https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113445

Revision: 113445
Author:   awjrichards
Date:     2012-03-09 01:35:11 +0000 (Fri, 09 Mar 2012)
Log Message:
-----------
MFT r113442, r113444

Modified Paths:
--------------
    branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php
    branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/application.js
    
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/application.min.js
    
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_application.js
    
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_application.min.js
    
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php

Property Changed:
----------------
    branches/wmf/1.19wmf1/extensions/MobileFrontend/
    
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php


Property changes on: branches/wmf/1.19wmf1/extensions/MobileFrontend
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/extensions/MobileFrontend:99727
   + /trunk/extensions/MobileFrontend:99727,113442,113444

Modified: 
branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php     
2012-03-09 01:32:54 UTC (rev 113444)
+++ branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php     
2012-03-09 01:35:11 UTC (rev 113445)
@@ -1216,6 +1216,8 @@
                                                'wgScriptPath' => $wgScriptPath,
                                                'isFilePage' => 
self::$isFilePage,
                                                'zeroRatedBanner' => 
self::$zeroRatedBanner,
+                                               'showText' => self::$messages[ 
'mobile-frontend-show-button' ],
+                                               'hideText' => self::$messages[ 
'mobile-frontend-hide-button' ],
                                                );
                $applicationTemplate->setByArray( $options );
                wfProfileOut( __METHOD__ );

