Changeset:
        8e4ed8a49b50
        
https://sourceforge.net/p/mrbs/hg-code/ci/8e4ed8a49b50eb1156ed87c566046088928174e0
Author:
        Campbell Morrison <cimorri...@hg.code.sf.net>
Date:
        Tue Oct 18 17:20:51 2016 +0100
Log message:

Fixed a performance problem when clicking on an empty cell in the week view 
when using hidden days on a large table.

diffstat:

 web/js/resizable.js.php |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r fc1092d92649 -r 8e4ed8a49b50 web/js/resizable.js.php
--- a/web/js/resizable.js.php   Tue Oct 18 13:52:43 2016 +0100
+++ b/web/js/resizable.js.php   Tue Oct 18 17:20:51 2016 +0100
@@ -611,8 +611,11 @@
           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() {
+              <?php
+              // Build the map of booked cells. (We select just the visible 
cells
+              // because there could be hidden days).
+              ?>
+              table.find('td:visible').not('td.new, 
td.row_labels').each(function() {
                   bookedMap.push(getSides($(this)));
                 });
               <?php // Apply a wrapper to turn off highlighting ?>
@@ -933,9 +936,10 @@
                       .appendTo($('div.resizing'));
                   <?php
                   // Build the map of booked cells, excluding this cell 
(because we're
-                  // allowed to be in our own cell
+                  // allowed to be in our own cell.   (We select just the 
visible cells
+                  // because there could be hidden days).
                   ?>
-                  table.find('td').not('td.new, 
td.row_labels').not(divBooking.closest('td')).each(function() {
+                  table.find('td:visible').not('td.new, 
td.row_labels').not(divBooking.closest('td')).each(function() {
                       bookedMap.push(getSides($(this)));
                     });
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
Mrbs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to