MediaWiki:EditTemplates.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
// importScriptURI( 'http://bits.pgehres.com/donate/js/MediaWiki:EditTemplates.js' ); |
// importScriptURI( 'http://bits.pgehres.com/donate/js/MediaWiki:EditTemplates.js' ); |
||
⚫ | |||
$( 'body' ).append( '<div id="editTemplatesList"></div>' ); |
|||
⚫ | |||
$( ' |
$( '#editTemplatesList' ).append( '<h4>Templates</h4>' ); |
||
⚫ | |||
⚫ | |||
var language = getQuerystring( 'uselang' ); |
|||
if ( country == '' ){ |
|||
⚫ | |||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
} |
|||
var editList = '' + |
|||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
editList = editList.replace( /@country/g, country ); |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
// '<li><a href="/wiki/Template:2011FR/?action=edit">Payment Methods</a></li>' + |
|||
// '<li><a href="/wiki/Template:2011FR/?action=edit">Infobox</a></li>' + |
|||
// '<li><a href="/wiki/Template:2011FR/?action=edit">Legalese</a></li></ul</li>' + |
|||
⚫ | |||
⚫ | |||
editList = editList.replace( /@country/g, country ); |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
}; |
|||
var hideEditBox = function(){ |
|||
⚫ | |||
⚫ | |||
}; |
|||
⚫ | |||
⚫ | |||
hideEditBox(); |
|||
} |
} |
Revision as of 12:51, 20 June 2014
if ( wgPageName == "Special:FundraiserLandingPage" ){
// importScript('MediaWiki:EditTemplates.js');
importStylesheet( 'MediaWiki:EditTemplates.css' );
// importScriptURI( 'http://bits.pgehres.com/donate/js/MediaWiki:EditTemplates.js' );
$( 'body' ).append( '<div id="editTemplates"><span id="editText">Edit</span><img id="editArrow" width="8" src="//upload.wikimedia.org/wikipedia/commons/thumb/1/10/ArrowRightNavbox.svg/32px-ArrowRightNavbox.svg.png"/></div>' );
$( 'body' ).append( '<div id="editTemplatesList"></div>' );
$( '#editTemplatesList' ).append( '<h4>Templates</h4>' );
var country = getQuerystring( 'country' );
var language = getQuerystring( 'uselang' );
if ( country == '' ){
country = 'XX';
}
if ( language == '' ){
language = 'en';
}
var editList = '' +
'<ul>' +
'<li><a href="/wiki/Template:Lp-layout-default?action=edit">Overall Layout</a></li>' +
'<li><a href="/wiki/Template:2011FR/Appeal-template-default?action=edit">Appeal Template</a><ul>' +
'<li><a href="/wiki/Template:2011FR/Appeal-default/text/@language?action=edit">Appeal Text</a></li>' +
'<li><a href="/wiki/Template:2011FR/Appeal-default/title/@language?action=edit">Appeal Title</a></li></ul></li>' +
'<li><a href="/wiki/Template:2012FR/Form-countryspecific-control/@country?action=edit">Form Layout</a><ul>' +
'<li><a href="/wiki/Template:2012FR/Form-countryspecific-control/@country&action=edit">Radio Buttons</a></li>' +
'</ul>';
editList = editList.replace( /@country/g, country );
editList = editList.replace( /@language/g, language );
$( '#editTemplatesList' ).append( editList );
$( '#editTemplatesList' ).append( '<a href="/wiki/Special:Upload">Upload file</a>' );
var showEditBox = function(){
$( '#editTemplatesList' ).css( 'display', 'inline-block' );
$( '#editTemplates' ).click( function(){ hideEditBox(); } );
};
var hideEditBox = function(){
$( '#editTemplatesList' ).css( 'display', 'none' );
$( '#editTemplates' ).click( function(){ showEditBox(); } );
};
hideEditBox();
}