Ox.TableList: add 'droppable' option (that guarantees cells are Ox.Elements, and thus receive drop events)

This commit is contained in:
rlx 2013-08-02 09:21:37 +00:00
parent 074ee0410e
commit d05b12208a

View file

@ -29,6 +29,7 @@ Ox.TableList <f> TableList Widget
columnWidth <[n]|[40, 800]> Minimum and maximum column width
disableHorizontalScrolling <b|false> If true, disable scrolling
draggable <b|false> If true, items can be dragged
droppable <b> If true, items can be dropped
id <s|''> Id
items <f|null> 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 = $('<div>');