[open-ils-commits] r14617 - in branches/rel_1_4/Open-ILS: web/opac/locale/en-US xul/staff_client/server/admin xul/staff_client/server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Oct 26 23:11:25 EDT 2009
Author: phasefx
Date: 2009-10-26 23:11:23 -0400 (Mon, 26 Oct 2009)
New Revision: 14617
Modified:
branches/rel_1_4/Open-ILS/web/opac/locale/en-US/lang.dtd
branches/rel_1_4/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml
branches/rel_1_4/Open-ILS/xul/staff_client/server/circ/in_house_use.js
branches/rel_1_4/Open-ILS/xul/staff_client/server/circ/in_house_use.xul
Log:
backporting changeset 14613: Tweak the Record In-House Use interface so that it has sound, a larger textbox for the '# of uses' field, and org unit settings that control the warning threshold and max allowed value for '# of uses'.
Exceeding the cap no longer sets the value to the cap.
Modified: branches/rel_1_4/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- branches/rel_1_4/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-10-27 02:58:41 UTC (rev 14616)
+++ branches/rel_1_4/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-10-27 03:11:23 UTC (rev 14617)
@@ -1512,9 +1512,10 @@
<!ENTITY staff.server.admin.org_settings.cat.bib.keep_on_empty.desc 'Do not automatically delete a bib record when all attached copies are deleted'>
<!ENTITY staff.server.admin.org_settings.cat.bib.alert_on_empty 'Alert on empty bib records'>
<!ENTITY staff.server.admin.org_settings.cat.bib.alert_on_empty.desc "Alert staff when the last copy for a record is being deleted">
-
-
-
+<!ENTITY ui.circ.in_house_use.entry_cap "GUI: Record In-House Use: Maximum # of uses allowed per entry.">
+<!ENTITY ui.circ.in_house_use.entry_cap.desc "The # of uses entry in the Record In-House Use interface may not exceed the value of this setting.">
+<!ENTITY ui.circ.in_house_use.entry_warn "GUI: Record In-House Use: # of uses threshold for Are You Sure? dialog.">
+<!ENTITY ui.circ.in_house_use.entry_warn.desc "In the Record In-House Use interface, a submission attempt will warn if the # of uses field exceeds the value of this setting.">
<!ENTITY staff.server.admin.stat_cat.title "Evergreen: Statistical Category Editor">
<!ENTITY staff.server.admin.stat_cat.greeting "Welcome ">
<!ENTITY staff.server.admin.stat_cat.heading " Statistical Category Editor">
Modified: branches/rel_1_4/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml
===================================================================
--- branches/rel_1_4/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml 2009-10-27 02:58:41 UTC (rev 14616)
+++ branches/rel_1_4/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml 2009-10-27 03:11:23 UTC (rev 14617)
@@ -117,6 +117,16 @@
label : '&staff.server.admin.org_settings.cat.bib.alert_on_empty;',
desc : '&staff.server.admin.org_settings.cat.bib.alert_on_empty.desc;',
type : 'bool'
+ },
+ 'ui.circ.in_house_use.entry_cap' : {
+ label : '&ui.circ.in_house_use.entry_cap;',
+ desc : '&ui.circ.in_house_use.entry_cap.desc;',
+ type : 'integer'
+ },
+ 'ui.circ.in_house_use.entry_warn' : {
+ label : '&ui.circ.in_house_use.entry_warn;',
+ desc : '&ui.circ.in_house_use.entry_warn.desc;',
+ type : 'integer'
}
};
</script>
Modified: branches/rel_1_4/Open-ILS/xul/staff_client/server/circ/in_house_use.js
===================================================================
--- branches/rel_1_4/Open-ILS/xul/staff_client/server/circ/in_house_use.js 2009-10-27 02:58:41 UTC (rev 14616)
+++ branches/rel_1_4/Open-ILS/xul/staff_client/server/circ/in_house_use.js 2009-10-27 03:11:23 UTC (rev 14617)
@@ -9,6 +9,7 @@
JSAN.use('util.barcode');
JSAN.use('util.date');
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
+ JSAN.use('util.sound'); this.sound = new util.sound();
}
circ.in_house_use.prototype = {
@@ -17,6 +18,9 @@
var obj = this;
+ obj.entry_cap = Number( obj.data.hash.aous['ui.circ.in_house_use.entry_cap'] ) || 99;
+ obj.entry_warn = Number( obj.data.hash.aous['ui.circ.in_house_use.entry_warn'] ) || 20;
+
JSAN.use('circ.util');
var columns = circ.util.columns(
{
@@ -135,13 +139,19 @@
try {
var value = Number(ev.target.value);
if (value > 0) {
- if (value > 99) ev.target.value = 99;
+ if (value > 99) { throw(value); }
} else {
- ev.target.value = 1;
+ throw(value);
}
} catch(E) {
dump('in_house_use:multiplier: ' + E + '\n');
- ev.target.value = 1;
+ obj.sound.circ_bad();
+ setTimeout(
+ function() {
+ obj.controller.view.in_house_use_multiplier_textbox.focus();
+ obj.controller.view.in_house_use_multiplier_textbox.select();
+ }, 0
+ );
}
}
}
@@ -230,13 +240,13 @@
return;
}
- if (multiplier == 0 || multiplier > 99) {
+ if (multiplier == 0 || multiplier > obj.entry_cap) {
obj.controller.view.in_house_use_multiplier_textbox.focus();
obj.controller.view.in_house_use_multiplier_textbox.select();
return;
}
- if (multiplier > 20) {
+ if (multiplier > obj.entry_warn) {
var r = obj.error.yns_alert(
document.getElementById('circStrings').getFormattedString('staff.circ.in_house_use.confirm_multiple', [barcode, multiplier]),
document.getElementById('circStrings').getString('staff.circ.in_house_use.confirm_multiple.title'),
@@ -308,6 +318,7 @@
//I could override map_row_to_column here
}
);
+ obj.sound.circ_good();
if (typeof obj.on_in_house_use == 'function') {
obj.on_in_house_use(result);
Modified: branches/rel_1_4/Open-ILS/xul/staff_client/server/circ/in_house_use.xul
===================================================================
--- branches/rel_1_4/Open-ILS/xul/staff_client/server/circ/in_house_use.xul 2009-10-27 02:58:41 UTC (rev 14616)
+++ branches/rel_1_4/Open-ILS/xul/staff_client/server/circ/in_house_use.xul 2009-10-27 03:11:23 UTC (rev 14617)
@@ -93,7 +93,7 @@
<hbox id="in_house_use_top_ui">
<label id="in_house_use_multiplier_label" value="&staff.circ.in_house_use.multiplier.label;" control="in_house_use_multiplier_textbox" accesskey="&staff.circ.in_house_use.multiplier.accesskey;" hidden="false"/>
- <textbox id="in_house_use_multiplier_textbox" value="1" hidden="false" size="2" cols="2" context="clipboard"/>
+ <textbox id="in_house_use_multiplier_textbox" value="1" hidden="false" size="6" cols="6" context="clipboard"/>
<hbox id="in_house_use_menu_placeholder" flex="0"/>
<textbox id="in_house_use_barcode_entry_textbox" context="clipboard"/>
<button id="in_house_use_submit_barcode_button"
More information about the open-ils-commits
mailing list