From 7207f80e092dce3b3b1bf9c67304376c50ec1fc4 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 22 Feb 2006 21:54:52 +0000 Subject: [PATCH] fixes git-svn-id: svn://svn.open-ils.org/ILS/trunk@3170 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/server/cat/copy_buckets.js | 5 +++-- Open-ILS/xul/staff_client/server/cat/copy_editor.js | 13 +++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js index e2682e622b..8a424b6641 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js @@ -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' ); diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 052d8e6cb9..14c92d52fd 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -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'); -- 2.43.2