From 197ab7554b99d7db07bf5ce3c850bfb666d46201 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 24 Sep 2015 20:07:56 +0000 Subject: [PATCH] webstaff: provide feedback after record imported via Z39.50 Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 | 10 ++++++++++ Open-ILS/src/templates/staff/cat/z3950/index.tt2 | 1 + Open-ILS/web/js/ui/default/staff/cat/z3950/app.js | 16 ++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 diff --git a/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 b/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 new file mode 100644 index 0000000000..50cc1a7835 --- /dev/null +++ b/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 @@ -0,0 +1,10 @@ +[%# Strings for cat/z3950/app.js %] + + diff --git a/Open-ILS/src/templates/staff/cat/z3950/index.tt2 b/Open-ILS/src/templates/staff/cat/z3950/index.tt2 index 291b335344..51eeeccd1b 100644 --- a/Open-ILS/src/templates/staff/cat/z3950/index.tt2 +++ b/Open-ILS/src/templates/staff/cat/z3950/index.tt2 @@ -8,6 +8,7 @@ [% BLOCK APP_JS %] +[% INCLUDE 'staff/cat/share/z3950_strings.tt2' %] diff --git a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js index 3d8d9d13f3..4cb33d3f82 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js @@ -27,7 +27,9 @@ angular.module('egCatZ3950Search', */ .controller('Z3950SearchCtrl', ['$scope','$q','$location','$timeout','$window','egCore','egGridDataProvider','egZ3950TargetSvc','$modal', -function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvider, egZ3950TargetSvc, $modal) { + 'egConfirmDialog', +function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvider, egZ3950TargetSvc, $modal, + egConfirmDialog) { // get list of targets egZ3950TargetSvc.loadTargets(); @@ -225,7 +227,17 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi function() { deferred.resolve() }, null, // onerror function(result) { - console.debug('imported'); + egConfirmDialog.open( + egCore.strings.IMPORTED_RECORD_FROM_Z3950, + egCore.strings.IMPORTED_RECORD_FROM_Z3950_AS_ID, + { id : result.id() }, + egCore.strings.GO_TO_RECORD, + egCore.strings.GO_BACK + ).result.then(function() { + // NOTE: $location.path('/cat/catalog/record/' + result.id()) did not work + // for some reason + $window.location.href = egCore.env.basePath + 'cat/catalog/record/' + result.id(); + }); } ); -- 2.11.0