Änderungen

Aus WIKI LAUER-FISCHER GmbH
Wechseln zu: Navigation, Suche

MediaWiki:Common.js

55 Bytes hinzugefügt, 14:59, 13. Apr. 2018
keine Bearbeitungszusammenfassung
jQuery(document).ready(function () {
"use strict"
// Register slideToggle() on each category.
var makeOnClick = generateMakeOnClick();
 
jQuery("div.generated-sidebar.portlet").each(makeOnClick);
makeOnClick.defaultExpanded = false;
// Registers the slideToggle() function on this and sets up the cookie
function makeOnClickgenerateMakeOnClick() {
"use strict";
var n = 0; var makeOnClick = function m() { if (jQuery(this).children("h3").is(":hidden")) { return; }
if (makeOnClick.defaultExpanded === undefined) { makeOnClick.defaultExpanded var k = true; }n
if (makeOnClick.n === undefined) { makeOnClick.n = 0; }++
var n = makeOnClick jQuery(this).nattr({ "role": "button", "type": "button" });
makeOnClick var expanded = m.n++;defaultExpanded
jQuery var cookie = getCookie(this)cookieName + k.attrtoString({ "role": "button", "type": "button" }));
var if (cookie === null) { setStateCookie(k, expanded ); } else { expanded = cookie === makeOnClick.defaultExpanded"1"; }
var cookie = getCookie jQuery(cookieName + nthis).children("h3").toStringattr("aria-pressed", expanded ? "true" : "false"); jQuery(this).children("h3").addClass(expanded ? "nav-expanded" : "nav-collapsed");
if (cookie =expanded == nullfalse) { setStateCookie jQuery(n, expandedthis); } else { expanded = cookie === .children("1div").hide(); }
jQuery(this).children("h3").attrclick(function ("aria-pressed", expanded ? "true" : "false");{ var newExpanded = jQuery(this).childrenattr("h3aria-pressed").addClass(expanded ? !== "nav-expanded" : "nav-collapsedtrue"; setStateCookie(k, newExpanded);
if (newExpanded) { jQuery(this).removeClass("nav-collapsed"); jQuery(this).addClass("nav-expanded == false") ; } else { jQuery(this).childrenremoveClass("divnav-expanded"); jQuery(this).hideaddClass("nav-collapsed"); }
jQuery(this).children("h3").click(function () { var newExpanded = jQuery(this).attr("aria-pressed") !== , newExpanded ? "true"; setStateCookie(n, newExpanded: "false");
if (newExpanded) { jQuery(this).removeClassparent("nav-collapsed"); jQuery(this).addClasschildren("navdiv.pBody:first-of-expandedtype"); } else { jQuery(this).removeClassslideToggle("nav-expanded"'fast'); jQuery(this }).addClass("nav-collapsed"); }
jQuery(this) makeOnClick.attr("aria-pressed", newExpanded ? "defaultExpanded = true" : "false");
jQuery return makeOnClick}function getCookie(thiskey){ "use strict"; var cookieQuery = document.parentcookie.match().children'("div.pBody?:first-of-type"^|;).slideToggle\\s*' + key + '\\s*=\\s*('fast[^;]+)'); })
function getCookie(key) { "use strict"; var return cookieQuery = document.cookie.match('(== null ?null :^|;)\\s*' + key + '\\s*=\\s*cookieQuery.pop([^;]+)');}
return cookieQuery // Writes the state of the k-th section into a cookie.function setStateCookie(k, expanded) { "use strict"; var now === null ? null : cookieQuery.popnew Date(); }now.setFullYear(now.getFullYear() + 3);
// Writes the state of the k-th section into a cookie. function setStateCookie(k, expanded) { "use strict"; var now expirationDate = new Date(); now.setFullYear(now.getFullYeartoUTCString() + 3);
var expirationDate cookie = nowcookieName + k.toUTCStringtoString() + "=" + (expanded ? "1" : "0")+ "; Expires=" + expirationDate + "; path=/";
var cookie = cookieName + k.toString() + "=" + (expanded ? "1" : "0") + "; Expires=" + expirationDate + "; path=/";  document.cookie = cookie; }
}

Navigationsmenü