Index: trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | var apiUrl = '/api.php'; |
3 | 3 | |
4 | 4 | if ( scriptPath ) { |
5 | | - apiUrl = scriptPath + apiUrl; |
| 5 | + apiUrl = scriptPath + apiUrl; |
6 | 6 | } |
7 | 7 | |
8 | 8 | var timer = -1; |
— | — | @@ -32,11 +32,11 @@ |
33 | 33 | ol.sqLeft = sq.offsetLeft; |
34 | 34 | ol.sqTop = sq.offsetTop; |
35 | 35 | sq.style.position = 'absolute'; |
36 | | - |
| 36 | + |
37 | 37 | if ( !ol.properOffsetWidth ) { |
38 | 38 | ol.properOffsetWidth = search.offsetLeft + 44; |
39 | 39 | } |
40 | | - |
| 40 | + |
41 | 41 | sq.className = ''; |
42 | 42 | sq.style.left = sb.offsetLeft + pixels; |
43 | 43 | sq.style.top = sb.offsetTop + pixels; |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | |
90 | 90 | var removeResults = document.getElementById( 'remove-results' ); |
91 | 91 | if ( !removeResults ) { |
92 | | - rrd = document.createElement( 'a' ); |
| 92 | + rrd = document.createElement( 'a' ); |
93 | 93 | rrd.setAttribute( 'href', '#' ); |
94 | 94 | rrd.setAttribute( 'id', 'remove-results' ); |
95 | 95 | rrd.setAttribute( 'onclick', 'removeResults();' ); |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | whichElement(event); |
159 | 159 | } |
160 | 160 | |
161 | | -function whichElement( e ) { |
| 161 | +function whichElement( e ) { |
162 | 162 | var targ; |
163 | 163 | if ( !e ) { |
164 | 164 | var e = window.event; |
— | — | @@ -167,15 +167,15 @@ |
168 | 168 | } else if ( e.srcElement ) { |
169 | 169 | targ = e.srcElement; |
170 | 170 | } |
171 | | - |
| 171 | + |
172 | 172 | if ( targ.nodeType == 3 ) { |
173 | 173 | targ = targ.parentNode; |
174 | 174 | } |
175 | | - |
| 175 | + |
176 | 176 | e.cancelBubble = true; |
177 | 177 | e.stopPropagation(); |
178 | | - if ( targ.className == "suggestion-result" || |
179 | | - targ.className == "search-result-item" || |
| 178 | + if ( targ.className == "suggestion-result" || |
| 179 | + targ.className == "search-result-item" || |
180 | 180 | targ.className == "suggestions-result" || |
181 | 181 | targ.className == "sq-val-update" || |
182 | 182 | targ.id == 'results' || |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | if ( results ) { |
204 | 204 | results.style.width = ( sq.offsetWidth - 2 ) + pixels; |
205 | 205 | results.style.left = sq.offsetLeft + pixels; |
206 | | - results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels; |
| 206 | + results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels; |
207 | 207 | if ( results.style.display == 'block' ) { |
208 | 208 | focused = false; |
209 | 209 | search.blur(); |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | } |
300 | 300 | if ( !sections || sections.length < 1 ) { |
301 | 301 | results.innerHTML = "<div class=\"suggestions-results\" title=\"No Results\">No Results</div>"; |
302 | | - } else { |
| 302 | + } else { |
303 | 303 | var html = '<div class="suggestions-results">'; |
304 | 304 | for ( i = 0; i < sections.length; i++ ) { |
305 | 305 | var section = sections[i]; |