Index: trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | resetViewPort(); |
42 | 42 | |
43 | 43 | search.onfocus = function() { |
44 | | - var pE, pT, pTT, rrd, rrdD, |
| 44 | + var rrd, rrdD, |
45 | 45 | removeResultsEl; |
46 | 46 | sb = document.getElementById( 'searchbox' ); |
47 | 47 | sq = document.getElementById( 'sq' ); |
— | — | @@ -51,23 +51,6 @@ |
52 | 52 | if ( !focused ) { |
53 | 53 | MobileFrontend.utils( document.body ).addClass( 'full-screen-search' ); |
54 | 54 | |
55 | | - pE = document.getElementById( 'placeholder' ); |
56 | | - if ( !pE ) { |
57 | | - pT = document.createElement( 'span' ); |
58 | | - pTT = document.createTextNode(placeholder); |
59 | | - pT.setAttribute( 'id', 'placeholder' ); |
60 | | - pT.appendChild(pTT); |
61 | | - sb.insertBefore( pT, sb.firstChild ); |
62 | | - } |
63 | | - pE = document.getElementById( 'placeholder' ); |
64 | | - if ( pE ) { |
65 | | - pE.style.display = 'block'; |
66 | | - } |
67 | | - |
68 | | - if ( pE && search.value !== '' ) { |
69 | | - pE.style.display = 'none'; |
70 | | - } |
71 | | - |
72 | 55 | removeResultsEl = document.getElementById( 'remove-results' ); |
73 | 56 | if ( !removeResultsEl ) { |
74 | 57 | rrd = document.createElement( 'a' ); |
— | — | @@ -244,13 +227,6 @@ |
245 | 228 | } |
246 | 229 | } |
247 | 230 | |
248 | | - function handleDefaultText() { |
249 | | - var pE = document.getElementById( 'placeholder' ); |
250 | | - if ( pE ) { |
251 | | - pE.style.display = 'none'; |
252 | | - } |
253 | | - } |
254 | | - |
255 | 231 | function initClearSearch() { |
256 | 232 | var clearSearch = document.getElementById( 'clearsearch' ), |
257 | 233 | search = document.getElementById( 'search' ), |
— | — | @@ -278,7 +254,6 @@ |
279 | 255 | } |
280 | 256 | u( clearSearch ).bind( 'mousedown', clearSearchBox ); |
281 | 257 | u( search ).bind( 'keyup', handleClearSearchLink ); |
282 | | - u( search ).bind( 'keydown', handleDefaultText ); |
283 | 258 | u( search ).bind( 'click', onFocusHandler ); |
284 | 259 | } |
285 | 260 | |
— | — | @@ -288,7 +263,6 @@ |
289 | 264 | document.body.onmousedown = whichElement; |
290 | 265 | document.body.ontouchstart = whichElement; |
291 | 266 | results.ontouchstart = whichElement; |
292 | | - search.onpaste = handleDefaultText; |
293 | 267 | } |
294 | 268 | init(); |
295 | 269 | initClearSearch(); |
Index: trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php |
— | — | @@ -61,7 +61,6 @@ |
62 | 62 | //<![CDATA[ |
63 | 63 | var title = "{$this->data['htmlTitle']}"; |
64 | 64 | var scriptPath = "{$this->data['wgScriptPath']}"; |
65 | | - var placeholder = "{$this->data['placeholder']}"; |
66 | 65 | var showText = "{$buttonShowText}"; |
67 | 66 | var hideText = "{$buttonHideText}"; |
68 | 67 | //]]> |
Index: trunk/extensions/MobileFrontend/templates/SearchTemplate.php |
— | — | @@ -14,6 +14,8 @@ |
15 | 15 | $homeButton = $this->data['messages']['mobile-frontend-home-button']; |
16 | 16 | $randomButton = $this->data['messages']['mobile-frontend-random-button']; |
17 | 17 | $clearText = htmlentities( $this->data['messages']['mobile-frontend-clear-search'], ENT_QUOTES ); |
| 18 | + $searchValue = $this->data['messages']['mobile-frontend-search-submit']; |
| 19 | + $placeholder = htmlentities( $this->data['messages']['mobile-frontend-placeholder'], ENT_QUOTES ); |
18 | 20 | |
19 | 21 | $scriptUrl = wfScript(); |
20 | 22 | $searchBoxDisplayNone = ( $this->data['hideSearchBox'] ) ? ' style="display: none;" ' : ''; |
— | — | @@ -34,7 +36,7 @@ |
35 | 37 | <form action='{$scriptUrl}' class='search_bar' method='get' {$searchBoxDisplayNone}> |
36 | 38 | <input type="hidden" value="Special:Search" name="title" /> |
37 | 39 | <div id="sq" class="divclearable"> |
38 | | - <input type="search" name="search" id="search" size="22" value="{$searchField}" autocorrect="off" autocomplete="off" autocapitalize="off" maxlength="1024" class="search" /> |
| 40 | + <input type="search" name="search" id="search" size="22" value="{$searchField}" autocorrect="off" autocomplete="off" autocapitalize="off" maxlength="1024" class="search" placeholder="{$placeholder}" /> |
39 | 41 | <div class="clearlink" id="clearsearch" title="{$clearText}"></div> |
40 | 42 | </div> |
41 | 43 | <button id='goButton' class='goButton' type='submit'></button> |