Index: trunk/extensions/MobileFrontend/javascripts/application.js |
— | — | @@ -3,6 +3,14 @@ |
4 | 4 | |
5 | 5 | initClearSearchLink(); |
6 | 6 | |
| 7 | +function goToLanguageSelection() { |
| 8 | + var languageSelection = document.getElementById( 'languageselection' ); |
| 9 | + var newlocation = languageSelection.options[languageSelection.selectedIndex].value; |
| 10 | + if ( newlocation ) { |
| 11 | + window.location = newlocation; |
| 12 | + } |
| 13 | +} |
| 14 | + |
7 | 15 | function initClearSearchLink() { |
8 | 16 | clearSearch.setAttribute( 'title','Clear' ); |
9 | 17 | clearSearch.addEventListener( 'mousedown', clearSearchBox, true ); |
Index: trunk/extensions/MobileFrontend/MobileFrontend.i18n.php |
— | — | @@ -68,6 +68,7 @@ |
69 | 69 | 'mobile-frontend-leave-feedback' => 'Mobile site feedback', |
70 | 70 | 'mobile-frontend-feedback-page' => 'Project:Mobile Extension Feedback', |
71 | 71 | 'mobile-frontend-leave-feedback-thanks' => 'Thanks, for your feedback!', |
| 72 | + 'mobile-frontend-language-selection' => 'Languages', |
72 | 73 | ); |
73 | 74 | |
74 | 75 | /** Message documentation (Message documentation) |
Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -1018,7 +1018,7 @@ |
1019 | 1019 | } elseif ( $this->contentFormat == 'WML' ) { |
1020 | 1020 | $homeButton = self::$messages['mobile-frontend-home-button']; |
1021 | 1021 | $randomButton = self::$messages['mobile-frontend-random-button']; |
1022 | | - header( 'Content-Type: text/vnd.wap.wml' ); |
| 1022 | + //header( 'Content-Type: text/vnd.wap.wml' ); |
1023 | 1023 | |
1024 | 1024 | // TODO: Content transformations required |
1025 | 1025 | // WML Validator: |
Index: trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php |
— | — | @@ -6,9 +6,12 @@ |
7 | 7 | $randomPageUrl = self::$randomPageUrl; |
8 | 8 | $homeButton = self::$messages['mobile-frontend-home-button']; |
9 | 9 | $randomButton = self::$messages['mobile-frontend-random-button']; |
| 10 | +$languageSelectionText = self::$messages['mobile-frontend-language-selection']; |
10 | 11 | |
11 | 12 | $scriptUrl = wfScript(); |
12 | 13 | |
| 14 | +$languageSelection = self::buildLanguageSelection(); |
| 15 | + |
13 | 16 | $searchWebkitHtml = <<<EOD |
14 | 17 | <div id='header'> |
15 | 18 | <div id='searchbox'> |
— | — | @@ -21,10 +24,14 @@ |
22 | 25 | </div> |
23 | 26 | <button id='goButton' type='submit'></button> |
24 | 27 | </form> |
| 28 | + <div id='results'></div> |
25 | 29 | </div> |
26 | 30 | <div class='nav' id='nav'> |
27 | 31 | <form method="get" action="{$mainPageUrl}"><button type="submit" id="homeButton">{$homeButton}</button></form> |
28 | 32 | <form method="get" action="{$randomPageUrl}"><button type="submit" id="randomButton">{$randomButton}</button></form> |
| 33 | + <br/> |
| 34 | + <b>{$languageSelectionText}:</b> |
| 35 | + {$languageSelection} |
29 | 36 | </div> |
30 | 37 | </div> |
31 | 38 | EOD; |
Index: trunk/extensions/MobileFrontend/views/layout/application.html.php |
— | — | @@ -43,7 +43,8 @@ |
44 | 44 | {$contentHtml} |
45 | 45 | </div> |
46 | 46 | {$footerHtml} |
47 | | - <script type="text/javascript" language="javascript" src="{$wgExtensionAssetsPath}/MobileFrontend/javascripts/application.js?version=20110920T172820Z"></script> |
| 47 | + <script type="text/javascript" language="javascript" src="{$wgExtensionAssetsPath}/MobileFrontend/javascripts/application.js?version=20110920T172820Z"></script> |
| 48 | + <script type="text/javascript" language="javascript" src="{$wgExtensionAssetsPath}/MobileFrontend/javascripts/opensearchresults.js?version=20110921T172820Z"></script> |
48 | 49 | </body> |
49 | 50 | </html> |
50 | 51 | EOT; |