diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 9a707304..9552adf5 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -2852,7 +2852,7 @@ requires trackValues boolean serialize textAlign 'left', 'center' or 'right' - type 'float', 'integer', 'password', 'text' + type 'float', 'integer', 'password', 'text', 'textarea' value string validate function, remote validation width integer, px @@ -3070,15 +3070,18 @@ requires Ox.print('autocomplete', oldValue, oldCursor) if (self.options.value || self.options.autocompleteReplaceCorrect) { - Ox.isFunction(self.options.autocomplete) ? - (self.options.key ? self.options.autocomplete( - self.options.key, - self.options.value, - autocompleteCallback - ) : self.options.autocomplete( - self.options.value, - autocompleteCallback - )) : autocompleteCallback(autocompleteFunction(self.options.value)); + if(Ox.isFunction(self.options.autocomplete)) { + if(self.options.key) { + self.options.autocomplete(self.options.key, + self.options.value, + autocompleteCallback) + } else { + self.options.autocomplete(self.options.value, + autocompleteCallback) + } + } else { + autocompleteCallback(autocompleteFunction(self.options.value)); + } } if (!self.options.value) { self.options.autocompleteSelect && self.$autocompleteMenu.hideMenu(); @@ -3186,20 +3189,21 @@ requires oldCursor = arguments[1]; } - Ox.isFunction(self.options.autovalidate) ? - (self.options.key ? self.options.autovalidate( - self.options.key, - self.options.value, - blur, - autovalidateCallback - ) : self.options.autovalidate( - self.options.value, - blur, - autovalidateCallback - )) : (Ox.isRegExp(self.options.autovalidate) ? - autovalidateCallback(autovalidateFunction(self.options.value)) : - autovalidateTypeFunction(self.options.type, self.options.value) - ); + if(Ox.isFunction(self.options.autovalidate)) { + if(self.options.key) { + self.options.autovalidate(self.options.key, self.options.value, + blur, autovalidateCallback); + } else { + self.options.autovalidate(self.options.value, blur, + autovalidateCallback); + } + } else { + if(Ox.isRegExp(self.options.autovalidate)) { + autovalidateCallback(autovalidateFunction(self.options.value)); + } else { + autovalidateTypeFunction(self.options.type, self.options.value); + } + } function autovalidateFunction(value) { var regexp = new RegExp(self.options.autovalidate); @@ -4096,7 +4100,7 @@ requires self.values = getValues(); self.$input = { - hours: Ox.Input({ + hours: new Ox.Input({ autocomplete: $.map(self.options.ampm ? Ox.range(1, 13) : Ox.range(0, 24), function(v) { return Ox.pad(v, 2); }), @@ -4107,7 +4111,7 @@ requires value: self.values.hours, width: 32 }), - minutes: Ox.Input({ + minutes: new Ox.Input({ autocomplete: $.map(Ox.range(0, 60), function(v) { return Ox.pad(v, 2); }), @@ -4118,7 +4122,7 @@ requires value: self.values.minutes, width: 32 }), - seconds: Ox.Input({ + seconds: new Ox.Input({ autocomplete: $.map(Ox.range(0, 60), function(v) { return Ox.pad(v, 2); }), @@ -4129,7 +4133,7 @@ requires value: self.values.seconds, width: 32 }), - milliseconds: Ox.Input({ + milliseconds: new Ox.Input({ autocomplete: $.map(Ox.range(0, 1000), function(v) { return Ox.pad(v, 3); }), @@ -4140,7 +4144,7 @@ requires value: self.values.milliseconds, width: 40 }), - ampm: Ox.Input({ + ampm: new Ox.Input({ autocomplete: ['AM', 'PM'], autocompleteReplace: true, autocompleteReplaceCorrect: true, @@ -8498,7 +8502,7 @@ requires .css({ width: width + 'px' }); - $input = Ox.Input({ + $input = new Ox.Input({ autovalidate: column.input.autovalidate, style: 'square', value: html,