diff --git a/source/Ox.UI/js/Core/Ox.Element.js b/source/Ox.UI/js/Core/Ox.Element.js index 9933a6d5..c362906b 100644 --- a/source/Ox.UI/js/Core/Ox.Element.js +++ b/source/Ox.UI/js/Core/Ox.Element.js @@ -16,13 +16,13 @@ Ox.Element Basic UI element object self shared private variable # Events ------------------------------------------------------------------- anyclick anyclick - fires on mouseup, but not on any subsequent mouseup within 250 ms + Fires on mouseup, but not on any subsequent mouseup within 250 ms * <*> original event properties doubleclick doubleclick - fires on the second mousedown within 250 ms + Fires on the second mousedown within 250 ms * <*> original event properties drag drag - fires on mousemove after dragstart, stops firing on mouseup + Fires on mousemove after dragstart, stops firing on mouseup clientDX horizontal drag delta in px clientDY vertical drag delta in px * <*> original event properties @@ -31,20 +31,24 @@ Ox.Element Basic UI element object clientDX horizontal drag delta in px clientDY vertical drag delta in px * <*> original event properties + dragenter dragenter + Fires when entering an element during drag + dragleave dragleave + Fires when leaving an element during drag dragpause dragpause - Fires once when the mouse doesn't move for 250 ms after drag + Fires once when the mouse doesn't move for 250 ms during drag clientDX horizontal drag delta in px clientDY vertical drag delta in px * <*> original event properties dragstart dragstart - fires when the mouse is down for 250 ms + Fires when the mouse is down for 250 ms * <*> original event properties mouserepeat mouserepeat - fires every 50 ms after the mouse was down for 250 ms, stops firing on + Fires every 50 ms after the mouse was down for 250 ms, stops firing on mouseleave or mouseup * <*> original event properties singleclick singleclick - fires 250 ms after mouseup, if there was no subsequent mousedown + Fires 250 ms after mouseup, if there was no subsequent mousedown * <*> original event properties @*/ diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index 35213c2c..7189cccd 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -29,6 +29,11 @@ Ox.List List Element self shared private variable add item added delete item removed + draganddrop Fires during drag + draganddropend Fires on drop + draganddropenter Fires when entering an item during drag + draganddropleave Fires when leaving an item during drag + draganddropstart Fires when drag starts copy copy paste paste movie move item @@ -326,7 +331,9 @@ Ox.List = function(options, self) { } function dragstart(event, e) { - if ($(e.target).is('.OxTarget')) { + var $target = $(e.target), + $parent = $target.parent(); + if ($target.is('.OxTarget') || $parent.is('.OxTarget')) { self.drag = { ids: self.options.selected } diff --git a/source/Ox.UI/js/List/Ox.TextList.js b/source/Ox.UI/js/List/Ox.TextList.js index ef4bf28d..70ed49fb 100644 --- a/source/Ox.UI/js/List/Ox.TextList.js +++ b/source/Ox.UI/js/List/Ox.TextList.js @@ -7,7 +7,7 @@ Ox.TextList TextList Object (options, self) -> TextList Object options Options object columns <[o]|[]> - Fixme: There's probably more... + # Fixme: There's probably more... addable editable format @@ -19,24 +19,26 @@ Ox.TextList TextList Object unique If true, this column acts as unique id visible width - columnsMovable - columnsRemovable - columnsResizable - columnsVisible - columnWidth + columnsMovable If true, columns can be re-ordered + columnsRemovable If true, columns are removable + columnsResizable If true, columns are resizable + columnsVisible If true, columns are visible + columnWidth <[n]|[40, 800]> Minimum and maximum column width draggable If true, items can be dragged id items function() {} {sort, range, keys, callback} or array max Maximum number of items that can be selected (-1 for all) min Minimum number of items that must be selected - pageLength - scrollbarVisible + pageLength Number of items per page + scrollbarVisible If true, the scrollbar is always visible selected sort sortable If true, elements can be re-ordered self 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' });