don't redisplay alert messages on refresh unless they have changed
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Aug 2006 19:49:08 +0000 (19:49 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Aug 2006 19:49:08 +0000 (19:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5763 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/display.js

index 937196e..4cca8f4 100644 (file)
@@ -387,7 +387,12 @@ patron.display.prototype = {
                                                                        var holds = req.getResultObject();
                                                                        if (holds.ready && holds.ready > 0) msg += 'Holds available: ' + holds.ready;
                                                                        if (msg) {
-                                                                               obj.error.yns_alert(msg,'Alert Message','OK',null,null,'Check here to confirm this message.');
+                                                                               if (msg != obj.old_msg) {
+                                                                                       obj.error.yns_alert(msg,'Alert Message','OK',null,null,'Check here to confirm this message.');
+                                                                                       obj.old_msg = msg;
+                                                                               } else {
+                                                                                       obj.error.sdump('D_TRACE','Not re-displaying this alert message: ' + msg);
+                                                                               }
                                                                        }
                                                                        if (obj.stop_checkouts && obj.checkout_window) {
                                                                                setTimeout( function() {