[IMP] Insert completed facet in stead of the index used for the completion, instead of always adding them to the end (if applicable)

bzr revid: xmo@openerp.com-20120509151217-4juo2hm8xxj21uj9
This commit is contained in:
Xavier Morel 2012-05-09 17:12:17 +02:00
parent 538b16c235
commit 0d51f8992c
1 changed files with 4 additions and 1 deletions

View File

@ -500,7 +500,10 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
select_completion: function (e, ui) {
e.preventDefault();
this.query.add(ui.item.facet);
var input_index = _(this.input_subviews).indexOf(
this.subviewForRoot(
this.$element.find('div.oe_searchview_input:focus')[0]));
this.query.add(ui.item.facet, {at: input_index / 2});
},
renderFacets: function () {
var self = this;