Revision: 2694
https://sourceforge.net/p/mrbs/code/2694/
Author: cimorrison
Date: 2013-02-11 08:51:49 +0000 (Mon, 11 Feb 2013)
Log Message:
-----------
Made sure that page refresh isn't restarted while we are in the middle of a
drag selection when we pass over the handles for resizable bookings
Modified Paths:
--------------
mrbs/trunk/web/js/resizable.js.php
Modified: mrbs/trunk/web/js/resizable.js.php
===================================================================
--- mrbs/trunk/web/js/resizable.js.php 2013-02-11 07:30:40 UTC (rev 2693)
+++ mrbs/trunk/web/js/resizable.js.php 2013-02-11 08:51:49 UTC (rev 2694)
@@ -551,8 +551,10 @@
// resized.
?>
var bookedMap = [];
-
+ var mouseDown = false;
+
var downHandler = function(e) {
+ mouseDown = true;
turnOffPageRefresh();
<?php // Build the map of booked cells ?>
table.find('td').not('td.new, td.row_labels').each(function() {
@@ -693,6 +695,7 @@
var upHandler = function(e) {
+ mouseDown = false;
e.preventDefault();
var tolerance = 2; <?php // px ?>
var box = downHandler.box;
@@ -1212,9 +1215,12 @@
// We want to disable page refresh if the user is hovering over
// the resizable handles. We trigger a mouseenter event on page
// load so we can work out whether the mouse is over the handle
- // on page load (but we only need to trigger one event)
- ?>
- var mouseDown = false;
+ // on page load (but we only need to trigger one event).
+ //
+ // mouseDown will also be set by the event handlers for drag selection
+ // of new bookings, so that we don't turn on page refresh while in the
+ // middle of a drag selection when we pass over a resizable handle
+ ?>
$('div.clone .ui-resizable-handle')
.mouseenter(function(e) {
if (!mouseDown)
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits