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

Revision: 114229
Author:   awjrichards
Date:     2012-03-20 01:02:41 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
Sync to trunk plus playing around with FormSpecialPage for contact form, seems 
too constraining

Modified Paths:
--------------
    branches/awjrichards/extensions/MobileFrontend/MobileFrontend.body.php
    branches/awjrichards/extensions/MobileFrontend/MobileFrontend.i18n.php
    branches/awjrichards/extensions/MobileFrontend/MobileFrontend.php
    
branches/awjrichards/extensions/MobileFrontend/javascripts/beta_opensearch.min.js
    branches/awjrichards/extensions/MobileFrontend/javascripts/references.js
    branches/awjrichards/extensions/MobileFrontend/javascripts/toggle.min.js
    branches/awjrichards/extensions/MobileFrontend/stylesheets/common.css
    
branches/awjrichards/extensions/MobileFrontend/templates/ApplicationTemplate.php
    branches/awjrichards/extensions/MobileFrontend/templates/SearchTemplate.php

Added Paths:
-----------
    branches/awjrichards/extensions/MobileFrontend/
    branches/awjrichards/extensions/MobileFrontend/javascripts/references.min.js


Property changes on: branches/awjrichards/extensions/MobileFrontend
___________________________________________________________________
Added: svn:mergeinfo
   + /trunk/extensions/MobileFrontend:99727,114170-114227

Modified: branches/awjrichards/extensions/MobileFrontend/MobileFrontend.body.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.body.php     2012-03-19 
18:57:30 UTC (rev 114169)
+++ branches/awjrichards/extensions/MobileFrontend/MobileFrontend.body.php      
2012-03-20 01:02:41 UTC (rev 114229)
@@ -1503,6 +1503,12 @@
                return $expiry;
        }
        
