Revision: 4191
          http://vexi.svn.sourceforge.net/vexi/?rev=4191&view=rev
Author:   clrg
Date:     2011-07-12 01:27:21 +0000 (Tue, 12 Jul 2011)

Log Message:
-----------
More monthfield tweaks / better poke

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t
    trunk/org.vexi-vexi.widgets/src_poke/poke/widgets/datefield.t

Modified: 
trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t    
2011-07-12 00:58:32 UTC (rev 4190)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t    
2011-07-12 01:27:21 UTC (rev 4191)
@@ -73,27 +73,21 @@
         $month.Press1 ++= selectPart;
         $year.Press1  ++= selectPart;
         
-        var setToday = function() {
-            value = new vexi.js.Date();
-        }
-        
         $more.action ++= function(v) {
-            if (year == null) {
-                setToday();
-            } else if (selected == $month) {
-                month = month==null ? 1 : month+1;
-            } else if (selected == $year) {
+            if (selected == $month and month != null) {
+                month = month==12 ? 1 : month+1;
+            } else
+            if (selected == $year and year != null) {
                 year = year+1;
             }
             return;
         }
         
         $less.action ++= function(v) {
-            if (year == null) {
-                setToday();
-            } else if (selected == $month) {
-                month = month==null ? 12 : month-1;
-            } else if (selected == $year) {
+            if (selected == $month and month != null) {
+                month = month==1 ? 12 : month-1;
+            } else
+            if (selected == $year and year != null) {
                 year = year-1;
             }
             return;
@@ -209,7 +203,7 @@
                     break;
                 case "enter":
                     if (value==null) {
-                        setToday();
+                        value = vexi.js.Date.today;
                     } else {
                         value = value;
                     }

Modified: trunk/org.vexi-vexi.widgets/src_poke/poke/widgets/datefield.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_poke/poke/widgets/datefield.t       
2011-07-12 00:58:32 UTC (rev 4190)
+++ trunk/org.vexi-vexi.widgets/src_poke/poke/widgets/datefield.t       
2011-07-12 01:27:21 UTC (rev 4191)
@@ -7,12 +7,32 @@
         </ui:box-->
         <ui:box>
             <w:monthfield id="date3" inputformat="MMYYYY" 
valueformat="MM-YYYY" />
-            <w:button id="put" text="Put" />
+            <w:button id="put" text="- Put ->" />
             <w:monthfield id="date4" inputformat="YYYYMM" 
valueformat="01-MM-YYYY" />
         </ui:box>
+        <ui:box>
+            <ui:box>
+                <w:button id="clear3" text="Clear" />
+            </ui:box>
+            <ui:box />
+            <ui:box>
+            <w:button id="clear4" text="Clear" />
+            </ui:box>
+        </ui:box>
+        <ui:box>
+            <ui:box id="date3_label" />
+            <ui:box />
+            <ui:box id="date4_label" />
+        </ui:box>
         
-        $put.action ++= function(v) { $date3.value = null; return; }
+        $clear3.action ++= function(v) { $date3.value = null; return; }
+        $clear4.action ++= function(v) { $date4.value = null; return; }
         
+        $put.action ++= function(v) { $date4.value = $date3.value; return; }
+        
+        $date3.value ++= function(v) { cascade = v; $date3_label.text = v; }
+        $date4.value ++= function(v) { cascade = v; $date4_label.text = v; }
+        
         vexi.ui.frame = thisbox;
         
     </ui:box>


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

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to