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@linnbenton.edu>
Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
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') %]"
});
}
+ $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 });