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
|
|
@ -31,6 +31,7 @@ Ox.TextList <f> TextList Object
|
|||
max <n|-1> Maximum number of items that can be selected (-1 for all)
|
||||
min <n|0> Minimum number of items that must be selected
|
||||
pageLength <n|100> Number of items per page
|
||||
query <o> Query
|
||||
scrollbarVisible <b|false> If true, the scrollbar is always visible
|
||||
selected <[s]|[]> Array of selected ids
|
||||
sort <[o]|[s]|[]> ['+foo', ...] or [{key: 'foo', operator: '+'}, ...]
|
||||
|
|
@ -64,6 +65,7 @@ Ox.TextList = function(options, self) {
|
|||
max: -1,
|
||||
min: 0,
|
||||
pageLength: 100,
|
||||
query: {conditions: [], operator: '&'},
|
||||
scrollbarVisible: false,
|
||||
selected: [],
|
||||
sort: [],
|
||||
|
|
@ -73,17 +75,20 @@ Ox.TextList = function(options, self) {
|
|||
.options(options || {})
|
||||
.update({
|
||||
items: function() {
|
||||
that.$body.options('items', self.options.items);
|
||||
that.$body.options({items: self.options.items});
|
||||
},
|
||||
paste: function() {
|
||||
that.$body.options('paste', self.options.paste);
|
||||
that.$body.options({paste: self.options.paste});
|
||||
},
|
||||
query: function() {
|
||||
that.$body.options({query: self.options.query});
|
||||
},
|
||||
selected: function() {
|
||||
that.$body.options('selected', self.options.selected);
|
||||
that.$body.options({selected: self.options.selected});
|
||||
},
|
||||
sort: function() {
|
||||
updateColumn();
|
||||
that.$body.options('sort', self.options.sort);
|
||||
that.$body.options({sort: self.options.sort});
|
||||
}
|
||||
})
|
||||
.addClass('OxTextList')
|
||||
|
|
@ -226,9 +231,10 @@ Ox.TextList = function(options, self) {
|
|||
}).concat(self.options.keys),
|
||||
max: self.options.max,
|
||||
min: self.options.min,
|
||||
orientation: 'vertical',
|
||||
pageLength: self.options.pageLength,
|
||||
paste: self.options.paste,
|
||||
orientation: 'vertical',
|
||||
query: self.options.query,
|
||||
selected: self.options.selected,
|
||||
sort: self.options.sort,
|
||||
sortable: self.options.sortable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue