[open-ils-commits] r18691 - in trunk/Open-ILS/xul/staff_client: chrome/content/cat server/serial (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Nov 10 16:51:06 EST 2010
Author: senator
Date: 2010-11-10 16:51:01 -0500 (Wed, 10 Nov 2010)
New Revision: 18691
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
trunk/Open-ILS/xul/staff_client/server/serial/select_aou.xul
Log:
Serials: patch from Dan Wells to address Launchpad bug #670734
Previously, a dialog box to select an org unit for the creation of legacy
MFHD records relied on a feature (window.opener) that has been
removed in newer versions of XULRunner.
This patch has that dialog box use a different, safer approach to accomplish
its task.
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js 2010-11-10 21:31:28 UTC (rev 18690)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js 2010-11-10 21:51:01 UTC (rev 18691)
@@ -495,19 +495,19 @@
function create_mfhd() {
try {
- g.data.create_mfhd_aou = '';
JSAN.use('util.window'); var win = new util.window();
- win.open(
+ var select_aou_window = win.open(
xulG.url_prefix(urls.XUL_SERIAL_SELECT_AOU),
'_blank',
- 'chrome,resizable,modal,centerscreen'
+ 'chrome,resizable,modal,centerscreen',
+ {'server_unadorned' : g.data.server_unadorned}
);
- if (!g.data.create_mfhd_aou) {
+ if (!select_aou_window.create_mfhd_aou) {
return;
}
var r = g.network.simple_request(
'MFHD_XML_RECORD_CREATE',
- [ ses(), 1, g.data.create_mfhd_aou, docid ]
+ [ ses(), 1, select_aou_window.create_mfhd_aou, docid ]
);
if (typeof r.ilsevent != 'undefined') {
throw(r);
Modified: trunk/Open-ILS/xul/staff_client/server/serial/select_aou.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/serial/select_aou.xul 2010-11-10 21:31:28 UTC (rev 18690)
+++ trunk/Open-ILS/xul/staff_client/server/serial/select_aou.xul 2010-11-10 21:51:01 UTC (rev 18691)
@@ -48,6 +48,7 @@
var file; var list_data; var ml;
file = new util.file('offline_ou_list');
+ var server_unadorned = xul_param('server_unadorned',{'modal_xulG':true});
if (file._file.exists()) {
list_data = file.get_object(); file.close();
ml = util.widgets.make_menulist( list_data[0], list_data[1] );
@@ -57,7 +58,7 @@
'command',
function(ev) {
//if (document.getElementById('refresh_button')) document.getElementById('refresh_button').focus();
- JSAN.use('util.file'); var file = new util.file('mfhd_create_prefs.'+opener.g.data.server_unadorned);
+ JSAN.use('util.file'); var file = new util.file('mfhd_create_prefs.'+server_unadorned);
util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ] });
},
false
@@ -66,7 +67,7 @@
throw(document.getElementById('catStrings').getString('staff.cat.copy_browser.missing_library') + '\n'); //TODO: different error?
}
- file = new util.file('mfhd_create_prefs.'+opener.g.data.server_unadorned);
+ file = new util.file('mfhd_create_prefs.'+server_unadorned);
util.widgets.load_attributes(file);
ml.value = ml.getAttribute('value');
} catch(E) {
@@ -76,7 +77,7 @@
}
g.select_aou = function() {
- opener.g.data.create_mfhd_aou = $('lib_menu').value;
+ update_modal_xulG({'create_mfhd_aou' : $('lib_menu').value});
window.close();
}
More information about the open-ils-commits
mailing list