Revision: 1537
http://mrbs.svn.sourceforge.net/mrbs/?rev=1537&view=rev
Author: cimorrison
Date: 2010-10-22 16:16:55 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
Fixed bug so that when All Day is checked the end time displays the correct
duration
Modified Paths:
--------------
mrbs/branches/from_to_bookings/web/Themes/default/header.inc
mrbs/branches/from_to_bookings/web/edit_entry.php
Modified: mrbs/branches/from_to_bookings/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/from_to_bookings/web/Themes/default/header.inc
2010-10-22 15:56:47 UTC (rev 1536)
+++ mrbs/branches/from_to_bookings/web/Themes/default/header.inc
2010-10-22 16:16:55 UTC (rev 1537)
@@ -399,16 +399,20 @@
var endIndex = endSelect.selectedIndex;
var endValue = parseInt(endSelect.options[endIndex].value);
- if (prevStartValue)
+ if (form.all_day.checked)
{
+ endValue = endOptions[nEndOptions - 1]['value'];
+ }
+ else if (prevStartValue)
+ {
endValue = endValue + (startValue - prevStartValue);
endValue = Math.min(endValue, endOptions[nEndOptions - 1]['value']);
}
prevStartValue = startValue;
var dateDifference = getDateDifference(form);
- startSelect.disabled = (dateDifference < 0);
- endSelect.disabled = (dateDifference < 0);
+ startSelect.disabled = startSelect.disabled || (dateDifference < 0);
+ endSelect.disabled = endSelect.disabled || (dateDifference < 0);
<?php // Destroy and rebuild the start select ?>
while (startSelect.options.length > 0)
Modified: mrbs/branches/from_to_bookings/web/edit_entry.php
===================================================================
--- mrbs/branches/from_to_bookings/web/edit_entry.php 2010-10-22 15:56:47 UTC
(rev 1536)
+++ mrbs/branches/from_to_bookings/web/edit_entry.php 2010-10-22 16:16:55 UTC
(rev 1537)
@@ -534,6 +534,7 @@
old_end = form.end_seconds.selectedIndex;
form.end_seconds.selectedIndex = form.end_seconds.options.length - 1;
form.end_seconds.disabled = true;
+ adjustSlotSelectors(form); // need to get the duration right
}
else // restore the old values and re-enable the inputs
{
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