fix table list css when dragging columns

This commit is contained in:
rlx 2013-07-22 08:23:50 +00:00
parent ce579b8f3f
commit b1ee9bcc06

View file

@ -578,11 +578,11 @@ Ox.TableList = function(options, self) {
startPos: getColumnPositionById(id) startPos: getColumnPositionById(id)
} }
self.drag.stopPos = self.drag.startPos; self.drag.stopPos = self.drag.startPos;
$('.' + getColumnClassName(id)).css({opacity: 0.25}); $('.' + getColumnClassName(id)).css({opacity: 0.5});
self.drag.startPos > 0 && self.$heads[self.drag.startPos].prev().children().eq(2).css({opacity: 0.25}); self.drag.startPos > 0 && self.$heads[self.drag.startPos].prev().children().eq(2).css({opacity: 0.5});
self.$heads[self.drag.startPos].next().children().eq(0).css({opacity: 0.25}); self.$heads[self.drag.startPos].next().children().eq(0).css({opacity: 0.5});
self.$heads[self.drag.startPos].addClass('OxDrag').css({ // fixme: why does the class not work? self.$heads[self.drag.startPos].addClass('OxDrag').css({ // fixme: why does the class not work?
cursor: 'move' cursor: 'ew-resize'
}); });
} }
@ -642,7 +642,7 @@ Ox.TableList = function(options, self) {
constructHead(); constructHead();
$('.' + getColumnClassName(id)).css({opacity: 1}); $('.' + getColumnClassName(id)).css({opacity: 1});
self.$heads[self.drag.stopPos].removeClass('OxDrag').css({ self.$heads[self.drag.stopPos].removeClass('OxDrag').css({
cursor: 'pointer' cursor: 'default'
}); });
that.$body.clearCache(); that.$body.clearCache();
triggerColumnChangeEvent(); triggerColumnChangeEvent();
@ -809,8 +809,8 @@ Ox.TableList = function(options, self) {
pos > 0 && self.$heads[pos].prev().children().eq(2).addClass('OxSelected'); pos > 0 && self.$heads[pos].prev().children().eq(2).addClass('OxSelected');
self.$heads[pos].next().children().eq(0).addClass('OxSelected'); self.$heads[pos].next().children().eq(0).addClass('OxSelected');
if (pos == stopPos) { if (pos == stopPos) {
pos > 0 && self.$heads[pos].prev().children().eq(2).css({opacity: 0.25}); pos > 0 && self.$heads[pos].prev().children().eq(2).css({opacity: 0.5});
self.$heads[pos].next().children().eq(0).css({opacity: 0.25}); self.$heads[pos].next().children().eq(0).css({opacity: 0.5});
} }
} }
} }