From 8ad18e36a84ba05390c05be11ea02296b969a682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Mon, 9 Oct 2006 17:36:04 +0000 Subject: [PATCH] adopted xajax_eT_wrapper to ralfs handler concept --- etemplate/js/etemplate.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/etemplate/js/etemplate.js b/etemplate/js/etemplate.js index 39168e1bb9..f261dc7cad 100644 --- a/etemplate/js/etemplate.js +++ b/etemplate/js/etemplate.js @@ -203,23 +203,14 @@ function set_style_by_class(t,c,p,v) function xajax_eT_wrapper(obj) { if (typeof(obj) == 'object') { set_style_by_class('div','popupManual','display','none'); - if (document.getElementById('ajax-loader')) { - document.getElementById('ajax-loader').style.display = 'inline'; - } - if (document.getElementById('exec[ajax-loader]')) { - document.getElementById('exec[ajax-loader]').style.display = 'inline'; - } + set_style_by_class('div','ajax-loader','display','inline'); var etemplate_exec_id = obj.form.etemplate_exec_id.defaultValue; var submit_button = obj.name; - xajax_doXMLHTTP('etemplate.etemplate.process_exec', etemplate_exec_id, submit_button, xajax.getFormValues(obj.form)); + var menuaction = obj.form.action.replace(/.+menuaction=/,''); + xajax_doXMLHTTP(menuaction+'./etemplate/process_exec', xajax.getFormValues(obj.form)); } else { - if (document.getElementById('ajax-loader')) { - document.getElementById('ajax-loader').style.display = 'none'; - } - if (document.getElementById('exec[ajax-loader]')) { - document.getElementById('exec[ajax-loader]').style.display = 'none'; - } + set_style_by_class('div','ajax-loader','display','none'); set_style_by_class('div','popupManual','display','inline'); } }