[open-ils-commits] r18793 - branches/rel_2_0/Open-ILS/xul/staff_client/server/serial (dbwells)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 18 14:30:09 EST 2010
Author: dbwells
Date: 2010-11-18 14:30:05 -0500 (Thu, 18 Nov 2010)
New Revision: 18793
Modified:
branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_items.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/select_unit.xul
Log:
Replace deprecated use of window.opener in unit selection window.
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_items.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_items.js 2010-11-18 19:22:46 UTC (rev 18792)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_items.js 2010-11-18 19:30:05 UTC (rev 18793)
@@ -491,19 +491,18 @@
'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),
- 'sel_serial_sunit_win_' + win.window_name_increment(),
- 'chrome,resizable,modal,centerscreen'
+ '_blank',
+ '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;
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/select_unit.xul
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/select_unit.xul 2010-11-18 19:22:46 UTC (rev 18792)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/select_unit.xul 2010-11-18 19:30:05 UTC (rev 18793)
@@ -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();
}
More information about the open-ils-commits
mailing list