fixes
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Feb 2006 21:54:52 +0000 (21:54 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Feb 2006 21:54:52 +0000 (21:54 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3170 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/copy_buckets.js
Open-ILS/xul/staff_client/server/cat/copy_editor.js

index e2682e6..8a424b6 100644 (file)
@@ -238,11 +238,11 @@ cat.copy_buckets.prototype = {
                                                                        var robj = obj.network.simple_request('BUCKET_ITEM_DELETE',
                                                                                [ obj.session, 'copy', bucket_item_id ]);
                                                                        if (typeof robj == 'object') throw robj;
-                                                                       obj.controller.render('copy_buckets_menulist_placeholder');
                                                                } catch(E) {
                                                                        alert(js2JSON(E));
                                                                }
                                                         }
+                                                       obj.controller.render('copy_buckets_menulist_placeholder');
                                                }
                                        ],
                                        'copy_buckets_delete_bucket' : [
@@ -302,7 +302,8 @@ cat.copy_buckets.prototype = {
                                                                                        }
                                                                                )
                                                                        ) )
-                                                                       + '&single_edit=1',
+                                                                       + '&single_edit=1'
+                                                                       + '&handle_update=1',
                                                                        'batch_copy_editor_win_' + win.window_name_increment(),
                                                                        'chrome,resizable,modal'
                                                                );
index 052d8e6..14c92d5 100644 (file)
@@ -20,6 +20,7 @@ function my_init() {
 
                g.session = g.cgi.param('session') || g.cgi.param('ses');
                g.docid = g.cgi.param('docid');
+               g.handle_update = g.cgi.param('handle_update');
 
                /******************************************************************************************************/
                /* Get the copy ids from various sources and flesh them */
@@ -732,6 +733,18 @@ g.render_input = function(node,input_cmd) {
 /* store the copies in the global xpcom stash */
 
 g.stash_and_close = function() {
+       if (g.handle_update) {
+               try {
+                       var r = g.network.request(
+                               api.FM_ACP_FLESHED_BATCH_UPDATE.app,
+                               api.FM_ACP_FLESHED_BATCH_UPDATE.method,
+                               [ g.session, g.copies ]
+                       );
+                       /* FIXME -- revisit the return value here */
+               } catch(E) {
+                       alert('copy update error: ' + js2JSON(E));
+               }
+       }
        g.data.temp = js2JSON( g.copies );
        g.error.sdump('D_CAT','in modal window, g.data.temp = \n' + g.data.temp + '\n');
        g.data.stash('temp');