some I18N and tweak call to getIntPref. Is the 2nd parameter version an undocumented...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Oct 2010 20:13:06 +0000 (20:13 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Oct 2010 20:13:06 +0000 (20:13 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18185 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties

index a4aa386..545ffbe 100644 (file)
@@ -143,7 +143,7 @@ main.menu.prototype = {
                 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 @@ main.menu.prototype = {
         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;
index d9fa2f5..1b10849 100644 (file)
@@ -139,6 +139,7 @@ menu.spawn_search.msg=Editor would like to search for: %1$s
 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?