Revision: 2125
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2125&view=rev
Author:   cimorrison
Date:     2011-10-20 10:10:01 +0000 (Thu, 20 Oct 2011)
Log Message:
-----------
Fixed bug which caused All Day to be checked when you were using a drag 
selection in an area where the default duration is All Day.

Modified Paths:
--------------
    mrbs/branches/draggable_bookings/web/Themes/default/header.inc
    mrbs/branches/draggable_bookings/web/edit_entry.php

Modified: mrbs/branches/draggable_bookings/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/draggable_bookings/web/Themes/default/header.inc      
2011-10-20 09:45:06 UTC (rev 2124)
+++ mrbs/branches/draggable_bookings/web/Themes/default/header.inc      
2011-10-20 10:10:01 UTC (rev 2125)
@@ -1643,11 +1643,11 @@
             var box = downHandler.box;
             var tolerance = 2; <?php // px ?>
             e.preventDefault();
+            params = getBookingParams(box);
             $(document).unbind('mousemove',moveHandler);
             $(document).unbind('mouseup', upHandler);
             <?php // Remove the resizing wrapper so that highlighting comes 
back on ?>
             $('table.dwm_main').unwrap();
-            params = getBookingParams(box);
             box.remove();
             <?php
             // If the user has released the button while outside the table it 
means
@@ -1672,7 +1672,8 @@
             <?php
             // Otherwise get the selected parameters and go to the edit_entry 
page
             ?>
-            var queryString = 'area=<?php echo $area ?>';
+            var queryString = 'drag=1';  <?php // Says that we've come from a 
drag select ?>
+            queryString += '&area=<?php echo $area ?>';
             queryString += '&start_seconds=' + params.seconds[0];
             queryString += '&end_seconds=' + 
params.seconds[params.seconds.length - 1];
             <?php
@@ -2256,7 +2257,10 @@
   // that handles changes.  (Note - the call to OnAllDayClick() comes inside
   // an each() in case there isn't an all_day checkbox, which there won't be
   // if we're logging in)
-  if ($default_duration_all_day)
+  // However don't check it if $drag is set, because that means we've
+  // come from a drag select and don't want the defaults
+  global $drag;
+  if ($default_duration_all_day && !isset($drag))
   {
     ?>
     $('#all_day').attr('checked', true).each(function() {

Modified: mrbs/branches/draggable_bookings/web/edit_entry.php
===================================================================
--- mrbs/branches/draggable_bookings/web/edit_entry.php 2011-10-20 09:45:06 UTC 
(rev 2124)
+++ mrbs/branches/draggable_bookings/web/edit_entry.php 2011-10-20 10:10:01 UTC 
(rev 2125)
@@ -129,7 +129,8 @@
 $copy = get_form_var('copy', 'int');
 $edit_type = get_form_var('edit_type', 'string', '');
 $returl = get_form_var('returl', 'string');
-// The following variables are used when coming via JavaScript
+// The following variables are used when coming via a JavaScript drag select
+$drag = get_form_var('drag', 'int');
 $start_seconds = get_form_var('start_seconds', 'int');
 $end_seconds = get_form_var('end_seconds', 'int');
 $selected_rooms = get_form_var('rooms', 'array');

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


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to