1
0
Fork 0
forked from 0x2620/oxjs

add disableButtons and enableButtons methods to Ox.Dialog

This commit is contained in:
rlx 2011-10-29 10:34:41 +00:00
commit 4c641db867
2 changed files with 19 additions and 1 deletions

View file

@ -75,7 +75,12 @@ Ox.Form = function(options, self) {
},
validate: function(data) {
validate(i, data.valid);
self.$items[i].setMessage(data.valid ? '' : data.message);
// timeout needed for cases where the form is removed
// from the DOM, triggering blur of an empty item -
// in this case, we don't want the message to appear
setTimeout(function() {
self.$items[i].setMessage(data.valid ? '' : data.message);
}, 0);
}
});
});