X-Git-Url: https://scm.cri.mines-paristech.fr/git/Plinn.git/blobdiff_plain/292a91bf78532d43a81bc528307ded8c6733d130..08a12c7d87614be8332e8bb81532f0e5a2ce36db:/skins/ajax_scripts/ajax_form_manager.js?ds=sidebyside diff --git a/skins/ajax_scripts/ajax_form_manager.js b/skins/ajax_scripts/ajax_form_manager.js index bdea518..12ca5b2 100644 --- a/skins/ajax_scripts/ajax_form_manager.js +++ b/skins/ajax_scripts/ajax_form_manager.js @@ -17,7 +17,6 @@ FormManager = function(form, responseTextDest, lazy) { var thisManager = this; this.form.onsubmit = function(evt) { thisManager.submit(evt); }; this.form.onclick = function(evt) { thisManager.click(evt); }; - this.submitButton = null; /* raised on form submit */ this.onBeforeSubmit = null; @@ -55,6 +54,7 @@ FormManager.prototype.submit = function(evt) { if (onBeforeSubmit.length) { onBeforeSubmit = onBeforeSubmit[0]; } + /*jslint evil: true */ this.onBeforeSubmit = eval(onBeforeSubmit.value); bsMessage = this.onBeforeSubmit(thisManager, evt); } @@ -99,7 +99,7 @@ FormManager.prototype.submit = function(evt) { query += submitButton.name + '=' + submitButton.value + '&'; } - if (window.AJAX_CONFIG && (AJAX_CONFIG & 1 === 1)) { + if (window.AJAX_CONFIG && ((AJAX_CONFIG & 1) === 1)) { if (form.method.toLowerCase() === 'post') { this._post(query); } @@ -175,10 +175,10 @@ FormManager.prototype.replaceElementByField = function(evt) { var tabIndex = ob.tabIndex; var text; if (ob.firstChild && ob.firstChild.className === 'hidden_value') { - text = ob.firstChild.innerHTML; + text = ob.firstChild.innerHTML; } else { - text = ob.innerHTML; + text = ob.innerHTML; } disablePropagation(evt); var parent; @@ -391,19 +391,25 @@ FormManager.prototype.loadResponse = function(req) { return; } var fragments = req.responseXML.documentElement.childNodes; - var fragment, dest; - var i; - for (i=0 ; i