Hrmm, global_utils.js gets copied and shared between chrome and remote xul, so not...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 8 Mar 2008 09:02:30 +0000 (09:02 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 8 Mar 2008 09:02:30 +0000 (09:02 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8925 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
Open-ILS/xul/staff_client/server/locale/en-US/common.properties
Open-ILS/xul/staff_client/server/patron/summary_overlay.xul

index dae269d..6302446 100644 (file)
@@ -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]));
                }
        }
 
                                                                         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]));
         }
        }
 
                        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]));  
                }
        }
 
                        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]));
                }
        }
 
index 4764566..b8d6e3b 100644 (file)
@@ -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
index 2e0d23e..d19e483 100644 (file)
                <row id="pdsgr0">
                        <label id="PatronSummaryContact_library_card_label" class="text_left card label"
                                value="&staff.patron_display.library_card.label;"/>
-                       <label id="patron_card" class="card value" style="text-decoration: underline; color: blue; -moz-user-focus: normal;" onclick="copy_to_clipboard(event)"/>
+                       <label id="patron_card" class="card value" style="text-decoration: underline; color: blue; -moz-user-focus: normal;" onclick="try { copy_to_clipboard(event); } catch(E) { alert(E); }"/>
                        <!--<textbox id="patron_card" class="plain" readonly="true" onclick="this.select()"/>-->
                </row>
                <row id="pdsgr1">