diff --git a/Gruntfile.js b/Gruntfile.js index 71896d84a4..15ed6446d0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -90,7 +90,7 @@ module.exports = function(grunt) { less: { dev: { options: { - paths: ['src'] + paths: ['src', 'bower_components/bootstrap/less'] }, files: { 'dist/<%= pkg.name %>.css': 'src/*.less' @@ -98,7 +98,7 @@ module.exports = function(grunt) { }, 'default': { options: { - paths: ['src'], + paths: ['src', 'bower_components/bootstrap/less'], yuicompress: true }, files: { diff --git a/bower.json b/bower.json index 9234456f2e..3fb468d943 100644 --- a/bower.json +++ b/bower.json @@ -19,12 +19,10 @@ "bootstrap": "~3.3.4", "moment": "~2.10.2", "eonasdan-bootstrap-datetimepicker": "~4.7.14", - "typeahead.js": "~0.10.5", - "typeahead.js-bootstrap3.less": "~0", + "typeahead.js": "~0.11.1", "gettext.js": "~0.5.0", "d3": "~3.5.0", - "c3": "~0.4.10", - "typeahead.js-bootstrap3.less": "~0" + "c3": "~0.4.10" }, "devDependencies": { "qunit": "~1.18.0" diff --git a/src/sao.less b/src/sao.less index 6f9f2f7783..e5da69491e 100644 --- a/src/sao.less +++ b/src/sao.less @@ -213,27 +213,3 @@ width: 100%; z-index: 1000; } - -.twitter-typeahead { - & .tt-hint { - background-color: transparent !important; - } - - & img.global-search-icon { - width: 2em; - height: 2em; - float: left; - } - - & p.global-search-text { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } -} - -.tt-dataset-actions { - font-style: italic; - font-variant: small-caps; - border-top: 1px #ddd solid; -} diff --git a/src/typeahead.less b/src/typeahead.less new file mode 100644 index 0000000000..f6b84a3408 --- /dev/null +++ b/src/typeahead.less @@ -0,0 +1,82 @@ +@import "variables"; + +.twitter-typeahead { + width: 100%; + .input-group &{ + //overwrite `display:inline-block` style + display: table-cell!important; + float: left; + } + + & .tt-hint { + background-color: transparent !important; + } + + & img.global-search-icon { + width: 2em; + height: 2em; + float: left; + } + + & p.global-search-text { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } +} + +.tt-dataset-actions { + font-style: italic; + font-variant: small-caps; + border-top: 1px #ddd solid; +} + +.tt-menu { + //dropdown menu + position: absolute; + top: 100%; + left: 0; + z-index: @zindex-dropdown; + min-width: 160px; + width: 100%; + padding: 5px 0; + margin: 0; + list-style: none; + font-size: @font-size-base; + background-color: @dropdown-bg; + border: 1px solid @dropdown-fallback-border; + border: 1px solid @dropdown-border; + border-bottom-right-radius: @border-radius-base; + border-bottom-left-radius: @border-radius-base; + box-shadow: 0 6px 12px rgba(0,0,0,.175); + background-clip: padding-box; + *border-right-width: 2px; + *border-bottom-width: 2px; + + .tt-suggestion { + //item + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: @line-height-base; + color: @dropdown-link-color; + white-space: nowrap; + + &.tt-cursor { + //item selected + text-decoration: none; + outline: 0; + background-color: @dropdown-link-hover-bg; + color: @dropdown-link-hover-color; + a { + //link in item selected + color: @dropdown-link-hover-color; + } + } + p { + margin: 0; + } + } +} +