[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. 8196546ae61acb33c8cfec411377f3db4db06486

Evergreen Git git at git.evergreen-ils.org
Thu Jan 22 15:39:39 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, master has been updated
       via  8196546ae61acb33c8cfec411377f3db4db06486 (commit)
      from  3a5aa33048ab82f9f30ed20fdc53e3a928cdb534 (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 8196546ae61acb33c8cfec411377f3db4db06486
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 ca07723..0a9bf03 100644
--- a/Open-ILS/xul/staff_client/server/cat/marcedit.js
+++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js
@@ -619,6 +619,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