LP#1710405 - remove Modify + Use Edits buttons in z3950 overlay user/cesardv/lp1710405_z3950_overlay_edit_save
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Thu, 30 Nov 2017 20:36:35 +0000 (15:36 -0500)
committerCesar Velez <cesar.velez@equinoxinitiative.org>
Thu, 30 Nov 2017 20:36:35 +0000 (15:36 -0500)
The workflow for using a z3950 record to overlay a marked bib
was confusing since it requires first saving the z3950 marc edits
via the Modify button at the top, and only then hitting Use Edits,
at the bottom of the modals. User often miss the click Modify part,
 thus this simplifies that, having just a "Save" button and a Cancel.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Open-ILS/src/templates/staff/cat/z3950/t_edit_overlay_record.tt2
Open-ILS/web/js/ui/default/staff/cat/z3950/app.js

index 0362fe3..7ebc94e 100644 (file)
@@ -6,11 +6,9 @@
   </div>
   <div class="modal-body">
     <eg-marc-edit-record dirty-flag="dirty_flag" record-id="record_id" 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>
index 09bf70f..5ca0582 100644 (file)
@@ -360,7 +360,8 @@ function($scope , $q , $location , $timeout , $window,  egCore , egGridDataProvi
                 args.overlay_target = $scope.overlay_target;
                 $scope.ok = function(args) { $uibModalInstance.close(args) };
                 $scope.cancel = function () { $uibModalInstance.dismiss() };
-                $scope.editOverlayRecord = function() {
+                
+               $scope.editOverlayRecord = function() {
                     $uibModal.open({
                         templateUrl: './cat/z3950/t_edit_overlay_record',
                         backdrop: 'static',
@@ -371,7 +372,7 @@ function($scope , $q , $location , $timeout , $window,  egCore , egGridDataProvi
                             $scope.record_id = 0;
                             $scope.dirty_flag = false;
                             $scope.args = args;
-                            $scope.ok = function(args) { $uibModalInstance.close(args) }
+                            $scope.ok = function() { $uibModalInstance.close($scope.args) }
                             $scope.cancel = function () { $uibModalInstance.dismiss() }
                         }]
                     }).result.then(function (args) {