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)
var $item = getItem(id),
$cell = getCell(id, key),
@ -855,8 +855,10 @@ Ox.TextList = function(options, self) {
submit: submit
})
.appendTo($cell);
//.focusInput(true);
setTimeout($input.focusInput, 0); // fixme: strange
// fixme: why do we need a timeout?
setTimeout(function() {
$input.focusInput(select);
}, 0);
function submit() {
var value = $input.value();
$input.remove();