<eg-grid-action label="[% l('Remove Selected Items from Bucket') %]" group="[% l('Bucket') %]"
handler="detachCopies"></eg-grid-action>
+ <eg-grid-action label="[% l('Move Selected Items to Pending Items') %]" group="[% l('Bucket') %]"
+ handler="moveToPending"></eg-grid-action>
<eg-grid-action label="[% l('Request Selected Items') %]" group="[% l('Items') %]"
handler="requestItems"></eg-grid-action>
<eg-grid-action label="[% l('Edit Selected Items') %]" group="[% l('Items') %]"
<eg-grid-action label="[% l('Remove Selected Records from Bucket') %]"
handler="detachRecords"></eg-grid-action>
+ <eg-grid-action label="[% l('Move Selected Records to Pending Records') %]"
+ handler="moveToPending"></eg-grid-action>
+
<eg-grid-action label="[% l('Delete Selected Records from Catalog') %]"
handler="deleteRecordsFromCatalog"></eg-grid-action>
bucketSvc.bucketNeedsRefresh = true;
return $q.all(promises).then(drawBucket);
}
+
+ $scope.moveToPending = function(copies) {
+ angular.forEach(copies, function(copy) {
+ bucketSvc.pendingList.push(copy.id);
+ });
+ $scope.detachCopies(copies);
+ }
$scope.spawnHoldingsEdit = function (copies) {
var cp_list = []
return $q.all(promises).then(drawBucket);
}
+ $scope.moveToPending = function(records) {
+ angular.forEach(records, function(rec) {
+ if (bucketSvc.pendingList.filter( // remove dupes
+ function(r) {return r.id == rec.id}).length) return;
+ bucketSvc.pendingList.push(rec);
+ });
+ $scope.detachRecords(records);
+ }
+
$scope.deleteRecordsFromCatalog = function(records) {
egConfirmDialog.open(
egCore.strings.CONFIRM_DELETE_RECORD_BUCKET_ITEMS_FROM_CATALOG,