1
0
Fork 0
forked from 0x2620/oxjs

update uses of focusInput()

This commit is contained in:
rolux 2011-12-18 15:14:11 +05:30
commit c1c4441b10
9 changed files with 21 additions and 17 deletions

View file

@ -66,7 +66,7 @@ Ox.ArrayInput = function(options, self) {
}
})
.appendTo(self.$element[index]));
focus && self.$input[index].focusInput();
focus && self.$input[index].focusInput(true);
self.$removeButton.splice(index, 0, Ox.Button({
title: self.$input.length == 1 ? 'close' : 'remove',
type: 'image'
@ -83,7 +83,7 @@ Ox.ArrayInput = function(options, self) {
});
}
if (self.$input.length == 1) {
self.$input[0].focusInput();
self.$input[0].focusInput(true);
} else {
removeInput(index);
}

View file

@ -768,7 +768,7 @@ Ox.Input = function(options, self) {
if (self.options.value === '') {
if (self.options.type == 'password') {
self.$placeholder.hide();
self.$input.show().focusInput();
self.$input.show().focusInput(true);
} else {
self.$input
.removeClass('OxPlaceholder')
@ -1138,7 +1138,7 @@ Ox.Input_ = function(options, self) {
float: 'left'
})
.click(function() {
that.$input[0].focusInput();
that.$input[0].focusInput(true);
})
.appendTo(that);
} else if (key.label.length > 1) {
@ -1192,7 +1192,7 @@ Ox.Input_ = function(options, self) {
float: 'right'
})
.click(function() {
that.$input[0].focusInput();
that.$input[0].focusInput(true);
})
.appendTo(that);
} else if (self.options.unit.length > 1) {
@ -1232,7 +1232,7 @@ Ox.Input_ = function(options, self) {
marginLeft: (v.width - (i == 0 ? 16 : 32)) + 'px'
})
.click(function() {
that.$input[0].focusInput();
that.$input[0].focusInput(true);
})
.appendTo(that);
}
@ -1307,7 +1307,7 @@ Ox.Input_ = function(options, self) {
}
if (self.options.label) {
//that.$label.html(self.option.title);
that.$input[0].focusInput();
that.$input[0].focusInput(true);
//autocompleteCall();
} else {
that.$input[0].options({
@ -1326,14 +1326,14 @@ Ox.Input_ = function(options, self) {
}
function changeUnit() {
that.$input[0].focusInput();
that.$input[0].focusInput(true);
}
function clear() {
that.$input.forEach(function(v, i) {
v.val('');
});
that.$input[0].focusInput();
that.$input[0].focusInput(true);
}
function height(value) {

View file

@ -89,7 +89,7 @@ Ox.InputGroup = function(options, self) {
if ($(event.target).hasClass('OxSeparator')) {
Ox.forEach(self.options.inputs, function($input) {
if ($input.focusInput) {
$input.focusInput();
$input.focusInput(true);
return false;
}
});