From 2acd0c2239dcf11fee2c611609f2d61fa8d09f42 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 28 Sep 2015 21:36:58 +0000 Subject: [PATCH] webstaff: adjust URL when navigating catalog search results Navigating from record to record after performing a catalog search now sets the URL in the browser to /eg/staff/cat/catalog/record/{record_id}. Clicking on the "Back To Results" button will set the URL back to /eg/staff/cat/catalog/index. This allows staff to copy and paste record URIs more conveniently. Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- Open-ILS/web/js/ui/default/staff/cat/catalog/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 80423a1cd4..4b2bf9d5fc 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 @@ -7,7 +7,7 @@ * */ -angular.module('egCatalogApp', ['ui.bootstrap','ngRoute','egCoreMod','egGridMod', 'egMarcMod', 'egUserMod']) +angular.module('egCatalogApp', ['ui.bootstrap','ngRoute','ngLocationUpdate','egCoreMod','egGridMod', 'egMarcMod', 'egUserMod']) .config(function($routeProvider, $locationProvider, $compileProvider) { $locationProvider.html5Mode(true); @@ -248,6 +248,9 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e if (force_opac_tab) $scope.record_tab = 'catalog'; $scope.in_opac_call = true; $scope.opac_iframe.dom.contentWindow[opac_frame_function](); + if (opac_frame_function == 'rdetailBackToResults') { + $location.update_path('/cat/catalog/index'); + } } } @@ -357,6 +360,7 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e $scope.conjoinedGridDataProvider.refresh(); }); init_parts_url(); + $location.update_path('/cat/catalog/record/' + $scope.record_id); } else { delete $scope.record_id; $scope.from_route = false; -- 2.11.0