I18N version of a patch from Bill Ott for a New Window button on the login window...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 25 May 2008 05:14:19 +0000 (05:14 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 25 May 2008 05:14:19 +0000 (05:14 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9695 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 4cb92ab..9faf49e 100644 (file)
@@ -246,6 +246,25 @@ function main_init() {
                        }, 
                        false
                );
+
+               var y = document.getElementById('new_window_btn');
+               y.setAttribute('label', offlineStrings.getString('main.new_window_btn.label'));
+               y.addEventListener(
+                       'command',
+                       function() {
+                               if (G.data.session) {
+                                       try {
+                                               G.window.open('chrome://open_ils_staff_client/content/main/menu_frame.xul?server=' +
+                                                       G.data.server,'main','chrome,resizable' );
+
+                                       } catch(E) { alert(E); }
+                               } else {
+                                       alert ( offlineStrings.getString('main.new_window_btn.login_first_warning') );
+                               }
+                       },
+                       false
+               );
+
                if ( found_ws_info_in_Achrome() ) {
                        //var hbox = x.parentNode; var b = document.createElement('button'); 
                        //b.setAttribute('label','Migrate legacy settings'); hbox.appendChild(b);
index 35b1c67..13fe535 100644 (file)
@@ -85,6 +85,9 @@
                <hbox>
                        <label id="version_label"/>
                        <button id="about_btn"/>
+
+                       <label id="new_window_label"/>
+                       <button id="new_window_btn"/>
                </hbox>
                <label value=" "/>
 
index 5a0ba3b..35b1cd2 100644 (file)
@@ -139,6 +139,8 @@ main.transaction_import.success=Transaction Import Successful
 main.on_debug.clear_cache=cache cleared
 main.on_debug.debug=debug the debug :D
 main.about_btn.label=About this client...
+main.new_window_btn.label=Open New Window
+main.new_window_btn.login_first_warning=Please login first!
 main.settings.migrate=This version of the staff client stores local settings in a different location than your previous installation.  Should we attempt to migrate these settings?
 main.settings.migrate.failed=WARNING: Unable to migrate legacy settings.  The settings and configuration files appear to exist in multiple locations. \nTo resolve this problem manually, please consider:\n\t%1$s\nwhich is in the directory where we want to store settings for the current operating system account, and:\n\t%2$s\nwhich is where we used to store such information.\n
 main.settings.migrate.confirm=Move the settings and configuration files from\n%1$s\nto\n%2$s?