From: Kyle Huckins Date: Wed, 13 Feb 2019 18:09:07 +0000 (+0000) Subject: CAT-206 Cataloging Date in Webby X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0ca17b02252dcc6692f10b352384ff59f81c64a3;p=working%2FEvergreen.git CAT-206 Cataloging Date in Webby - Add Cataloging Date row to marc edit interface - Add update and clear buttons for Cataloging Date Signed-off-by: Kyle Huckins Changes to be committed: modified: Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2 modified: Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js --- 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 5ba785945b..5ec1415c77 100644 --- a/Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2 +++ b/Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2 @@ -51,6 +51,24 @@ + +
+
+
+ + [% l('Cataloging Date:') %] + + +
+
+
+ + + + +
+ +
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 4d2f9c97a5..63310ff0e6 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 @@ -1193,6 +1193,9 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap']) $scope.dirtyFlag = false; $scope.flat_text_marc = $scope.record.toBreaker(); + if ($scope.record_type == 'bre') { + $scope.cataloging_date = new Date(rec.cataloging_date()) || new Date(); + } if ($scope.record_type == 'bre' && !$scope.brandNewRecord) { $scope.bib_source.id = $scope.bibSource = rec.source(); //$scope.Record().source(); } @@ -1257,6 +1260,16 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap']) return true; }; + $scope.updateDate = function(cataloging_date) { + if (cataloging_date instanceof Date && !isNaN(cataloging_date)) { + $scope.Record().cataloging_date(new Date(cataloging_date).toISOString()); + } else if (!cataloging_date) { + $scope.Record.cataloging_date(null); + } else { + return; + } + } + $scope.processRedo = function () { if ($scope.record_redo_stack.length) { $scope.in_redo = true;