webstaff: improve how egVolumeList opens the vol/copy editor
authorGalen Charlton <gmc@esilibrary.com>
Wed, 7 Oct 2015 21:01:51 +0000 (21:01 +0000)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:49 +0000 (14:58 -0500)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/cat/services/holdings.js

index 2201812..e80d712 100644 (file)
@@ -304,7 +304,7 @@ function(egCore , $q) {
                     return cp_id_list;
                 }
 
-                $scope.edit_volumes = function (copies_too) {
+                var spawn_volume_editor = function (copies_too) {
                     egCore.net.request(
                         'open-ils.actor',
                         'open-ils.actor.anon_cache.set_value',
@@ -312,13 +312,14 @@ function(egCore , $q) {
                             record_id: $scope.recordId,
                             copies: gatherHoldingsIds(),
                             hide_vols : false,
-                            hide_copies : (copies_too) ? false : true
+                            hide_copies : ((copies_too) ? false : true)
                         }
                     ).then(function(key) {
                         if (key) {
                             $modal.open({
                                 templateUrl: './cat/share/t_embedded_volcopy',
                                 size: 'lg',
+                                windowClass: 'eg-wide-modal',
                                 controller:
                                     ['$scope', '$modalInstance', function($scope, $modalInstance) {
                                     $scope.volcopy_url = 
@@ -332,8 +333,11 @@ function(egCore , $q) {
                         }
                     });
                 }
+                $scope.edit_volumes = function() {
+                    spawn_volume_editor(false);
+                }
                 $scope.edit_copies = function() {
-                    $scope.edit_volumes(true);
+                    spawn_volume_editor(true);
                 }
 
                 function load_holdings() {