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
|
closePreview <f> close preview
|
||||||
() -> <u> close
|
() -> <o> the list
|
||||||
@*/
|
@*/
|
||||||
that.closePreview = function() {
|
that.closePreview = function() {
|
||||||
that.$element.closePreview();
|
that.$element.closePreview();
|
||||||
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
paste <f> paste to list
|
paste <f> paste into list
|
||||||
(data) -> <f> paste data, returns IconList
|
() -> <o> the list
|
||||||
@*/
|
@*/
|
||||||
that.paste = function(data) {
|
that.paste = function(data) {
|
||||||
that.$element.paste(data);
|
that.$element.paste(data);
|
||||||
|
@ -161,7 +162,7 @@ Ox.IconList = function(options, self) {
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
reloadList <f> reload list
|
reloadList <f> reload list
|
||||||
() -> <u> reload iconlist
|
() -> <o> the list
|
||||||
@*/
|
@*/
|
||||||
that.reloadList = function() {
|
that.reloadList = function() {
|
||||||
that.$element.reloadList();
|
that.$element.reloadList();
|
||||||
|
@ -169,16 +170,16 @@ Ox.IconList = function(options, self) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
scrollToSelection <f> set key/value
|
scrollToSelection <f> scroll list to selection
|
||||||
() -> <u> scroll list ot selection
|
() -> <o> the list
|
||||||
@*/
|
@*/
|
||||||
that.scrollToSelection = function() {
|
that.scrollToSelection = function() {
|
||||||
that.$element.scrollToSelection();
|
that.$element.scrollToSelection();
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
size <f> set key/value
|
size <f> get size of list
|
||||||
() -> <n> get size of list
|
() -> <n> size
|
||||||
@*/
|
@*/
|
||||||
that.size = function() {
|
that.size = function() {
|
||||||
that.$element.size();
|
that.$element.size();
|
||||||
|
@ -186,8 +187,9 @@ Ox.IconList = function(options, self) {
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
sortList <f> sort list
|
sortList <f> sort list
|
||||||
(key, operator) -> <u> sort list by key with operator
|
(key, operator) -> <o> the list
|
||||||
operator <s> can be + / -
|
key <s> sort key
|
||||||
|
operator <s> sort operator ("+" or "-")
|
||||||
@*/
|
@*/
|
||||||
that.sortList = function(key, operator) {
|
that.sortList = function(key, operator) {
|
||||||
self.options.sort = [{
|
self.options.sort = [{
|
||||||
|
@ -196,6 +198,7 @@ Ox.IconList = function(options, self) {
|
||||||
}];
|
}];
|
||||||
updateKeys();
|
updateKeys();
|
||||||
that.$element.sortList(key, operator);
|
that.$element.sortList(key, operator);
|
||||||
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
|
|
@ -1427,8 +1427,8 @@ Ox.List = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
clearCache <f> empy list cache
|
clearCache <f> empty list cache
|
||||||
() -> <f> empy cache, returns List Element
|
() -> <o> the list
|
||||||
@*/
|
@*/
|
||||||
that.clearCache = function() { // fixme: was used by TextList resizeColumn, now probably no longer necessary
|
that.clearCache = function() { // fixme: was used by TextList resizeColumn, now probably no longer necessary
|
||||||
self.$pages = [];
|
self.$pages = [];
|
||||||
|
@ -1437,7 +1437,7 @@ Ox.List = function(options, self) {
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
closePreview <f> close preview
|
closePreview <f> close preview
|
||||||
() -> <f> close preview, returns List Element
|
() -> <o> the list
|
||||||
@*/
|
@*/
|
||||||
that.closePreview = function() {
|
that.closePreview = function() {
|
||||||
self.preview = false;
|
self.preview = false;
|
||||||
|
@ -1446,7 +1446,7 @@ Ox.List = function(options, self) {
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
paste <f> paste data
|
paste <f> paste data
|
||||||
(data) -> <f> paste data into list
|
(data) -> <o> the list
|
||||||
data <o> paste object
|
data <o> paste object
|
||||||
@*/
|
@*/
|
||||||
that.paste = function(data) {
|
that.paste = function(data) {
|
||||||
|
@ -1456,23 +1456,25 @@ Ox.List = function(options, self) {
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
reloadList <f> reload list contents
|
reloadList <f> reload list contents
|
||||||
() -> <f> returns List Element
|
() -> <o> the list
|
||||||
@*/
|
@*/
|
||||||
that.reloadList = function(stayAtPosition) {
|
that.reloadList = function(stayAtPosition) {
|
||||||
if (stayAtPosition) {
|
var scrollTop = that.scrollTop();
|
||||||
var scrollTop = that.scrollTop();
|
if (!self.isAsync) {
|
||||||
updateQuery(function() {
|
loadItems();
|
||||||
that.scrollTop(scrollTop);
|
scrollList();
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
updateQuery();
|
updateQuery(scrollList);
|
||||||
|
}
|
||||||
|
function scrollList() {
|
||||||
|
stayAtPosition && that.scrollTop(scrollTop);
|
||||||
}
|
}
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
reloadPages <f> reload list pages
|
reloadPages <f> reload list pages
|
||||||
() -> <f> returns List Element
|
() -> <o> the list
|
||||||
@*/
|
@*/
|
||||||
that.reloadPages = function() {
|
that.reloadPages = function() {
|
||||||
//Ox.print('---------------- list reload, page', self.page)
|
//Ox.print('---------------- list reload, page', self.page)
|
||||||
|
|
Loading…
Reference in a new issue