re-enable volume creation without items (and volume editing). Previously, if multipl...
authorJason Etheridge <jason@esilibrary.com>
Tue, 8 Mar 2011 19:13:15 +0000 (14:13 -0500)
committerJason Etheridge <jason@esilibrary.com>
Tue, 8 Mar 2011 19:13:15 +0000 (14:13 -0500)
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js

index b823f89..6769e6c 100644 (file)
@@ -877,11 +877,7 @@ g.stash_and_close = function(param) {
         }
 
         var dont_close = false;
-        if (copies.length > 0) {
-            JSAN.use('cat.util');
-            if (param == 'edit') {
-                copies = cat.util.spawn_copy_editor( { 'edit' : true, 'docid' : g.doc_id, 'copies' : copies, 'caller_handles_update' : true });
-            }
+        if (volumes.length > 0) {
             if (typeof xul_param('update_volume') == 'function') {
                 xul_param('update_volume')(volumes);
             } else {
@@ -893,6 +889,12 @@ g.stash_and_close = function(param) {
                     g.error.standard_unexpected_error_alert('volume update',r);
                 }
             }
+        }
+        if (copies.length > 0) {
+            if (param == 'edit') {
+                JSAN.use('cat.util');
+                copies = cat.util.spawn_copy_editor( { 'edit' : true, 'docid' : g.doc_id, 'copies' : copies, 'caller_handles_update' : true });
+            }
             if (typeof xul_param('update_copy') == 'function') {
                 xul_param('update_copy')(copies);
             } else {