@@ -9,13 +9,13 @@ slug: reference/
9
9
10
10
<div class =" column-span" >
11
11
12
- <main id =" content" >
12
+ <main id =" content" >
13
13
<h1 >Reference</h1 >
14
14
15
15
<div id =" search" class =" search-wrapper" role =" search" ></div >
16
16
<div id =" collection-list-nav" ></div >
17
17
18
- <!-- class="container-fluid"-->
18
+ <!-- class="container-fluid"-->
19
19
<div id =" list" tabindex =" 2" class =" list-wrapper allItems-collection" ></div >
20
20
<div id =" item" tabindex =" 1" class =" item-wrapper apidocs" ></div >
21
21
<div id =" file" class =" file-wrapper" ></div >
@@ -39,21 +39,25 @@ slug: reference/
39
39
40
40
var translations;
41
41
42
- $ (document ).ready (function () {
42
+ $ (document ).ready (function () {
43
43
var routes = window .location .pathname .split (' /' );
44
44
var lang = routes[1 ];
45
45
if (langs .indexOf (lang) != - 1 ) {
46
- $ .getJSON (' /assets/reference/' + lang + ' .json' , function (data ) {
46
+ $ .getJSON (' /assets/reference/' + lang+ ' .json' , function (data ) {
47
47
translations = data;
48
48
49
- window .addEventListener (' reference-rendered' , function () {
49
+ window .addEventListener (' reference-rendered' , function () {
50
50
console .log (" rendered" );
51
51
updateLanguage ();
52
52
}, false );
53
53
});
54
54
}
55
55
});
56
56
57
+ function removePlaceholder () {
58
+ $ (' #search input' ).attr (' placeholder' , ' ' );
59
+ }
60
+
57
61
function updateLanguage () {
58
62
if (translations) {
59
63
// reference title
@@ -104,27 +108,27 @@ slug: reference/
104
108
$ (' #footer2' ).html (translations[' footer2' ]);
105
109
$ (' #footer3' ).html (translations[' footer3' ]);
106
110
$ (' #footer4' ).html (translations[' footer4' ]);
107
- $ (' .group-name, .subgroup-name' ).each (function () {
111
+ $ (' .group-name, .subgroup-name' ).each (function () {
108
112
$ (this ).text (translations[$ (this ).text ()]);
109
113
});
110
114
var routes = window .location .hash .split (' /' );
111
115
var obj = routes[1 ];
112
116
var name = routes[2 ];
113
117
if (translations[obj] && translations[obj][name]) {
114
118
var entry = translations[obj][name];
115
- $ (' .description-text' ).html (' <p>' + entry .description + ' </p>' );
119
+ $ (' .description-text' ).html (' <p>' + entry .description + ' </p>' );
116
120
$ (' .returns' ).html (entry .returns );
117
- $ (' .params' ).find (' ul' ).each (function (i ) {
121
+ $ (' .params' ).find (' ul' ).each (function (i ) {
118
122
if (i < entry .params .length ) {
119
- $ (this ).children (' li' ).each (function (j ) {
123
+ $ (this ).children (' li' ).each (function (j ){
120
124
$ (this ).children (' .paramtype' ).html (entry .params [j]);
121
125
});
122
126
}
123
127
});
124
128
}
125
129
}
126
130
}
127
- </script >
131
+ </script >
128
132
129
133
{{> asterisk }}
130
134
0 commit comments