From 09ff238c8f53c28a942613c59016c3fcf82c5be6 Mon Sep 17 00:00:00 2001 From: dbs Date: Sat, 19 Jan 2008 20:33:26 +0000 Subject: [PATCH] Just use one messagecatalog (offline.properties) in chrome git-svn-id: svn://svn.open-ils.org/ILS/trunk@8433 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/chrome/content/admin/survey.js | 8 +-- .../chrome/content/admin/survey_wizard.xul | 9 +-- .../xul/staff_client/chrome/content/cat/opac.xul | 4 +- .../staff_client/chrome/content/circ/offline.xul | 17 ++--- .../chrome/content/circ/offline_checkin.js | 14 ++-- .../chrome/content/circ/offline_checkin.xul | 3 +- .../chrome/content/circ/offline_checkout.js | 50 +++++++------- .../chrome/content/circ/offline_checkout.xul | 3 +- .../chrome/content/circ/offline_in_house_use.js | 14 ++-- .../chrome/content/circ/offline_in_house_use.xul | 3 +- .../chrome/content/circ/offline_register.js | 76 +++++++++++----------- .../chrome/content/circ/offline_register.xul | 3 +- .../chrome/content/circ/offline_renew.xul | 3 +- .../chrome/locale/en-US/admin.properties | 31 --------- .../chrome/locale/en-US/cat.properties | 6 -- .../{common.properties => offline.properties} | 8 +++ 16 files changed, 100 insertions(+), 152 deletions(-) delete mode 100644 Open-ILS/xul/staff_client/chrome/locale/en-US/admin.properties delete mode 100644 Open-ILS/xul/staff_client/chrome/locale/en-US/cat.properties rename Open-ILS/xul/staff_client/chrome/locale/en-US/{common.properties => offline.properties} (67%) diff --git a/Open-ILS/xul/staff_client/chrome/content/admin/survey.js b/Open-ILS/xul/staff_client/chrome/content/admin/survey.js index 9dccae731c..24bdcbaabb 100644 --- a/Open-ILS/xul/staff_client/chrome/content/admin/survey.js +++ b/Open-ILS/xul/staff_client/chrome/content/admin/survey.js @@ -247,10 +247,10 @@ function add_question_row(my_asvq) { g_row_2.appendChild(g_tb); if (last_button) last_button.setAttribute('accesskey',''); var g_b = document.createElement('button'); - var strbundle = document.getElementById("adminStrings"); - g_b.setAttribute('label', strbundle.getString('staff.admin.survey.save_response.label')); - g_b.setAttribute('accesskey', strbundle.getString('staff.admin.survey.save_response.label')); - g_b.setAttribute('oncommand','add_answer(event,' + my_asvq.id() + ');'); + var strbundle = document.getElementById("offlineStrings"); + g_b.setAttribute('label', strbundle.getString('staff.admin.survey.save_response.label')); + g_b.setAttribute('accesskey', strbundle.getString('staff.admin.survey.save_response.label')); + g_b.setAttribute('oncommand','add_answer(event,' + my_asvq.id() + ');'); g_row_2.appendChild(g_b); var blank = document.createElement('row'); diff --git a/Open-ILS/xul/staff_client/chrome/content/admin/survey_wizard.xul b/Open-ILS/xul/staff_client/chrome/content/admin/survey_wizard.xul index 0061170ff2..a340a761b2 100644 --- a/Open-ILS/xul/staff_client/chrome/content/admin/survey_wizard.xul +++ b/Open-ILS/xul/staff_client/chrome/content/admin/survey_wizard.xul @@ -28,7 +28,7 @@ function my_init() { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing'); } + if (typeof JSAN == 'undefined') { throw( document.getElementById("offlineStrings").getString('common.jsan.missing') ); } JSAN.errorLevel = "die"; // none, warn, or die JSAN.addRepository('..'); JSAN.use('util.error'); g.error = new util.error(); @@ -48,7 +48,7 @@ document.getElementById('survey_add').canAdvance = false; } catch(E) { - var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['survey_wizard.xul', E]); + var err_msg = document.getElementById("offlineStrings").getFormattedString('common.exception', ['survey_wizard.xul', E]); try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); } alert(err_msg); } @@ -56,10 +56,7 @@ ]]> - - - - + diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul index a5a5e2bddc..8ecf5ddf3c 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul @@ -30,9 +30,7 @@ - - - - + diff --git a/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.js b/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.js index 26fa0fe938..8c74f39caa 100644 --- a/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.js +++ b/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.js @@ -1,20 +1,18 @@ -var commonStrings; -var circStrings; +var offlineStrings; function my_init() { try { - commonStrings = $('commonStrings'); - circStrings = $('circStrings'); + offlineStrings = $('offlineStrings'); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - if (typeof JSAN == 'undefined') { throw(commonStrings.getString('common.jsan.missing')); } + if (typeof JSAN == 'undefined') { throw(offlineStrings.getString('common.jsan.missing')); } JSAN.errorLevel = "die"; // none, warn, or die JSAN.addRepository('..'); JSAN.use('util.error'); g.error = new util.error(); g.error.sdump('D_TRACE','my_init() for offline_checkin.xul'); if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') { - try { window.xulG.set_tab_name(circStrings.getString('circ.standalone')); } catch(E) { alert(E); } + try { window.xulG.set_tab_name(offlineStrings.getString('circ.standalone')); } catch(E) { alert(E); } } JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'}); @@ -40,7 +38,7 @@ function my_init() { if (file._file.exists()) { g.delta = file.get_object()[0]; file.close(); } else { g.delta = 0; } } catch(E) { - var err_msg = commonStrings.getFormattedString('common.exception', ["circ/offline_checkin.xul", E]); + var err_msg = offlineStrings.getFormattedString('common.exception', ["circ/offline_checkin.xul", E]); try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); } alert(err_msg); } @@ -59,7 +57,7 @@ function handle_keypress(ev) { function handle_enter(ev) { JSAN.use('util.barcode'); if ( ($('strict_i_barcode').checked) && (! util.barcode.check($('i_barcode').value)) ) { - var r = g.error.yns_alert(circStrings.getString('circ.bad_checkdigit'),circStrings.getString('circ.barcode.warning'),commonStrings.getString('common.ok'),commonStrings.getString('common.clear'),null,commonStrings.getString('common.confirm')); + var r = g.error.yns_alert(offlineStrings.getString('circ.bad_checkdigit'),offlineStrings.getString('circ.barcode.warning'),offlineStrings.getString('common.ok'),offlineStrings.getString('common.clear'),null,offlineStrings.getString('common.confirm')); if (r == 1) { setTimeout( function() { diff --git a/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.xul b/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.xul index 8211c2f7c0..d19616d0b4 100644 --- a/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.xul +++ b/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.xul @@ -29,8 +29,7 @@