File tree Expand file tree Collapse file tree 5 files changed +26
-22
lines changed Expand file tree Collapse file tree 5 files changed +26
-22
lines changed Original file line number Diff line number Diff line change 12
12
"google-caja" : " 5669" ,
13
13
"jed" : " ~1.1.1" ,
14
14
"jquery" : " components/jquery#~3.4.1" ,
15
- "jquery-typeahead" : " ~2.0.0 " ,
15
+ "jquery-typeahead" : " ~2.10.6 " ,
16
16
"jquery-ui" : " components/jqueryui#~1.12" ,
17
17
"marked" : " ~0.5" ,
18
18
"MathJax" : " ^2.7.4" ,
Original file line number Diff line number Diff line change @@ -44,20 +44,20 @@ define([
44
44
// typeahead lib need a specific layout with specific class names.
45
45
// the following just does that
46
46
var form = $ ( '<form/>' ) ;
47
- var container = $ ( '<div/>' ) . addClass ( 'typeahead-container ' ) ;
48
- var field = $ ( '<div/>' ) . addClass ( 'typeahead-field ' ) ;
47
+ var container = $ ( '<div/>' ) . addClass ( 'typeahead__container ' ) ;
48
+ var field = $ ( '<div/>' ) . addClass ( 'typeahead__field ' ) ;
49
49
var input = $ ( '<input/>' ) . attr ( 'type' , 'search' ) ;
50
50
51
51
field
52
52
. append (
53
- $ ( '<span>' ) . addClass ( 'typeahead-query ' ) . append (
53
+ $ ( '<span>' ) . addClass ( 'typeahead__query ' ) . append (
54
54
input
55
55
)
56
56
)
57
57
. append (
58
- $ ( '<span/>' ) . addClass ( 'typeahead-button ' ) . append (
58
+ $ ( '<span/>' ) . addClass ( 'typeahead__button ' ) . append (
59
59
$ ( '<button/>' ) . attr ( 'type' , 'submit' ) . append (
60
- $ ( '<span/>' ) . addClass ( 'typeahead-search -icon' )
60
+ $ ( '<span/>' ) . addClass ( 'typeahead__search -icon' )
61
61
)
62
62
)
63
63
) ;
@@ -185,7 +185,9 @@ define([
185
185
maxItem : 1e3 ,
186
186
minLength : 0 ,
187
187
hint : true ,
188
- group : [ "group" , "{{group}} command group" ] ,
188
+ group : {
189
+ template :"{{group}} command group"
190
+ } ,
189
191
searchOnFocus : true ,
190
192
mustSelectItem : true ,
191
193
template : '<i class="fa fa-icon {{icon}}"></i>{{display}} <div title={{key}} class="pull-right {{mode_shortcut}}">{{shortcut}}</div>' ,
Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ var bind = function bind(obj) {
19
19
} ;
20
20
Function . prototype . bind = Function . prototype . bind || bind ;
21
21
22
+ requirejs . config ( {
23
+ map : {
24
+ "*" : {
25
+ "typeahead" : "jquery-typeahead"
26
+ }
27
+ }
28
+ } )
22
29
23
30
requirejs ( [
24
31
'jquery' ,
Original file line number Diff line number Diff line change 1
- ul .typeahead-list i {
2
- margin-left : -10px ;
3
- width : 18px ;
1
+ div .typeahead__container {
2
+ font : revert ;
4
3
}
5
4
6
- [dir= " rtl" ] ul .typeahead-list i {
7
- margin-left : 0 ;
8
- margin-right : -10px ;
5
+ ul .typeahead__list i {
6
+ width : 18px ;
9
7
}
10
8
11
- ul .typeahead-list {
9
+ ul .typeahead__list {
12
10
max-height : 80vh ;
13
11
overflow :auto ;
14
12
@@ -19,11 +17,11 @@ ul.typeahead-list {
19
17
}
20
18
}
21
19
22
- ul .typeahead-list & > li > a .pull-right {
20
+ ul .typeahead__list & > li > a .pull-right {
23
21
.pull-left ();
24
22
}
25
23
26
- [dir= " rtl" ] .typeahead-list {
24
+ [dir= " rtl" ] .typeahead__list {
27
25
text-align : right ;
28
26
}
29
27
Original file line number Diff line number Diff line change @@ -25,21 +25,18 @@ var rjs_config = {
25
25
moment : 'components/moment/min/moment-with-locales' ,
26
26
codemirror : 'components/codemirror' ,
27
27
xterm : 'components/xterm.js/index' ,
28
- ' xtermjs-fit' : 'components/xterm.js-fit/index' ,
29
- typeahead : 'components/jquery-typeahead/dist/jquery.typeahead' ,
28
+ " xtermjs-fit" : 'components/xterm.js-fit/index' ,
29
+ "jquery- typeahead" : 'components/jquery-typeahead/dist/jquery.typeahead.min ' ,
30
30
contents : 'empty:' ,
31
31
custom : 'empty:' ,
32
32
} ,
33
33
map : { // for backward compatibility
34
34
"*" : {
35
35
"jqueryui" : "jquery-ui" ,
36
+ "typeahead" : "jquery-typeahead"
36
37
}
37
38
} ,
38
39
shim : {
39
- typeahead : {
40
- deps : [ "jquery" ] ,
41
- exports : "typeahead"
42
- } ,
43
40
underscore : {
44
41
exports : '_'
45
42
} ,
You can’t perform that action at this time.
0 commit comments