From: Galen Charlton Date: Thu, 24 Sep 2015 20:52:50 +0000 (+0000) Subject: webstaff: give more feedback for Z39.50 edit-then-import X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=45a3db6fae09212d5860d270684aa9a7d83750b3;p=evergreen%2Fpines.git webstaff: give more feedback for Z39.50 edit-then-import The "edit then import" modal now varies the label of the MARC editor's save button based on whether one has yet to import the current record or if one is just making changes to it after having imported it. The dialog now also has a button for going to the newly-imported record in catalog view. Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2 b/Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2 index 4c1adbe2b4..a487624d4e 100644 --- a/Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2 +++ b/Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2 @@ -47,7 +47,7 @@ - + diff --git a/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 b/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 index 50cc1a7835..7be4638117 100644 --- a/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 +++ b/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 @@ -6,5 +6,7 @@ angular.module('egCoreMod').run(['egStrings', function(s) { s.IMPORTED_RECORD_FROM_Z3950_AS_ID = "[% l('Record imported as ID [_1]', '{{id}}') %]"; s.GO_TO_RECORD = "[% l('Go to record') %]"; s.GO_BACK = "[% l('Go back') %]"; + s.IMPORT_BUTTON_LABEL = "[% l('Import') %]"; + s.SAVE_BUTTON_LABEL = "[% l('Save') %]"; }]); diff --git a/Open-ILS/src/templates/staff/cat/z3950/t_marc_edit.tt2 b/Open-ILS/src/templates/staff/cat/z3950/t_marc_edit.tt2 index ab70dc9f5e..9e0fe2136e 100644 --- a/Open-ILS/src/templates/staff/cat/z3950/t_marc_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/z3950/t_marc_edit.tt2 @@ -6,10 +6,12 @@ diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js b/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js index 64f4b4ee91..3ec54d693a 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js +++ b/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js @@ -582,7 +582,8 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap']) // than to (immediately) update the database inPlaceMode : '@', recordType : '@', - maxUndo : '@' + maxUndo : '@', + saveLabel : '@' }, link: function (scope, element, attrs) { 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 4cb33d3f82..85c0ac0144 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 @@ -251,20 +251,28 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi $scope.spawn_editor = function() { var items = $scope.gridControls.selectedItems(); + var recId = 0; $modal.open({ templateUrl: './cat/z3950/t_marc_edit', size: 'lg', controller: ['$scope', '$modalInstance', function($scope, $modalInstance) { $scope.focusMe = true; - $scope.record_id = 0; + $scope.record_id = recId; $scope.dirty_flag = false; $scope.marc_xml = items[0]['marcxml']; $scope.ok = function(args) { $modalInstance.close(args) } $scope.cancel = function () { $modalInstance.dismiss() } + $scope.save_label = egCore.strings.IMPORT_BUTTON_LABEL; + $scope.import_record_callback = function (record_id) { + recId = record_id; + $scope.save_label = egCore.strings.SAVE_BUTTON_LABEL; + }; }] - }).result.then(function (args) { - if (!args || !args.name) return; + }).result.then(function () { + if (recId) { + $window.location.href = egCore.env.basePath + 'cat/catalog/record/' + recId; + } }); }