+       public function getCacheVaryCookies( $out, &$cookies ) {
+               global $wgCookiePrefix;
+               $cookies[] = $wgCookiePrefix . 'mf_useformat';
+               return true;
+       }
+       
        /**
         * Determine the duration the cookie should last.
         * 

Modified: branches/awjrichards/extensions/MobileFrontend/MobileFrontend.i18n.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.i18n.php     2012-03-19 
18:57:30 UTC (rev 114169)
+++ branches/awjrichards/extensions/MobileFrontend/MobileFrontend.i18n.php      
2012-03-20 01:02:41 UTC (rev 114229)
@@ -75,6 +75,8 @@
        'mobile-frontend-dismiss-notification' => 'dismiss this notification',
        'mobile-frontend-sopa-notice' => '<h3 id="sopa-notice">Thank you for 
protecting Wikipedia.</h3><br/><a 
href="http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Mobile_Learn_more";>(We’re
 not done yet.)</a>',
        'mobile-frontend-clear-search' => 'Clear',
+       'mobilefrontendcontactus' => 'Contact us',
+       'mobile-frontend-contact-us-email-default' => 'Your email address',
 );
 
 /** Message documentation (Message documentation)
@@ -113,6 +115,8 @@
        'mobile-frontend-placeholder' => 'Phrase used to prompt user to use 
search interface for mobile full screen search',
        'mobile-frontend-dismiss-notification' => 'Phrase used to dismiss the 
top banner notification',
        'mobile-frontend-clear-search' => 'Tooltip for clear button that 
appears when you type into search box',
+       'mobilefrontendcontactus' => 'Title for SpecialMobileFrontendContactUs 
- a contact form.',
+       'mobile-frontend-contact-us-email-default' => 'Default text to appear 
in the "email" textfield on the contact page',
 );
 
 /** Ṫuroyo (Ṫuroyo)
@@ -3544,8 +3548,11 @@
        'mobile-frontend-clear-search' => '지우기',
 );
 
-/** Karachay-Balkar (Къарачай-Малкъар) */
+/** Karachay-Balkar (Къарачай-Малкъар)
+ * @author Iltever
+ */
 $messages['krc'] = array(
+       'mobile-frontend-desc' => 'Мобил интерфейс',
        'mobile-frontend-search-submit' => 'Бар',
        'mobile-frontend-search-results' => 'Излеуню эсеблери',
        'mobile-frontend-no-article-found' => 'Статья табылмады',
@@ -3562,15 +3569,29 @@
        'mobile-frontend-error-page-title' => 'Проблемабыз барды!',
        'mobile-frontend-error-page-text' => 'Мобил Википедия тири ишлене 
тургъан стадиядады, биз бек кюрешебиз бютеу ичиндеги халатларыбызны кетерирге 
деб. Бу халатны юсюнден билдириу келгенди бизге, къысха заманны ичинде 
тюзетирге деб турабыз. Кесек замандан джангыдан къарагъыз.',
        'mobile-frontend-are-you-sure' => 'Таукелмисиз ?',
-       'mobile-frontend-explain-disable' => 'Википедияны мобил версиясын 
джукълатыргъа таукелмисиз? <b>Джукълатны</b> сайласагъыз, Википедиягъа энди 
кирген сагъатыгъызда сайтны мобил аппартлагъа версиясына автомат джибериллик 
тюйюлсюз.',
+       'mobile-frontend-explain-disable' => '{{SITENAME}}ны мобил версиясын 
джукълатыргъа таукелмисиз? <b>Джукълатны</b> сайласагъыз, {{SITENAME}}гъа энди 
кирген сагъатыгъызда сайтны мобил аппартлагъа версиясына автомат джибериллик 
тюйюлсюз.',
        'mobile-frontend-nav-end' => 'Ахырда',
        'mobile-frontend-nav-top' => 'Башланнганына',
        'mobile-frontend-nav-edit' => 'Тюзет',
        'mobile-frontend-nav-history' => 'Тарих',
        'mobile-frontend-search-text' => 'Излеу',
        'mobile-frontend-contact-us' => 'Сорууларыгъыз неда 
башламчылыкъларыгъыз бар эсе, бу адресге джазыгъыз: mob...@wikipedia.org.',
-       'mobile-frontend-author-link' => 'Авторну, лицензияны юсюнден 
информацияны эмда къошакъ билгиле билир ючюн бу медиа-файлгъа Википедияда 
къарагъыз.',
+       'mobile-frontend-author-link' => 'Авторну, лицензияны юсюнден 
информацияны эмда къошакъ билгиле билир ючюн бу медиа-файлгъа {{SITENAME}}да 
къарагъыз.',
        'mobile-frontend-download-full-version' => 'Толу версияны ал',
+       'mobile-frontend-file-namespace' => 'Файл',
+       'mobile-frontend-wml-continue' => 'Мындан арысы ...',
+       'mobile-frontend-wml-back' => 'Артха ...',
+       'mobile-frontend-view' => 'Мобил версия',
+       'mobile-frontend-opt-out-yes-button' => 'Хоу',
+       'mobile-frontend-opt-out-no-button' => 'Огъай',
+       'mobile-frontend-news-items' => 'Джангылыкълада',
+       'mobile-frontend-language' => 'Тил',
+       'mobile-frontend-username' => 'Къошулуучуну аты:',
+       'mobile-frontend-password' => 'Паролюгъуз:',
+       'mobile-frontend-login' => 'Кир',
+       'mobile-frontend-placeholder' => 'Излеу...',
+       'mobile-frontend-dismiss-notification' => 'бу билдириуню джашыр',
+       'mobile-frontend-clear-search' => 'Кетер',
 );
 
 /** Colognian (Ripoarisch)
@@ -3961,6 +3982,26 @@
  * @author RMizo
  */
 $messages['lus'] = array(
+       'mobile-frontend-search-submit' => 'Kal rawh le',
+       'mobile-frontend-search-results' => 'Zawn hmuhte',
+       'mobile-frontend-no-article-found' => 'Phek hmuh tur awm lo',
+       'mobile-frontend-featured-article' => 'Tlangrèlthang...',
+       'mobile-frontend-in-the-news' => 'Chanchin thar lamah thung',
+       'mobile-frontend-home-button' => 'Inpui',
+       'mobile-frontend-random-button' => 'Kahpah',
+       'mobile-frontend-back-to-top-of-section' => 'Hlawm khat zuan lêtna',
+       'mobile-frontend-show-button' => 'Tihlanna',
+       'mobile-frontend-hide-button' => 'Tihbona',
+       'mobile-frontend-disable-button' => 'Tihthihna',
+       'mobile-frontend-back-button' => 'Lêtna',
+       'mobile-frontend-regular-site' => 'Hmaipui thlir',
+       'mobile-frontend-error-page-title' => 'Harsatna kan tawk tlat!',
+       'mobile-frontend-are-you-sure' => 'I chiang chiah maw?',
+       'mobile-frontend-nav-end' => 'Tawpna',
+       'mobile-frontend-nav-top' => 'Chhîp',
+       'mobile-frontend-nav-edit' => 'Siamţhatna',
+       'mobile-frontend-nav-history' => 'Chanchin',
+       'mobile-frontend-search-text' => 'Zawnna',
        'mobile-frontend-news-items' => 'Chanchin thar',
 );
 
