forked from 0x2620/oxjs
support drag and drop in text lists
This commit is contained in:
parent
6b0779fcab
commit
63885b8c1b
3 changed files with 33 additions and 19 deletions
|
|
@ -7,7 +7,7 @@ Ox.TextList <f:Ox.Element> TextList Object
|
|||
(options, self) -> <f> TextList Object
|
||||
options <o> Options object
|
||||
columns <[o]|[]>
|
||||
Fixme: There's probably more...
|
||||
# Fixme: There's probably more...
|
||||
addable <b>
|
||||
editable <b>
|
||||
format <f>
|
||||
|
|
@ -19,24 +19,26 @@ Ox.TextList <f:Ox.Element> TextList Object
|
|||
unique <b> If true, this column acts as unique id
|
||||
visible <b>
|
||||
width <n>
|
||||
columnsMovable <b|false>
|
||||
columnsRemovable <b|false>
|
||||
columnsResizable <b|false>
|
||||
columnsVisible <b|false>
|
||||
columnWidth <a|[40, 800]>
|
||||
columnsMovable <b|false> If true, columns can be re-ordered
|
||||
columnsRemovable <b|false> If true, columns are removable
|
||||
columnsResizable <b|false> If true, columns are resizable
|
||||
columnsVisible <b|false> If true, columns are visible
|
||||
columnWidth <[n]|[40, 800]> Minimum and maximum column width
|
||||
draggable <b|false> If true, items can be dragged
|
||||
id <s|''>
|
||||
items <f|null> function() {} {sort, range, keys, callback} or array
|
||||
max <n|-1> Maximum number of items that can be selected (-1 for all)
|
||||
min <n|0> Minimum number of items that must be selected
|
||||
pageLength <n|100>
|
||||
scrollbarVisible <b|false>
|
||||
pageLength <n|100> Number of items per page
|
||||
scrollbarVisible <b|false> If true, the scrollbar is always visible
|
||||
selected <a|[]>
|
||||
sort <a|[]>
|
||||
sortable <b|false> If true, elements can be re-ordered
|
||||
self <o> shared private variable
|
||||
@*/
|
||||
|
||||
// fixme: options.columnsMovable, but options.sortable ... pick one.
|
||||
|
||||
Ox.TextList = function(options, self) {
|
||||
|
||||
// fixme: rename to TableList
|
||||
|
|
@ -206,12 +208,12 @@ Ox.TextList = function(options, self) {
|
|||
}
|
||||
})
|
||||
.bindEvent({
|
||||
edit: function(data) {
|
||||
that.editCell(data.id, data.key);
|
||||
},
|
||||
cancel: function(data) {
|
||||
Ox.print('cancel edit', data);
|
||||
},
|
||||
edit: function(data) {
|
||||
that.editCell(data.id, data.key);
|
||||
},
|
||||
init: function(data) {
|
||||
// fixme: why does this never reach?
|
||||
//Ox.print('INIT????')
|
||||
|
|
@ -223,6 +225,7 @@ Ox.TextList = function(options, self) {
|
|||
}
|
||||
})
|
||||
.appendTo(that);
|
||||
|
||||
that.$body.$content.css({
|
||||
width: getItemWidth() + 'px'
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue