From: Mike Rylander Date: Fri, 12 Dec 2014 21:41:24 +0000 (-0500) Subject: LP#1402797 Focus patron search field on search, expand, clear X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=75ac833a0eecfa4dddec70ebd197fb683bdf9e8a;p=evergreen%2Fmasslnc.git LP#1402797 Focus patron search field on search, expand, clear Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/src/templates/staff/circ/patron/t_search.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_search.tt2 index 29abb4092a..b2034f98cf 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_search.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_search.tt2 @@ -26,21 +26,23 @@ ng-model="searchArgs.second_given_name" placeholder="[% l('Middle Name') %]"/> -
+
-
- +
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js index 49d1e24343..14d699c3f1 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js @@ -884,6 +884,11 @@ function($scope, $q, $routeParams, $timeout, $window, $location, egCore, return d; } + $scope.clearForm = function () { + $scope.searchArgs={}; + window.prevElement.focus(); + } + $scope.applyShowExtras = function($event, bool) { if (bool) { $scope.showExtras = true; @@ -892,6 +897,7 @@ function($scope, $q, $routeParams, $timeout, $window, $location, egCore, $scope.showExtras = false; egCore.hatch.removeItem('eg.circ.patron.search.show_extras'); } + window.prevElement.focus(); $event.preventDefault(); }