table list: when editing cell, make next click blur, but not cause new click or edit

This commit is contained in:
rlx 2013-08-11 08:22:29 +00:00
parent 24adbd3894
commit a2f6e18900

View file

@ -1007,6 +1007,8 @@ Ox.TableList = function(options, self) {
$cell = getCell(id, key), $cell = getCell(id, key),
$input, $input,
html = $cell.html(), html = $cell.html(),
clickableCells = $item.find('.OxClickable').removeClass('OxClickable'),
editableCells = $item.find('.OxEditable').removeClass('OxEditable'),
index = getColumnIndexById(key), index = getColumnIndexById(key),
column = self.options.columns[index], column = self.options.columns[index],
width = column.width - self.options.columnsVisible; width = column.width - self.options.columnsVisible;
@ -1046,6 +1048,10 @@ Ox.TableList = function(options, self) {
width: (width - 8) + 'px' width: (width - 8) + 'px'
}) })
.html(value); .html(value);
setTimeout(function() {
clickableCells.addClass('OxClickable');
editableCells.addClass('OxEditable');
}, 250);
that.triggerEvent('submit', { that.triggerEvent('submit', {
id: id, id: id,
key: key, key: key,