[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6105] trunk/UI
- Subject: SF.net SVN: ledger-smb:[6105] trunk/UI
- From: ..hidden..
- Date: Wed, 2 Oct 2013 08:16:17 +0000
Revision: 6105
http://sourceforge.net/p/ledger-smb/code/6105
Author: einhverfr
Date: 2013-10-02 08:16:13 +0000 (Wed, 02 Oct 2013)
Log Message:
-----------
Disabling TabularForm for now
Modified Paths:
--------------
trunk/UI/lib/Loader.js
trunk/UI/lib/TabularForm.js
trunk/UI/login.html
trunk/UI/login.js
Modified: trunk/UI/lib/Loader.js
===================================================================
--- trunk/UI/lib/Loader.js 2013-10-01 13:16:15 UTC (rev 6104)
+++ trunk/UI/lib/Loader.js 2013-10-02 08:16:13 UTC (rev 6105)
@@ -22,6 +22,7 @@
'dojo/query',
'dojo/ready',
'dijit/_WidgetBase',
+ 'dojo/dom-construct',
// widgets
// row1
'lsmb/lib/TabularForm',
@@ -36,7 +37,7 @@
],
function(
// base
- declare, registry, parser, query, ready, wbase,
+ declare, registry, parser, query, ready, wbase, construct,
// widgets
tabular, textarea, datebox, checkbox, radio, textbox,
select, button) {
@@ -46,7 +47,15 @@
DIV: {
'__default': function(){ return undefined; },
'tabular': function(node){
- return new tabular({}, node);
+ //disabling for now
+ return undefined;
+ return new tabular({
+ showLabels: true,
+ labelWidth: 100,
+ customClass: 'lsmbtabular',
+ orientation: 'vert',
+ cols: 1
+ }, node);
}
},
@@ -54,7 +63,7 @@
return new textarea(
{ "name": input.name,
"value": input.innerHTML,
- "label": input.title,
+ "title": input.title,
"cols": input.cols,
"rows": input.rows}, input);
}
@@ -75,6 +84,7 @@
}
return new datebox({
"label": input.title,
+ "title": input.title,
"value": val,
"name": input.name,
"id": input.id,
@@ -108,6 +118,7 @@
+ 'em';
}
return new textbox({
+ "title": input.title,
"label": input.title,
"value": input.value,
"name": input.name,
@@ -142,6 +153,7 @@
+ 'em';
}
return new textbox({
+ "title": input.title,
"label": input.title,
"value": input.value,
"name": input.name,
@@ -168,7 +180,7 @@
return new select(
{ "name": input.name,
"options": optlist,
- "label": input.title,
+ "title": input.title,
"id": input.id
} , input);
}
@@ -179,14 +191,15 @@
{ "name": input.name,
"type": input.type,
"id": input.id,
- "label": input.innerHTML,
+ "title": input.innerHTML,
"value": input.value
}, input
);
}
}
},
- constructor: function(){},
+ constructor: function(){
+ },
// createWidget(domNode)
//
// Creates a widget from a domNode. This is used in a number of cases,
@@ -199,7 +212,7 @@
return dnode.size * 0.6 + 'em';
},
createWidget: function(dnode) {
- if (undefined !== registry.byNode(dnode)){
+ if (undefined !== registry.byId(dnode.id)){
return undefined;
}
if (undefined == this.nodeMap[dnode.nodeName]){
@@ -233,14 +246,16 @@
if (declarative){
return parser.parse();
}
+ query('.tabular label').forEach(function(dnode){
+ construct.destroy(dnode);
+ });
query('*').forEach(function(dnode){
- ready(function(){
- widget = myself.createWidget(dnode);
- if (undefined !== widget){
- console.log('startup', dnode);
- widget.startup();
- }
- });
+ ready(function(){
+ widget = myself.createWidget(dnode);
+ if (undefined !== widget){
+ widget.startup();
+ }
+ });
});
}
});
Modified: trunk/UI/lib/TabularForm.js
===================================================================
--- trunk/UI/lib/TabularForm.js 2013-10-01 13:16:15 UTC (rev 6104)
+++ trunk/UI/lib/TabularForm.js 2013-10-02 08:16:13 UTC (rev 6105)
@@ -67,10 +67,11 @@
'dijit/layout/ContentPane',
'dojo/query',
'dojo/window',
- 'dojo/_base/declare'
+ 'dojo/_base/declare',
+ 'dijit/form/TextBox',
],
function(TableContainer, dom, cls, registry, cp, query, win,
- declare)
+ declare, testbox)
{
return declare('lsmb/lib/TabularForm',
[TableContainer],
@@ -98,26 +99,22 @@
classes[0].replace(/ virtlabel-(\w+) /, "$1");
}
}
- },
- postCreate: function(){
+ console.log(this);
var myself = this;
- require(['lsmb/lib/Loader', 'dojo/ready'],
- function(l, ready){
- ready(function(){
+ require(['lsmb/lib/Loader', 'dojo/ready', 'dojo/dom-construct'],
+ function(l, ready, construct){
+ ready(80, function(){
loader = new l;
- query('*', this.domNode).forEach(function(dnode){
+ query('*', myself.domNode).forEach(function(dnode){
myself.TFRenderElement(dnode)
+
});
- this.inherited(arguments);
});
});
},
TFRenderElement: function(dnode){
var myself = this;
if (registry.byId(dnode.id)){
- widget = registry.byId(dnode.id);
- myself.addChild(widget);
- widget.startup();
return;
}
if (cls.contains(dnode, 'input-row')){
@@ -126,8 +123,9 @@
else {
var widget = loader.createWidget(dnode);
if (undefined !== widget) {
+ console.log(widget);
+ myself.addChild(widget);
widget.startup();
- myself.addChild(widget);
}
}
},
@@ -143,6 +141,10 @@
this.addChild(spc);
}
},
+ startup: function(){
+ this.inherited(arguments);
+ this.layout();
+ },
/*
resize: function(){
//TODO: this needs to detect container size and restructure
Modified: trunk/UI/login.html
===================================================================
--- trunk/UI/login.html 2013-10-01 13:16:15 UTC (rev 6104)
+++ trunk/UI/login.html 2013-10-02 08:16:13 UTC (rev 6105)
@@ -28,7 +28,7 @@
<a href="http://www.ledgersmb.org/" target="_top"><img src="images/ledgersmb.png" class="logo" alt="LedgerSMB Logo" /></a>
<h1 class="login" align="center"><?lsmb text("LedgerSMB [_1]", VERSION) ?></h1>
<div align="center">
- <div id="company_div" class="tabular col-1">
+ <div id="company_div" class="tabular1 col-1">
<div class="noshow">
<div>
<?lsmb PROCESS input
Modified: trunk/UI/login.js
===================================================================
--- trunk/UI/login.js 2013-10-01 13:16:15 UTC (rev 6104)
+++ trunk/UI/login.js 2013-10-02 08:16:13 UTC (rev 6105)
@@ -17,7 +17,8 @@
var password = document.login.password.value;
var company = document.login.company.value;
var action = document.login.action.value;
- //alert('document.login.company.value='+document.login.company.value);
+ // console.log(password, company, username);
+ // alert('document.login.company.value='+document.login.company.value);
http.open("get", 'login.pl?action=authenticate&company='+company, true, username, password);
http.onreadystatechange = function(){
if (http.readyState != 4){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits