NIHVIVO-3213: Refactored file

This commit is contained in:
manolobevia 2011-10-31 22:21:39 +00:00
parent 51cc2feba0
commit 4d9001a8e5

View file

@ -11,33 +11,33 @@ $(document).ready(function(){
var theSubmitButton = theForm.find(':submit');
theSubmitButton.addClass("disabledSubmit");
function disableSubmit() {
theSubmitButton.removeAttr('disabled');
theSubmitButton.removeClass("disabledSubmit");
}
$('input').each(function() {
if ( $(this).attr('type') != 'submit' && $(this).attr('name') != 'querytext') {
$(this).change(function() {
theSubmitButton.removeAttr('disabled');
theSubmitButton.removeClass("disabledSubmit");
disableSubmit()
});
$(this).bind("propertychange", function() {
theSubmitButton.removeAttr('disabled');
theSubmitButton.removeClass("disabledSubmit");
disableSubmit();
});
$(this).bind("input", function() {
theSubmitButton.removeAttr('disabled');
theSubmitButton.removeClass("disabledSubmit");
disableSubmit()
});
}
});
$('select').each(function() {
$(this).change(function() {
theSubmitButton.removeAttr('disabled');
theSubmitButton.removeClass("disabledSubmit");
disableSubmit()
});
});
$('.remove-proxy').click(function(){
theSubmitButton.removeAttr('disabled');
theSubmitButton.removeClass("disabledSubmit");
disableSubmit()
})
});