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

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



Revision: 6087
          http://sourceforge.net/p/ledger-smb/code/6087
Author:   einhverfr
Date:     2013-09-26 11:39:33 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Fully refactored tab code, working, box sizes and active divs passed in as startup() parameters

Modified Paths:
--------------
    trunk/UI/Contact/contact.js
    trunk/UI/Contact/tabs.js
    trunk/UI/lib/TabSet.js

Modified: trunk/UI/Contact/contact.js
===================================================================
--- trunk/UI/Contact/contact.js	2013-09-26 10:27:51 UTC (rev 6086)
+++ trunk/UI/Contact/contact.js	2013-09-26 11:39:33 UTC (rev 6087)
@@ -5,11 +5,11 @@
          "dijit/layout/ContentPane",
          'lsmb/Contact/tabs',
           'dijit/registry',
+          'dojo/window',
          'dojo/ready'],
-       function(query, dom, tc, cp, obj, registry){
+       function(query, dom, tc, cp, obj, registry, win){
            var tabs = new tc({}, dom.byId('contact_tabs'));
-           tabs.startup();
-           obj.init();
+           tabs.startup(activeDiv, win.getBox());
        } 
  
 );

Modified: trunk/UI/Contact/tabs.js
===================================================================
--- trunk/UI/Contact/tabs.js	2013-09-26 10:27:51 UTC (rev 6086)
+++ trunk/UI/Contact/tabs.js	2013-09-26 11:39:33 UTC (rev 6087)
@@ -9,10 +9,6 @@
           if (activeDiv) {
             ready(function() {
               var td = registry.byId('contact_tabs');
-              var ad = registry.byId(activeDiv);
-              console.log(td,ad,activeDiv);
-              td.selectChild(ad);
-
             });
           }
         }

Modified: trunk/UI/lib/TabSet.js
===================================================================
--- trunk/UI/lib/TabSet.js	2013-09-26 10:27:51 UTC (rev 6086)
+++ trunk/UI/lib/TabSet.js	2013-09-26 11:39:33 UTC (rev 6087)
@@ -6,8 +6,9 @@
       return declare('dijit/layout/TabContainer',
         [TabContainer],
         {
-          startup: function() {
+          startup: function(activeDiv, boxSize) {
            var myself = this; // needed for AMD query usage below.
+           var active;
            require (['dojo/query', 
                      'dijit/layout/ContentPane', 
                      'dijit/registry', 'dojo/domReady!'],
@@ -21,11 +22,14 @@
                var t = registry.byId(cnode.id);
                if (t !== undefined){
                    myself.addChild(t);
+                   t.startup();
                }
                });
+               var ad = registry.byId(activeDiv);
+               myself.selectChild(ad);
             });
             this.inherited(arguments);
-            
+            this.resize(boxSize);
           }
           
         });

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=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits