Revision: 2181
http://mrbs.svn.sourceforge.net/mrbs/?rev=2181&view=rev
Author: cimorrison
Date: 2011-11-21 05:13:37 +0000 (Mon, 21 Nov 2011)
Log Message:
-----------
Fixed bug which was causing the table for the wrong day to be displayed after
dragging the last day of a multi-day booking in the week view
Modified Paths:
--------------
mrbs/trunk/web/Themes/default/header.inc
mrbs/trunk/web/edit_entry_handler.php
Modified: mrbs/trunk/web/Themes/default/header.inc
===================================================================
--- mrbs/trunk/web/Themes/default/header.inc 2011-11-21 04:47:22 UTC (rev
2180)
+++ mrbs/trunk/web/Themes/default/header.inc 2011-11-21 05:13:37 UTC (rev
2181)
@@ -2096,7 +2096,11 @@
// We've got a change to the booking, so we need to send an
Ajax
// request to the server to make the new booking
?>
- var data = {ajax: 1, commit: 1};
+ var data = {ajax: 1,
+ commit: 1,
+ day: <?php echo $day ?>,
+ month: <?php echo $month ?>,
+ year: <?php echo $year ?>};
<?php // get the booking id ?>
data.id = divClone.data('id');
<?php // get the other parameters ?>
Modified: mrbs/trunk/web/edit_entry_handler.php
===================================================================
--- mrbs/trunk/web/edit_entry_handler.php 2011-11-21 04:47:22 UTC (rev
2180)
+++ mrbs/trunk/web/edit_entry_handler.php 2011-11-21 05:13:37 UTC (rev
2181)
@@ -168,10 +168,13 @@
}
}
-// Get the start day/month/year and make them the current day/month/year
-$day = $start_day;
-$month = $start_month;
-$year = $start_year;
+if (!$ajax || !$commit)
+{
+ // Get the start day/month/year and make them the current day/month/year
+ $day = $start_day;
+ $month = $start_month;
+ $year = $start_year;
+}
// The id must be either an integer or NULL, so that subsequent code that
tests whether
// isset($id) works. (I suppose one could use !empty instead, but there's
always the
@@ -407,7 +410,7 @@
// Now work out the start and times
$starttime = mktime(intval($start_seconds/3600),
intval(($start_seconds%3600)/60), 0,
- $month, $day, $year);
+ $start_month, $start_day, $start_year);
$endtime = mktime(intval($end_seconds/3600), intval(($end_seconds%3600)/60),
0,
$end_month, $end_day, $end_year);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, 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-novd2d
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits