From 52899110eee85466374871a960d0cc06abf8debf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 13 Mar 2015 16:45:47 +0100 Subject: [PATCH] Add autocompletion on M2O form widgets review15051002 --- bower.json | 4 +- index.html | 2 + src/common.js | 45 ++++++++++++++++++++++ src/model.js | 2 +- src/sao.less | 4 ++ src/tab.js | 4 +- src/view.js | 105 ++++++++++++++++++++++++++++++++++++++++++-------- 7 files changed, 146 insertions(+), 20 deletions(-) diff --git a/bower.json b/bower.json index 97ceec2bc0..5c765dfa48 100644 --- a/bower.json +++ b/bower.json @@ -18,7 +18,9 @@ "jquery": "~2.1.1", "bootstrap": "~3.3.1", "moment": "~2.9.0", - "eonasdan-bootstrap-datetimepicker": "~4.0.0" + "eonasdan-bootstrap-datetimepicker": "~4.0.0", + "typeahead.js": "~0.10.5", + "typeahead.js-bootstrap3.less": "~0" }, "devDependencies": { "qunit": "~1.17.1" diff --git a/index.html b/index.html index 6857392c99..03c8da8f9b 100644 --- a/index.html +++ b/index.html @@ -10,8 +10,10 @@ this repository contains the full copyright notices and license terms. --> + + = 0) { + if (ref_model && ref_id !== null && ref_id >= 0) { if (!rec_name && ref_id >= 0) { Sao.rpc({ 'method': 'model.' + ref_model + '.read', diff --git a/src/sao.less b/src/sao.less index 71cb592eed..d73ffa6d45 100644 --- a/src/sao.less +++ b/src/sao.less @@ -175,3 +175,7 @@ width: 100%; z-index: 1000; } + +.tt-hint { + background-color: transparent !important; +} diff --git a/src/tab.js b/src/tab.js index bd97fcf81e..69f6c58f96 100644 --- a/src/tab.js +++ b/src/tab.js @@ -42,7 +42,7 @@ '
' + '