@@ -4974,7 +5015,7 @@
        'mobile-frontend-hide-button' => 'Ukryj',
        'mobile-frontend-disable-button' => 'Wyłącz',
        'mobile-frontend-back-button' => 'Powrót',
-       'mobile-frontend-regular-site' => 'Zobacz tę stronę w 
{{GRAMMAR:MS.lp|{{SITENAME}}}}',
+       'mobile-frontend-regular-site' => 'Widoku pulpitu',
        'mobile-frontend-error-page-title' => 'Wystąpił problem!',
        'mobile-frontend-error-page-text' => 'Mobilna wersja 
{{GRAMMAR:D.lp|{{SITENAME}}}} jest wciąż rozwijana, ale równie intensywnie 
pracujemy nad naprawą wszystkich błędów. Zostaliśmy poinformowani o tym błędzie 
i niedługo go naprawimy. Wróć później, aby sprawdzić!',
        'mobile-frontend-are-you-sure' => 'Czy jesteś pewien?',

Modified: branches/awjrichards/extensions/MobileFrontend/MobileFrontend.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.php  2012-03-19 18:57:30 UTC 
(rev 114169)
+++ branches/awjrichards/extensions/MobileFrontend/MobileFrontend.php   
2012-03-20 01:02:41 UTC (rev 114229)
@@ -37,7 +37,9 @@
 );
 
 $cwd = dirname( __FILE__ );
+
 $wgExtensionMessagesFiles['MobileFrontend'] = "$cwd/MobileFrontend.i18n.php";
+$wgExtensionMessagesFiles['MobileFrontendAlias'] = 
"$cwd/MobileFrontend.alias.php";
 
 // autoload extension classes
 
@@ -65,12 +67,17 @@
        'ApplicationWmlTemplate' => 'templates/ApplicationWmlTemplate',
        'ThanksNoticeTemplate' => 'templates/ThanksNoticeTemplate',
        'SopaNoticeTemplate' => 'templates/SopaNoticeTemplate',
+       
+       // special pages
+       'SepcialMobileFrontendContactUs' => 
'special/SpecialMobileFrontendContactUs',
 );
 
 foreach ( $autoloadClasses as $className => $classFilename ) {
        $wgAutoloadClasses[$className] = "$cwd/$classFilename.php";
 }
 
+$wgSpecialPages['MobileFrontendContactUs'] = 'SepcialMobileFrontendContactUs';
+
 /**
  * Path to the logo used in the mobile view
  *
@@ -121,6 +128,8 @@
  */
 $wgMobileRedirectFormAction = false;
 
+$wgMobileResourceVersion;
+
 $wgExtMobileFrontend = null;
 
 $wgExtensionFunctions[] = 'efMobileFrontend_Setup';
@@ -134,6 +143,7 @@
 $wgHooks['APIGetDescription'][] = 'ApiParseExtender::onAPIGetDescription';
 $wgHooks['OpenSearchXml'][] = 'ApiQueryExtracts::onOpenSearchXml';
 
