From c8d0969a41fa94a4c2ca08e57493ebe935a5162c Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 14 Jul 2013 13:41:02 +0000 Subject: [PATCH] Ox.List: set item.options('position'), not item.data('position') --- source/Ox.UI/js/List/List.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index e21fc46e..79345229 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -964,17 +964,15 @@ Ox.List = function(options, self) { } function moveend(data) { - var $item = self.$items[self.drag.pos]; - $item.removeClass('OxDrag') + self.$items[self.drag.pos] + .removeClass('OxDrag') .css({ cursor: 'default' }); that.triggerEvent('move', { - //id: id, ids: self.$items.map(function($item) { return $item.options('data')[self.options.unique]; }) - //position: pos }); delete self.drag; } @@ -987,7 +985,7 @@ Ox.List = function(options, self) { var $item = self.$items.splice(startPos, 1)[0]; self.$items.splice(stopPos, 0, $item); self.$items.forEach(function($item, pos) { - $item.data({position: pos}); + $item.options({position: pos}); }); self.selected = [stopPos]; } @@ -1389,8 +1387,8 @@ Ox.List = function(options, self) { } function updatePositions() { - self.$items.forEach(function(item, pos) { - item.data('position', pos); + self.$items.forEach(function($item, pos) { + $item.options({position: pos}); }); }