summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-05-09 17:12:17 +0200
committerXavier Morel <xmo@openerp.com>2012-05-09 17:12:17 +0200
commit0d51f8992c4fad5cd46a0879b22dc2a697eb0769 (patch)
tree5cfeb5a9060d2e4a9c0eb64418af01dcb18ff25a /addons/web/static/src
parent538b16c2350b75eccdefc249de6c58d851571c42 (diff)
[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
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/search.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index 198740f4a97..7c35a79ef84 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -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;