[Laszlo-checkins] r9322 - in openlaszlo/trunk/lps/components: base lz

bargull@openlaszlo.org bargull at openlaszlo.org
Sat May 24 11:17:41 PDT 2008


Author: bargull
Date: 2008-05-24 11:17:36 -0700 (Sat, 24 May 2008)
New Revision: 9322

Modified:
   openlaszlo/trunk/lps/components/base/basedatepicker.lzx
   openlaszlo/trunk/lps/components/base/basedatepickerday.lzx
   openlaszlo/trunk/lps/components/lz/datepicker.lzx
Log:
Change 20080522-bargull-ayF by bargull at dell--p4--2-53 on 2008-05-22 00:42:47
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: fix'n update datepicker

New Features:

Bugs Fixed: LPP-5191

Technical Reviewer: promanik
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
My previous changeset didn't worked well for dhtml, so here's the one.
Additionally, I've fixed the debugger-warnings for datepicker.


Tests:



Modified: openlaszlo/trunk/lps/components/base/basedatepicker.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basedatepicker.lzx	2008-05-24 14:20:11 UTC (rev 9321)
+++ openlaszlo/trunk/lps/components/base/basedatepicker.lzx	2008-05-24 18:17:36 UTC (rev 9322)
@@ -174,22 +174,15 @@
 
             this.selecteddatepickerday = d;
 
-            if( this.selecteddate == null ) { 
+            //only set a new selected date if it has changed or wasn't yet set
+            var seldate = this.selecteddate;
+            if( seldate == null || 
+                    (seldate.getDate() != d.daynum ||
+                     seldate.getFullYear() != this.showingyear ||
+                     seldate.getMonth() != this.showingmonth) ) { 
                 this.setAttribute('selecteddate', new Date( this.showingyear,
                                                             this.showingmonth,
                                                             d.daynum ) );
-            } else { 
-
-                //only set a new selected date if it has changed
-                if( this.selecteddate.getDate() != d.daynum ||
-                    this.selecteddate.getFullYear() != this.showingyear ||
-                    this.selecteddate.getMonth() != this.showingmonth ) { 
-
-                    this.selecteddate.setDate( d.daynum );
-                    this.selecteddate.setYear( this.showingyear );
-                    this.selecteddate.setMonth( this.showingmonth ); 
-                    this.setAttribute('selecteddate', this.selecteddate );
-                }
             }
         ]]>
         </method>

Modified: openlaszlo/trunk/lps/components/base/basedatepickerday.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basedatepickerday.lzx	2008-05-24 14:20:11 UTC (rev 9321)
+++ openlaszlo/trunk/lps/components/base/basedatepickerday.lzx	2008-05-24 18:17:36 UTC (rev 9322)
@@ -40,17 +40,21 @@
             } 
         </handler> 
 
-        <handler name="onmousedown" method="buttonpush" />
+        <handler name="onmousedown" >
+            this.buttonpush();
+        </handler>
         <!--- This method is called when this day has focus, and the 
               enter key is pushed. 
               @keywords protected --> 
-        <method name="buttonpush" args="ignore" />
+        <method name="buttonpush" />
 
-        <handler name="onmouseup" method="buttonrelease" />
+        <handler name="onmouseup" >
+            this.buttonrelease();
+        </handler>
         <!--- This method is called when this day has focus, and the 
               enter key is released. 
               @keywords protected --> 
-        <method name="buttonrelease" args="ignore" />
+        <method name="buttonrelease" />
 
         <doc>
           <tag name="shortdesc"><text>An abstract class representing a day for use with <classname>basedatepicker</classname></text></tag>

Modified: openlaszlo/trunk/lps/components/lz/datepicker.lzx
===================================================================
--- openlaszlo/trunk/lps/components/lz/datepicker.lzx	2008-05-24 14:20:11 UTC (rev 9321)
+++ openlaszlo/trunk/lps/components/lz/datepicker.lzx	2008-05-24 18:17:36 UTC (rev 9322)
@@ -104,11 +104,11 @@
 
         <handler name="onselected"> 
             if( this.selected ) { 
-                this.buttonview.setVisible( true );  
+                this.buttonview.setAttribute('visible', true );  
                 this.buttonview.setAttribute('frame', 3 );
             } else { 
                 this.buttonview.setAttribute('frame', 1 ); 
-                this.buttonview.setVisible( false );
+                this.buttonview.setAttribute('visible', false );
             }
         </handler>
 
@@ -167,8 +167,7 @@
 
         </basecomponent>
         
-        <text y="$once{parent.height/2 - this.height/2}"
-              text="${classroot.daynum}" 
+        <text text="${classroot.daynum}" 
               resize="true" 
               align="center" 
               valign="middle"



More information about the Laszlo-checkins mailing list