minor fixes (list)

This commit is contained in:
Rolux 2010-06-29 19:39:21 +02:00
parent 57342999c4
commit 2385c846d2

View File

@ -2803,7 +2803,7 @@ requires
$right = $("<div>").addClass("OxRight").appendTo($resize);
});
that.$head.$content.css({
width: Ox.sum(self.columnWidths) + "px"
width: (Ox.sum(self.columnWidths) + 2) + "px"
});
toggleSelected(self.selectedColumn);
that.$titles[self.selectedColumn].css({
@ -2916,18 +2916,9 @@ requires
that.sort(args.columns[pos].id, args.columns[pos].operator);
}
function toggleOrder(pos) {
Ox.print("toggleOrder", pos, self.options.sort[0].operator)
that.$titles[pos].next().html(oxui.symbols[
"triangle_" + (self.options.sort[0].operator == "+" ? "up" : "down")
]);
}
function toggleSelected(pos) {
Ox.print("toggleSelected", pos)
if (pos > 0) {
that.$titles[pos].prev().children().eq(2).toggleClass("OxSelected");
}
updateOrder(pos);
pos > 0 && that.$titles[pos].prev().children().eq(2).toggleClass("OxSelected");
that.$titles[pos].toggleClass("OxSelected");
that.$titles[pos].next().toggleClass("OxSelected");
that.$titles[pos].next().next().children().eq(0).toggleClass("OxSelected");
@ -2938,6 +2929,12 @@ requires
});
}
function updateOrder(pos) {
that.$titles[pos].next().html(oxui.symbols[
"triangle_" + (self.options.sort[0].operator == "+" ? "up" : "down")
]);
}
that.sort = function(key, operator) {
var isSelected = key == self.options.sort[0].key;
self.options.sort = [
@ -2947,7 +2944,7 @@ requires
}
];
if (isSelected) {
toggleOrder(self.selectedColumn);
updateOrder(self.selectedColumn);
} else {
toggleSelected(self.selectedColumn);
self.selectedColumn = getColumnById(key);