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

Evergreen Git git at git.evergreen-ils.org
Tue Mar 6 09:46:58 EST 2012


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  fb08c4afe5807040bdc8a940d8197d92dc24665b (commit)
      from  d3bf88739ea88768d92831062219f76f58b6a1e3 (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 fb08c4afe5807040bdc8a940d8197d92dc24665b
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Tue Mar 6 08:42:36 2012 -0500

    lp948012 double-clicking on list rows
    
    Teaches util.list how to handle double-clicks, and Patron Search to use
    double-clicks for patron retrieval, and Holdings Maintenance to use
    double-clicks for item editing.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/list.js b/Open-ILS/xul/staff_client/chrome/content/util/list.js
index 4013eff..df7f37d 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/list.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js
@@ -174,6 +174,14 @@ util.list.prototype = {
                 false
             );
         }
+        if (typeof params.on_dblclick == 'function') {
+            this.node.addEventListener(
+                'dblclick',
+                params.on_dblclick,
+                false
+            );
+        }
+
         /*
         this.node.addEventListener(
             'mousemove',
diff --git a/Open-ILS/xul/staff_client/server/cat/copy_browser.js b/Open-ILS/xul/staff_client/server/cat/copy_browser.js
index 0fbce27..ce3c578 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_browser.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_browser.js
@@ -1841,6 +1841,18 @@ cat.copy_browser.prototype = {
                             window.xulG.on_select(list);
                         }
                     },
+                    'on_dblclick' : function(ev) {
+                        JSAN.use('util.functional');
+                        JSAN.use('util.widgets');
+                        var sel = obj.list.retrieve_selection();
+                        obj.controller.view.sel_clip.disabled = sel.length < 1;
+                        obj.sel_list = util.functional.map_list(
+                            sel,
+                            function(o) { return o.getAttribute('retrieve_id'); }
+                        );
+                        obj.toggle_actions();
+                        util.widgets.dispatch('command','cmd_edit_items');
+                    },
                     'on_select' : function(ev) {
                         JSAN.use('util.functional');
                         var sel = obj.list.retrieve_selection();
diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js
index 97f23c0..f18ecf5 100644
--- a/Open-ILS/xul/staff_client/server/patron/display.js
+++ b/Open-ILS/xul/staff_client/server/patron/display.js
@@ -735,6 +735,10 @@ patron.display.prototype = {
                             'query' : query,
                             'search_limit' : search_limit,
                             'search_sort' : search_sort,
+                            'on_dblclick' : function(list) {
+                                JSAN.use('util.widgets');
+                                util.widgets.dispatch('command','cmd_patron_retrieve')
+                            },
                             'on_select' : function(list) {
                                 if (!list) return;
                                 if (list.length < 1) return;
diff --git a/Open-ILS/xul/staff_client/server/patron/search_result.js b/Open-ILS/xul/staff_client/server/patron/search_result.js
index 6d71bd5..0512e1c 100644
--- a/Open-ILS/xul/staff_client/server/patron/search_result.js
+++ b/Open-ILS/xul/staff_client/server/patron/search_result.js
@@ -102,6 +102,24 @@ patron.search_result.prototype = {
                         }
                     );
                 },
+                'on_dblclick' : function(ev) {
+                    JSAN.use('util.functional');
+                    var sel = obj.list.retrieve_selection();
+                    var list = util.functional.map_list(
+                        sel,
+                        function(o) { return o.getAttribute('retrieve_id'); }
+                    );
+                    obj.controller.view.cmd_sel_clip.setAttribute('disabled', list.length < 1 );
+                    if (typeof obj.on_dblclick == 'function') {
+                        obj.on_dblclick(list);
+                    }
+                    if (typeof window.xulG == 'object' && typeof window.xulG.on_dblclick == 'function') {
+                        obj.error.sdump('D_PATRON','patron.search_result: Calling external .on_dblclick()\n');
+                        window.xulG.on_dblclick(list);
+                    } else {
+                        obj.error.sdump('D_PATRON','patron.search_result: No external .on_dblclick()\n');
+                    }
+                },
                 'on_select' : function(ev) {
                     JSAN.use('util.functional');
                     var sel = obj.list.retrieve_selection();

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

Summary of changes:
 .../xul/staff_client/chrome/content/util/list.js   |    8 ++++++++
 .../xul/staff_client/server/cat/copy_browser.js    |   12 ++++++++++++
 Open-ILS/xul/staff_client/server/patron/display.js |    4 ++++
 .../staff_client/server/patron/search_result.js    |   18 ++++++++++++++++++
 4 files changed, 42 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list