1
0
Fork 0
forked from 0x2620/oxjs

form elements rewrite, part 1

This commit is contained in:
rlx 2011-12-21 13:42:47 +00:00
commit 7f83cd3141
30 changed files with 1061 additions and 958 deletions

View file

@ -593,9 +593,10 @@ Ox.Input = function(options, self) {
self.options.autovalidate && autovalidate(true);
self.options.placeholder && setPlaceholder();
self.options.validate && validate();
if (self.bindKeyboard) {
Ox.UI.$document.unbind('keydown', keydown);
}
self.bindKeyboard && Ox.UI.$document.unbind('keydown', keydown);
self.options.value !== self.originalValue && that.triggerEvent('change', {
value: self.options.value
});
// fixme: for some reason, if options.type is set, no change event fires
// as a workaround, blur sends a value. remove later...
!self.cancelled && !self.submitted && that.triggerEvent('blur', {
@ -768,7 +769,7 @@ Ox.Input = function(options, self) {
if (self.options.value === '') {
if (self.options.type == 'password') {
self.$placeholder.hide();
self.$input.show().focusInput(true);
self.$input.show().focus();
} else {
self.$input
.removeClass('OxPlaceholder')