+
 function efMobileFrontend_Setup() {
        global $wgExtMobileFrontend, $wgHooks;
        $wgExtMobileFrontend = new ExtMobileFrontend();
@@ -142,6 +152,7 @@
        $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( 
&$wgExtMobileFrontend, 'addMobileFooter' );
        $wgHooks['TestCanonicalRedirect'][] = array( &$wgExtMobileFrontend, 
'testCanonicalRedirect' );
        $wgHooks['ResourceLoaderTestModules'][] = array( &$wgExtMobileFrontend, 
'addTestModules' );
+       $wgHooks['GetCacheVaryCookies'][] = array( &$wgExtMobileFrontend, 
'getCacheVaryCookies' );
 }
 
 /**

Modified: 
branches/awjrichards/extensions/MobileFrontend/javascripts/beta_opensearch.min.js
===================================================================
--- trunk/extensions/MobileFrontend/javascripts/beta_opensearch.min.js  
2012-03-19 18:57:30 UTC (rev 114169)
+++ 
branches/awjrichards/extensions/MobileFrontend/javascripts/beta_opensearch.min.js
   2012-03-20 01:02:41 UTC (rev 114229)
@@ -1 +1 @@
-MobileFrontend.opensearch=(function(){var 
c="/api.php",m=-1,d=500,z=15,q,l=document.getElementById("search"),t=document.getElementById("sq"),a=document.getElementById("searchbox"),r=document.getElementById("content"),o=document.getElementById("footer"),x=document.getElementById("clearsearch"),k=false,n=MobileFrontend.utils;c=MobileFrontend.setting("scriptPath")+c;function
 s(){results.style.display="none"}function 
h(){if(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)){var
 u=n('meta[name="viewport"]');if(u){u=u[0];u.content="width=device-width, 
minimum-scale=1.0, maximum-scale=1.0, 
initial-scale=1.0";n(document.body).bind("gesturestart",function(){u.content="width=device-width,
 initial-scale=1.0"})}}}h();l.onfocus=function(){var 
u,A;a=document.getElementById("searchbox");t=document.getElementById("sq");r=document.getElementById("content");o=document.getElementById("footer");h();if(!k){MobileFrontend.utils(document.body).addClass("full-screen-search");u=document.getElementById("remove-results");if(!u){u=document.createElement("a");u.setAttribute("href","#");u.setAttribute("id","remove-results");n(u).bind("click",y);A=document.createElement("div");A.setAttribute("id","left-arrow");u.appendChild(A);t.insertBefore(u,t.firstChild)}k=true}};function
 
y(){MobileFrontend.utils(document.body).removeClass("full-screen-search");if(k){k=false}if(x){x.style.display="none"}}function
 b(A){var 
u;if(!A){A=window.event}if(A.target){u=A.target}else{if(A.srcElement){u=A.srcElement}}if(u.nodeType===3){u=u.parentNode}A.cancelBubble=true;A.stopPropagation();if(u.className==="suggestion-result"||u.className==="search-result-item"||u.className==="suggestions-result"||u.className==="sq-val-update"||u.id==="results"||u.id==="search"||u.id==="searchbox"||u.id==="sq"||u.id==="placeholder"||u.id==="clearsearch"||u.tagName==="BODY"){if(u.id==="clearsearch"&&results){results.innerHTML=""}}else{s()}}window.onload=function(){n(l).bind("keyup",function(){clearTimeout(m);q=this.value;if(q.length<1){results.innerHTML=""}else{q=encodeURIComponent(q);m=setTimeout(function(){j(q)},d)}})};function
 
j(u){url=c+"?action=opensearch&limit="+z+"&namespace=0&format=xml&search="+u;n.ajax({url:url,success:function(A){p(g(A))}})}function
 g(D){var 
E=[],A,B,C,u=D.getElementsByTagName("Item");for(A=0;A<u.length;A++){B=u[A];C={label:B.getElementsByTagName("Text")[0].textContent,value:B.getElementsByTagName("Url")[0].textContent};E.push(C)}return
 E}function i(A){var u=document.getElementById("search");if(u){u.value=A+" 
";u.focus();j(u.value)}}function e(B){var 
A=document.createTextNode(B),u=document.createElement("div");u.appendChild(A);return
 u.innerHTML}function w(u){return 
u.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function p(J){var 
D=document.getElementById("results"),F,E,C=e(document.getElementById("search").value),B,I,A,u,G,H;D.style.display="block";if(l){l.focus()}if(!J||J.length<1){D.innerHTML='<ul
 class="suggestions-results" title="No Results"><li 
class="suggestions-result">No 
Results</li></div>'}else{if(D.firstChild){D.removeChild(D.firstChild)}F=document.createElement("ul");F.className="suggestions-results";D.appendChild(F);B=function(){var
 
K=this.parentNode.getAttribute("title");i(K)};for(E=0;E<J.length;E++){I=J[E];u=document.createElement("li");G=document.createElement("a");u.setAttribute("title",I.label);u.className="suggestions-result";H=document.createTextNode("+");G.appendChild(H);G.className="sq-val-update";n(G).bind("click",B);u.appendChild(G);G=document.createElement("a");G.setAttribute("href",I.value.replace(/^(?:\/\/|[^\/]+)*\//,"/"));G.className="search-result-item";H=document.createTextNode(I.label);G.appendChild(H);u.appendChild(G);F.appendChild(u);A=w(C);G.innerHTML=G.innerHTML.replace(new
 RegExp("("+A+")","ig"),"<strong>$1</strong>")}}}function f(){var 
D=document.getElementById("clearsearch"),u=document.getElementById("search");function
 
B(){if(D){if(u.value.length>0){D.style.display="block"}else{D.style.display="none"}}}function
 A(E){u.value="";D.style.display="none";if(E){E.preventDefault()}}function 
C(){u.select()}n(D).bind("mousedown",A);n(u).bind("keyup",B);n(u).bind("click",C)}function
 v(){var 
u=document.getElementById("results");u.onmousedown=b;document.body.onmousedown=b;document.body.ontouchstart=b;u.ontouchstart=b}v();f();return{init:v,initClearSearch:f,writeResults:p,createObjectArray:g,removeResults:y}}());
\ No newline at end of file
+MobileFrontend.opensearch=(function(){var 
c="/api.php",m=-1,d=500,A=15,q,k=document.getElementById("search"),a=document.getElementById("searchbox"),r=document.getElementById("content"),o=document.getElementById("footer"),y=document.getElementById("clearsearch"),j=false,x,w,n=MobileFrontend.utils;c=MobileFrontend.setting("scriptPath")+c;function
 
s(){results.style.display="none"}x=n('meta[name="viewport"]');if(x){x=x[0];w=x.getAttribute("content")}function
 h(){if(x){x.setAttribute("content","minimum-scale=1.0, maximum-scale=1.0, 
initial-scale=1.0");n(document.body).bind("gesturestart",function(){x.setAttribute("content",w)})}}h();k.onfocus=function(){var
 
u,B;a=document.getElementById("searchbox");header=document.getElementById("header");r=document.getElementById("content");o=document.getElementById("footer");h();if(!j){MobileFrontend.utils(document.body).addClass("full-screen-search");u=document.getElementById("remove-results");if(!u){u=document.createElement("a");u.setAttribute("href","#");u.setAttribute("id","remove-results");n(u).bind("click",z);B=document.createElement("div");B.setAttribute("id","left-arrow");u.appendChild(B);header.insertBefore(u,header.firstChild)}j=true}};function
 
z(){MobileFrontend.utils(document.body).removeClass("full-screen-search");if(j){j=false}if(y){y.style.display="none"}}function
 b(B){var 
u;if(!B){B=window.event}if(B.target){u=B.target}else{if(B.srcElement){u=B.srcElement}}if(u.nodeType===3){u=u.parentNode}B.cancelBubble=true;B.stopPropagation();if(u.className==="suggestion-result"||u.className==="search-result-item"||u.className==="suggestions-result"||u.className==="sq-val-update"||u.id==="results"||u.id==="search"||u.id==="searchbox"||u.id==="sq"||u.id==="placeholder"||u.id==="clearsearch"||u.tagName==="BODY"){if(u.id==="clearsearch"&&results){results.innerHTML=""}}else{s()}}var
 
l=function(u){u.preventDefault();clearTimeout(m);q=k.value;if(q.length<1){results.innerHTML=""}else{q=encodeURIComponent(q);m=setTimeout(function(){i(q)},d)}};n(k).bind("keyup",l);n(document.getElementById("searchForm")).bind("submit",l);n(k).bind("blur",l);function
 
i(u){url=c+"?action=opensearch&limit="+A+"&namespace=0&format=xml&search="+u;n.ajax({url:url,success:function(B){if(n(document.body).hasClass("full-screen-search")){p(g(B))}}})}function
 g(E){var 
F=[],B,C,D,u=E.getElementsByTagName("Item");for(B=0;B<u.length;B++){C=u[B];D={label:C.getElementsByTagName("Text")[0].textContent,value:C.getElementsByTagName("Url")[0].textContent};F.push(D)}return
 F}function e(C){var 
B=document.createTextNode(C),u=document.createElement("div");u.appendChild(B);return
 u.innerHTML}function v(u){return 
u.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function p(J){var 
D=document.getElementById("results"),F,E,C=e(document.getElementById("search").value),I,B,u,G,H;D.style.display="block";if(k){k.focus()}if(!J||J.length<1){D.innerHTML='<ul
 class="suggestions-results" title="No Results"><li 
class="suggestions-result">No 
Results</li></div>'}else{if(D.firstChild){D.removeChild(D.firstChild)}F=document.createElement("ul");F.className="suggestions-results";D.appendChild(F);for(E=0;E<J.length;E++){I=J[E];u=document.createElement("li");u.setAttribute("title",I.label);u.className="suggestions-result";G=document.createElement("a");G.setAttribute("href",I.value.replace(/^(?:\/\/|[^\/]+)*\//,"/"));G.className="search-result-item";H=document.createTextNode(I.label);G.appendChild(H);u.appendChild(G);F.appendChild(u);B=v(C);G.innerHTML=G.innerHTML.replace(new
 RegExp("("+B+")","ig"),"<strong>$1</strong>")}}}function f(){var 
E=document.getElementById("clearsearch"),u=document.getElementById("search");function
 
C(){if(E){if(u.value.length>0){E.style.display="block"}else{E.style.display="none"}}}function
 B(F){u.value="";E.style.display="none";F.preventDefault()}function 
D(){u.select()}n(E).bind("mousedown",B);n(u).bind("keyup",C);n(u).bind("click",D)}function
 t(){var 
u=document.getElementById("results");u.onmousedown=b;document.body.onmousedown=b;document.body.ontouchstart=b;u.ontouchstart=b}t();f();return{init:t,initClearSearch:f,writeResults:p,createObjectArray:g,removeResults:z}}());
\ No newline at end of file

Modified: 
branches/awjrichards/extensions/MobileFrontend/javascripts/references.js
===================================================================
--- trunk/extensions/MobileFrontend/javascripts/references.js   2012-03-19 
18:57:30 UTC (rev 114169)
+++ branches/awjrichards/extensions/MobileFrontend/javascripts/references.js    
2012-03-20 01:02:41 UTC (rev 114229)
@@ -49,7 +49,7 @@
                        $( '.mw-cite-backlink a' ).click( close );
                        
                        var data, html, href, references = collect();
-                       $( 'sup a' ).click( function(ev) {
+                       $( 'sup a' ).unbind('click').click( function(ev) {
                                var top, oh;
                                href = $(this).attr( 'href' );
                                data = href && href.charAt(0) === '#' ?

Copied: 
branches/awjrichards/extensions/MobileFrontend/javascripts/references.min.js 
(from rev 114227, trunk/extensions/MobileFrontend/javascripts/references.min.js)
===================================================================
--- 
branches/awjrichards/extensions/MobileFrontend/javascripts/references.min.js    
                            (rev 0)
+++ 
branches/awjrichards/extensions/MobileFrontend/javascripts/references.min.js    
    2012-03-20 01:02:41 UTC (rev 114229)
@@ -0,0 +1 @@
+if(typeof jQuery!=="undefined"){MobileFrontend.references=(function(d){var 
b,f,a={};f=window.location.hash.substr(1).match(/refspeed:([0-9]*)/);a.animationSpeed=f?parseInt(f[1],10):500;f=window.location.hash.substr(1).match(/refanimation:([a-z]*)/);a.animation=f?f[1]:null;function
 c(){var g={};d("ol.references 
li").each(function(h,j){g[d(j).attr("id")]={html:d(j).html(),label:h+1}});return
 g}b=function(){var 
g=d("#mf-references").outerHeight();d("#mf-references").css({top:(window.innerHeight+window.pageYOffset)-g,bottom:"auto",position:"absolute"})};d(document).scroll(b);function
 e(){d('<div 
id="mf-references"><div></div></div>').hide().appendTo(document.body);var 
l=function(){var 
m;j=null;if(a.animation==="none"){d("#mf-references").hide()}else{if(a.animation==="slide"){m=window.innerHeight+window.pageYOffset;d("#mf-references").show().animate({top:m},a.animationSpeed)}else{d("#mf-references").fadeOut(a.animationSpeed)}}},j;d("<button>close</button>").click(l).appendTo("#mf-references");d(".mw-cite-backlink
 a").click(l);var k,i,g,h=c();d("sup a").unbind("click").click(function(m){var 
o,n;g=d(this).attr("href");k=g&&g.charAt(0)==="#"?h[g.substr(1,g.length)]:null;if(!d("#mf-references").is(":visible")||j!==g){j=g;if(k){i="<h3>["+k.label+"]</h3>"+k.html}else{i=d("<a
 />").text(d(this).text()).attr("href",g).appendTo("<div 
/>").parent().html()}d("#mf-references 
div").html(i);b();if(a.animation==="none"){d("#mf-references").show()}else{if(a.animation==="slide"){o=window.innerHeight+window.pageYOffset;n=d("#mf-references").outerHeight();d("#mf-references").show().css({top:o}).animate({top:o-n},a.animationSpeed)}else{d("#mf-references").fadeIn(a.animationSpeed)}}}else{l()}m.preventDefault()})}e()})(jQuery)};
\ No newline at end of file

Modified: 
branches/awjrichards/extensions/MobileFrontend/javascripts/toggle.min.js
===================================================================
--- trunk/extensions/MobileFrontend/javascripts/toggle.min.js   2012-03-19 
18:57:30 UTC (rev 114169)
+++ branches/awjrichards/extensions/MobileFrontend/javascripts/toggle.min.js    
2012-03-20 01:02:41 UTC (rev 114229)
@@ -1 +1 @@
-MobileFrontend.toggle=(function(){var a=MobileFrontend.utils;function c(){var 
l,f,n,m,h=a(".section_heading");window.wm_toggle_section=b;m=a(".section_heading
 button");for(l=0;l<m.length;l++){a(m[l]).remove()}function k(){var 
i=this.id?this.id.split("_")[1]:-1;if(i>-1){b(i)}}function g(p){var 
o,i;o=document.createElement("button");i=document.createTextNode(MobileFrontend.message(p?"expand-section":"collapse-section"));o.className=p?"show":"hide";o.appendChild(i);return
 
o}if(!h){h=[]}else{a(document.body).addClass("togglingEnabled")}for(l=0;l<h.length;l++){n=h[l];n.removeAttribute("onclick");n.insertBefore(g(true),n.firstChild);n.insertBefore(g(false),n.firstChild);a(n).bind("click",k)}function
 j(){var 
i=this.hash||document.location.hash;if(i.indexOf("#")===0){e(i)}}j();for(f=document.getElementsByTagName("a"),l=0;l<f.length;l++){a(f[l]).bind("click",j)}}function
 e(i){var 
g=document.getElementById(i.substr(1)),h,f;if(g){h=g;while(h&&!a(h).hasClass("content_block")&&!a(h).hasClass("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;if(a(f).hasClass("openSection")){a(f).removeClass("openSection")}else{a(f).addClass("openSection")}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"}}}c();return{wm_reveal_for_hash:e,wm_toggle_section:b,init:c}})();
\ No newline at end of file
+MobileFrontend.toggle=(function(){var a=MobileFrontend.utils;function c(){var 
l,f,n,m,h=a(".section_heading");window.wm_toggle_section=b;m=a(".section_heading
 button");for(l=0;l<m.length;l++){a(m[l]).remove()}function k(){var 
i=this.id?this.id.split("_")[1]:-1;if(i!==-1){b(i)}}function g(p){var 
o,i;o=document.createElement("button");i=document.createTextNode(MobileFrontend.message(p?"expand-section":"collapse-section"));o.className=p?"show":"hide";o.appendChild(i);return
 
o}if(!h){h=[]}else{a(document.body).addClass("togglingEnabled")}for(l=0;l<h.length;l++){n=h[l];n.removeAttribute("onclick");n.insertBefore(g(true),n.firstChild);n.insertBefore(g(false),n.firstChild);a(n).bind("click",k)}function
 j(){var 
i=this.hash||document.location.hash;if(i.indexOf("#")===0){e(i)}}j();for(f=document.getElementsByTagName("a"),l=0;l<f.length;l++){a(f[l]).bind("click",j)}}function
 e(i){var 
g=document.getElementById(i.substr(1)),h,f;if(g){h=g;while(h&&!a(h).hasClass("content_block")&&!a(h).hasClass("section_heading")){h=h.parentNode}if(h&&!a(h).hasClass("openSection")){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;if(a(f).hasClass("openSection")){a(f).removeClass("openSection")}else{a(f).addClass("openSection")}for(h=0,d=["content_","anchor_"];h<=1;h++){k=document.getElementById(d[h]+g);if(k&&a(k).hasClass("openSection")){a(k).removeClass("openSection")}else{a(k).addClass("openSection")}}}c();return{wm_reveal_for_hash:e,wm_toggle_section:b,init:c}})();
\ No newline at end of file

Modified: branches/awjrichards/extensions/MobileFrontend/stylesheets/common.css
===================================================================
--- trunk/extensions/MobileFrontend/stylesheets/common.css      2012-03-19 
18:57:30 UTC (rev 114169)
+++ branches/awjrichards/extensions/MobileFrontend/stylesheets/common.css       
2012-03-20 01:02:41 UTC (rev 114229)
@@ -182,6 +182,7 @@
 
 html[dir="rtl"] #results {
        left: 41px;
+       right: 53px;
 }
 
 .search_bar .search {

Modified: 
branches/awjrichards/extensions/MobileFrontend/templates/ApplicationTemplate.php
===================================================================
--- trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php   
2012-03-19 18:57:30 UTC (rev 114169)
+++ 
branches/awjrichards/extensions/MobileFrontend/templates/ApplicationTemplate.php
    2012-03-20 01:02:41 UTC (rev 114229)
@@ -7,7 +7,7 @@
 class ApplicationTemplate extends MobileFrontendTemplate {
 
        public function getHTML() {
-
+               global $wgMobileResourceVersion;
                if ( $this->data['wgAppleTouchIcon'] !== false ) {
                        $appleTouchIconTag = Html::element( 'link', array( 
'rel' => 'apple-touch-icon', 'href' => $this->data['wgAppleTouchIcon'] ) );
                } else {
@@ -36,7 +36,7 @@
 
                $jQuerySupport = $this->data['device']['supports_jquery'];
                $jQueryScript = $jQuerySupport ? $startScriptTag . 
$javaScriptPath . 'jquery-1.7.1.min.js' . $endScriptTag : '';
-               $filePageScript = ( $this->data['isFilePage'] ) ? 
$startScriptTag . $javaScriptPath . 'filepage.js?version=122920111241' . 
$endScriptTag : '';
+               $filePageScript = ( $this->data['isFilePage'] ) ? 
$startScriptTag . $javaScriptPath . 'filepage.js?version=' . 
$wgMobileResourceVersion . $endScriptTag : '';
 
                $startLinkTag = "<link 
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/";
                $endLinkTag = "' media='all' rel='Stylesheet' type='text/css' 
/>";
@@ -59,7 +59,7 @@
 
                if( $this->data['isBetaGroupMember'] && $jQuerySupport ) {
                        $betajs = <<<HTML
-                       
{$startScriptTag}{$javaScriptPath}references.{$resourceSuffix}js?version=1331257310{$endScriptTag}
+                       
{$startScriptTag}{$javaScriptPath}references.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
 HTML;
                } else {
                        $betajs = "";
@@ -71,8 +71,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=1331678715'
 media='all' rel='Stylesheet' type='text/css' />
-                       <link 
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version=1331678715'
 media='all' rel='Stylesheet' type='text/css' />
+                       <link 
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$betaPrefix}common.css?version={$wgMobileResourceVersion}'
 media='all' rel='Stylesheet' type='text/css' />
+                       <link 
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version={$wgMobileResourceVersion}'
 media='all' rel='Stylesheet' type='text/css' />
                        {$filePageStyle}
                        <meta name="viewport" content="initial-scale=1.0">
                        {$appleTouchIconTag}
@@ -90,10 +90,10 @@
                        </div>
                        {$this->data['footerHtml']}
                        <!--[if gt IE 9]><!-->
-                       
{$startScriptTag}{$javaScriptPath}application.{$resourceSuffix}js?version=1331257310{$endScriptTag}
-                       
{$startScriptTag}{$javaScriptPath}toggle.{$resourceSuffix}js?version=1331257310{$endScriptTag}
-                       
{$startScriptTag}{$javaScriptPath}banner.{$resourceSuffix}js?version=1331257310{$endScriptTag}
-                       
{$startScriptTag}{$javaScriptPath}{$betaPrefix}opensearch.{$resourceSuffix}js?version=1331250599{$endScriptTag}
+                       
{$startScriptTag}{$javaScriptPath}application.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
+                       
{$startScriptTag}{$javaScriptPath}toggle.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
+                       
{$startScriptTag}{$javaScriptPath}banner.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
+                       
{$startScriptTag}{$javaScriptPath}{$betaPrefix}opensearch.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
                        {$betajs}
                        {$filePageScript}
                        <!--[endif]-->

Modified: 
branches/awjrichards/extensions/MobileFrontend/templates/SearchTemplate.php
===================================================================
--- trunk/extensions/MobileFrontend/templates/SearchTemplate.php        
2012-03-19 18:57:30 UTC (rev 114169)
+++ branches/awjrichards/extensions/MobileFrontend/templates/SearchTemplate.php 
2012-03-20 01:02:41 UTC (rev 114229)
@@ -8,14 +8,14 @@
 
        public function getHTML() {
 
-               $searchField = htmlspecialchars( $this->data['searchField'] );
+               $searchField = Xml::escapeJsString( $this->data['searchField'] 
);
                $mainPageUrl = $this->data['mainPageUrl'];
                $randomPageUrl = $this->data['randomPageUrl'];
                $homeButton = 
$this->data['messages']['mobile-frontend-home-button'];
                $randomButton = 
$this->data['messages']['mobile-frontend-random-button'];
-               $clearText = htmlentities( 
$this->data['messages']['mobile-frontend-clear-search'], ENT_QUOTES );
+               $clearText = Xml::escapeJsString( 
$this->data['messages']['mobile-frontend-clear-search'] );
                $searchValue = 
$this->data['messages']['mobile-frontend-search-submit'];
-               $placeholder = htmlentities( 
$this->data['messages']['mobile-frontend-placeholder'], ENT_QUOTES );
+               $placeholder = Xml::escapeJsString( 
$this->data['messages']['mobile-frontend-placeholder'] );
 
                $scriptUrl = wfScript();
                $searchBoxDisplayNone = ( $this->data['hideSearchBox'] ) ? ' 
style="display: none;" ' : '';


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to