From: Galen Charlton Date: Thu, 24 Sep 2015 20:07:56 +0000 (+0000) Subject: webstaff: provide feedback after record imported via Z39.50 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=49101c9e41843e5a83ff64e8416324eeccd4a693;p=working%2FEvergreen.git webstaff: provide feedback after record imported via Z39.50 Signed-off-by: Galen Charlton --- 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(); + }); } );