mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-19 06:53:53 +01:00
LSform: add CSS class on submitting form to permit visual adaptation
This commit is contained in:
parent
6e02cbe2d5
commit
a5814afefc
2 changed files with 8 additions and 0 deletions
|
@ -66,6 +66,10 @@ div.LSform_layout_current {
|
|||
display: block;
|
||||
}
|
||||
|
||||
form.submitting div.LSform_layout_current, form.submitting ul.LSform_layout_active {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
/*
|
||||
* Architecture
|
||||
*/
|
||||
|
|
|
@ -297,6 +297,8 @@ var LSform = new Class({
|
|||
return;
|
||||
}
|
||||
this.submitting = true;
|
||||
console.log(this.LSform);
|
||||
this.LSform.addClass('submitting');
|
||||
|
||||
// Fire
|
||||
LSdebug('onSubmit(): fire submit event');
|
||||
|
@ -306,6 +308,7 @@ var LSform = new Class({
|
|||
onSubmitConfirm: function (confirmed, event) {
|
||||
if (!confirmed) {
|
||||
this.submitting = false;
|
||||
this.LSform.removeClass('submitting');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -348,6 +351,7 @@ var LSform = new Class({
|
|||
|
||||
onAjaxSubmitComplete: function(responseText, responseXML) {
|
||||
this.submitting = false;
|
||||
this.LSform.removeClass('submitting');
|
||||
var data = JSON.decode(responseText);
|
||||
if ( varLSdefault.checkAjaxReturn(data) ) {
|
||||
this.resetErrors();
|
||||
|
|
Loading…
Reference in a new issue