LP1747664: Restore Call Number Editing user/jboyer/lp1747664-edit-volumes
authorJason Boyer <jboyer@library.in.gov>
Tue, 6 Feb 2018 17:07:42 +0000 (12:07 -0500)
committerJason Boyer <jboyer@library.in.gov>
Tue, 6 Feb 2018 17:07:42 +0000 (12:07 -0500)
This patch allows call numbers to be edited from
item status and copy buckets again, so long as there's
only a single bib record involved. Multi-record copy
edits result in only the items themselves being editable.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Open-ILS/web/js/ui/default/staff/circ/services/item.js

index 79a8b0f..4d24e43 100644 (file)
@@ -675,6 +675,8 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog
 
     service.spawnHoldingsEdit = function (items,hide_vols,hide_copies){
         var item_ids = [];
+       var record_ids = service.gatherSelectedRecordIds(items);
+
         angular.forEach(items, function(i){
            item_ids.push(i.id);
         });
@@ -685,7 +687,7 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog
            null,
            'edit-these-copies',
            {
-               record_id: 0,  // disables record summary
+               record_id: record_ids.length > 1 ? 0 : record_ids[0],
                copies: item_ids,
                raw: {},
                hide_vols : hide_vols,