[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. 9dfd0466c9cc721790ebc914b2041f762ab23cea

Evergreen Git git at git.evergreen-ils.org
Thu May 23 17:32:44 EDT 2019


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_1 has been updated
       via  9dfd0466c9cc721790ebc914b2041f762ab23cea (commit)
      from  649f4a3d5e7c4d91f62dd0b055224dff2cb6ad12 (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 9dfd0466c9cc721790ebc914b2041f762ab23cea
Author: Jane Sandberg <sandbej at linnbenton.edu>
Date:   Thu Dec 6 15:49:40 2018 -0800

    LP1760599: Only show merge records action when multiple bucket records selected
    
    To test:
    1) Create a bucket.
    2) Select one record from your bucket. Right-click on your record or click on the Actions drop-down.
    3) Note that "Merge Selected Records" is clickable.
    4) Apply this commit.
    5) Repeat steps 2-3.  Note that "Merge Selected Records" is no longer
    clickable, unless you select two or more records.
    
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>
    Signed-off-by: Rogan Hamby <rogan.hamby at gmail.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2 b/Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2
index 02aa7f5a5c..ab7461b973 100644
--- a/Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2
+++ b/Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2
@@ -23,6 +23,7 @@
     label="[% l('Transfer Title Holds') %]"></eg-grid-action>
 
   <eg-grid-action label="[% l('Merge Selected Records') %]" 
+    disabled="need_multiple_selected"
     handler="openRecordMergeDialog"></eg-grid-action>
 
   <eg-grid-action label="[% l('Export Records') %]" 
diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js
index 4637f00431..d39d9662bb 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js
@@ -776,6 +776,12 @@ function($scope,  $q , $routeParams,  bucketSvc,  egCore,  $window,
         });
     }
 
+    $scope.need_multiple_selected = function() {
+        var items = $scope.gridControls.selectedItems();
+        if (items.length > 1) return false;
+        return true;
+    }
+
     // fetch the bucket;  on error show the not-allowed message
     if ($scope.bucketId) 
         drawBucket()['catch'](function() { $scope.forbidden = true });

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

Summary of changes:
 Open-ILS/src/templates/staff/cat/bucket/record/t_view.tt2 | 1 +
 Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js | 6 ++++++
 2 files changed, 7 insertions(+)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list