[open-ils-commits] [GIT] Evergreen ILS branch master updated. 7114cd60a39a0929761eca9469ce2af8fc040f00

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, master has been updated
       via  7114cd60a39a0929761eca9469ce2af8fc040f00 (commit)
      from  78389b7bc689069cec741b583cb1bd8b6353a161 (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 7114cd60a39a0929761eca9469ce2af8fc040f00
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 a9fa25e132..e7c80d3d26 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
@@ -788,6 +788,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