Modified: 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/application.js
===================================================================
--- branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/application.js  
2012-03-09 01:32:54 UTC (rev 113444)
+++ branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/application.js  
2012-03-09 01:35:11 UTC (rev 113445)
@@ -24,7 +24,7 @@
                function createButton( visible ) {
                        var btn, label;
                        btn = document.createElement( 'button' );
-                       label = document.createTextNode( visible ? 'Show' : 
'Hide' );
+                       label = document.createTextNode( visible ? showText : 
hideText );
                        btn.className = visible ? 'show' : 'hide';
                        btn.appendChild( label );
                        btn.style.display = visible ? 'inline-block' : 'none';

Modified: 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/application.min.js
===================================================================
--- 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/application.min.js  
    2012-03-09 01:32:54 UTC (rev 113444)
+++ 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/application.min.js  
    2012-03-09 01:35:11 UTC (rev 113445)
@@ -1 +1 @@
-MobileFrontend=(function(){var a;function c(){var 
j,k,f,o,r,h,n=a(".section_heading");a(document.body).addClass("jsEnabled");window.wm_toggle_section=b;var
 h=a(".section_heading 
button");for(j=0;j<h.length;j++){a(h[j]).remove()}function m(){var 
i=this.id?this.id.split("_")[1]:-1;if(i>-1){b(i)}}function p(t){var 
s,i;s=document.createElement("button");i=document.createTextNode(t?"Show":"Hide");s.className=t?"show":"hide";s.appendChild(i);s.style.display=t?"inline-block":"none";return
 
s}if(!n){n=[]}else{a(document.body).addClass("togglingEnabled")}for(j=0;j<n.length;j++){r=n[j];r.removeAttribute("onclick");r.insertBefore(p(true),r.firstChild);r.insertBefore(p(false),r.firstChild);a(r).bind("click",m)}k=document.getElementById("results");f=document.getElementById("languageselection");function
 g(){var 
i;if(f){i=f.options[f.selectedIndex].value;if(i){location.href=i}}}a(f).bind("change",g);function
 l(){var 
i=document.getElementById("nav").style;i.display=i.display==="block"?"none":"block"}a(document.getElementById("logo")).bind("click",l);function
 q(){var 
i=this.hash||document.location.hash;if(i.indexOf("#")===0){e(i)}}q();for(o=document.getElementsByTagName("a"),j=0;j<o.length;j++){a(o[j]).bind("click",q)}window.scrollTo(0,1)}function
 e(i){var 
g=document.getElementById(i.substr(1)),h,f;if(g){h=g;while(h&&h.className!=="content_block"&&h.className!=="section_heading"){h=h.parentNode}if(h&&h.style.display!=="block"){f=parseInt(h.id.split("_")[1],10);b(f)}}}function
 b(g){var 
f=document.getElementById("section_"+g),l=f.getElementsByTagName("button"),h,j,k;for(h=0;h<=1;h++){j=l[h].style;j.display=j.display==="none"||(h&&!j.display)?"inline-block":"none"}for(h=0,d=["content_","anchor_"];h<=1;h++){k=document.getElementById(d[h]+g);if(k){k.style.display=k.style.display==="block"?"none":"block"}}}a=typeof
 
jQuery!=="undefined"?jQuery:function(g){if(typeof(g)==="string"){if(document.querySelectorAll){return[].slice.call(document.querySelectorAll(g))}}function
 h(k){var l=g.className,m=l.split(" ");m.push(k);g.className=m.join(" 
")}function i(k){var m=g.className,n=m.split(" 
"),o=[],l;for(l=0;l<n.length;l++){if(n[l]!==k){o.push(n[l])}}g.className=o.join("
 ")}function j(l,k){g.addEventListener(l,k,false)}function 
f(){g.parentNode.removeChild(g)}return{addClass:h,bind:j,remove:f,removeClass:i}};a.ajax=a.ajax||function(h){var
 f,g;if(window.XMLHttpRequest){f=new XMLHttpRequest()}else{f=new 
ActiveXObject("Microsoft.XMLHTTP")}if(f.overrideMimeType){f.overrideMimeType("text/xml")}f.onreadystatechange=function(){if(f.readyState===4&&f.status===200){h.success(f.responseXML)}};f.open("GET",h.url,true);f.send()};c();return{wm_reveal_for_hash:e,wm_toggle_section:b,init:c,utils:a}}());
\ No newline at end of file
+MobileFrontend=(function(){var a;function c(){var 
j,k,f,o,r,h,n=a(".section_heading");a(document.body).addClass("jsEnabled");window.wm_toggle_section=b;var
 h=a(".section_heading 
button");for(j=0;j<h.length;j++){a(h[j]).remove()}function m(){var 
i=this.id?this.id.split("_")[1]:-1;if(i>-1){b(i)}}function p(t){var 
s,i;s=document.createElement("button");i=document.createTextNode(t?showText:hideText);s.className=t?"show":"hide";s.appendChild(i);s.style.display=t?"inline-block":"none";return
 
s}if(!n){n=[]}else{a(document.body).addClass("togglingEnabled")}for(j=0;j<n.length;j++){r=n[j];r.removeAttribute("onclick");r.insertBefore(p(true),r.firstChild);r.insertBefore(p(false),r.firstChild);a(r).bind("click",m)}k=document.getElementById("results");f=document.getElementById("languageselection");function
 g(){var 
i;if(f){i=f.options[f.selectedIndex].value;if(i){location.href=i}}}a(f).bind("change",g);function
 l(){var 
i=document.getElementById("nav").style;i.display=i.display==="block"?"none":"block"}a(document.getElementById("logo")).bind("click",l);function
 q(){var 
i=this.hash||document.location.hash;if(i.indexOf("#")===0){e(i)}}q();for(o=document.getElementsByTagName("a"),j=0;j<o.length;j++){a(o[j]).bind("click",q)}window.scrollTo(0,1)}function
 e(i){var 
g=document.getElementById(i.substr(1)),h,f;if(g){h=g;while(h&&h.className!=="content_block"&&h.className!=="section_heading"){h=h.parentNode}if(h&&h.style.display!=="block"){f=parseInt(h.id.split("_")[1],10);b(f)}}}function
 b(g){var 
f=document.getElementById("section_"+g),l=f.getElementsByTagName("button"),h,j,k;for(h=0;h<=1;h++){j=l[h].style;j.display=j.display==="none"||(h&&!j.display)?"inline-block":"none"}for(h=0,d=["content_","anchor_"];h<=1;h++){k=document.getElementById(d[h]+g);if(k){k.style.display=k.style.display==="block"?"none":"block"}}}a=typeof
 
jQuery!=="undefined"?jQuery:function(g){if(typeof(g)==="string"){if(document.querySelectorAll){return[].slice.call(document.querySelectorAll(g))}}function
 h(k){var l=g.className,m=l.split(" ");m.push(k);g.className=m.join(" 
")}function i(k){var m=g.className,n=m.split(" 
"),o=[],l;for(l=0;l<n.length;l++){if(n[l]!==k){o.push(n[l])}}g.className=o.join("
 ")}function j(l,k){g.addEventListener(l,k,false)}function 
f(){g.parentNode.removeChild(g)}return{addClass:h,bind:j,remove:f,removeClass:i}};a.ajax=a.ajax||function(h){var
 f,g;if(window.XMLHttpRequest){f=new XMLHttpRequest()}else{f=new 
ActiveXObject("Microsoft.XMLHTTP")}if(f.overrideMimeType){f.overrideMimeType("text/xml")}f.onreadystatechange=function(){if(f.readyState===4&&f.status===200){h.success(f.responseXML)}};f.open("GET",h.url,true);f.send()};c();return{wm_reveal_for_hash:e,wm_toggle_section:b,init:c,utils:a}}());
\ No newline at end of file

Modified: 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_application.js
===================================================================
--- 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_application.js 
    2012-03-09 01:32:54 UTC (rev 113444)
+++ 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_application.js 
    2012-03-09 01:35:11 UTC (rev 113445)
@@ -28,7 +28,7 @@
                function createButton( visible ) {
                        var btn, label;
                        btn = document.createElement( 'button' );
-                       label = document.createTextNode( visible ? 'Show' : 
'Hide' );
+                       label = document.createTextNode( visible ? showText : 
hideText );
                        btn.className = visible ? 'show' : 'hide';
                        btn.appendChild( label );
                        btn.style.display = visible ? 'inline-block' : 'none';

Modified: 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_application.min.js
===================================================================
--- 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_application.min.js
 2012-03-09 01:32:54 UTC (rev 113444)
+++ 
branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_application.min.js
 2012-03-09 01:35:11 UTC (rev 113445)
@@ -1 +1 @@
-MobileFrontend=(function(){var a;function c(){var 
j,t,q,k,f,o,s,h,n=a(".section_heading");a(document.body).addClass("jsEnabled");window.wm_toggle_section=b;var
 h=a(".section_heading 
button");for(j=0;j<h.length;j++){a(h[j]).remove()}function m(){var 
i=this.id?this.id.split("_")[1]:-1;if(i>-1){b(i)}}function p(v){var 
u,i;u=document.createElement("button");i=document.createTextNode(v?"Show":"Hide");u.className=v?"show":"hide";u.appendChild(i);u.style.display=v?"inline-block":"none";return
 
u}if(!n){n=[]}else{a(document.body).addClass("togglingEnabled")}for(j=0;j<n.length;j++){s=n[j];s.removeAttribute("onclick");s.insertBefore(p(true),s.firstChild);s.insertBefore(p(false),s.firstChild);a(s).bind("click",m)}k=document.getElementById("results");f=document.getElementById("languageselection");function
 g(){var 
i;if(f){i=f.options[f.selectedIndex].value;if(i){location.href=i}}}a(f).bind("change",g);function
 l(){var 
i=document.getElementById("nav").style;i.display=i.display==="block"?"none":"block"}a(document.getElementById("logo")).bind("click",l);function
 r(){var 
i=this.hash||document.location.hash;if(i.indexOf("#")===0){e(i)}}r();for(o=document.getElementsByTagName("a"),j=0;j<o.length;j++){a(o[j]).bind("click",r)}window.scrollTo(0,1)}function
 e(i){var 
g=document.getElementById(i.substr(1)),h,f;if(g){h=g;while(h&&h.className!=="content_block"&&h.className!=="section_heading"){h=h.parentNode}if(h&&h.style.display!=="block"){f=parseInt(h.id.split("_")[1],10);b(f)}}}function
 b(g){var 
f=document.getElementById("section_"+g),l=f.getElementsByTagName("button"),h,j,k;for(h=0;h<=1;h++){j=l[h].style;j.display=j.display==="none"||(h&&!j.display)?"inline-block":"none"}for(h=0,d=["content_","anchor_"];h<=1;h++){k=document.getElementById(d[h]+g);if(k){k.style.display=k.style.display==="block"?"none":"block"}}}a=typeof
 
jQuery!=="undefined"?jQuery:function(g){if(typeof(g)==="string"){if(document.querySelectorAll){return[].slice.call(document.querySelectorAll(g))}}function
 h(k){var l=g.className,m=l.split(" ");m.push(k);g.className=m.join(" 
")}function i(k){var m=g.className,n=m.split(" 
"),o=[],l;for(l=0;l<n.length;l++){if(n[l]!==k){o.push(n[l])}}g.className=o.join("
 ")}function j(l,k){g.addEventListener(l,k,false)}function 
f(){g.parentNode.removeChild(g)}return{addClass:h,bind:j,remove:f,removeClass:i}};a.ajax=a.ajax||function(h){var
 f,g;if(window.XMLHttpRequest){f=new XMLHttpRequest()}else{f=new 
ActiveXObject("Microsoft.XMLHTTP")}if(f.overrideMimeType){f.overrideMimeType("text/xml")}f.onreadystatechange=function(){if(f.readyState===4&&f.status===200){h.success(f.responseXML)}};f.open("GET",h.url,true);f.send()};c();return{wm_reveal_for_hash:e,wm_toggle_section:b,init:c,utils:a}}());
\ No newline at end of file
+MobileFrontend=(function(){var a;function c(){var 
j,t,q,k,f,o,s,h,n=a(".section_heading");a(document.body).addClass("jsEnabled");window.wm_toggle_section=b;var
 h=a(".section_heading 
button");for(j=0;j<h.length;j++){a(h[j]).remove()}function m(){var 
i=this.id?this.id.split("_")[1]:-1;if(i>-1){b(i)}}function p(v){var 
u,i;u=document.createElement("button");i=document.createTextNode(v?showText:hideText);u.className=v?"show":"hide";u.appendChild(i);u.style.display=v?"inline-block":"none";return
 
u}if(!n){n=[]}else{a(document.body).addClass("togglingEnabled")}for(j=0;j<n.length;j++){s=n[j];s.removeAttribute("onclick");s.insertBefore(p(true),s.firstChild);s.insertBefore(p(false),s.firstChild);a(s).bind("click",m)}k=document.getElementById("results");f=document.getElementById("languageselection");function
 g(){var 
i;if(f){i=f.options[f.selectedIndex].value;if(i){location.href=i}}}a(f).bind("change",g);function
 l(){var 
i=document.getElementById("nav").style;i.display=i.display==="block"?"none":"block"}a(document.getElementById("logo")).bind("click",l);function
 r(){var 
i=this.hash||document.location.hash;if(i.indexOf("#")===0){e(i)}}r();for(o=document.getElementsByTagName("a"),j=0;j<o.length;j++){a(o[j]).bind("click",r)}window.scrollTo(0,1)}function
 e(i){var 
g=document.getElementById(i.substr(1)),h,f;if(g){h=g;while(h&&h.className!=="content_block"&&h.className!=="section_heading"){h=h.parentNode}if(h&&h.style.display!=="block"){f=parseInt(h.id.split("_")[1],10);b(f)}}}function
 b(g){var 
f=document.getElementById("section_"+g),l=f.getElementsByTagName("button"),h,j,k;for(h=0;h<=1;h++){j=l[h].style;j.display=j.display==="none"||(h&&!j.display)?"inline-block":"none"}for(h=0,d=["content_","anchor_"];h<=1;h++){k=document.getElementById(d[h]+g);if(k){k.style.display=k.style.display==="block"?"none":"block"}}}a=typeof
 
jQuery!=="undefined"?jQuery:function(g){if(typeof(g)==="string"){if(document.querySelectorAll){return[].slice.call(document.querySelectorAll(g))}}function
 h(k){var l=g.className,m=l.split(" ");m.push(k);g.className=m.join(" 
")}function i(k){var m=g.className,n=m.split(" 
"),o=[],l;for(l=0;l<n.length;l++){if(n[l]!==k){o.push(n[l])}}g.className=o.join("
 ")}function j(l,k){g.addEventListener(l,k,false)}function 
f(){g.parentNode.removeChild(g)}return{addClass:h,bind:j,remove:f,removeClass:i}};a.ajax=a.ajax||function(h){var
 f,g;if(window.XMLHttpRequest){f=new XMLHttpRequest()}else{f=new 
ActiveXObject("Microsoft.XMLHTTP")}if(f.overrideMimeType){f.overrideMimeType("text/xml")}f.onreadystatechange=function(){if(f.readyState===4&&f.status===200){h.success(f.responseXML)}};f.open("GET",h.url,true);f.send()};c();return{wm_reveal_for_hash:e,wm_toggle_section:b,init:c,utils:a}}());
\ No newline at end of file

Modified: 
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
===================================================================
--- 
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
   2012-03-09 01:32:54 UTC (rev 113444)
+++ 
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
   2012-03-09 01:35:11 UTC (rev 113445)
@@ -40,7 +40,10 @@
                $startLinkTag = "<link 
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/";
                $endLinkTag = "' media='all' rel='Stylesheet' type='text/css' 
/>";
                $filePageStyle = ( $this->data['isFilePage'] ) ? $startLinkTag 
. 'filepage.css' . $endLinkTag : '';
+               $buttonHideText = htmlentities( $this->data['hideText'], 
ENT_QUOTES );
+               $buttonShowText = htmlentities( $this->data['showText'], 
ENT_QUOTES );
 
+
                $applicationHtml = <<<HTML
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
@@ -48,8 +51,8 @@
                  <head>
                        <title>{$this->data['htmlTitle']}</title>
                        <meta http-equiv="content-type" 
content="application/xhtml+xml; charset=utf-8" />
-                       <link 
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$betaPrefix}common.css?version=1331250586'
 media='all' rel='Stylesheet' type='text/css' />
-                       <link 
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version=1331250586'
 media='all' rel='Stylesheet' type='text/css' />
+                       <link 
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$betaPrefix}common.css?version=1331255385'
 media='all' rel='Stylesheet' type='text/css' />
+                       <link 
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version=1331255385'
 media='all' rel='Stylesheet' type='text/css' />
                        {$filePageStyle}
                        <meta name="viewport" content="width=device-width, 
initial-scale=1.0">
                        {$appleTouchIconTag}
@@ -59,6 +62,8 @@
                                var title = "{$this->data['htmlTitle']}";
                                var scriptPath = 
"{$this->data['wgScriptPath']}";
                                var placeholder = 
"{$this->data['placeholder']}";
+                               var showText = "{$buttonShowText}";
+                               var hideText = "{$buttonHideText}";
                          //]]>
                        </script>
                  </head>
@@ -71,8 +76,8 @@
                        </div>
                        {$this->data['footerHtml']}
                        <!--[if gt IE 9]><!-->
-                       
{$startScriptTag}{$javaScriptPath}{$betaPrefix}application.{$resourceSuffix}js?version=1331250586{$endScriptTag}
-                       
{$startScriptTag}{$javaScriptPath}banner.{$resourceSuffix}js?version=1331250586{$endScriptTag}
+                       
{$startScriptTag}{$javaScriptPath}{$betaPrefix}application.{$resourceSuffix}js?version=1331255385{$endScriptTag}
+                       
{$startScriptTag}{$javaScriptPath}banner.{$resourceSuffix}js?version=1331255385{$endScriptTag}
                        
{$startScriptTag}{$javaScriptPath}{$betaPrefix}opensearch.{$resourceSuffix}js?version=1331250599{$endScriptTag}
                        {$filePageScript}
                        <!--[endif]-->


Property changes on: 
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php:99727,113428
   + 
/trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php:99727,113428,113442,113444


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to