1
0
Fork 0
forked from 0x2620/oxjs

use [].concat, not Ox.merge

This commit is contained in:
rolux 2012-05-24 09:45:33 +02:00
commit 1c40fb007b
27 changed files with 87 additions and 90 deletions

View file

@ -78,7 +78,7 @@ Ox.DateInput = function(options, self) {
})
.bindEvent('autocomplete', changeMonthOrYear),
year: Ox.Input({
autocomplete: Ox.merge(Ox.range(1900, 3000), Ox.range(1000, 1900)).map(function(i) {
autocomplete: Ox.range(1900, 3000).concat(Ox.range(1000, 1900)).map(function(i) {
return i.toString();
}),
autocompleteReplace: true,
@ -92,7 +92,7 @@ Ox.DateInput = function(options, self) {
that = Ox.InputGroup(Ox.extend(self.options, {
id: self.options.id,
inputs: Ox.merge(self.options.weekday ? [
inputs: [].concat(self.options.weekday ? [
self.$input.weekday
] : [], self.options.format == 'short' ? [
self.$input.year, self.$input.month, self.$input.day
@ -100,7 +100,7 @@ Ox.DateInput = function(options, self) {
self.$input.month, self.$input.day, self.$input.year
]),
join: join,
separators: Ox.merge(self.options.weekday ? [
separators: [].concat(self.options.weekday ? [
{title: self.options.format == 'short' ? '' : ',', width: 8},
] : [], self.options.format == 'short' ? [
{title: '-', width: 8}, {title: '-', width: 8}
@ -202,13 +202,13 @@ Ox.DateInput = function(options, self) {
function split() {
var values = getValues();
return Ox.merge(self.options.weekday ? [
return [].concat(self.options.weekday ? [
values.weekday
] : [], self.options.format == 'short' ? [
values.year, values.month, values.day
] : [
values.month, values.day, values.year
])
]);
}
return that;