Revision: 4219
          http://vexi.svn.sourceforge.net/vexi/?rev=4219&view=rev
Author:   mkpg2
Date:     2011-09-08 04:05:08 +0000 (Thu, 08 Sep 2011)
Log Message:
-----------
Modify foot. To act effectively as a separate non-scrolling body with a fixed 
number of rows. Ideally table would support multiple bodies with different 
characteristics to support this functionality in a more general manner.

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/table.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/foot.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/table.t
    trunk/org.vexi-vexi.widgets/src_main/vexi/widget/table/foot.t

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/table.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/table.t    
2011-09-02 19:39:37 UTC (rev 4218)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/table.t    
2011-09-08 04:05:08 UTC (rev 4219)
@@ -36,7 +36,7 @@
         var activeindex;
         var activefinal;
         var fakeviewport;
-        var realviewport;
+        thisbox.realviewport;
         
         thisbox.th_content;
         thisbox.th_head;
@@ -469,6 +469,23 @@
             }
         }
         
+        var setupRowContainer = function(c){
+            /** assign v_head automatically */
+            c.Children ++= function(r) {
+                if (r) {
+                    r.v_head = th_head;
+                } else {
+                    var oldr = trapee[trapname];
+                    if (oldr) {
+                        oldr.v_head = null;
+                    }
+                }
+                cascade = r;
+            };
+        
+        };
+        
+        
         /** set up table components */
         thisbox.v_container ++= function(v) {
             cascade = v;
@@ -516,7 +533,7 @@
                             }
                         }
                         cascade = h;
-                    }
+                    };
                     return;
                 }
                 
@@ -534,18 +551,7 @@
                     thisbox.focused ++= static.focusWrite;
                     thisbox.KeyPressed ++= static.keypressWrite;
                     
-                    /** assign v_head automatically */
-                    c.Children ++= function(r) {
-                        if (r) {
-                            r.v_head = th_head;
-                        } else {
-                            var oldr = trapee[trapname];
-                            if (oldr) {
-                                oldr.v_head = null;
-                            }
-                        }
-                        cascade = r;
-                    }
+                    setupRowContainer(c);
                     
                     // for access to relevant internal dimensions
                     c.rowheight ++= function() { return rowheight; }
@@ -562,15 +568,8 @@
                 if (c and c.v_table_type == "foot") {
                     th_foot = c;
                     th_footview[0] = c;
-                    // set up existing footers
-                    for (var i=0; c.numchildren > i; i++) {
-                        c[i].width = th_head[i].width;
-                    }
-                    // size new footers
-                    c.Children ++= function(e) {
-                        cascade = e;
-                        e.width = th_head[arguments.trapname].width;
-                    }
+                    
+                    setupRowContainer(c);
                     return;
                 }
                 

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/foot.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/foot.t  
2011-09-02 19:39:37 UTC (rev 4218)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/foot.t  
2011-09-08 04:05:08 UTC (rev 4219)
@@ -5,5 +5,6 @@
         <author>Charles Goodwin</author>
     </meta:doc>
     
-    <foot />
+    <ui:box v_table_type="foot"  orient="vertical"/>
+    
 </vexi>

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/table.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/table.t 
2011-09-02 19:39:37 UTC (rev 4218)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/table.t 
2011-09-08 04:05:08 UTC (rev 4219)
@@ -20,7 +20,7 @@
             </ui:box>
         </ui:box>
         
-        <ui:box>
+        <ui:box id="bodypart">
             <ui:box id="bodyport" align="topleft" fill="white" layout="place">
                 <ui:box id="bodyview" vshrink="true" />
             </ui:box>
@@ -40,6 +40,12 @@
             <ui:box id="bottominset" shrink="true" />
         </ui:box>
         
+        // HACK really should be controlled by existence of body element 
+        thisbox.displayBodyPart ++= function(v){
+            $bodypart.display = v;
+            vshrink = !v;
+        };
+        
         var content = v_content ? v_content : thisbox;
         content.orient = "vertical";
         

Modified: trunk/org.vexi-vexi.widgets/src_main/vexi/widget/table/foot.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/vexi/widget/table/foot.t       
2011-09-02 19:39:37 UTC (rev 4218)
+++ trunk/org.vexi-vexi.widgets/src_main/vexi/widget/table/foot.t       
2011-09-08 04:05:08 UTC (rev 4219)
@@ -9,5 +9,5 @@
         <usage>See vexi.widget.table.table</usage>
     </meta:doc>
     
-    <ui:box v_table_type="foot" />
+    <foot />
 </vexi>

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


------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to