diff --git a/build/css/ox.ui.css b/build/css/ox.ui.css index fd9dbe68..81af27e7 100644 --- a/build/css/ox.ui.css +++ b/build/css/ox.ui.css @@ -806,12 +806,14 @@ Lists width: 5px; height: 16px; } +.OxTextList .OxBar .OxResize.OxResizable { + cursor: ew-resize; +} .OxTextList .OxBar .OxResize .OxLeft, .OxTextList .OxBar .OxResize .OxCenter, .OxTextList .OxBar .OxResize .OxRight { float: left; height: 16px; - cursor: ew-resize; } .OxTextList .OxBar .OxResize .OxLeft, .OxTextList .OxBar .OxResize .OxRight { @@ -819,13 +821,7 @@ Lists } .OxTextList .OxBar .OxResize .OxCenter { width: 1px; -} -.OxTextList .OxBar .OxResize .OxCenter { - float: left; - width: 1px; - height: 16px; background: rgb(24, 24, 24); - cursor: ew-resize; } .OxTextList .OxBar .OxSelect { position: absolute; diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 8e15396b..b6498b62 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1068,6 +1068,10 @@ requires }; that.remove = function() { + if (self.options && self.options.id) { + Ox.Event.remove(self.options.id); + Ox.Event.unbind(self.options.id); + } that.$element.remove(); delete $elements[that.ox]; return that; @@ -1493,6 +1497,7 @@ requires function toggle() { var i = (self.options.edge == 'left' || self.options.edge == 'top') ? 0 : 1; self.options.parent.toggle(self.ids[i]); + self.options.collapsed = !self.options.collapsed; /* Ox.print('toggle'); if (Ox.isUndefined(self.options.position)) { @@ -6726,6 +6731,7 @@ requires columns: [], columnsMovable: false, columnsRemovable: false, + columnsResizable: false, columnWidth: [40, 800], id: '', request: function() {}, // {sort, range, keys, callback} @@ -6923,26 +6929,29 @@ requires .appendTo(that.$head.$content.$element); $resize = $('
') .addClass('OxResize') - .mousedown(function(e) { - var startWidth = self.columnWidths[i], - startX = e.clientX; - $window.mousemove(function(e) { - var x = e.clientX, - width = Ox.limit( - startWidth - startX + x, - self.options.columnWidth[0], - self.options.columnWidth[1] - ); - resizeColumn(v.id, width); - }); - $window.one('mouseup', function() { - $window.unbind('mousemove'); - }); - }) - .dblclick(function() { - resizeColumn(v.id, v.width); - }) .appendTo(that.$head.$content.$element); + if (self.options.columnsResizable) { + $resize.addClass('OxResizable') + .mousedown(function(e) { + var startWidth = self.columnWidths[i], + startX = e.clientX; + $window.mousemove(function(e) { + var x = e.clientX, + width = Ox.limit( + startWidth - startX + x, + self.options.columnWidth[0], + self.options.columnWidth[1] + ); + resizeColumn(v.id, width); + }); + $window.one('mouseup', function() { + $window.unbind('mousemove'); + }); + }) + .dblclick(function() { + resizeColumn(v.id, v.width); + }); + } $left = $('
').addClass('OxLeft').appendTo($resize); $center = $('
').addClass('OxCenter').appendTo($resize); $right = $('
').addClass('OxRight').appendTo($resize);