s.IMPORT_BUTTON_LABEL = "[% l('Import') %]";
s.SAVE_BUTTON_LABEL = "[% l('Save') %]";
s.OVERLAY_CHANGED_TITLE = "[% l('Overlay target changed') %]";
- s.OVERLAY_CHANGED = "[% l('The overlay target has changed from [_1] to [_2]. Continue with overlay of record [_2]?', '{{id}}', '{{live_id}}') %]";
+ s.OVERLAY_CHANGED = "[% l('The overlay target has changed from [_1] (TCN [_2]) to [_3] (TCN [_4]). Continue with overlay of record [_3]?', '{{id}}', '{{tcn}}', '{{live_id}}', '{{live_tcn}}') %]";
s.OVERLAY_REMOVED_TITLE = "[% l('Overlay target removed') %]";
s.OVERLAY_REMOVED = "[% l('The overlay target has been removed. The previous target was record [_1]. Continue with overlay of record [_1]?', '{{id}}') %]";
}]);
};
$scope.local_overlay_target = egCore.hatch.getLocalItem('eg.cat.marked_overlay_record') || 0;
+ $scope.local_overlay_target_tcn = egCore.hatch.getLocalItem('eg.cat.marked_overlay_tcn') || 0;
if($scope.local_overlay_target) {
var currTarget = $scope.local_overlay_target;
get_tcn(currTarget);
get_tcn(currTarget);
}
egCore.hatch.setLocalItem('eg.cat.marked_overlay_record',$scope.local_overlay_target);
+ egCore.hatch.setLocalItem('eg.cat.marked_overlay_tcn',$scope.local_overlay_target_tcn);
}
function get_tcn(currTarget) {
$scope.overlay_record = function() {
var items = $scope.gridControls.selectedItems();
var overlay_target = $scope.local_overlay_target;
+ var overlay_target_tcn = $scope.local_overlay_target_tcn;
var live_overlay_target = egCore.hatch.getLocalItem('eg.cat.marked_overlay_record') || 0;
+ var live_overlay_target_tcn = egCore.hatch.getLocalItem('eg.cat.marked_overlay_tcn') || 0;
var args = {
'marc_xml' : items[0]['marcxml'],
'bib_source' : null
.then(function(rec) {
$scope.overlay_target.orig_marc_xml = rec.marc();
$scope.merge_marc(); // in case a sticky value was already set
+ $scope.overlay_target_tcn = overlay_target_tcn;
});
}
egConfirmDialog.open(
confirm_title,
confirm_msg,
- { id : overlay_target, live_id : live_overlay_target }
+ { id : overlay_target, live_id : live_overlay_target,
+ tcn : overlay_target_tcn, live_tcn: live_overlay_target_tcn}
).result.then(
function () { // proceed -- but check live overlay for unset-ness
if (live_overlay_target != 0) {
).then(
function(result) {
$scope.local_overlay_target = 0;
+ $scope.local_overlay_target_tcn = 0;
egCore.hatch.removeLocalItem('eg.cat.marked_overlay_record');
+ egCore.hatch.removeLocalItem('eg.cat.marked_overlay_tcn');
console.debug('overlay complete, target removed');
$window.open('/eg2/staff/catalog/record/' + overlay_target);
}