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

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



Revision: 6099
          http://sourceforge.net/p/ledger-smb/code/6099
Author:   einhverfr
Date:     2013-09-29 14:28:48 +0000 (Sun, 29 Sep 2013)
Log Message:
-----------
Fixing javascript errors

Modified Paths:
--------------
    trunk/UI/lib/Loader.js
    trunk/UI/lib/TabularForm.js

Modified: trunk/UI/lib/Loader.js
===================================================================
--- trunk/UI/lib/Loader.js	2013-09-29 14:11:36 UTC (rev 6098)
+++ trunk/UI/lib/Loader.js	2013-09-29 14:28:48 UTC (rev 6099)
@@ -46,7 +46,7 @@
                DIV: {
                '__default': function(){ return undefined; },
                  'tabular': function(node){
-                                        return new tabular(null, node);
+                                        return new tabular({}, node);
                             }
              
                     },

Modified: trunk/UI/lib/TabularForm.js
===================================================================
--- trunk/UI/lib/TabularForm.js	2013-09-29 14:11:36 UTC (rev 6098)
+++ trunk/UI/lib/TabularForm.js	2013-09-29 14:28:48 UTC (rev 6099)
@@ -82,23 +82,26 @@
             if (domNode !== undefined){
                 // Number of columns
                 var class_str = " " + domNode.className + " ";
-                console.log(class_str);
-                var classes = class_str.match('/ col-\d+ /');
-                classes[0].replace('s/col-//');
-                this.cols=classes[0];
+                var classes = class_str.match(/ col-\d+ /);
+                if (classes){ 
+                    this.cols = classes[0].replace(/ col-(\d+) /, "$1");
+                }
 
                 //resize to one column on a size of....
                 classes = class_str.match('/ virtsize-\w+ /');
-                classes[0].replace('s/virtsize-//');
-                this.vertsize = classes[0];
+                if (classes){
+                    this.vertsize = classes[0].replace(/ virtsize-(\w+) /, "$1");               }
 
                 //labels go vertical on a size of.....
                 classes = class_str.match('/ virtlabel-\w+ /');
-                classes[0].replace('s/virtlabel-//');
-                this.vertlabelsize = classes[0];
+                if (classes){
+                    this.vertlabelsize = 
+                            classes[0].replace(/ virtlabel-(\w+) /, "$1");
+                }
             }
         },
         postCreate: function(){
+            console.log('postCreate');
             this.inherited(arguments);
             query('*', this.domNode).forEach(TFRenderElement(dnode)); 
         },

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