preserve scroll position when adding list column
This commit is contained in:
parent
69bbff174c
commit
67395d6be7
|
@ -237,7 +237,6 @@ requires
|
|||
callback = data;
|
||||
data = {};
|
||||
}
|
||||
console.log('api', action, data)
|
||||
return Ox.Request.send({
|
||||
url: self.options.apiURL,
|
||||
data: {
|
||||
|
@ -6293,7 +6292,7 @@ requires
|
|||
offset = page * self.pageLength,
|
||||
range = [offset, offset + (page < self.pages - 1 ?
|
||||
self.pageLength : self.listLength % self.pageLength)];
|
||||
if (Ox.isUndefined(self.$pages[page])) {
|
||||
if (Ox.isUndefined(self.$pages[page])) { // fixme: unload will have made this undefined already
|
||||
self.requests.push(self.options.request({
|
||||
keys: keys,
|
||||
range: range,
|
||||
|
@ -6331,6 +6330,7 @@ requires
|
|||
!Ox.isUndefined(callback) && callback();
|
||||
}));
|
||||
} else {
|
||||
Ox.print('loading a page from cache, this should probably not happen -----------')
|
||||
self.$pages[page].appendTo(that.$content);
|
||||
}
|
||||
}
|
||||
|
@ -6630,7 +6630,7 @@ requires
|
|||
}
|
||||
};
|
||||
|
||||
that.clearCache = function() { // used by TextList resizeColumn
|
||||
that.clearCache = function() { // was used by TextList resizeColumn, now probably no longer necessary
|
||||
self.$pages = [];
|
||||
return that;
|
||||
};
|
||||
|
@ -6640,8 +6640,10 @@ requires
|
|||
};
|
||||
|
||||
that.reload = function() {
|
||||
Ox.print('---------------- list reload, page', self.page)
|
||||
var page = self.page;
|
||||
clear();
|
||||
that.clearCache();
|
||||
self.page = page
|
||||
that.$content.empty();
|
||||
loadPages(self.page);
|
||||
return that;
|
||||
|
@ -7119,7 +7121,7 @@ requires
|
|||
return v.id;
|
||||
})
|
||||
});
|
||||
that.$body.clearCache();
|
||||
//that.$body.clearCache();
|
||||
}
|
||||
|
||||
function resize() {
|
||||
|
@ -7140,7 +7142,7 @@ requires
|
|||
width: (width - 9) + 'px'
|
||||
});
|
||||
setWidth();
|
||||
that.$body.clearCache();
|
||||
//that.$body.clearCache();
|
||||
}
|
||||
|
||||
function setWidth() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user