[open-ils-commits] r18185 - in trunk/Open-ILS/xul/staff_client/chrome: content/main locale/en-US (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Oct 5 16:13:11 EDT 2010


Author: phasefx
Date: 2010-10-05 16:13:06 -0400 (Tue, 05 Oct 2010)
New Revision: 18185

Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
   trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
Log:
some I18N and tweak call to getIntPref.  Is the 2nd parameter version an undocumented way of providing a default if the pref isn't found?

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js	2010-10-05 20:13:03 UTC (rev 18184)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js	2010-10-05 20:13:06 UTC (rev 18185)
@@ -143,7 +143,7 @@
                 function() {
                     if (obj.new_tab(null,{'focus':true},null) == false)
                     {
-                        if(window.confirm("Sorry, we can't create any more tabs in this window.\nWould you like to create a new tab in another window?"))
+                        if(window.confirm(offlineStrings.getString('menu.new_tab.max_tab_dialog')))
                         {
                             var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
                                 getService(Components.interfaces.nsIWindowMediator);
@@ -1342,7 +1342,7 @@
         var obj = this;
         var max_tabs = 0;
         try {
-            var max_tabs = xulG.pref.getIntPref('open-ils.window_max_tabs', max_tabs);
+            var max_tabs = xulG.pref.getIntPref('open-ils.window_max_tabs') || max_tabs;
         }
         catch (e) {}
         if(max_tabs > 0 && this.controller.view.tabs.childNodes.length > max_tabs) return false;

Modified: trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties	2010-10-05 20:13:03 UTC (rev 18184)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties	2010-10-05 20:13:06 UTC (rev 18185)
@@ -139,6 +139,7 @@
 menu.cmd_verify_credentials.tabname=Verify Credentials
 menu.close_all_tabs.error=Error closing all tabs
 menu.new_tab.tab=Tab
+menu.new_tab.max_tab_dialog=Sorry, we can't create any more tabs in this window.\nWould you like to create a new tab in another window?
 main.session_cookie.error=Error setting session cookie: %1$s
 menu.set_tab.error=pause for error
 menu.reset_network_stats=Reset network activity summary?



More information about the open-ils-commits mailing list