Template:2011FR/Form-section-links: Difference between revisions

Content deleted Content added
Cbarr (talk | contribs)
No edit summary
clean up code, rm unused markers & css, convert divs to a list, add default link targets just in case js breaks
Line 1:
<html>
 
<style type="text/css">
.collapsible-container {
 
.collapsible-container{
font-size: 0.8em;
cursor: pointer;
}
 
.collapsible-container-trigger{
color: #0645AD;
font-size: 1.2em;
background-image: none !important;
padding-right: 0 !important;
}
 
.collapsible-container-trigger:hover{
text-decoration: underline;
color: #0645AD;
}
 
.collapsible-container-contained{
display: none;
background-color: #FFFFFF;
Line 28 ⟶ 11:
}
 
.form-info-links {
.collapsible-container-marker-collapsed{
displaylist-style: inlinenone;
backgroundmargin-imageleft: none0 !important;
display: none;
color: #0645AD;
}
 
.collapsible-container-marker-expanded{
display: none;
color: #0645AD;
}
 
</style>
 
<script type="text/javascript">
 
function triggerHover(elem){
// document.getElementById(elem + '-container-contained').style.display='block';
// document.getElementById(elem + '-collapsed-marker').style.display='none';
// document.getElementById(elem + '-expanded-marker').style.display='inline';
$('#' + elem + '-container-contained').toggle();
//$('#' + elem + '-collapsed-marker').toggle('slow',null);
//$('#' + elem + '-expanded-marker').toggle('slow',null);
}
 
function triggerLeave(elem){
// document.getElementById(elem + '-container-contained').style.display='none';
// document.getElementById(elem + '-collapsed-marker').style.display='inline';
// document.getElementById(elem + '-expanded-marker').style.display='none';
$('#' + elem + '-container-contained').toggle();
//$('#' + elem + '-collapsed-marker').toggle('slow',null);
//$('#' + elem + '-expanded-marker').toggle('slow',null);
}
function triggerClick(elem){
$('#' + elem + '-container-contained').toggle();
}
</script>
<div class="collapsible-container" id="monthly-container">
<a class="collapsible-container-trigger" id="monthly-link" target="_blank"href=""></html>{{int:donate_interface-monthly-donation}}<html></a>
</div>
 
<!-- This piece of script is add to preserve the layout of the page when the user is sent to monthly donation page -->
<script type="text/javascript">
 
var monthlyURL = window.location.href;
var pageCountrySpecific = getQuerystring( 'form-countryspecific' );
Line 76 ⟶ 23:
// if on a static page, e.g. from sidebar just use a monthly form and leave everything else as defaults
// Need to fix this later to pass language, utm data etc, but that stupid ampersand bug is stopping me for now -- Pcoombe
monthlyURL = 'https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage?form-countryspecific=Form-countryspecific-monthly&country=</html>{{{country}}}<html>&language=</html>{{int:lang}}<html>';
} else {
// if on Special:FundraiserLandingPage, use all the same querystring but a monthly form
Line 82 ⟶ 29:
}
document.getElementById("monthly-link").href = monthlyURL;
 
</script>
<!-- ----------------- end script--------------- -->
<ul class="form-info-links">
<li><a classid="collapsible-containermonthly-triggerlink" target="_blank" href="https://wikimediafoundationdonate.wikimedia.org/wiki/Special:LandingCheckFundraiserLandingPage?landing_pageform-countryspecific=FAQ&basic=trueForm-countryspecific-monthly&country=</html>{{{country}}}<html>&language=</html>{{int:lang}}<html>"></html>{{int:donate_interface-faqsmonthly-donation}}<html></a></li>
 
<li><a classid="collapsibleways-to-containergive-triggerlink" target="_blank" href="https://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Ways_to_Give&basic=true&country=</html>{{{country}}}<html>&language=</html>{{int:lang}}<html>"></html>{{int:donate_interface-otherways-short}}<html></a></li>
<div class="collapsible-container" id="otherways-container">
<a class="collapsible-container-trigger" target="_blank" href="https://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Ways_to_Give&basic=true&country=</html>{{{country}}}<html>&language=</html>{{int:lang}}<html>"></html>{{int:donate_interface-otherways-short}}<html></a>
</div>
 
<div class="collapsible-container"li><a classid="collapsiblefaq-container-triggerlink" target="_blank" href="https://wikimediafoundation.org/wiki/Problems_donatingSpecial:LandingCheck?landing_page=FAQ&basic=true&country=</html>{{{country}}}<html>?&language=</html>{{int:lang}}<html>"></html>{{int:Donate_interfacedonate_interface-problemsdonatingfaqs}}<html></a></divli>
<div class="collapsible-container" id="faq-container">
<a class="collapsible-container-trigger" target="_blank" href="https://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=FAQ&basic=true&country=</html>{{{country}}}<html>&language=</html>{{int:lang}}<html>"></html>{{int:donate_interface-faqs}}<html></a>
</div>
 
</divli>
<!-- <div class="collapsible-container" id="tax-container" onmouseover="triggerHover('tax');" onmouseout="triggerLeave('tax');"> -->
<spana classid="collapsibletax-containerlink" href="https://wikimediafoundation.org/wiki/Deductibility_of_donations" onclick="$('#tax-triggercontainer').toggle(); return(false);"></html>{{#ifeq: {{{country}}} | US | {{int:donate_interface-taxded-link-us}} | {{int:donate_interface-taxded-link-int}} }}<html></spana>
<div class="collapsible-container" id="tax-container" onclick="triggerClick('tax');">
<spandiv class="collapsible-container-marker-collapsed" id="tax-collapsed-markercontainer" onclick=">&$('#9650tax-container').toggle();</span return(false);">
<span class="collapsible-container-marker-expanded" id="tax-expanded-marker">&#9660;</span>
<span class="collapsible-container-trigger"></html>{{#ifeq: {{{country}}} | US | {{int:donate_interface-taxded-link-us}} | {{int:donate_interface-taxded-link-int}} }}<html></span>
<div class="collapsible-container-contained" id="tax-container-contained">
</html>{{#ifeq: {{{country}}} | US | {{int:donate_interface-taxded-msg-us}} |{{#ifeq: {{{country}}}| NL | {{int:donate_interface-taxded-msg-nl}} | {{int:donate_interface-taxded-msg-int}} }} }}<html><br/><br/>
</html>{{#ifeq:{{int:lang}}|en||{{int:donate_interface-legal-original}}}}<html>
</div>
</divli>
 
<div class="collapsible-container"><a class="collapsible-container-trigger" target="_blank" href="https://wikimediafoundation.org/wiki/Problems_donating?country=</html>{{{country}}}<html>?language=</html>{{int:lang}}<html>"></html>{{int:Donate_interface-problemsdonating}}<html></a></div>
<li><a id="problems-link" target="_blank" href="https://wikimediafoundation.org/wiki/Problems_donating?country=</html>{{{country}}}<html>?language=</html>{{int:lang}}<html>"></html>{{int:Donate_interface-problemsdonating}}<html></a></li>
</ul>
 
</html>