update iconlist on window resize; keep resizebars from being draggable when collapsed
This commit is contained in:
parent
4601254f36
commit
feb7a876b7
|
@ -806,12 +806,14 @@ Lists
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
.OxTextList .OxBar .OxResize.OxResizable {
|
||||||
|
cursor: ew-resize;
|
||||||
|
}
|
||||||
.OxTextList .OxBar .OxResize .OxLeft,
|
.OxTextList .OxBar .OxResize .OxLeft,
|
||||||
.OxTextList .OxBar .OxResize .OxCenter,
|
.OxTextList .OxBar .OxResize .OxCenter,
|
||||||
.OxTextList .OxBar .OxResize .OxRight {
|
.OxTextList .OxBar .OxResize .OxRight {
|
||||||
float: left;
|
float: left;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
cursor: ew-resize;
|
|
||||||
}
|
}
|
||||||
.OxTextList .OxBar .OxResize .OxLeft,
|
.OxTextList .OxBar .OxResize .OxLeft,
|
||||||
.OxTextList .OxBar .OxResize .OxRight {
|
.OxTextList .OxBar .OxResize .OxRight {
|
||||||
|
@ -819,13 +821,7 @@ Lists
|
||||||
}
|
}
|
||||||
.OxTextList .OxBar .OxResize .OxCenter {
|
.OxTextList .OxBar .OxResize .OxCenter {
|
||||||
width: 1px;
|
width: 1px;
|
||||||
}
|
|
||||||
.OxTextList .OxBar .OxResize .OxCenter {
|
|
||||||
float: left;
|
|
||||||
width: 1px;
|
|
||||||
height: 16px;
|
|
||||||
background: rgb(24, 24, 24);
|
background: rgb(24, 24, 24);
|
||||||
cursor: ew-resize;
|
|
||||||
}
|
}
|
||||||
.OxTextList .OxBar .OxSelect {
|
.OxTextList .OxBar .OxSelect {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -1068,6 +1068,10 @@ requires
|
||||||
};
|
};
|
||||||
|
|
||||||
that.remove = function() {
|
that.remove = function() {
|
||||||
|
if (self.options && self.options.id) {
|
||||||
|
Ox.Event.remove(self.options.id);
|
||||||
|
Ox.Event.unbind(self.options.id);
|
||||||
|
}
|
||||||
that.$element.remove();
|
that.$element.remove();
|
||||||
delete $elements[that.ox];
|
delete $elements[that.ox];
|
||||||
return that;
|
return that;
|
||||||
|
@ -1493,6 +1497,7 @@ requires
|
||||||
function toggle() {
|
function toggle() {
|
||||||
var i = (self.options.edge == 'left' || self.options.edge == 'top') ? 0 : 1;
|
var i = (self.options.edge == 'left' || self.options.edge == 'top') ? 0 : 1;
|
||||||
self.options.parent.toggle(self.ids[i]);
|
self.options.parent.toggle(self.ids[i]);
|
||||||
|
self.options.collapsed = !self.options.collapsed;
|
||||||
/*
|
/*
|
||||||
Ox.print('toggle');
|
Ox.print('toggle');
|
||||||
if (Ox.isUndefined(self.options.position)) {
|
if (Ox.isUndefined(self.options.position)) {
|
||||||
|
@ -6726,6 +6731,7 @@ requires
|
||||||
columns: [],
|
columns: [],
|
||||||
columnsMovable: false,
|
columnsMovable: false,
|
||||||
columnsRemovable: false,
|
columnsRemovable: false,
|
||||||
|
columnsResizable: false,
|
||||||
columnWidth: [40, 800],
|
columnWidth: [40, 800],
|
||||||
id: '',
|
id: '',
|
||||||
request: function() {}, // {sort, range, keys, callback}
|
request: function() {}, // {sort, range, keys, callback}
|
||||||
|
@ -6923,26 +6929,29 @@ requires
|
||||||
.appendTo(that.$head.$content.$element);
|
.appendTo(that.$head.$content.$element);
|
||||||
$resize = $('<div>')
|
$resize = $('<div>')
|
||||||
.addClass('OxResize')
|
.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);
|
.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);
|
$left = $('<div>').addClass('OxLeft').appendTo($resize);
|
||||||
$center = $('<div>').addClass('OxCenter').appendTo($resize);
|
$center = $('<div>').addClass('OxCenter').appendTo($resize);
|
||||||
$right = $('<div>').addClass('OxRight').appendTo($resize);
|
$right = $('<div>').addClass('OxRight').appendTo($resize);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user