[open-ils-commits] r7568 - in trunk/Open-ILS/xul/staff_client:
chrome/content/util server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Jul 21 11:59:55 EDT 2007
Author: phasefx
Date: 2007-07-21 11:59:29 -0400 (Sat, 21 Jul 2007)
New Revision: 7568
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/util/fancy_prompt.xul
trunk/Open-ILS/xul/staff_client/chrome/content/util/window.js
trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.js
Log:
hrmm, the xul_param stuff has the side effect of updating xulG; need to change that. But this fixes the Cancel action or Close Window event for fancy prompts such as Merge Records
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/fancy_prompt.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/fancy_prompt.xul 2007-07-20 12:37:04 UTC (rev 7567)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/fancy_prompt.xul 2007-07-21 15:59:29 UTC (rev 7568)
@@ -48,8 +48,6 @@
//g.data.fancy_prompt_data = ''; g.data.stash('fancy_prompt_data');
//g.data.fancy_prompt_data = {};
- xulG.fancy_status = 'incomplete';
-
//var key = location.pathname + location.search + location.hash;
//if (typeof g.data.modal_xulG_stack != 'undefined' && typeof g.data.modal_xulG_stack[key] != 'undefined') {
// xulG = g.data.modal_xulG_stack[key][ g.data.modal_xulG_stack[key].length - 1 ];
@@ -96,6 +94,12 @@
if (xul_param('focus',{'modal_xulG':true})) document.getElementById(xul_param('focus',{'modal_xulG':true})).focus();
+ JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
+ xulG.fancy_status = 'incomplete';
+ var key = location.pathname + location.search + location.hash;
+ data.modal_xulG_stack[key][ data.modal_xulG_stack[key].length - 1 ] = xulG;
+ data.stash('modal_xulG_stack');
+
} catch(E) {
var err_msg = "!! This software has encountered an error. Please tell your friendly " +
"system administrator or software developer the following:\nfancy_prompt.xul\n" + E + '\n';
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/window.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/window.js 2007-07-20 12:37:04 UTC (rev 7567)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/window.js 2007-07-21 15:59:29 UTC (rev 7568)
@@ -93,6 +93,7 @@
}
var w = this.SafeWindowOpen(url,title,features);
if (features.match(/modal/) && my_xulG) {
+ data.init({'via':'stash'});
var x = data.modal_xulG_stack[key].pop();
data.stash('modal_xulG_stack');
return x;
Modified: trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.js 2007-07-20 12:37:04 UTC (rev 7567)
+++ trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.js 2007-07-21 15:59:29 UTC (rev 7568)
@@ -520,7 +520,8 @@
}
);
//obj.data.stash_retrieve();
- if (fancy_prompt_data.fancy_status == 'incomplete') { alert('Merge Aborted'); return; }
+
+ if (typeof fancy_prompt_data.fancy_status == 'undefined' || fancy_prompt_data.fancy_status == 'incomplete') { alert('Merge Aborted'); return; }
var robj = obj.network.simple_request('MERGE_RECORDS',
[
ses(),
@@ -602,7 +603,7 @@
}
);
//obj.data.stash_retrieve();
- if (fancy_prompt_data.fancy_status == 'incomplete') { alert('Delete Aborted'); return; }
+ if (typeof fancy_prompt_data.fancy_status == 'undefined' || fancy_prompt_data.fancy_status != 'complete') { alert('Delete Aborted'); return; }
var s = '';
for (var i = 0; i < record_ids.length; i++) {
var robj = obj.network.simple_request('FM_BRE_DELETE',[ses(),record_ids[i]]);
More information about the open-ils-commits
mailing list