updating filter
This commit is contained in:
parent
46f40c0623
commit
7c23fb3741
1 changed files with 9 additions and 10 deletions
|
@ -249,6 +249,7 @@ Ox.Filter = function(options, self) {
|
|||
|
||||
function changeOperator(event, data) {
|
||||
self.options.query.operator = data.selected[0].id;
|
||||
that.$element.find('.OxGroupLabel').html(self.options.query.operator == '&' ? 'and' : 'or');
|
||||
}
|
||||
|
||||
function constructCondition(condition, pos) {
|
||||
|
@ -345,24 +346,22 @@ Ox.Filter = function(options, self) {
|
|||
return new Ox.FormElementGroup({
|
||||
elements: [
|
||||
new Ox.Label({
|
||||
title: self.options.operator == '&' ? 'and' : 'or',
|
||||
title: self.options.query.operator == '&' ? 'and' : 'or',
|
||||
overlap: 'right',
|
||||
width: 48
|
||||
}),
|
||||
}).addClass('OxGroupLabel'),
|
||||
new Ox.FormElementGroup({
|
||||
elements: [
|
||||
new Ox.Select({
|
||||
items: $.map(self.operators, function(operator) {
|
||||
Ox.print('!!!!', {
|
||||
checked: operator.id != self.options.operator,
|
||||
id: operator.id,
|
||||
title: operator.title
|
||||
});
|
||||
return {
|
||||
//checked: operator.id != self.options.operator,
|
||||
checked: operator.id != self.options.query.operator,
|
||||
id: operator.id,
|
||||
title: operator.title
|
||||
}
|
||||
// fixme: should be operator.title,
|
||||
// but is passed by reference to some select,
|
||||
// which makes it an array
|
||||
title: operator.title[0]
|
||||
};
|
||||
}),
|
||||
width: 48
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue