Skip to content

Commit af9de07

Browse files
committed
Add bootstrap-3-specific styling to the typeahead.js stuff
Note the workaround for `typeahead.js-bootstrap3.less` not having quite updated to cope with a class-name change in `typeahead.js` v0.11.1 (made the suggestions background-transparent) - just tell typeahead.js to use the old class name: hyspace/typeahead.js-bootstrap3.less#24 (comment)
1 parent 0adf027 commit af9de07

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

app/views/fragments/head.scala.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<script type="text/javascript" src="@routes.Assets.at("lib/typeahead.js/dist/typeahead.bundle.js")"></script>
88
<script type="text/javascript" src="@routes.Assets.at("lib/handlebars/dist/handlebars.js")"></script>
99
<link rel="stylesheet" href="@routes.Assets.at("lib/octicons/octicons/octicons.css")">
10+
<link rel="stylesheet" href="@routes.Assets.at("lib/typeahead.js-bootstrap3.less/typeahead.css")">
1011
<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")">
1112

1213
@for(googleAnalyticsId <- lib.AnalyticsConfig.googleAnalyticsIdOpt) {

app/views/fragments/sendTabContent.scala.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
jQuery('#@mailType.slug-in-reply-to .typeahead').typeahead({
7171
hint: true,
7272
highlight: true,
73+
minLength: 1,
74+
classNames: {
75+
menu: 'tt-dropdown-menu'
76+
}
7377
minLength: 1
7478
},
7579
{

build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ libraryDependencies ++= Seq(
3939
"com.adrianhurt" %% "play-bootstrap3" % "0.4.4-P24",
4040
"org.webjars.bower" % "octicons" % "2.2.3",
4141
"org.webjars.bower" % "typeahead.js" % "0.11.1",
42+
"org.webjars.bower" % "typeahead.js-bootstrap3.less" % "0.2.3",
4243
"org.webjars.npm" % "handlebars" % "3.0.3",
4344
"com.lihaoyi" %% "fastparse" % "0.1.7",
4445
"com.github.nscala-time" %% "nscala-time" % "2.0.0",

0 commit comments

Comments
 (0)