[IMP] use qweb templates for read-only facets

bzr revid: xmo@openerp.com-20120327150811-v9urpm5j6hosesoz
This commit is contained in:
Xavier Morel 2012-03-27 17:08:11 +02:00
parent 5a455daa43
commit c94bfd8bf9
2 changed files with 12 additions and 9 deletions

View File

@ -642,15 +642,9 @@ openerp.web.search.FilterGroupFacet = VS.ui.SearchFacet.extend({
this.setMode('not', 'selected');
var value = this.model.get('value');
this.$el.html([
'<div class="category oe_filter">',
this.model.get('category'),
'</div>',
'<div class="search_facet_input_container">',
value,
'</div>',
'<div class="search_facet_remove VS-icon VS-icon-cancel"></div>'
].join(''));
this.$el.html(QWeb.render('SearchView.filters.facet', {
facet: this.model
}));
// virtual input so SearchFacet code has something to play with
this.box = $('<input>').val(value);

View File

@ -1304,6 +1304,15 @@
<t t-esc="filter.attrs.string or filter.attrs.name or 'Ω'"/>
</li>
</ul>
<t t-name="SearchView.filters.facet">
<div class="category oe_filter_category"><t t-esc="facet.get('category')"/></div>
<div class="search_facet_input_container">
<t t-esc="facet.get('value')"/>
</div>
<div class="search_facet_remove VS-icon VS-icon-cancel"/>
</t>
<t t-name="SearchView.field">
<label t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
t-att-title="attrs.help"