[open-ils-commits] [GIT] Evergreen ILS branch master updated. 2b6a71ec267c809cc3fea0d5c888aff61255aed8

Evergreen Git git at git.evergreen-ils.org
Fri Nov 4 17:45:23 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  2b6a71ec267c809cc3fea0d5c888aff61255aed8 (commit)
      from  b14b8d123df40abd9c543efa62fc4f59479b3f62 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2b6a71ec267c809cc3fea0d5c888aff61255aed8
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed Sep 28 19:00:56 2011 -0400

    Close All Tabs shortcut
    
    Enable CTRL+Click on the close tab "X" to close all tabs.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
index 61d239c..65aa26c 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js
+++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
@@ -273,7 +273,31 @@ main.menu.prototype = {
             ],
             'cmd_close_tab' : [
                 ['oncommand'],
-                function() { obj.close_tab(); }
+                function(event) {
+                    var myEvent = event;
+                    var closeAll = false;
+                    if(event && event.sourceEvent) myEvent = event.sourceEvent;
+                    // Note: The last event is not supposed to be myEvent in this if.
+                    if(myEvent && myEvent.explicitOriginalTarget.nodeName.match(/toolbarbutton/) && myEvent.explicitOriginalTarget.command == event.originalTarget.id) {
+                        var value = xulG.pref.getIntPref('ui.key.accelKey');
+                        switch(value) {
+                            case 17:
+                                closeAll = myEvent.ctrlKey;
+                                break;
+                            case 18:
+                                closeAll = myEvent.altKey;
+                                break;
+                            case 224:
+                                closeAll = myEvent.metaKey;
+                                break;
+                        }
+                    }
+                    if(closeAll) {
+                        obj.close_all_tabs();
+                    } else {
+                        obj.close_tab();
+                    }
+                }
             ],
             'cmd_close_all_tabs' : [
                 ['oncommand'],

-----------------------------------------------------------------------

Summary of changes:
 .../xul/staff_client/chrome/content/main/menu.js   |   26 +++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list