From 290d65cd4f2667faf7a8ebbb9c2536fa9e4f14d9 Mon Sep 17 00:00:00 2001 From: phasefx Date: Sat, 8 Mar 2008 09:02:30 +0000 Subject: [PATCH] Hrmm, global_utils.js gets copied and shared between chrome and remote xul, so not sure what's the best thing to do here for the properties files. Where do we want the redundancy? Or can we get rid of it? git-svn-id: svn://svn.open-ils.org/ILS/trunk@8925 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/OpenILS/global_util.js | 18 ++++++++++++------ .../server/locale/en-US/common.properties | 6 ++++++ .../server/patron/summary_overlay.xul | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js index dae269ded0..6302446a8f 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js @@ -27,7 +27,8 @@ removeCSSClass(document.documentElement,'ALL_FONTS_XX_LARGE'); addCSSClass(document.documentElement,data.global_font_adjust); } catch(E) { - alert($('offlineStrings').getFormattedString('openils.global_util.font_size.error', [E])); + var Strings = $('offlineStrings') || $('commonStrings'); + alert(Strings.getFormattedString('openils.global_util.font_size.error', [E])); } } @@ -46,14 +47,16 @@ return frame.contentWindow.wrappedJSObject; } } catch(E) { - alert($('offlineStrings').getFormattedString('openils.global_util.content_window_jsobject.error', [frame, E])); + var Strings = $('offlineStrings') || $('commonStrings'); + alert(Strings.getFormattedString('openils.global_util.content_window_jsobject.error', [frame, E])); } return frame.contentWindow; } else { return null; } } catch(E) { - alert($('offlineStrings').getFormattedString('openils.global_util.content_window.error', [frame, E])); + var Strings = $('offlineStrings') || $('commonStrings'); + alert(Strings.getFormattedString('openils.global_util.content_window.error', [frame, E])); } } @@ -192,9 +195,11 @@ const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"] .getService(Components.interfaces.nsIClipboardHelper); gClipboardHelper.copyString(text); - alert($('offlineStrings').getFormattedString('openils.global_util.clipboard', [text])); + var Strings = $('offlineStrings') || $('commonStrings'); + alert(Strings.getFormattedString('openils.global_util.clipboard', [text])); } catch(E) { - alert($('offlineStrings').getFormattedString('openils.global_util.clipboard.error', [E])); + var Strings = $('offlineStrings') || $('commonStrings'); + alert(Strings.getFormattedString('openils.global_util.clipboard.error', [E])); } } @@ -206,7 +211,8 @@ cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK); cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY); } catch(E) { - alert($('offlineStrings').getFormattedString('openils.global_util.clear_cache.error', [E])); + var Strings = $('offlineStrings') || $('commonStrings'); + alert(Strings.getFormattedString('openils.global_util.clear_cache.error', [E])); } } diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties index 4764566b75..b8d6e3b2b3 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties @@ -13,6 +13,12 @@ common.barcode.status.warning.blocked=Blocked common.barcode.status.warning.unknown=with an unknown code: %1$s common.date.invalid=Invalid Date lang.version=remote v1 +openils.global_util.clear_cache.error=Problem clearing the cache: %1$s +openils.global_util.clipboard.error=Clipboard action failed: %1$s +openils.global_util.clipboard=Copied "%1$s" to clipboard. +openils.global_util.content_window_jsobject.error=Error with get_contentWindow(%1$s) and wrappedJSObject: %2$s +openils.global_util.content_window.error=Error with get_contentWindow(%1$s): %2$s +openils.global_util.font_size.error=Error adjusting the font size: %1$s staff.acp_label_barcode=Barcode staff.acp_label_call_number=Call Number staff.acp_label_circ_as_type=Circ As Type diff --git a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul index 2e0d23e8c8..d19e483b75 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul @@ -135,7 +135,7 @@ -- 2.43.2