Revision: 3768
          http://vexi.svn.sourceforge.net/vexi/?rev=3768&view=rev
Author:   clrg
Date:     2009-12-24 04:48:39 +0000 (Thu, 24 Dec 2009)

Log Message:
-----------
Various minor fixes

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/scrollpane.t
    trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/combo.t
    trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/datefield.t
    trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/datetime.t
    trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/scrollpane.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/scrollpane.t 
2009-12-14 17:48:12 UTC (rev 3767)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/scrollpane.t 
2009-12-24 04:48:39 UTC (rev 3768)
@@ -41,20 +41,34 @@
             
             /** autohide th_hscroll */
             autohidehorizontal ++= function(a) {
-                if (v == autohidehorizontal) return;
+                if (v == autohidehorizontal) {
+                    return;
+                }
                 v.autohide = a;
                 cascade = a;
             }
             
             /** toggle horizontal scrollbar */
             scrollhorizontal ++= function(s) {
-                if (v.display != s) v.display = s;
-                if (s and v.viewport != th_viewport) v.viewport = th_viewport;
-                if (!s and v.viewport == th_viewport) v.viewport = null;
-                if (!th_viewport) return;
+                if (v.display != s) {
+                    v.display = s;
+                }
+                if (s and v.viewport != th_viewport) {
+                    v.viewport = th_viewport;
+                }
+                if (!s and v.viewport == th_viewport) {
+                    v.viewport = null;
+                }
+                if (!th_viewport) {
+                    return;
+                }
                 if (!s) {
-                    if (scrollhorizontal) th_viewport[0].contentwidth ++= 
constrainPaneH;
-                } else th_viewport[0].contentwidth --= constrainPaneH;
+                    if (scrollhorizontal) {
+                        th_viewport[0].contentwidth ++= constrainPaneH;
+                    }
+                } else {
+                    th_viewport[0].contentwidth --= constrainPaneH;
+                }
                 cascade = s;
             }
         }
@@ -65,20 +79,34 @@
             
             /** autohide th_vscroll */
             autohidevertical ++= function(a) {
-                if (a == autohidevertical) return;
+                if (a == autohidevertical) {
+                    return;
+                }
                 v.autohide = a;
                 cascade = a;
             }
             
             /** toggle vertical scrollbar */
             scrollvertical ++= function(s) {
-                if (v.display != s) v.display = s;
-                if (s and v.viewport != th_viewport) v.viewport = th_viewport;
-                if (!s and v.viewport == th_viewport) v.viewport = null;
-                if (!th_viewport) return;
+                if (v.display != s) {
+                    v.display = s;
+                }
+                if (s and v.viewport != th_viewport) {
+                    v.viewport = th_viewport;
+                }
+                if (!s and v.viewport == th_viewport) {
+                    v.viewport = null;
+                }
+                if (!th_viewport) {
+                    return;
+                }
                 if (!s) {
-                    if (scrollvertical) th_viewport[0].contentheight ++= 
constrainPaneV;
-                } else th_viewport[0].contentheight --= constrainPaneV;
+                    if (scrollvertical) {
+                        th_viewport[0].contentheight ++= constrainPaneV;
+                    }
+                } else {
+                    th_viewport[0].contentheight --= constrainPaneV;
+                }
                 cascade = s;
             }
         }
@@ -87,17 +115,25 @@
         th_viewport ++= function(v) {
             // clean up existing viewport
             if (th_viewport) {
-                if (!scrollhorizontal)
+                if (!scrollhorizontal) {
                     th_viewport[0].width --= constrainPaneH;
-                if (!scrollvertical)
+                }
+                if (!scrollvertical) {
                     th_viewport[0].height --= constrainPaneV;
+                }
             }
             // set up new viewport
             cascade = v;
-            if (scrollhorizontal) th_hscroll.viewport = v;
-            else v[0].width ++= constrainPaneH;
-            if (scrollvertical) th_vscroll.viewport = v;
-            else v[0].height ++= constrainPaneV;
+            if (scrollhorizontal) {
+                th_hscroll.viewport = v;
+            } else {
+                v[0].width ++= constrainPaneH;
+            }
+            if (scrollvertical) {
+                th_vscroll.viewport = v;
+            } else {
+                v[0].height ++= constrainPaneV;
+            }
         }
         
         // assign static traps

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/combo.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/combo.t   
2009-12-14 17:48:12 UTC (rev 3767)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/combo.t   
2009-12-24 04:48:39 UTC (rev 3768)
@@ -19,8 +19,8 @@
                 </ui:box>
             </button>
         </bevel>
