[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_6 updated. 04014a714f5c92e3a3f2ef5f118bc5ae14c5da68

Evergreen Git git at git.evergreen-ils.org
Thu Jan 22 16:36:36 EST 2015


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, rel_2_6 has been updated
       via  04014a714f5c92e3a3f2ef5f118bc5ae14c5da68 (commit)
      from  308e6cf7c296438289642da807003b28d1d4ea5f (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 04014a714f5c92e3a3f2ef5f118bc5ae14c5da68
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed Dec 3 13:18:27 2014 -0500

    LP#1398926: Allow symbol popup to trigger on new marc fields
    
    Or rather, new MARC text entry boxes in general.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/xul/staff_client/server/OpenILS/symbol_overlay.js b/Open-ILS/xul/staff_client/server/OpenILS/symbol_overlay.js
index f84a702..dfae01f 100644
--- a/Open-ILS/xul/staff_client/server/OpenILS/symbol_overlay.js
+++ b/Open-ILS/xul/staff_client/server/OpenILS/symbol_overlay.js
@@ -7,16 +7,26 @@ var el = {};
 dojo.addOnLoad(
     function(){
         dojo.query('.plain').forEach(function(node,index,arr){
-            node.addEventListener("keypress", function(event) { 
-                if (event.charCode == 115 && event.ctrlKey){
-                        setNod(node);
-                        $('symbol-panel').openPopup(node, 'after_pointer' );
-                    }
-                 }, true);
+            addSymbolTrigger(node);
         });
     }
 );
 
+function addSymbolTrigger(node) {
+    if (!node.getAttribute('eg_has_symbol_trigger')) {
+        node.addEventListener(
+            "keypress",
+            function(event) { 
+                if (event.charCode == 115 && event.ctrlKey){
+                    setNod(node);
+                    $('symbol-panel').openPopup(node, 'after_pointer' );
+                }
+            },
+            true);
+        node.setAttribute('eg_has_symbol_trigger', 1);
+    }
+}
+
 function setNod(elm){
     el = elm;
 }
diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js
index 2a05414..3455b41 100644
--- a/Open-ILS/xul/staff_client/server/cat/marcedit.js
+++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js
@@ -611,6 +611,9 @@ function createMARCTextbox (element,attrs) {
         set_lock_on_keypress,
         false
     );
+    if ($('symbol-panel')) {
+        addSymbolTrigger(box);
+    }
     box.onkeypress = function (event) {
         var root_node;
         var node = element;

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

Summary of changes:
 .../staff_client/server/OpenILS/symbol_overlay.js  |   22 ++++++++++++++-----
 Open-ILS/xul/staff_client/server/cat/marcedit.js   |    3 ++
 2 files changed, 19 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list