<eg-grid
id-field="id"
idl-class="acp"
+ menu-label="[% l('Save... ') %]"
features="-pagination,-actions,-index"
items-provider="completedGridDataProvider"
grid-controls="completedGridControls"
persist-key="cat.volcopy.copies.complete">
- <eg-grid-menu-item handler="completeToWorking"
+ <eg-grid-menu-item standalone="true" handler="completeToWorking"
label="[% l('Edit Selected') %]"></eg-grid-menu-item>
+ <eg-grid-menu-item handler="saveAndContinue"
+ label="[% l('Save Completed') %]"></eg-grid-menu-item>
<eg-grid-menu-item handler="saveAndExit"
label="[% l('Save & Exit') %]"></eg-grid-menu-item>
$scope.saveCompletedCopies = function (and_exit) {
var cnHash = {};
var perCnCopies = {};
- angular.forEach( $scope.completed_copies, function (cp) {
+ angular.forEach( egCore.idl.Clone($scope.completed_copies), function (cp) {
var cn_id = cp.call_number().id();
if (!cnHash[cn_id]) {
cnHash[cn_id] = cp.call_number();
});
}
+ $scope.saveAndContinue = function () {
+ $scope.saveCompletedCopies(false);
+ }
+
$scope.saveAndExit = function () {
$scope.saveCompletedCopies(true);
}