From 75ac833a0eecfa4dddec70ebd197fb683bdf9e8a Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 12 Dec 2014 16:41:24 -0500 Subject: [PATCH] LP#1402797 Focus patron search field on search, expand, clear Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/staff/circ/patron/t_search.tt2 | 8 +++++--- Open-ILS/web/js/ui/default/staff/circ/patron/app.js | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) 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(); } -- 2.43.2