Like the changes to the z3950 marceditor UI, and serials,
make the Acq marceditor have a simple Save button, instead
of the Modify + Save Edits buttons needed to save a change.
Same change as in
1710405, et al. Note this also fixes a
propagation issue that prevented changes from marceditor's
scope.marcXml from making it to the modal controller scope,
and being saved. Props to miker for helping me debug this!
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
</div>
<div class="modal-body">
<eg-marc-edit-record dirty-flag="dirty_flag" marc-xml="args.marc_xml"
- in-place-mode="true" record-type="bre" save-label="[% l('Modify') %]" />
+ on-save="ok" in-place-mode="true" record-type="bre" save-label="[% l('Save') %]" />
</div>
<div class="modal-footer">
- <input type="submit" ng-click="ok(args)"
- class="btn btn-primary" value="[% l('Use Edits') %]"/>
<button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
</div>
</div>
$scope.focusMe = true;
$scope.args = args;
$scope.dirty_flag = false;
- $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.ok = function() { $uibModalInstance.close($scope.args) }
$scope.cancel = function () { $uibModalInstance.dismiss() }
}]
}).result.then(function (args) {
$scope.saveRecord = function () {
if ($scope.inPlaceMode) {
$scope.marcXml = $scope.record.toXmlString();
- return processOnSaveCallbacks();
+ return $timeout(processOnSaveCallbacks);
}
$scope.mangle_005();
$scope.Record().editor(egCore.auth.user().id());