update uses of focusInput()

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

View file

@ -486,7 +486,7 @@ Ox.ListCalendar = function(options, self) {
Ox.Log('Calendar', 'TIME TO SET LIST OPTIONS:', +new Date() - time0);
self.$calendar.addEvent(event);
selectEvent(event);
self.$nameInput.focusInput();
self.$nameInput.focusInput(true);
} else {
alert(result.status.text);
}

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;
}
});

View file

@ -857,7 +857,7 @@ Ox.TextList = function(options, self) {
blur: submit,
})
.appendTo($cell);
//.focusInput();
//.focusInput(true);
setTimeout($input.focusInput, 0); // fixme: strange
function submit() {
var value = $input.value();

View file

@ -79,7 +79,7 @@ Ox.VideoEditor = function(options, self) {
},
key_f: function() {
setTimeout(function() {
self.$findInput.focusInput();
self.$findInput.focusInput(true);
});
},
key_g: function() {
@ -1004,7 +1004,7 @@ Ox.VideoEditor = function(options, self) {
if (self.results.length) {
setPosition(getNextPosition('result', 1));
} else {
self.$findInput.focusInput();
self.$findInput.focusInput(true);
}
}
}

View file

@ -1115,7 +1115,7 @@ Ox.VideoPlayer = function(options, self) {
if (self.$find.is(':hidden')) {
toggleFind();
} else {
self.$findInput.focusInput();
self.$findInput.focusInput(true);
}
}, 0);
}
@ -1999,7 +1999,7 @@ Ox.VideoPlayer = function(options, self) {
results: self.results
});
if (hasPressedEnter) {
self.results.length ? goToNextResult(1) : self.$findInput.focusInput();
self.results.length ? goToNextResult(1) : self.$findInput.focusInput(true);
}
that.triggerEvent('find', {find: self.options.find});
}

View file

@ -664,6 +664,8 @@ Ox.sub <f> Returns a substring or sub-array
"ooba"
> Ox.sub('foobar', -5, -1)
"ooba"
> Ox.sub('foo', -1, 0)
""
@*/
Ox.sub = function(col, start, stop) {
stop = Ox.isUndefined(stop) ? col.length : stop;

View file

@ -96,7 +96,9 @@
@*/
Ox.decodeBase32 = function(str) {
return parseInt(Ox.map(str.toUpperCase(), function(char) {
var index = Ox.BASE_32_DIGITS.indexOf(Ox.BASE_32_ALIASES[char] || char);
var index = Ox.BASE_32_DIGITS.indexOf(
Ox.BASE_32_ALIASES[char] || char
);
return (index == -1 ? ' ' : index).toString(32);
}).join(''), 32);
};