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

SF.net SVN: ledger-smb:[6092] trunk/UI/lib/TabularForm.js



Revision: 6092
          http://sourceforge.net/p/ledger-smb/code/6092
Author:   einhverfr
Date:     2013-09-28 04:24:42 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
outline of the TabularForm code.

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

Modified: trunk/UI/lib/TabularForm.js
===================================================================
--- trunk/UI/lib/TabularForm.js	2013-09-28 03:32:02 UTC (rev 6091)
+++ trunk/UI/lib/TabularForm.js	2013-09-28 04:24:42 UTC (rev 6092)
@@ -0,0 +1,76 @@
+/* lsmb/lib/TabularForm
+ * A tabular-form widget for LedgerSMB with some additional features
+ * (loosely) inspired by Twitter Bootstrap(TM).
+ *
+ * Based on dojox/layout/TableContainer
+ *
+ * This widget is intended to be a generalized tabular data entry form layout
+ * system.
+ *
+ * NODE CLASSES
+ *
+ * TabularForm supports a number of classes to help manage layouts for different
+ * screen sizes.  While this is somewhat inspired by Twitter Bootstrap(TM), the
+ * properties assign to the table instead of the grid column.  In other words
+ * because this is for data entry forms, we simply manage the form as a whole 
+ * and resize accordingly.  This is important because we typically want to 
+ * preserve the logical structure of the form when we resize.
+ *
+ * For columns, we support the following classes.  Each is the number of 
+ * columns of inputs supported, so would typically be double (i.e. col-1 is 
+ * one column of inputs plus one column of labels).
+ *
+ * col-1
+ * col-2
+ * col-3
+ * col-4
+ *
+ * cols can also be passed in via the constructor.
+ *
+ * For resizing support we support the following:
+ *
+ * vertsize-small
+ * vertsize-med
+ * vertsize-mobile
+ *
+ * mobile = width <= 480px wide
+ * small = width 480-768 px wide
+ * med = width 768-992px wide
+ *
+ * This allows generally three modes:
+ *
+ * 1.  Standard (larger than size), multi-columns supported, labels horizontal
+ * 2.  Single column (within size), single columns, label horizontal
+ * 3.  Small (smaller than size), single column, labels vertical.
+ *
+ * Note that for nested TabularForm components, they are resized independently.
+ *
+ * LAYOUT RULES
+ * 
+ * 1.  class input_row contains a group of inputs which are rendered together 
+ * on one or more rows.  Rows are terminated after an input-row completes.
+ * 2.  buttons are contained inside a content pane to suppress labels.
+ *
+ */
+
+define([
+    'dojox/layout/TableContainer',
+    'dojo/domClass',
+    'dijit/registry',
+    'dojo/query',
+    'dojo/_base/declare'
+    ],
+    function(TableContainer, cls, registry, query, declare) {
+      return declare('dojox/layout/TableContainer',
+        [TableContainer],
+        {
+        constructor: function (mixIn, domNode){
+            
+        },
+        postCreate: function(){
+        },
+        resize: function(){
+        }
+        });
+     });
+

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