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

Evergreen Git git at git.evergreen-ils.org
Mon Sep 25 16:10:17 EDT 2017


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  decefb50240244a9b033e1e5c77ce63235a9322a (commit)
      from  1f10da4df50b6b4605c95e8ed5f6fb2d3e8f57bd (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 decefb50240244a9b033e1e5c77ce63235a9322a
Author: Bill Erickson <berickxx at gmail.com>
Date:   Thu Sep 21 15:23:55 2017 -0400

    LP#1622364 Avoid precat dialog submit on ISBN enter
    
    Avoid submitting the precat copy checkout entry form when the Enter key
    is pressed on the ISBN field.  Do this to allow scanners to enter ISBN
    data without automatically submitting the form.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Cesar Velez <cesar.velez at equinoxinitiative.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/circ/share/t_precat_dialog.tt2 b/Open-ILS/src/templates/staff/circ/share/t_precat_dialog.tt2
index 1410f9e..0601782 100644
--- a/Open-ILS/src/templates/staff/circ/share/t_precat_dialog.tt2
+++ b/Open-ILS/src/templates/staff/circ/share/t_precat_dialog.tt2
@@ -23,6 +23,7 @@
         <div class="form-group">
           <label for="precat-isbn">[% l('ISBN') %]</label>
           <input type="text" class="form-control" id="precat-isbn"
+            ng-keydown="preventSubmit($event)"
             ng-model="precatArgs.dummy_isbn" placeholder="[% l('ISBN...') %]"/>
         </div>
         <div class="form-group">
diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
index 27755fe..b8f0d60 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
@@ -826,6 +826,13 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
                 $scope.circModifiers = circMods;
                 $scope.ok = function(args) { $uibModalInstance.close(args) }
                 $scope.cancel = function () { $uibModalInstance.dismiss() }
+
+                // use this function as a keydown handler on form
+                // elements that should not submit the form on enter.
+                $scope.preventSubmit = function($event) {
+                    if ($event.keyCode == 13)
+                        $event.preventDefault();
+                }
             }],
             resolve : {
                 circMods : function() { 

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

Summary of changes:
 .../templates/staff/circ/share/t_precat_dialog.tt2 |    1 +
 .../web/js/ui/default/staff/circ/services/circ.js  |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list