Revision: 1573
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1573&view=rev
Author:   cimorrison
Date:     2010-11-02 16:22:45 +0000 (Tue, 02 Nov 2010)

Log Message:
-----------
Disabled the end date selector if the All Day checkbox is ticked.   (If you 
want to make an All Day booking for several days then it needs to be a Repeat 
booking)

Modified Paths:
--------------
    mrbs/branches/from_to_bookings/web/edit_entry.php

Modified: mrbs/branches/from_to_bookings/web/edit_entry.php
===================================================================
--- mrbs/branches/from_to_bookings/web/edit_entry.php   2010-11-02 15:34:16 UTC 
(rev 1572)
+++ mrbs/branches/from_to_bookings/web/edit_entry.php   2010-11-02 16:22:45 UTC 
(rev 1573)
@@ -523,6 +523,7 @@
 var old_hour = '<?php if (!$twentyfourhour_format && ($start_hour > 12)){ echo 
($start_hour - 12);} else { echo $start_hour;} ?>';
 var old_minute = '<?php echo $start_min;?>';
 var old_period = 0; // This is the index number
+var old_end_datepicker, old_end_datepicker_alt_day, 
old_end_datepicker_alt_month, old_end_datepicker_alt_year;
 
 // Executed when the user clicks on the all_day checkbox.
 function OnAllDayClick(allday)
@@ -538,6 +539,19 @@
     old_end = form.end_seconds.selectedIndex;
     form.end_seconds.selectedIndex = form.end_seconds.options.length - 1;
     form.end_seconds.disabled = true;
+    
+    old_end_datepicker_alt_day = form.end_datepicker_alt_day.value;
+    form.end_datepicker_alt_day.value = form.start_datepicker_alt_day.value;
+    
+    old_end_datepicker_alt_month = form.end_datepicker_alt_month.value;
+    form.end_datepicker_alt_month.value = 
form.start_datepicker_alt_month.value;
+    
+    old_end_datepicker_alt_year = form.end_datepicker_alt_year.value;
+    form.end_datepicker_alt_year.value = form.start_datepicker_alt_year.value;
+    
+    old_end_datepicker = form.end_datepicker.value;
+    form.end_datepicker.value = form.start_datepicker.value;
+    form.end_datepicker.disabled = true;
     adjustSlotSelectors(form); // need to get the duration right
   }
   else  // restore the old values and re-enable the inputs
@@ -546,6 +560,11 @@
     form.start_seconds.disabled = false;
     form.end_seconds.selectedIndex = old_end;
     form.end_seconds.disabled = false;
+    form.end_datepicker_alt_day.value = old_end_datepicker_alt_day;
+    form.end_datepicker_alt_month.value = old_end_datepicker_alt_month;
+    form.end_datepicker_alt_year.value = old_end_datepicker_alt_year;
+    form.end_datepicker.value = old_end_datepicker;
+    form.end_datepicker.disabled = false;
   }
 }
 //]]>


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

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to