MediaWiki:Minerva.js: Difference between revisions

No edit summary
Tag: Replaced
 
Line 1: Line 1:
/* All JavaScript here will be loaded for users of the MinervaNeue skin */
/* All JavaScript here will be loaded for users of the MinervaNeue skin */
// Template:TLP drawer
function TLPExpandDe(x) {
  var content = document.getElementById('tlp-children-'+x); //outputs something like document.getElementById("tlp-children-1.21")
  var button = document.getElementById('tlp-button-text-'+x); //outputs something like document.getElementById("tlp-button-text-1.21")
  if (content.style.display == "block") {
    content.style.display = "none";
    button.innerHTML = "Ausklappen";
  } else {
    content.style.display = "block";
    button.innerHTML = "Einklappen";
  }
}
function TLPExpandEn(x) {
  var content = document.getElementById('tlp-children-'+x); //outputs something like document.getElementById("tlp-children-1.21")
  var button = document.getElementById('tlp-button-text-'+x); //outputs something like document.getElementById("tlp-button-text-1.21")
  if (content.style.display == "block") {
    content.style.display = "none";
    button.innerHTML = "Expand";
  } else {
    content.style.display = "block";
    button.innerHTML = "Collapse";
  }
}
function TLPExpandFr(x) {
  var content = document.getElementById('tlp-children-'+x); //outputs something like document.getElementById("tlp-children-1.21")
  var button = document.getElementById('tlp-button-text-'+x); //outputs something like document.getElementById("tlp-button-text-1.21")
  if (content.style.display == "block") {
    content.style.display = "none";
    button.innerHTML = "Afficher";
  } else {
    content.style.display = "block";
    button.innerHTML = "Masquer";
  }
}
function TLPExpandIt(x) {
  var content = document.getElementById('tlp-children-'+x); //outputs something like document.getElementById("tlp-children-1.21")
  var button = document.getElementById('tlp-button-text-'+x); //outputs something like document.getElementById("tlp-button-text-1.21")
  if (content.style.display == "block") {
    content.style.display = "none";
    button.innerHTML = "Espandi";
  } else {
    content.style.display = "block";
    button.innerHTML = "Comprimi";
  }
}
function TLPExpandEs(x) {
  var content = document.getElementById('tlp-children-'+x); //outputs something like document.getElementById("tlp-children-1.21")
  var button = document.getElementById('tlp-button-text-'+x); //outputs something like document.getElementById("tlp-button-text-1.21")
  if (content.style.display == "block") {
    content.style.display = "none";
    button.innerHTML = "Mostrar";
  } else {
    content.style.display = "block";
    button.innerHTML = "Ocultar";
  }
}
function drawerExpand(x) {
  var content = document.getElementById("drawer-content-"+x);
  var button = document.getElementById("drawer-button-"+x);
  if (content.style.display == "block") {
    content.style.display = "none";
button.innerHTML = "Expand";
  } else {
    content.style.display = "block";
    button.innerHTML = "Collapse";
  }
}