Commit r2350: https://sourceforge.net/p/mrbs/code/2350/

------------------------------------------------------------------------
r2350 | cimorrison | 2012-07-23 15:15:44 +0100 (Mon, 23 Jul 2012) | 1 line
Changed paths:
   M /mrbs/trunk/web/js/resizable.js.php
   M /mrbs/trunk/web/lang/lang.en

Added some positive visual feedback when bookings are altered by dragging the 
cell border
------------------------------------------------------------------------

Index: mrbs/trunk/web/js/resizable.js.php
===================================================================
--- mrbs/trunk/web/js/resizable.js.php  (revision 2349)
+++ mrbs/trunk/web/js/resizable.js.php  (revision 2350)
@@ -991,11 +991,27 @@
                             // table in order to get rid of events and data and
                             // prevent memory leaks (2) insert the updated 
table HTML
                             // and then (3) trigger a window load event so 
that the
-                            // resizable bookings are re-created.
+                            // resizable bookings are re-created and then (4) 
give the
+                            // user some positive visual feedback that the 
change has 
+                            // been saved
                             ?>
                             table.empty();
                             table.html(result.table_innerhtml);
                             $(window).trigger('load');
+                            <?php // Now for the visual feedback ?>
+                            $.each(result.new_details, function(i, value) {
+                                var cell = $('[data-id="' + value.id + '"]');
+                                var cellAnchor = cell.find('a');
+                                var oldHTML = cellAnchor.html();
+                                var duration = 1000; <?php // ms ?>
+                                cellAnchor.fadeOut(duration, function(){
+                                    cellAnchor.html('<?php echo 
get_vocab("changes_saved")?>').fadeIn(duration, function() {
+                                        cellAnchor.fadeOut(duration, 
function() {
+                                            
cellAnchor.html(oldHTML).fadeIn(duration);
+                                          })
+                                      });
+                                  });
+                              });
                           }
                           else
                           {
Index: mrbs/trunk/web/lang/lang.en
===================================================================
--- mrbs/trunk/web/lang/lang.en (revision 2349)
+++ mrbs/trunk/web/lang/lang.en (revision 2350)
@@ -190,6 +190,7 @@
 $vocab["max_per_future_area"]     = "The maximum number of outstanding 
bookings per user in this area is";
 $vocab["skip_and_book"]           = "Skip and book";
 $vocab["skip_and_book_note"]      = "Carry on with the booking, skipping past 
the conflicting entries";
+$vocab["changes_saved"]           = "Changes saved";
 
 // Used in pending.php
 $vocab["pending"]            = "Bookings awaiting approval";

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to