[imp] small improvements to advanced filters

bzr revid: nicolas.vanhoren@openerp.com-20110621125317-0s7cfk7q8jkflmne
This commit is contained in:
niv-openerp 2011-06-21 14:53:17 +02:00
parent 016eff262b
commit 4e9834f4e3
2 changed files with 11 additions and 3 deletions

View File

@ -565,6 +565,7 @@ background: linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,
.openerp .searchview_extended_delete_group {
float:right;
display: none;
}
.openerp .searchview_extended_delete_group span,

View File

@ -796,9 +796,6 @@ openerp.base.search.ExtendedSearchGroup = openerp.base.BaseWidget.extend({
});
var delete_btn = this.$element.find('.searchview_extended_delete_group');
delete_btn.click(function (e) {
if (_this.parent.children.length == 1) {
_this.parent.hide();
}
_this.stop();
});
},
@ -811,6 +808,11 @@ openerp.base.search.ExtendedSearchGroup = openerp.base.BaseWidget.extend({
return [].concat(choice == "none" ? ['!'] : [],
_.map(_.range(_.max([0,props.length - 1])), function() { return op; }),
props);
},
stop: function() {
if (this.parent.children.length == 1)
this.parent.hide();
this._super();
}
});
@ -838,6 +840,11 @@ openerp.base.search.ExtendedSearchProposition = openerp.base.BaseWidget.extend({
_this.stop();
});
},
stop: function() {
if (this.parent.children.length == 1)
this.parent.stop();
this._super();
},
changed: function() {
var nval = this.$element.find(".searchview_extended_prop_field").val();
if(this.attrs.selected == null || nval != this.attrs.selected.name) {