[open-ils-commits] r15022 - in trunk/Open-ILS: src/sql/Pg src/sql/Pg/upgrade web/js/ui/default/circ/selfcheck (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 24 22:21:57 EST 2009
Author: erickson
Date: 2009-11-24 22:21:54 -0500 (Tue, 24 Nov 2009)
New Revision: 15022
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0091.data.org-setting-selfcheck-misc2.sql
Modified:
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
Log:
added org setting to enable selfcheck audio. alter popup alert to match setting name layout
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-24 22:45:22 UTC (rev 15021)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-25 03:21:54 UTC (rev 15022)
@@ -51,7 +51,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0090'); -- miker
+INSERT INTO config.upgrade_log (version) VALUES ('0091'); -- berick
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-11-24 22:45:22 UTC (rev 15021)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-11-25 03:21:54 UTC (rev 15022)
@@ -1589,7 +1589,7 @@
'Number of seconds of inactivity before the patron is logged out of the selfcheck interfacer',
'integer' ),
-( 'circ.selfcheck.alert_on_checkout_event',
+( 'circ.selfcheck.alert.popup',
'Selfcheck: Pop-up alert for errors',
'If true, checkout/renewal errors will cause a pop-up window in addition to the on-screen message',
'bool' ),
@@ -2607,3 +2607,12 @@
'bool'
);
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype )
+ VALUES (
+ 'circ.selfcheck.alert.sound',
+ oils_i18n_gettext('circ.selfcheck.alert.sound', 'Selfcheck: Audio Alerts', 'coust', 'label'),
+ oils_i18n_gettext('circ.selfcheck.alert.sound', 'Use audio alerts for selfcheck events', 'coust', 'description'),
+ 'bool'
+ );
+
+
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0091.data.org-setting-selfcheck-misc2.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0091.data.org-setting-selfcheck-misc2.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0091.data.org-setting-selfcheck-misc2.sql 2009-11-25 03:21:54 UTC (rev 15022)
@@ -0,0 +1,23 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0091');
+
+-- add some consistency to the name of an old selfcheck setting
+UPDATE actor.org_unit_setting
+ SET name = 'circ.selfcheck.alert.popup'
+ WHERE name = 'circ.selfcheck.alert_on_checkout_event';
+
+UPDATE config.org_unit_setting_type
+ SET name = 'circ.selfcheck.alert.popup'
+ WHERE name = 'circ.selfcheck.alert_on_checkout_event';
+
+-- add the sound setting
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype )
+ VALUES (
+ 'circ.selfcheck.alert.sound',
+ oils_i18n_gettext('circ.selfcheck.alert.sound', 'Selfcheck: Audio Alerts', 'coust', 'label'),
+ oils_i18n_gettext('circ.selfcheck.alert.sound', 'Use audio alerts for selfcheck events', 'coust', 'description'),
+ 'bool'
+ );
+
+COMMIT;
Modified: trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js 2009-11-24 22:45:22 UTC (rev 15021)
+++ trunk/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js 2009-11-25 03:21:54 UTC (rev 15022)
@@ -12,15 +12,13 @@
const SET_BARCODE_REGEX = 'opac.barcode_regex';
const SET_PATRON_TIMEOUT = 'circ.selfcheck.patron_login_timeout';
-const SET_ALERT_ON_CHECKOUT_EVENT = 'circ.selfcheck.alert_on_checkout_event';
const SET_AUTO_OVERRIDE_EVENTS = 'circ.selfcheck.auto_override_checkout_events';
const SET_PATRON_PASSWORD_REQUIRED = 'circ.selfcheck.patron_password_required';
const SET_AUTO_RENEW_INTERVAL = 'circ.checkout_auto_renew_age';
const SET_WORKSTATION_REQUIRED = 'circ.selfcheck.workstation_required';
-const SET_SOUND_ON_CHECKOUT_EVENT = 'circ.selfcheck.sound_on_checkout_event';
+const SET_ALERT_POPUP = 'circ.selfcheck.alert.popup';
+const SET_ALERT_SOUND = 'circ.selfcheck.alert.sound';
-//openils.Util.playAudioUrl('/xul/server/skin/media/audio/bonus.wav');
-
function SelfCheckManager() {
this.cgi = new openils.CGI();
@@ -114,7 +112,7 @@
this.staff.ws_ou(), [
SET_BARCODE_REGEX,
SET_PATRON_TIMEOUT,
- SET_ALERT_ON_CHECKOUT_EVENT,
+ SET_ALERT_POPUP,
SET_AUTO_OVERRIDE_EVENTS,
SET_PATRON_PASSWORD_REQUIRED,
SET_AUTO_RENEW_INTERVAL,
@@ -218,10 +216,10 @@
dojo.byId('oils-selfck-status-div').innerHTML = message;
- if(shouldPopup && this.orgSettings[SET_ALERT_ON_CHECKOUT_EVENT])
+ if(shouldPopup && this.orgSettings[SET_ALERT_POPUP])
alert(message);
- if(sound && this.orgSettings[SET_SOUND_ON_CHECKOUT_EVENT])
+ if(sound && this.orgSettings[SET_ALERT_SOUND])
openils.Util.playAudioUrl(SelfCheckManager.audioConfig[sound]);
}
More information about the open-ils-commits
mailing list