From d05b12208af2f7bc8f1b3f0d11e7ae6b52833968 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Fri, 2 Aug 2013 09:21:37 +0000 Subject: [PATCH] Ox.TableList: add 'droppable' option (that guarantees cells are Ox.Elements, and thus receive drop events) --- source/Ox.UI/js/List/TableList.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/Ox.UI/js/List/TableList.js b/source/Ox.UI/js/List/TableList.js index cf676386..038cee92 100644 --- a/source/Ox.UI/js/List/TableList.js +++ b/source/Ox.UI/js/List/TableList.js @@ -29,6 +29,7 @@ Ox.TableList TableList Widget columnWidth <[n]|[40, 800]> Minimum and maximum column width disableHorizontalScrolling If true, disable scrolling draggable If true, items can be dragged + droppable If true, items can be dropped id Id items function() {} {sort, range, keys, callback} or array keys <[s]|[]> Additional keys (apart from keys of visible columns) @@ -70,6 +71,7 @@ Ox.TableList = function(options, self) { columnWidth: [40, 800], disableHorizontalScrolling: false, draggable: false, + droppable: false, id: '', items: null, keys: [], @@ -540,6 +542,8 @@ Ox.TableList = function(options, self) { ? (Ox.isString(v.tooltip) ? v.tooltip : v.tooltip(data)) : ''; } }); + } else if (self.options.droppable) { + $cell = Ox.Element(); } else { // this is faster $cell = $('
');