diff --git a/source/Ox.UI/js/Form/Ox.Filter.js b/source/Ox.UI/js/Form/Ox.Filter.js index 18a6bfef..681d21df 100644 --- a/source/Ox.UI/js/Form/Ox.Filter.js +++ b/source/Ox.UI/js/Form/Ox.Filter.js @@ -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 })