From a2f6e18900af2a9ee2e88f5552e382f9b00c9808 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 11 Aug 2013 08:22:29 +0000 Subject: [PATCH] table list: when editing cell, make next click blur, but not cause new click or edit --- source/Ox.UI/js/List/TableList.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/Ox.UI/js/List/TableList.js b/source/Ox.UI/js/List/TableList.js index 2e592add..ce58960f 100644 --- a/source/Ox.UI/js/List/TableList.js +++ b/source/Ox.UI/js/List/TableList.js @@ -1007,6 +1007,8 @@ Ox.TableList = function(options, self) { $cell = getCell(id, key), $input, html = $cell.html(), + clickableCells = $item.find('.OxClickable').removeClass('OxClickable'), + editableCells = $item.find('.OxEditable').removeClass('OxEditable'), index = getColumnIndexById(key), column = self.options.columns[index], width = column.width - self.options.columnsVisible; @@ -1046,6 +1048,10 @@ Ox.TableList = function(options, self) { width: (width - 8) + 'px' }) .html(value); + setTimeout(function() { + clickableCells.addClass('OxClickable'); + editableCells.addClass('OxEditable'); + }, 250); that.triggerEvent('submit', { id: id, key: key,