-        <lib:layout.border id="popbox" border="black" depth="1">
-            <scrollpane id="scroll" autohidevertical="true" fill="white" 
scrollhorizontal="false">
+        <lib:layout.border id="popbox" border="black" fill="white" depth="1">
+            <scrollpane id="scroll" autohidevertical="true" 
scrollhorizontal="false">
                 <ui:box id="content" vshrink="true" />
             </scrollpane>
         </lib:layout.border>

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/datefield.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/datefield.t       
2009-12-14 17:48:12 UTC (rev 3767)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/datefield.t       
2009-12-24 04:48:39 UTC (rev 3768)
@@ -46,6 +46,8 @@
         thisbox.dayview   = $day;
         thisbox.monthview = $month;
         thisbox.yearview  = $year;
+        thisbox.sep1      = $sep1;
+        thisbox.sep2      = $sep2;
         thisbox.v_popbox  = $popbox;
         thisbox.v_textbox = false;
         

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/datetime.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/datetime.t        
2009-12-14 17:48:12 UTC (rev 3767)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/datetime.t        
2009-12-24 04:48:39 UTC (rev 3768)
@@ -21,8 +21,11 @@
         
         thisbox.date ++= function() {
             var dstr = $date.value+' '+$time.value;
-            try { return vexi.date(dstr); }
-            catch(e) { throw "invalid date string: "+d; }
+            try {
+                return vexi.date(dstr);
+            } catch(e) {
+                throw "invalid date string: "+d;
+            }
         }
         
         thisbox.enabled ++= function(v) {
@@ -33,33 +36,35 @@
         
         thisbox.value ++= function(v) {
             switch (typeof(v)) {
-                case "string":
-                    var vlc = v.toLowerCase();
-                    if (vlc=="today" or vlc=="now") {
-                        $date.value = "today";
-                        $time.value = "now";
-                        return;
-                    }
-                    // expect a string in "date time" format
-                    // e.g. "YYYY-MM-DD HH:MM:SS.MS"
-                    // REMARK: we don't use the date object to begin with
-                    // because basically it isn't very versatile
-                    var dt = v.split(' ');
-                    if (dt.length==2) {
-                        $date.value = dt[0];
-                        $time.value = dt[1];
-                        return;
-                    }
-                    v = vexi.date(v);
-                    if (v+""=="Invalid Date") throw "Invalid Date";
-                    // purposefully fall through...
-                case "date":
-                case "null":
-                    $date.value = v;
-                    $time.value = v;
-                    break;
-                default:
-                    throw "unsupported datetime type '"+typeof(v)+"'";
+            case "string":
+                var vlc = v.toLowerCase();
+                if (vlc=="today" or vlc=="now") {
+                    $date.value = "today";
+                    $time.value = "now";
+                    return;
+                }
+                // expect a string in "date time" format
+                // e.g. "YYYY-MM-DD HH:MM:SS.MS"
+                // REMARK: we don't use the date object to begin with
+                // because basically it isn't very versatile
+                var dt = v.split(' ');
+                if (dt.length==2) {
+                    $date.value = dt[0];
+                    $time.value = dt[1];
+                    return;
+                }
+                v = vexi.date(v);
+                if (v+""=="Invalid Date") {
+                    throw "Invalid Date";
+                }
+                // purposefully fall through...
+            case "date":
+            case "null":
+                $date.value = v;
+                $time.value = v;
+                break;
+            default:
+                throw "unsupported datetime type '"+typeof(v)+"'";
             }
             return;
         }
@@ -67,9 +72,15 @@
         thisbox.value ++= function() {
             var d = $date.value;
             var t = $time.value;
-            if (d==null and t==null) return null;
-            if (t==null) return d;
-            if (d==null) return t;
+            if (d==null and t==null) {
+                return null;
+            }
+            if (t==null) {
+                return d;
+            }
+            if (d==null) {
+                return t;
+            }
             return d+' '+t;
         }
         

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t  
2009-12-14 17:48:12 UTC (rev 3767)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/theme/classic/option.t  
2009-12-24 04:48:39 UTC (rev 3768)
@@ -19,8 +19,8 @@
                 </ui:box>
             </button>
         </bevel>
-        <lib:layout.border id="popbox" border="black" depth="1">
-            <scrollpane id="scroll" autohidevertical="true" fill="white" 
scrollhorizontal="false">
+        <lib:layout.border id="popbox" border="black" fill="white" depth="1">
+            <scrollpane id="scroll" autohidevertical="true" 
scrollhorizontal="false">
                 <ui:box id="content" vshrink="true" />
             </scrollpane>
         </lib:layout.border>


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

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to