This is the source view for Form.js
");
this.divEl.appendChild(this.formMask);
this.maskRendered = true;
},
/**
* Show the form mask
*/
showMask: function() {
this.renderMask();
// Hide selects in IE 6
this.toggleSelectsInIE(false);
this.formMask.style.display = '';
},
/**
* Hide the form mask
*/
hideMask: function() {
// Show selects back in IE 6
this.toggleSelectsInIE(true);
this.formMask.style.display = 'none';
},
/*
* Method to hide selects in IE 6 when masking the form (else they would appear over the mask)
*/
toggleSelectsInIE: function(show) {
// IE 6 only
if (!!YAHOO.env.ua.ie && YAHOO.env.ua.ie < 7) {
var method = !!show ? YAHOO.util.Dom.removeClass : YAHOO.util.Dom.addClass;
var that = this;
YAHOO.util.Dom.getElementsBy(
function() {return true;},
"select",
this.divEl,
function(el) {method.call(that,el,"inputEx-hidden");}
);
}
},
/**
* Enable all fields and buttons in the form
*/
enable: function() {
inputEx.Form.superclass.enable.call(this);
for (var i = 0 ; i < this.buttons.length ; i++) {
this.buttons[i].disabled = false;
}
},
/**
* Disable all fields and buttons in the form
*/
disable: function() {
inputEx.Form.superclass.disable.call(this);
for (var i = 0 ; i < this.buttons.length ; i++) {
this.buttons[i].disabled = true;
}
}
});
// Specific waiting message in ajax submit
inputEx.messages.ajaxWait = "Please wait...";;
/**
* Register this class as "form" type
*/
inputEx.registerType("form", inputEx.Form);
})();