shutdown command.. need prompt
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 6 Jul 2006 17:55:05 +0000 (17:55 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 6 Jul 2006 17:55:05 +0000 (17:55 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4915 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul

index bd800fb..3cea8f3 100644 (file)
@@ -510,6 +510,21 @@ main.menu.prototype = {
                                        }
                                }
                        ],
+                       'cmd_shutdown' : [
+                               ['oncommand'],
+                               function() {
+                                       var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService();
+                                       var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
+                                       var enumerator = windowManagerInterface.getEnumerator(null);
+
+                                       var w; // close all other windows
+                                       while ( w = enumerator.getNext() ) {
+                                               if (w != window) w.close();
+                                       
+                                       }
+                                       window.close();
+                               }
+                       ],
                };
 
                JSAN.use('util.controller');
index 080b8b4..91ba4f1 100644 (file)
@@ -13,6 +13,7 @@
        <command id="cmd_new_tab" key="new-tab-key" />
        <command id="cmd_close_tab" key="close-tab-key" />
        <command id="cmd_close_all_tabs" key="close-all-tabs-key" />
+       <command id="cmd_shutdown" />
 
        <command id="cmd_edit_copy_buckets" />
        <command id="cmd_edit_record_buckets" />