forked from 0x2620/oxjs
IconList/InfoList/TextList: add query option
This commit is contained in:
parent
0f9bf79ddf
commit
68321c7245
3 changed files with 28 additions and 12 deletions
|
|
@ -18,6 +18,7 @@ Ox.IconList <f> IconList Object
|
|||
min <n|0> minimum of selcted items
|
||||
orientation <s|both> orientation ("horizontal", "vertical" or "both")
|
||||
pageLength <n|100> Number of items per page (if orientation != "both")
|
||||
query <o> Query
|
||||
selected <a|[]> array of selected items
|
||||
size <n|128> list size
|
||||
sort <a|[]> sort keys
|
||||
|
|
@ -44,6 +45,7 @@ Ox.IconList = function(options, self) {
|
|||
min: 0,
|
||||
orientation: 'both',
|
||||
pageLength: 100,
|
||||
query: {conditions: [], operator: '&'},
|
||||
selected: [],
|
||||
size: 128,
|
||||
sort: [],
|
||||
|
|
@ -52,14 +54,17 @@ Ox.IconList = function(options, self) {
|
|||
.options(options || {})
|
||||
.update({
|
||||
items: function() {
|
||||
that.$element.options('items', self.options.items);
|
||||
that.$element.options({items: self.options.items});
|
||||
},
|
||||
query: function() {
|
||||
that.$element.options({query: self.options.query});
|
||||
},
|
||||
selected: function() {
|
||||
that.$element.options('selected', self.options.selected);
|
||||
that.$element.options({selected: self.options.selected});
|
||||
},
|
||||
sort: function() {
|
||||
updateKeys();
|
||||
that.$element.options('sort', self.options.sort);
|
||||
that.$element.options({sort: self.options.sort});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -89,6 +94,7 @@ Ox.IconList = function(options, self) {
|
|||
min: self.options.min,
|
||||
orientation: self.options.orientation,
|
||||
pageLength: self.options.pageLength,
|
||||
query: self.options.query,
|
||||
selected: self.options.selected,
|
||||
sort: self.options.sort,
|
||||
type: 'icon',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue