From 0124c313cdbee07c1f52f64a83f9e78a3de140da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 9 Oct 2015 13:49:18 +0200 Subject: [PATCH] Append Many2One buttons after the completion to not break layout --- src/view.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/view.js b/src/view.js index 63469d99c2..688994d31c 100644 --- a/src/view.js +++ b/src/view.js @@ -2791,6 +2791,16 @@ }).appendTo(group); // Use keydown to not receive focus-in TAB this.entry.on('keydown', this.key_press.bind(this)); + + if (!attributes.completion || attributes.completion == "1") { + Sao.common.get_completion(group, + this._update_completion.bind(this), + this._completion_match_selected.bind(this), + this._completion_action_activated.bind(this)); + this.wid_completion = true; + } + + // Append buttons after the completion to not break layout var buttons = jQuery('', { 'class': 'input-group-btn' }).appendTo(group); @@ -2801,13 +2811,7 @@ 'class': 'glyphicon glyphicon-search' })).appendTo(buttons); this.but_open.click(this.edit.bind(this)); - if (!attributes.completion || attributes.completion == "1") { - Sao.common.get_completion(group, - this._update_completion.bind(this), - this._completion_match_selected.bind(this), - this._completion_action_activated.bind(this)); - this.wid_completion = true; - } + this.el.change(this.focus_out.bind(this)); this._readonly = false; },