forked from 0x2620/oxjs
remove new for all Ox.Elements, dont declare arguments again, add some semicolons
This commit is contained in:
parent
3eab11e967
commit
b27ed00356
69 changed files with 430 additions and 440 deletions
|
|
@ -16,8 +16,8 @@ Ox.TimeInput <f:Ox.Element> TimeInput Object
|
|||
Ox.TimeInput = function(options, self) {
|
||||
|
||||
// fixme: seconds get set even if options.seconds is false
|
||||
var self = self || {},
|
||||
that = new Ox.Element({}, self)
|
||||
self = self || {};
|
||||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
ampm: false,
|
||||
seconds: false,
|
||||
|
|
@ -46,7 +46,7 @@ Ox.TimeInput = function(options, self) {
|
|||
self.values = getValues();
|
||||
|
||||
self.$input = {
|
||||
hours: new Ox.Input({
|
||||
hours: Ox.Input({
|
||||
autocomplete: $.map(self.options.ampm ? Ox.range(1, 13) : Ox.range(0, 24), function(v) {
|
||||
return Ox.pad(v, 2);
|
||||
}),
|
||||
|
|
@ -57,7 +57,7 @@ Ox.TimeInput = function(options, self) {
|
|||
value: self.values.hours,
|
||||
width: 32//self.options.width.hours
|
||||
}),
|
||||
minutes: new Ox.Input({
|
||||
minutes: Ox.Input({
|
||||
autocomplete: $.map(Ox.range(0, 60), function(v) {
|
||||
return Ox.pad(v, 2);
|
||||
}),
|
||||
|
|
@ -68,7 +68,7 @@ Ox.TimeInput = function(options, self) {
|
|||
value: self.values.minutes,
|
||||
width: 32//self.options.width.minutes
|
||||
}),
|
||||
seconds: new Ox.Input({
|
||||
seconds: Ox.Input({
|
||||
autocomplete: $.map(Ox.range(0, 60), function(v) {
|
||||
return Ox.pad(v, 2);
|
||||
}),
|
||||
|
|
@ -79,7 +79,7 @@ Ox.TimeInput = function(options, self) {
|
|||
value: self.values.seconds,
|
||||
width: 32//self.options.width.seconds
|
||||
}),
|
||||
milliseconds: new Ox.Input({
|
||||
milliseconds: Ox.Input({
|
||||
autocomplete: $.map(Ox.range(0, 1000), function(v) {
|
||||
return Ox.pad(v, 3);
|
||||
}),
|
||||
|
|
@ -90,7 +90,7 @@ Ox.TimeInput = function(options, self) {
|
|||
value: self.values.milliseconds,
|
||||
width: 40//self.options.width.milliseconds
|
||||
}),
|
||||
ampm: new Ox.Input({
|
||||
ampm: Ox.Input({
|
||||
autocomplete: ['AM', 'PM'],
|
||||
autocompleteReplace: true,
|
||||
autocompleteReplaceCorrect: true,
|
||||
|
|
@ -100,7 +100,7 @@ Ox.TimeInput = function(options, self) {
|
|||
})
|
||||
};
|
||||
|
||||
that = new Ox.InputGroup($.extend(self.options, {
|
||||
that = Ox.InputGroup($.extend(self.options, {
|
||||
inputs: $.merge($.merge($.merge([
|
||||
self.$input.hours,
|
||||
self.$input.minutes,
|
||||
|
|
@ -169,7 +169,7 @@ Ox.TimeInput = function(options, self) {
|
|||
if (key == 'value') {
|
||||
setValues();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return that;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue