Browse Source

update iconlist on window resize; keep resizebars from being draggable when collapsed

master
rolux 14 years ago
parent
commit
feb7a876b7
  1. 10
      build/css/ox.ui.css
  2. 47
      build/js/ox.ui.js

10
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;

47
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 = $('<div>')
.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 = $('<div>').addClass('OxLeft').appendTo($resize);
$center = $('<div>').addClass('OxCenter').appendTo($resize);
$right = $('<div>').addClass('OxRight').appendTo($resize);

Loading…
Cancel
Save