MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 41: Line 41:
}
}


function showOnlyNext(ev) { // for expandable text
function showOnlyNext(ev) { // expand inline
  ev.currentTarget.style.display = "none";
  ev.currentTarget.style.display = "none";
  ev.currentTarget.nextElementSibling.style.display = "initial";
  ev.currentTarget.nextElementSibling.style.display = "initial";
  ev.stopPropagation();
  ev.stopPropagation();
}
}
function showOnlyPrev(ev) {
function showOnlyPrev(ev) { // collapse inline
  ev.currentTarget.style.display = "none";
  ev.currentTarget.style.display = "none";
  ev.currentTarget.previousElementSibling.style.display = "initial";
  ev.currentTarget.previousElementSibling.style.display = "initial";
  ev.stopPropagation();
  ev.stopPropagation();
}
}
function tpSelf(ev) { togglePopup(ev.currentTarget); } // for popups
function tpNext(ev) { // show popup
function tpNext(ev) { togglePopup(ev.currentTarget.nextElementSibling); }
togglePopup(ev.currentTarget.nextElementSibling);
ev.stopPropagation();
}
function tpSelf(ev) { // hide popup
togglePopup(ev.currentTarget);
ev.stopPropagation();
}


function dpInfo(o) { // for calculator: display a datapoint's info
function dpInfo(o) { // for calculator: display a datapoint's info