NIHVIVO-3213: Refactored file
This commit is contained in:
parent
51cc2feba0
commit
4d9001a8e5
1 changed files with 10 additions and 10 deletions
|
@ -11,33 +11,33 @@ $(document).ready(function(){
|
||||||
var theSubmitButton = theForm.find(':submit');
|
var theSubmitButton = theForm.find(':submit');
|
||||||
|
|
||||||
theSubmitButton.addClass("disabledSubmit");
|
theSubmitButton.addClass("disabledSubmit");
|
||||||
|
|
||||||
|
function disableSubmit() {
|
||||||
|
theSubmitButton.removeAttr('disabled');
|
||||||
|
theSubmitButton.removeClass("disabledSubmit");
|
||||||
|
}
|
||||||
|
|
||||||
$('input').each(function() {
|
$('input').each(function() {
|
||||||
if ( $(this).attr('type') != 'submit' && $(this).attr('name') != 'querytext') {
|
if ( $(this).attr('type') != 'submit' && $(this).attr('name') != 'querytext') {
|
||||||
$(this).change(function() {
|
$(this).change(function() {
|
||||||
theSubmitButton.removeAttr('disabled');
|
disableSubmit()
|
||||||
theSubmitButton.removeClass("disabledSubmit");
|
|
||||||
});
|
});
|
||||||
$(this).bind("propertychange", function() {
|
$(this).bind("propertychange", function() {
|
||||||
theSubmitButton.removeAttr('disabled');
|
disableSubmit();
|
||||||
theSubmitButton.removeClass("disabledSubmit");
|
|
||||||
});
|
});
|
||||||
$(this).bind("input", function() {
|
$(this).bind("input", function() {
|
||||||
theSubmitButton.removeAttr('disabled');
|
disableSubmit()
|
||||||
theSubmitButton.removeClass("disabledSubmit");
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('select').each(function() {
|
$('select').each(function() {
|
||||||
$(this).change(function() {
|
$(this).change(function() {
|
||||||
theSubmitButton.removeAttr('disabled');
|
disableSubmit()
|
||||||
theSubmitButton.removeClass("disabledSubmit");
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.remove-proxy').click(function(){
|
$('.remove-proxy').click(function(){
|
||||||
theSubmitButton.removeAttr('disabled');
|
disableSubmit()
|
||||||
theSubmitButton.removeClass("disabledSubmit");
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue