From 8d5b248785636a53cc2a681116dda8f0adfb7525 Mon Sep 17 00:00:00 2001 From: dbwells Date: Thu, 18 Nov 2010 19:22:46 +0000 Subject: [PATCH] Replace deprecated use of window.opener in unit selection window. git-svn-id: svn://svn.open-ils.org/ILS/trunk@18792 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/serial/manage_items.js | 11 +++++------ Open-ILS/xul/staff_client/server/serial/select_unit.xul | 6 ++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/serial/manage_items.js b/Open-ILS/xul/staff_client/server/serial/manage_items.js index 756ea5d57..4e757be98 100644 --- a/Open-ILS/xul/staff_client/server/serial/manage_items.js +++ b/Open-ILS/xul/staff_client/server/serial/manage_items.js @@ -491,19 +491,18 @@ serial.manage_items.prototype = { 'set_other_sunit' : function() { var obj = this; try { - g.serial_items_sunit_select = ''; - g.serial_items_sdist_ids = obj.sdist_ids; JSAN.use('util.window'); var win = new util.window(); - win.open( + var select_unit_window = win.open( xulG.url_prefix(urls.XUL_SERIAL_SELECT_UNIT), '_blank', - 'chrome,resizable,modal,centerscreen' + 'chrome,resizable,modal,centerscreen', + {'sdist_ids' : obj.sdist_ids} ); - if (!g.serial_items_sunit_select) { + if (!select_unit_window.sunit_selection) { return; } - var selection = g.serial_items_sunit_select; + var selection = select_unit_window.sunit_selection; var sunit_id = selection.sunit; var sdist_id = selection.sdist; var sstr_id = selection.sstr; diff --git a/Open-ILS/xul/staff_client/server/serial/select_unit.xul b/Open-ILS/xul/staff_client/server/serial/select_unit.xul index 9fc93efca..0347ad80c 100644 --- a/Open-ILS/xul/staff_client/server/serial/select_unit.xul +++ b/Open-ILS/xul/staff_client/server/serial/select_unit.xul @@ -46,10 +46,12 @@ var ml; JSAN.use('util.network'); g.network = new util.network(); + var sdist_ids = xul_param('sdist_ids',{'modal_xulG':true}); + //TODO: unit_list.retrieve option for binding units only (that is, units containing bound items only) var robj = g.network.request( 'open-ils.serial', 'open-ils.serial.unit_list.retrieve', - opener.g.serial_items_sdist_ids + sdist_ids ); if (typeof robj.ilsevent != 'undefined') throw(robj); ml = util.widgets.make_menulist(robj); @@ -64,7 +66,7 @@ g.select_unit = function() { var selection = JSON2js($('unit_menu').value); selection.label = $('unit_menu').selectedItem.label; - opener.g.serial_items_sunit_select = selection; + update_modal_xulG({'sunit_selection' : selection}); window.close(); } -- 2.11.0