[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6702] trunk/UI



Revision: 6702
          http://sourceforge.net/p/ledger-smb/code/6702
Author:   einhverfr
Date:     2014-01-29 07:02:14 +0000 (Wed, 29 Jan 2014)
Log Message:
-----------
Payment select all checkbox now works, closing bug 991

Modified Paths:
--------------
    trunk/UI/lib/Loader.js
    trunk/UI/payments/payments_detail.html
    trunk/UI/payments/payments_detail.js

Modified: trunk/UI/lib/Loader.js
===================================================================
--- trunk/UI/lib/Loader.js	2014-01-29 06:17:02 UTC (rev 6701)
+++ trunk/UI/lib/Loader.js	2014-01-29 07:02:14 UTC (rev 6702)
@@ -33,14 +33,16 @@
     'dijit/form/TextBox',
     //row2
     'dijit/form/Select',
-    'dijit/form/Button'
+    'dijit/form/Button',
+    //more
+    'dojo/on'
     ],
 function(
     // base
     declare, registry, parser, query, ready, wbase, construct,
     // widgets
     tabular, textarea, datebox, checkbox, radio, textbox, 
-    select, button) {
+    select, button, on) {
     return declare(wbase, {
         nodeMap: { // hierarchy nodeName->class, input type treated as class
                    // for INPUT elements, type beats class.
@@ -255,12 +257,17 @@
             });
             query('*').forEach(function(dnode){
                 ready(function(){
+                   var onclick = dnode.onclick;
                    widget = myself.createWidget(dnode);
                    if (undefined !== widget){
                        ready(function(){
                            registry.byId(dnode.id).startup();
                         });
                    }
+                   if (null !== onclick){
+                       alert(onclick); 
+                       ready(function(){ on(dnode, 'click', onclick)});
+                   }
                 });
             });
         }

Modified: trunk/UI/payments/payments_detail.html
===================================================================
--- trunk/UI/payments/payments_detail.html	2014-01-29 06:17:02 UTC (rev 6701)
+++ trunk/UI/payments/payments_detail.html	2014-01-29 07:02:14 UTC (rev 6702)
@@ -239,6 +239,7 @@
 			name = "id_$r.contact_id"
 			value = r.contact_id
 			checked = (r.selected) ? "checked" : undef 
+                        class = 'contactcb'
 			
 		} ?>
 		<?lsmb r.econtrol_code ?> -- 

Modified: trunk/UI/payments/payments_detail.js
===================================================================
--- trunk/UI/payments/payments_detail.js	2014-01-29 06:17:02 UTC (rev 6701)
+++ trunk/UI/payments/payments_detail.js	2014-01-29 07:02:14 UTC (rev 6702)
@@ -45,6 +45,11 @@
                         var cid = document.getElementById('contact-' + i).value;
                         var rowcb = document.getElementById('id-' + cid);
                         rowcb.checked = cb.checked;
+                        require(['dijit/registry'], function(registry){
+                               var widget = registry.byId(rowcb.id);
+                               console.log(widget);
+                               widget.set('checked', cb.checked);
+                        });
                     }
                  }, false);
 }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits