From 4d4807e49c3f2f18f7ec1340182193a5c50deab3 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 24 Feb 2016 11:02:42 -0500 Subject: [PATCH] LP#1570091: Show (index / hit count) in the Back To Results button Signed-off-by: Mike Rylander Signed-off-by: Bill Erickson Conflicts: Open-ILS/src/templates/opac/parts/record/navigation.tt2 Signed-off-by: Galen Charlton Signed-off-by: Bill Erickson --- .../opac/parts/record/navigation.tt2 | 5 +++++ .../templates/staff/cat/catalog/t_catalog.tt2 | 2 +- .../js/ui/default/staff/cat/catalog/app.js | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/opac/parts/record/navigation.tt2 b/Open-ILS/src/templates/opac/parts/record/navigation.tt2 index 003f6bdd59..e44e8da928 100644 --- a/Open-ILS/src/templates/opac/parts/record/navigation.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/navigation.tt2 @@ -2,6 +2,11 @@
[% l('Search Results') %] + + [% l('Showing Item [_1] of [_2]', ctx.search_result_index + 1, ctx.hit_count) %] diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 index 39ec70172c..3dd663890e 100644 --- a/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 +++ b/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 @@ -18,7 +18,7 @@ [% l('End') %]
diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js index bfa8ee600d..e2540b6767 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js @@ -248,6 +248,25 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e $scope.opac_iframe = null; $scope.parts_iframe = null; + $scope.search_result_index = 1; + $scope.search_result_hit_count = 1; + + $scope.$watch( + 'opac_iframe.dom.contentWindow.search_result_index', + function (n,o) { + if (!isNaN(parseInt(n))) + $scope.search_result_index = n + 1; + } + ); + + $scope.$watch( + 'opac_iframe.dom.contentWindow.search_result_hit_count', + function (n,o) { + if (!isNaN(parseInt(n))) + $scope.search_result_hit_count = n; + } + ); + $scope.in_opac_call = false; $scope.opac_call = function (opac_frame_function, force_opac_tab) { if ($scope.opac_iframe) { -- 2.43.2