MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 51: Line 51:
  ev.stopPropagation();
  ev.stopPropagation();
}
}
function tpSelf(ev) { togglePopup(ev.currentTarget); } // for popups
function tpNext(ev) { togglePopup(ev.currentTarget.nextElementSibling); }


function dpInfo(o) { // for calculator: display a datapoint's info
function dpInfo(o) { // for calculator: display a datapoint's info
Line 184: Line 186:
   } else
   } else
   if (next.className=="ppContent" || next.classList.contains("ppContent")) {
   if (next.className=="ppContent" || next.classList.contains("ppContent")) {
   e[i].onclick = next.onclick = function(e){togglePopup(next);};
   e[i].onclick = tpNext;
  next.onclick = tpSelf;
   }
   }
  }
  }