From: Mike Rylander Date: Wed, 2 Sep 2015 14:56:45 +0000 (-0400) Subject: webstaff: Add call number attrs to copy templates X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=643e236766ffbfe2e7e5baaf7275620e506248e4;p=Evergreen.git webstaff: Add call number attrs to copy templates Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 index b38db523a2..d4277043d1 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 @@ -30,6 +30,49 @@ +
+
+
+

[% l('Volume Attributes') %]

+
+
+
+ +
+
+ [% l('Classification') %] +
+
+ +
+
+ [% l('Prefix') %] +
+
+ +
+
+ [% l('Suffix') %] +
+
+ +
+
+ +
+
+
+

[% l('Copy Attributes') %]

+
+
+
+
diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 index 44c28d88a6..f589139914 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2 @@ -4,12 +4,24 @@

[% l('Volume/Copy Detail defaults') %]

+
+
+
+
+
+
+ +
+
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 cfe93f9d9f..71d3a2da75 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 @@ -201,8 +201,8 @@ function(egCore , $q) { '
', scope: { copy: "=", callNumber: "=", index: "@" }, - controller : ['$scope','itemSvc', - function ( $scope , itemSvc ) { + controller : ['$scope','itemSvc','egCore', + function ( $scope , itemSvc , egCore ) { $scope.new_part_id = 0; $scope.nextBarcode = function (i) { @@ -247,7 +247,7 @@ function(egCore , $q) { itemSvc.get_parts($scope.callNumber.record()).then(function(list){ $scope.part_list = list; angular.forEach(list, function(p){ $scope.parts.push(p.label()) }); - $scope.parts = angluar.copy($scope.parts); + $scope.parts = angular.copy($scope.parts); }); } @@ -691,8 +691,15 @@ function($scope , $q , $routeParams , $location , $timeout , egCore , egNet , eg $scope.working[k] = angular.copy(v); } else { angular.forEach(v, function (sv,sk) { - $scope.working[k][sk] = angular.copy(sv); - if (k == 'statcats') $scope.statcatUpdate(sk); + if (k == 'callnumber') { + angular.forEach(v, function (cnv,cnk) { + $scope.batch[cnk] = cnv; + }); + $scope.applyBatchCNValues(); + } else { + $scope.working[k][sk] = angular.copy(sv); + if (k == 'statcats') $scope.statcatUpdate(sk); + } }); } }); @@ -1012,11 +1019,13 @@ function($scope , $q , $routeParams , $location , $timeout , egCore , egNet , eg cnList.push(v); }); - egCore.net.request( + egNet.request( 'open-ils.cat', 'open-ils.cat.asset.volume.fleshed.batch.update.override', cnList, 1, { auto_merge_vols : 1, create_parts : 1 } - ); + ).then(function(update_count) { + alert(update_count + ' call numbers updated'); + }); } } @@ -1263,6 +1272,25 @@ function($scope , $q , $routeParams , $location , $timeout , egCore , egNet , eg createSimpleUpdateWatcher('mint_condition'); createSimpleUpdateWatcher('opac_visible'); createSimpleUpdateWatcher('ref'); + + $scope.suffix_list = []; + itemSvc.get_suffixes(egCore.auth.user().ws_ou()).then(function(list){ + $scope.suffix_list = list; + }); + + $scope.prefix_list = []; + itemSvc.get_prefixes(egCore.auth.user().ws_ou()).then(function(list){ + $scope.prefix_list = list; + }); + + $scope.classification_list = []; + itemSvc.get_classifications().then(function(list){ + $scope.classification_list = list; + }); + + createSimpleUpdateWatcher('working.callnumber.classification'); + createSimpleUpdateWatcher('working.callnumber.prefix'); + createSimpleUpdateWatcher('working.callnumber.suffix'); } ] }