[open-ils-commits] [GIT] Evergreen ILS branch rel_3_3 updated. f6cd9d92a9c84fdd18f1ee482842074290c63f36

Evergreen Git git at git.evergreen-ils.org
Wed Jul 22 10:37:17 EDT 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_3_3 has been updated
       via  f6cd9d92a9c84fdd18f1ee482842074290c63f36 (commit)
      from  3bb0331e266e95c87e3f7f567a38377317ebd7a8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f6cd9d92a9c84fdd18f1ee482842074290c63f36
Author: Jane Sandberg <sandbej at linnbenton.edu>
Date:   Sun Mar 8 07:58:09 2020 -0700

    LP1845241: Use the correct API call to Undelete a bib record
    
    To test:
    
    1) Open up a delete-ready bibliographic record in the Web client
    (no attached holdings, no located URI, no open orders attached, etc.)
    2) Delete it.
    3) Undelete it.  Note that the "Undelete" button briefly turns into a
    "Delete" button before changing back to an "Undelete" button.  Note that
    the bib record does not show up in search results within the Web client.
    4) Apply this commit.
    5) Now try undeleting the record again.  Notice that the "Delete" button
    does not revert to an "Undelete" button.  Note also that the record is
    once again showing up in search results (although you may have to be a
    bit creative using search terms, due to search results caching).
    
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>
    Signed-off-by: blake <blake at mobiusconsortium.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/cat/share/marcedit_strings.tt2 b/Open-ILS/src/templates/staff/cat/share/marcedit_strings.tt2
index 295078c534..38d279237e 100644
--- a/Open-ILS/src/templates/staff/cat/share/marcedit_strings.tt2
+++ b/Open-ILS/src/templates/staff/cat/share/marcedit_strings.tt2
@@ -12,10 +12,12 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
     s.CONFIRM_DELETE_BRE_MSG    = "[% l('Are you sure you want to delete title record [_1] from the catalog?', '{{id}}') %]";
     s.CONFIRM_DELETE_ARE_MSG    = "[% l('Are you sure you want to delete authority record [_1] from the catalog?', '{{id}}') %]";
     s.ALERT_DELETE_FAILED       = "[% l('Could not delete record [_1]: [_2]', '{{id}}', '{{desc}}') %]";
+    s.ALERT_UNDELETE_FAILED     = "[% l('Could not undelete record [_1]: [_2]', '{{id}}', '{{desc}}') %]";
     s.DIRTY_MARC_WARNING        = "[% l('There is unsaved data in this record.') %]"
     s.MARC_ALERT_CREATE_SUCCESS = "[% l('Successfully created new record') %]";
     s.MARC_ALERT_CREATE_FAILED  = "[% l('Failed to create new record: [_1]', '{{error}}') %]";
     s.MARC_ALERT_UPDATE_SUCCESS = "[% l('Successfully updated record') %]";
     s.MARC_ALERT_UPDATE_FAILED  = "[% l('Failed to update record: [_1]', '{{error}}') %]";
+    s.SUCCESS_UNDELETE_RECORD   = "[% l('Record is no longer deleted') %]";
 }]);
 </script>
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 3967267aa7..0a6a0dddef 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
@@ -1331,8 +1331,24 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                 };
 
                 $scope.undeleteRecord = function () {
-                    $scope.Record().deleted(false);
-                    return $scope.saveRecord();
+                    if ($scope.record_type == 'bre') {
+                        egCore.net.request(
+                            'open-ils.cat',
+                            'open-ils.cat.biblio.record_entry.undelete',
+                            egCore.auth.token(), $scope.recordId
+                        ).then(function(resp) {
+                            var evt = egCore.evt.parse(resp);
+                            if (evt) {
+                                return egAlertDialog.open(
+                                    egCore.strings.ALERT_UNDELETE_FAILED,
+                                    { id : $scope.recordId, desc : evt.desc }
+                                );
+                            } else {
+                                ngToast.create(egCore.strings.SUCCESS_UNDELETE_RECORD);
+                                loadRecord().then(processOnSaveCallbacks);
+                            }
+                        });
+                    }
                 };
 
                 $scope.validateHeadings = function () {

-----------------------------------------------------------------------

Summary of changes:
 .../templates/staff/cat/share/marcedit_strings.tt2   |  2 ++
 .../web/js/ui/default/staff/cat/services/marcedit.js | 20 ++++++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list