@@ -17,6 +17,27 @@ class SearchbarComponent(engine: SearchbarEngine, inkuireEngine: InkuireDelegate
17
17
icon.classList.add(" micon" )
18
18
icon.classList.add(p.kind.take(2 ))
19
19
20
+ val resultA = document.createElement(" a" ).asInstanceOf [html.Anchor ]
21
+ resultA.href = Globals .pathToRoot + p.location
22
+ resultA.text = s " ${p.fullName}"
23
+
24
+ val location = document.createElement(" span" )
25
+ location.classList.add(" pull-right" )
26
+ location.classList.add(" scaladoc-searchbar-location" )
27
+ location.textContent = p.description
28
+
29
+ wrapper.appendChild(resultA)
30
+ wrapper.appendChild(location)
31
+ wrapper.addEventListener(" mouseover" , {
32
+ case e : MouseEvent => handleHover(wrapper)
33
+ })
34
+ wrapper
35
+
36
+ def toHTMLInkuireHack =
37
+ val wrapper = document.createElement(" div" ).asInstanceOf [html.Div ]
38
+ wrapper.classList.add(" scaladoc-searchbar-result" )
39
+ wrapper.classList.add(" monospace" )
40
+
20
41
val resultA = document.createElement(" a" ).asInstanceOf [html.Anchor ]
21
42
resultA.href = Globals .pathToRoot + p.location.drop(21 ) // TODO change when generating XD
22
43
resultA.text = s " ${p.fullName}"
@@ -66,7 +87,7 @@ class SearchbarComponent(engine: SearchbarEngine, inkuireEngine: InkuireDelegate
66
87
case BySignature (signature) =>
67
88
println(" Searching" )
68
89
inkuireEngine.query(query) { (p : PageEntry ) =>
69
- resultsDiv.appendChild(p.toHTML )
90
+ resultsDiv.appendChild(p.toHTMLInkuireHack )
70
91
}
71
92
}
72
93
}
0 commit comments