This commit is contained in:
Rolux 2010-06-29 15:10:13 +02:00
parent e7d2a5de0a
commit a2c7bae121

View File

@ -2762,11 +2762,8 @@ requires
})
.html(v.title)
.click(function() {
if (self.options.sort[0].key != v.id) {
that.sort(v.id, v.operator);
} else {
that.order(self.options.operator == "+" ? "-" : "+");
}
that.sort(v.id, self.options.sort[0].key == v.id ?
(self.options.sort[0].operator == "+" ? "-" : "+") : v.operator);
})
.appendTo(that.$head.$content.$element);
$order = $("<div>")
@ -2934,14 +2931,16 @@ requires
that.sort = function(key, operator) {
if (key != self.options.sort.key || operator != self.options.sort.operator) {
self.options.sort = {
self.options.sort = [
{
key: key,
operator: operator
};
}
];
toggleSelected(self.selectedColumn);
selectedColumn = getColumnById(key);
self.selectedColumn = getColumnById(key);
toggleSelected(self.selectedColumn);
that.$body.sort(self.options.sort.key, self.options.sort.operator);
that.$body.sort(self.options.sort[0].key, self.options.sort[0].operator);
}
};
@ -3619,7 +3618,7 @@ requires
left = offset.left + self.options.offset.left + (self.options.side == "bottom" ? 0 : width),
top = offset.top + self.options.offset.top + (self.options.side == "bottom" ? height : 0),
menuHeight = that.$content.outerHeight(); // fixme: why is outerHeight 0 when hidden?
menuMaxHeight = Math.floor($window.height() - top - 16),
menuMaxHeight = Math.floor($window.height() - top - 16);
if (self.options.parent) {
if (menuHeight > menuMaxHeight) {
top = Ox.limit(top - menuHeight + menuMaxHeight, self.options.parent.offset().top, top);