[open-ils-commits] [GIT] Evergreen ILS branch master updated. ef3fa1488e4a84f998a4ba2671d796a553f7c07c

Evergreen Git git at git.evergreen-ils.org
Wed Sep 12 08:45:26 EDT 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  ef3fa1488e4a84f998a4ba2671d796a553f7c07c (commit)
       via  7417b395d9b790cbcd66914a3884b6a3d248d2e0 (commit)
       via  ad1d99ce712afef42c099b935d377f97a8ffb385 (commit)
      from  6fb3aaba241eee24be54751b63e923436c38d047 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ef3fa1488e4a84f998a4ba2671d796a553f7c07c
Author: Cesar Velez <cesar.velez at equinoxinitiative.org>
Date:   Mon Aug 20 15:09:56 2018 -0400

    LP#1739087 - enable vol to be zeroed
    
    Allow user to "blank" or "zero out" a volume row by using the new "x"
    
    Signed-off by: Cesar Velez <cesar.velez at equinoxinitiative.org>
    
    Signed-off-by: Jason Etheridge <jason at EquinoxInitiative.org>

diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
index 496b93d..804b7ee 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
@@ -1507,7 +1507,11 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                     );
 
                     angular.forEach(itemSvc.copies, function(c){
-                        c.call_number().not_ephemeral = true;
+                        var cn = c.call_number();
+                        var copy_id = c.id();
+                        if (copy_id > 0){
+                            cn.not_ephemeral = true;
+                        }
                     });
 
                     return itemSvc.copies;

commit 7417b395d9b790cbcd66914a3884b6a3d248d2e0
Author: Cesar Velez <cesar.velez at equinoxinitiative.org>
Date:   Thu Aug 16 17:40:56 2018 -0400

    LP#1739087 - add [x] to volcopy editor volume rows-FollowUp
    
    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 at equinoxinitiative.org>
    
    Signed-off-by: Jason Etheridge <jason at EquinoxInitiative.org>

diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
index 43a4930..496b93d 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
@@ -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()">×</button>' +
+                    '<button aria-label="Delete" style="margin:-5px -15px; float:left;" ng-hide="callNumber.not_ephemeral" type="button" class="close" ng-click="removeCN()">×</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(

commit ad1d99ce712afef42c099b935d377f97a8ffb385
Author: Cesar Velez <cesar.velez at equinoxinitiative.org>
Date:   Fri Jul 27 11:21:25 2018 -0400

    LP#1739087 - add [x] to volcopy editor volume rows
    
    Enable newly created call numbers to be removable in
    VolCopyEditor.
    
    Signed-off by: Cesar Velez <cesar.velez at equinoxinitiative.org>
    
    Signed-off-by: Jason Etheridge <jason at EquinoxInitiative.org>

diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
index 72fee0e..43a4930 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
@@ -479,7 +479,7 @@ function(egCore , $q) {
                     '<div class="label label-danger" ng-if="empty_barcode">{{empty_barcode_string}}</div>'+
                 '</div>'+
                 '<div class="col-xs-3"><input class="form-control" type="number" min="1" ng-model="copy_number" ng-change="updateCopyNo()"/></div>'+
-                '<div class="col-xs-4"><eg-basic-combo-box eg-disabled="record == 0" list="parts" selected="part"></eg-basic-combo-box></div>'+
+                '<div class="col-xs-3"><eg-basic-combo-box eg-disabled="record == 0" list="parts" selected="part"></eg-basic-combo-box></div>'+
             '</div>',
 
         scope: { focusNext: "=", copy: "=", callNumber: "=", index: "@", record: "@" },
@@ -570,6 +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()">×</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">'+
@@ -588,7 +589,7 @@ function(egCore , $q) {
                 '</div>'+
             '</div>',
 
-        scope: {focusNext: "=", allcopies: "=", copies: "=", onlyVols: "=", record: "@" },
+        scope: {focusNext: "=", allcopies: "=", copies: "=", onlyVols: "=", record: "@", struct:"=" },
         controller : ['$scope','itemSvc','egCore',
             function ( $scope , itemSvc , egCore ) {
                 $scope.callNumber =  $scope.copies[0].call_number();
@@ -745,6 +746,34 @@ function(egCore , $q) {
                 $scope.copy_count = $scope.copies.length;
                 $scope.orig_copy_count = $scope.copy_count;
 
+                $scope.removeCN = function(){
+                    var cn = $scope.callNumber;
+                    if (cn.not_ephemeral) return;  // can't delete existing volumes
+
+                    angular.forEach(Object.keys($scope.struct), function(k){
+                        angular.forEach($scope.struct[k], function(cp){
+                            var struct_cn = cp.call_number();
+                            if (struct_cn.id() == cn.id()){
+                                console.log("X'ed CN id" + cn.id() + " and struct CN id match!");
+                                // remove any copies in $scope.struct[k]
+                                angular.forEach($scope.copies, function(c){
+                                    var idx = $scope.allcopies.indexOf(c);
+                                    $scope.allcopies.splice(idx, 1);
+                                });
+
+                                $scope.copies = [];
+                                // remove added vol:
+                                delete $scope.struct[k];
+                            }
+                        });
+                    });
+
+                    // 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);
+
+                }
+
                 $scope.changeCPCount = function () {
                     while ($scope.copy_count > $scope.copies.length) {
                         var cp = itemSvc.generateNewCopy(
@@ -787,11 +816,11 @@ function(egCore , $q) {
         template:
             '<div class="row">'+
                 '<div class="col-xs-1"><eg-org-selector alldisabled="{{record == 0}}" selected="owning_lib" disable-test="cant_have_vols"></eg-org-selector></div>'+
-                '<div class="col-xs-1"><input ng-disabled="record == 0" class="form-control" type="number" min="{{orig_cn_count}}" ng-model="cn_count" ng-change="changeCNCount()"/></div>'+
+                '<div class="col-xs-1"><input name="cn_count_lib{{lib}}" ng-disabled="record == 0" class="form-control" type="number" min="{{orig_cn_count}}" ng-model="cn_count" ng-change="changeCNCount()"/></div>'+
                 '<div class="col-xs-10">'+
                     '<eg-vol-row only-vols="onlyVols" record="{{record}}"'+
                         'ng-repeat="(cn,copies) in struct" '+
-                        'focus-next="focusNextFirst" copies="copies" allcopies="allcopies">'+
+                        'focus-next="focusNextFirst" copies="copies" allcopies="allcopies" struct="struct">'+
                     '</eg-vol-row>'+
                 '</div>'+
             '</div>',
@@ -975,6 +1004,10 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
 
         $scope.data.addCopy(cp);
 
+        // manually increase cn_count numeric input
+        var cn_spinner = $("input[name='cn_count_lib"+ newLib.id() +"']");
+        cn_spinner.val(parseInt(cn_spinner.val()) + 1);
+
         if (!$scope.defaults.classification) {
             egCore.org.settings(
                 ['cat.default_classification_scheme'],
@@ -1471,6 +1504,10 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                         }
                     );
 
+                    angular.forEach(itemSvc.copies, function(c){
+                        c.call_number().not_ephemeral = true;
+                    });
+
                     return itemSvc.copies;
                 }
 

-----------------------------------------------------------------------

Summary of changes:
 .../web/js/ui/default/staff/cat/volcopy/app.js     |   51 ++++++++++++++++++--
 1 files changed, 47 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list