add 'select' option to editCell method of TextLists (helps fix #445)

This commit is contained in:
rlx 2012-02-15 20:59:04 +00:00
parent 75a230d417
commit 3007cafcae

View file

@ -825,7 +825,7 @@ Ox.TextList = function(options, self) {
*/ */
} }
that.editCell = function(id, key) { that.editCell = function(id, key, select) {
Ox.Log('List', 'editCell', id, key) Ox.Log('List', 'editCell', id, key)
var $item = getItem(id), var $item = getItem(id),
$cell = getCell(id, key), $cell = getCell(id, key),
@ -855,8 +855,10 @@ Ox.TextList = function(options, self) {
submit: submit submit: submit
}) })
.appendTo($cell); .appendTo($cell);
//.focusInput(true); // fixme: why do we need a timeout?
setTimeout($input.focusInput, 0); // fixme: strange setTimeout(function() {
$input.focusInput(select);
}, 0);
function submit() { function submit() {
var value = $input.value(); var value = $input.value();
$input.remove(); $input.remove();