more fixes (list)

This commit is contained in:
Rolux 2010-06-30 00:19:41 +02:00
parent 62285d03af
commit 813dc0a039

View file

@ -2382,6 +2382,7 @@ requires
type: "text"
})
.options(options || {})
.click(click)
.scroll(scroll);
$.extend(self, {
@ -2459,6 +2460,10 @@ requires
}
}
function click(e) {
Ox.print("e.target", e.target);
}
function deselect(pos) {
if (isSelected(pos)) {
selected.splice(selected.indexOf(pos), 1);
@ -2484,8 +2489,8 @@ requires
function getPage() {
return self.options.orientation == "vertical"
? Math.floor(that.scrollTop() / pageHeight)
: Math.floor(that.scrollLeft() / pageWidth);
? Math.floor(that.scrollTop() / self.pageHeight)
: Math.floor(that.scrollLeft() / self.pageWidth);
}
function getPrevious() {
@ -2507,7 +2512,7 @@ requires
}
function loadPage(page, callback) {
Ox.print("loadPage", page, self.pages)
Ox.print("loadPage", page)
if (page < 0 || page >= self.pages) {
return;
}
@ -2540,6 +2545,7 @@ requires
self.$items[pos].appendTo(self.$pages[page])
});
self.$pages[page].appendTo(that.$content);
Ox.print(page, "self.$pages", self.$pages)
},
keys: self.options.keys,
range: range,
@ -2645,6 +2651,12 @@ requires
}
function unloadPage(page) {
if (page < 0 || page >= self.pages) {
return;
}
Ox.print("unloadPage", page)
Ox.print("self.$pages", self.$pages)
Ox.print(!Ox.isUndefined(self.$pages[page]))
!Ox.isUndefined(self.$pages[page]) && self.$pages[page].remove();
}
@ -2663,13 +2675,13 @@ requires
Ox.Request.cancel(v);
});
self.requests = [];
unloadPages(self.page);
$.extend(self, {
$items: [],
$pages: [],
page: 0,
selected: []
});
unloadPages(self.page);
that.scrollTop(0);
loadPages(self.page);
}
@ -2868,7 +2880,7 @@ requires
var $item = $("<div>")
.addClass("OxItem")
.css({
width: Ox.sum(self.columnWidths) + "px"
width: Math.max(Ox.sum(self.columnWidths), that.$element.width() - 12) + "px"
})
.data("pos", pos);
$.each(self.visibleColumns, function(i, v) {
@ -2914,6 +2926,10 @@ requires
}
function resize() {
}
function resizeColumn(id, width) {
var i = getColumnIndexById(id),
pos = getColumnPositionById(id);