[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6104] trunk/UI
- Subject: SF.net SVN: ledger-smb:[6104] trunk/UI
- From: ..hidden..
- Date: Tue, 1 Oct 2013 13:16:17 +0000
Revision: 6104
http://sourceforge.net/p/ledger-smb/code/6104
Author: einhverfr
Date: 2013-10-01 13:16:15 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
Moving AccountSelector out of the single load handler so that we don't get prompted for credentials on the login screen.
Modified Paths:
--------------
trunk/UI/lib/Loader.js
trunk/UI/lib/TabularForm.js
trunk/UI/login.html
Modified: trunk/UI/lib/Loader.js
===================================================================
--- trunk/UI/lib/Loader.js 2013-10-01 08:16:02 UTC (rev 6103)
+++ trunk/UI/lib/Loader.js 2013-10-01 13:16:15 UTC (rev 6104)
@@ -30,7 +30,6 @@
'dijit/form/CheckBox',
'dijit/form/RadioButton',
'dijit/form/TextBox',
- 'lsmb/accounts/AccountSelector',
//row2
'dijit/form/Select',
'dijit/form/Button'
@@ -39,7 +38,7 @@
// base
declare, registry, parser, query, ready, wbase,
// widgets
- tabular, textarea, datebox, checkbox, radio, textbox, accountselector,
+ tabular, textarea, datebox, checkbox, radio, textbox,
select, button) {
return declare(wbase, {
nodeMap: { // hierarchy nodeName->class, input type treated as class
@@ -119,9 +118,17 @@
}, input);
},
'AccountBox': function(input){
+ // Since this requires db components, it
+ // cannot be preloaded on every page.
+ require(['lsmb/accounts/AccountSelector',
+ 'dojo/ready'],
+ function(accountselector, ready){
+ ready(function(){
return new accountselector({
"name": input.name
}, input);
+ });
+ });
},
'__default': function(input){
if (undefined !== registry.byNode(input)){
Modified: trunk/UI/lib/TabularForm.js
===================================================================
--- trunk/UI/lib/TabularForm.js 2013-10-01 08:16:02 UTC (rev 6103)
+++ trunk/UI/lib/TabularForm.js 2013-10-01 13:16:15 UTC (rev 6104)
@@ -100,24 +100,26 @@
}
},
postCreate: function(){
- this.inherited(arguments);
var myself = this;
- query('*', this.domNode).forEach(function(dnode){
+ require(['lsmb/lib/Loader', 'dojo/ready'],
+ function(l, ready){
+ ready(function(){
+ loader = new l;
+ query('*', this.domNode).forEach(function(dnode){
myself.TFRenderElement(dnode)
- });
+ });
+ this.inherited(arguments);
+ });
+ });
},
TFRenderElement: function(dnode){
var myself = this;
- require(['lsmb/lib/Loader', 'dojo/ready'],
- function(l, ready){
- ready(function(){
if (registry.byId(dnode.id)){
widget = registry.byId(dnode.id);
myself.addChild(widget);
widget.startup();
return;
}
- loader = new l;
if (cls.contains(dnode, 'input-row')){
TFRenderRow(dnode);
}
@@ -128,8 +130,6 @@
myself.addChild(widget);
}
}
- });
- });
},
TFRenderRow: function (dnode){
var counter = 0;
@@ -143,10 +143,12 @@
this.addChild(spc);
}
},
+/*
resize: function(){
//TODO: this needs to detect container size and restructure
//accordingly. --CT
}
+*/
});
});
Modified: trunk/UI/login.html
===================================================================
--- trunk/UI/login.html 2013-10-01 08:16:02 UTC (rev 6103)
+++ trunk/UI/login.html 2013-10-01 13:16:15 UTC (rev 6104)
@@ -28,8 +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">
- <div class="tabular col-1">
+ <div id="company_div" class="tabular col-1">
<div class="noshow">
<div>
<?lsmb PROCESS input
@@ -66,7 +65,6 @@
value = company
accesskey="c" } ?>
</div>
- </div>
</div>
<button type="submit" name="action" value="login" accesskey="l" id="action-login"><?lsmb text('Login') ?></button>
</div>
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