1
0
Fork 0
forked from 0x2620/oxjs

list updates

This commit is contained in:
rlx 2011-08-07 22:16:06 +00:00
commit 5095eeed5d
2 changed files with 27 additions and 22 deletions

View file

@ -1427,8 +1427,8 @@ Ox.List = function(options, self) {
}
/*@
clearCache <f> empy list cache
() -> <f> empy cache, returns List Element
clearCache <f> empty list cache
() -> <o> the list
@*/
that.clearCache = function() { // fixme: was used by TextList resizeColumn, now probably no longer necessary
self.$pages = [];
@ -1437,7 +1437,7 @@ Ox.List = function(options, self) {
/*@
closePreview <f> close preview
() -> <f> close preview, returns List Element
() -> <o> the list
@*/
that.closePreview = function() {
self.preview = false;
@ -1446,7 +1446,7 @@ Ox.List = function(options, self) {
/*@
paste <f> paste data
(data) -> <f> paste data into list
(data) -> <o> the list
data <o> paste object
@*/
that.paste = function(data) {
@ -1456,23 +1456,25 @@ Ox.List = function(options, self) {
/*@
reloadList <f> reload list contents
() -> <f> returns List Element
() -> <o> the list
@*/
that.reloadList = function(stayAtPosition) {
if (stayAtPosition) {
var scrollTop = that.scrollTop();
updateQuery(function() {
that.scrollTop(scrollTop);
});
var scrollTop = that.scrollTop();
if (!self.isAsync) {
loadItems();
scrollList();
} else {
updateQuery();
updateQuery(scrollList);
}
function scrollList() {
stayAtPosition && that.scrollTop(scrollTop);
}
return that;
};
/*@
reloadPages <f> reload list pages
() -> <f> returns List Element
() -> <o> the list
@*/
that.reloadPages = function() {
//Ox.print('---------------- list reload, page', self.page)