preserve scroll position when adding list column
This commit is contained in:
parent
1d98189008
commit
3d30983359
1 changed files with 8 additions and 6 deletions
|
@ -237,7 +237,6 @@ requires
|
||||||
callback = data;
|
callback = data;
|
||||||
data = {};
|
data = {};
|
||||||
}
|
}
|
||||||
console.log('api', action, data)
|
|
||||||
return Ox.Request.send({
|
return Ox.Request.send({
|
||||||
url: self.options.apiURL,
|
url: self.options.apiURL,
|
||||||
data: {
|
data: {
|
||||||
|
@ -6293,7 +6292,7 @@ requires
|
||||||
offset = page * self.pageLength,
|
offset = page * self.pageLength,
|
||||||
range = [offset, offset + (page < self.pages - 1 ?
|
range = [offset, offset + (page < self.pages - 1 ?
|
||||||
self.pageLength : self.listLength % self.pageLength)];
|
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({
|
self.requests.push(self.options.request({
|
||||||
keys: keys,
|
keys: keys,
|
||||||
range: range,
|
range: range,
|
||||||
|
@ -6331,6 +6330,7 @@ requires
|
||||||
!Ox.isUndefined(callback) && callback();
|
!Ox.isUndefined(callback) && callback();
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
|
Ox.print('loading a page from cache, this should probably not happen -----------')
|
||||||
self.$pages[page].appendTo(that.$content);
|
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 = [];
|
self.$pages = [];
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
@ -6640,8 +6640,10 @@ requires
|
||||||
};
|
};
|
||||||
|
|
||||||
that.reload = function() {
|
that.reload = function() {
|
||||||
|
Ox.print('---------------- list reload, page', self.page)
|
||||||
|
var page = self.page;
|
||||||
clear();
|
clear();
|
||||||
that.clearCache();
|
self.page = page
|
||||||
that.$content.empty();
|
that.$content.empty();
|
||||||
loadPages(self.page);
|
loadPages(self.page);
|
||||||
return that;
|
return that;
|
||||||
|
@ -7119,7 +7121,7 @@ requires
|
||||||
return v.id;
|
return v.id;
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
that.$body.clearCache();
|
//that.$body.clearCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
function resize() {
|
function resize() {
|
||||||
|
@ -7140,7 +7142,7 @@ requires
|
||||||
width: (width - 9) + 'px'
|
width: (width - 9) + 'px'
|
||||||
});
|
});
|
||||||
setWidth();
|
setWidth();
|
||||||
that.$body.clearCache();
|
//that.$body.clearCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
function setWidth() {
|
function setWidth() {
|
||||||
|
|
Loading…
Reference in a new issue