list updates
This commit is contained in:
parent
2b44e1c694
commit
5095eeed5d
2 changed files with 27 additions and 22 deletions
|
@ -144,15 +144,16 @@ Ox.IconList = function(options, self) {
|
|||
|
||||
/*@
|
||||
closePreview <f> close preview
|
||||
() -> <u> close
|
||||
() -> <o> the list
|
||||
@*/
|
||||
that.closePreview = function() {
|
||||
that.$element.closePreview();
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
paste <f> paste to list
|
||||
(data) -> <f> paste data, returns IconList
|
||||
paste <f> paste into list
|
||||
() -> <o> the list
|
||||
@*/
|
||||
that.paste = function(data) {
|
||||
that.$element.paste(data);
|
||||
|
@ -161,7 +162,7 @@ Ox.IconList = function(options, self) {
|
|||
|
||||
/*@
|
||||
reloadList <f> reload list
|
||||
() -> <u> reload iconlist
|
||||
() -> <o> the list
|
||||
@*/
|
||||
that.reloadList = function() {
|
||||
that.$element.reloadList();
|
||||
|
@ -169,16 +170,16 @@ Ox.IconList = function(options, self) {
|
|||
};
|
||||
|
||||
/*@
|
||||
scrollToSelection <f> set key/value
|
||||
() -> <u> scroll list ot selection
|
||||
scrollToSelection <f> scroll list to selection
|
||||
() -> <o> the list
|
||||
@*/
|
||||
that.scrollToSelection = function() {
|
||||
that.$element.scrollToSelection();
|
||||
};
|
||||
|
||||
/*@
|
||||
size <f> set key/value
|
||||
() -> <n> get size of list
|
||||
size <f> get size of list
|
||||
() -> <n> size
|
||||
@*/
|
||||
that.size = function() {
|
||||
that.$element.size();
|
||||
|
@ -186,8 +187,9 @@ Ox.IconList = function(options, self) {
|
|||
|
||||
/*@
|
||||
sortList <f> sort list
|
||||
(key, operator) -> <u> sort list by key with operator
|
||||
operator <s> can be + / -
|
||||
(key, operator) -> <o> the list
|
||||
key <s> sort key
|
||||
operator <s> sort operator ("+" or "-")
|
||||
@*/
|
||||
that.sortList = function(key, operator) {
|
||||
self.options.sort = [{
|
||||
|
@ -196,6 +198,7 @@ Ox.IconList = function(options, self) {
|
|||
}];
|
||||
updateKeys();
|
||||
that.$element.sortList(key, operator);
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue