LP#1739087 - add [x] to volcopy editor volume rows-FollowUp
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Thu, 16 Aug 2018 21:40:56 +0000 (17:40 -0400)
committerJason Etheridge <jason@EquinoxInitiative.org>
Wed, 12 Sep 2018 12:42:49 +0000 (08:42 -0400)
Since we're programmatically changing the Volume counter,
must manually trigger the change event, to prevent sync issues.

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

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 43a4930..496b93d 100644 (file)
@@ -570,7 +570,7 @@ function(egCore , $q) {
         template:
             '<div class="row">'+
                 '<div class="col-xs-2">'+
-                    '<button style="margin:-5px -15px; float:left;" ng-hide="callNumber.not_ephemeral" type="button" class="close" ng-click="removeCN()">&times;</button>' +
+                    '<button aria-label="Delete" style="margin:-5px -15px; float:left;" ng-hide="callNumber.not_ephemeral" type="button" class="close" ng-click="removeCN()">&times;</button>' +
                     '<select ng-disabled="record == 0" class="form-control" ng-model="classification" ng-change="updateClassification()" ng-options="cl.name() for cl in classification_list"/>'+
                 '</div>'+
                 '<div class="col-xs-1">'+
@@ -770,7 +770,8 @@ function(egCore , $q) {
 
                     // manually decrease cn_count numeric input
                     var cn_spinner = $("input[name='cn_count_lib"+ cn.owning_lib() +"']");
-                    cn_spinner.val(parseInt(cn_spinner.val()) - 1);
+                    if (cn_spinner.val() > 0) cn_spinner.val(parseInt(cn_spinner.val()) - 1);
+                    cn_spinner.trigger("change");
 
                 }
 
@@ -1007,6 +1008,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
         // manually increase cn_count numeric input
         var cn_spinner = $("input[name='cn_count_lib"+ newLib.id() +"']");
         cn_spinner.val(parseInt(cn_spinner.val()) + 1);
+        cn_spinner.trigger("change");
 
         if (!$scope.defaults.classification) {
             egCore.org.settings(