From: Mike Rylander Date: Mon, 12 Oct 2015 20:10:04 +0000 (-0400) Subject: webstaff: allow batch copy attribute editing across bib records X-Git-Tag: sprint4-merge-nov22~742 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d19ea04d9ecee521483b02173effb03efc1ae583;p=working%2FEvergreen.git webstaff: allow batch copy attribute editing across bib records Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 index 519765ec2c..d5b4725621 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 @@ -11,7 +11,7 @@
-
+

[% l('Batch Apply') %]

@@ -64,7 +64,7 @@ focus-next="focusNextFirst" ng-repeat="(lib,callnumbers) in data.tree | orderBy:lib track by lib" ng-init="ind = $index" - record="record.id()" + record="{{record_id}}" only-vols="only_vols" lib="{{lib}}" allcopies="data.copies" diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_view.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_view.tt2 index 2fb627e0f6..1cfa4e059d 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_view.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_view.tt2 @@ -7,7 +7,7 @@ eg-navbar { } - diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js index ebc4bb96c1..da8d00de9d 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js @@ -449,31 +449,27 @@ function($scope, $q , $routeParams , $timeout , $window , $modal , bucketSvc , } $scope.spawnHoldingsEdit = function (copies) { - var rec_hash = {}; + var cp_list = [] angular.forEach($scope.gridControls.selectedItems(), function (i) { - var rec = i['call_number.record.id']; - if (!rec_hash[rec]) rec_hash[rec] = []; - rec_hash[rec].push(i.id); + cp_list.push(i.id); }) - angular.forEach(rec_hash, function(cp_list,r) { - egCore.net.request( - 'open-ils.actor', - 'open-ils.actor.anon_cache.set_value', - null, 'edit-these-copies', { - record_id: r, - copies: cp_list, - hide_vols : true, - hide_copies : false - } - ).then(function(key) { - if (key) { - var url = egCore.env.basePath + 'cat/volcopy/' + key; - $timeout(function() { $window.open(url, '_blank') }); - } else { - alert('Could not create anonymous cache key!'); - } - }); + egCore.net.request( + 'open-ils.actor', + 'open-ils.actor.anon_cache.set_value', + null, 'edit-these-copies', { + record_id: 0, // false-y value for record_id disables record summary + copies: cp_list, + hide_vols : true, + hide_copies : false + } + ).then(function(key) { + if (key) { + var url = egCore.env.basePath + 'cat/volcopy/' + key; + $timeout(function() { $window.open(url, '_blank') }); + } else { + alert('Could not create anonymous cache key!'); + } }); } diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/record.js b/Open-ILS/web/js/ui/default/staff/cat/services/record.js index 853a046ed3..590dea3794 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/services/record.js +++ b/Open-ILS/web/js/ui/default/staff/cat/services/record.js @@ -165,7 +165,9 @@ angular.module('egCoreMod') }); $scope.bib_cn = null; $scope.bib_cn_tooltip = ''; - var label_class = egCore.env.aous['cat.default_classification_scheme'] || 1; + var label_class = 1; + if (egCore.env.aous) + label_class = egCore.env.aous['cat.default_classification_scheme'] || 1; egCore.net.request( 'open-ils.cat', 'open-ils.cat.biblio.record.marc_cn.retrieve', 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 d58ac9f2be..031a43bc7a 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 @@ -252,10 +252,10 @@ function(egCore , $q) { ' type="text" ng-model="barcode" ng-change="updateBarcode()"/>'+ '
'+ '
'+ - '
'+ + '
'+ '
', - scope: { focusNext: "=", copy: "=", callNumber: "=", index: "@" }, + scope: { focusNext: "=", copy: "=", callNumber: "=", index: "@", record: "@" }, controller : ['$scope','itemSvc','egCore', function ( $scope , itemSvc , egCore ) { $scope.new_part_id = 0; @@ -328,22 +328,22 @@ function(egCore , $q) { template: '
'+ '
'+ - ''+ '
'+ '
'+ - ''+ '
'+ - '
'+ + '
'+ '
'+ - ''+ '
'+ - '
'+ + '
'+ '
'+ - ''+ + ''+ '
'+ '
', - scope: {focusNext: "=", allcopies: "=", copies: "=", onlyVols: "=" }, + scope: {focusNext: "=", allcopies: "=", copies: "=", onlyVols: "=", record: "@" }, controller : ['$scope','itemSvc','egCore', function ( $scope , itemSvc , egCore ) { $scope.callNumber = $scope.copies[0].call_number(); @@ -509,10 +509,10 @@ function(egCore , $q) { replace: true, template: '
'+ - '
'+ - '
'+ + '
'+ + '
'+ '
'+ - ''+ ''+ diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index af64ef4439..fefe0c41f1 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -216,11 +216,12 @@ function($modal, $interpolate) { replace: true, scope: { list: "=", // list of strings - selected: "=" + selected: "=", + egDisabled: "=" }, template: '
'+ - ''+ + ''+ '
'+ ''+ '