From: Jason Etheridge Date: Thu, 17 Feb 2011 04:35:35 +0000 (-0500) Subject: enable popups. If KCLS doesn't want this, they can disable the org setting. Specify... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d8c0c84c729ab35a0019d90bd5474025ac416a45;p=evergreen%2Fequinox.git enable popups. If KCLS doesn't want this, they can disable the org setting. Specify an additional CSS classname for messages that should popup. Tweak the CSS for normal messages so that they are blue. Errors get a red color. --- diff --git a/Open-ILS/web/css/skin/kcls/selfcheck.css b/Open-ILS/web/css/skin/kcls/selfcheck.css index 2a5dc794d8..33a018c33e 100644 --- a/Open-ILS/web/css/skin/kcls/selfcheck.css +++ b/Open-ILS/web/css/skin/kcls/selfcheck.css @@ -176,7 +176,11 @@ h2 { vertical-align:inherit !important; font-size: 18px; font-weight: bold; - color: red; + color: blue; +} + +.checkout_failure { + color: red !important; } #oils-base-body-block { @@ -206,3 +210,4 @@ body .dijitAlignClient { width:0px !important; } + diff --git a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js index 557a3cd490..fe492e52c9 100644 --- a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js @@ -377,6 +377,11 @@ SelfCheckManager.prototype.handleAlert = function(message, shouldPopup, sound) { dojo.byId('oils-selfck-status-div2').innerHTML = message; dojo.byId('oils-selfck-status-div3').innerHTML = message; } + + if(shouldPopup) + openils.Util.addCSSClass( dojo.byId('oils-selfck-status-div'), 'checkout_failure' ); + else + openils.Util.removeCSSClass( dojo.byId('oils-selfck-status-div'), 'checkout_failure' ); if(shouldPopup && this.orgSettings[SET_ALERT_POPUP]) alert(message); @@ -988,7 +993,7 @@ SelfCheckManager.prototype.handleXactResult = function(action, item, result) { return { renew : true }; } - popup = false; + popup = true; sound = 'checkout-failure'; displayText = dojo.string.substitute(localeStrings.ALREADY_OUT, [item]); @@ -1007,7 +1012,7 @@ SelfCheckManager.prototype.handleXactResult = function(action, item, result) { // item is checked out to some other user - popup = false; + popup = true; sound = 'checkout-failure'; displayText = dojo.string.substitute(localeStrings.OPEN_CIRCULATION_EXISTS, [item]); } @@ -1062,7 +1067,7 @@ SelfCheckManager.prototype.handleXactResult = function(action, item, result) { } this.updateScanBox(); - popup = false; + popup = true; sound = 'checkout-failure'; if(action == 'renew')