1
0
Fork 0
forked from 0x2620/oxjs

IconList/InfoList/TextList: add query option

This commit is contained in:
rolux 2012-06-19 14:15:20 +02:00
commit 68321c7245
3 changed files with 28 additions and 12 deletions

View file

@ -20,6 +20,7 @@ Ox.InfoList = function(options, self) {
keys: [],
max: -1,
min: 0,
query: {conditions: [], operator: '&'},
selected: [],
size: 192,
sort: [],
@ -28,14 +29,17 @@ Ox.InfoList = 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});
},
width: function() {
var width = getItemWidth();
@ -45,7 +49,6 @@ Ox.InfoList = function(options, self) {
$parent.css({width: width - 144});
$parent.parent().css({width: width - 144});
$parent.parent().parent().css({width: width - 8});
Ox.Log('List', '@@@', this.className, id)
Ox.UI.elements[id].options({width: width - 152});
});
}
@ -67,6 +70,7 @@ Ox.InfoList = function(options, self) {
min: self.options.min,
orientation: 'vertical',
pageLength: 10,
query: self.options.query,
selected: self.options.selected,
sort: self.options.sort,
type: 'info',