Änderungen

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

MediaWiki:Common.js

4.868 Bytes entfernt, 14:59, 13. Apr. 2018
keine Bearbeitungszusammenfassung
var cookieName = "sectionVisible"
 
jQuery(document).ready(function () {
// Delete WINAPO SQL from Addon-Produkte and insert a new link after Addon-Produkte."use strict" // That way WINAPO SQL looks like big link and is not affected by Register slideToggle() on Addon-Produkte. jQuery("#n-WINAPO-SQL").detach() jQuery("#p-AddOn-Produkte")each category.css({"margin-bottom": "2px"}) jQuery("#p-AddOn-Produkte").after("<a href=\"/Kategorie:WINAPO_SQL\" classvar makeOnClick =\"portlet generated-sidebar\"><h3>WINAPO SQL</h3></a>") jQuerygenerateMakeOnClick("#p-AddOn-Produkte + a > h3").css({ "margin-bottom": "12px" });
// Register slideTogglejQuery("div.generated-sidebar.portlet") on .each category(makeOnClick); makeOnClick.defaultExpanded = false; jQuery("div.generated#p-sidebar.portlet > h3tb").each(makeOnClick);});
// Registers the slideToggle() function on this and sets up the cookie
function makeOnClickgenerateMakeOnClick(n) { "use strict";
var n = 0; var makeOnClick = function m() { if (jQuery(this).attrchildren({ "roleh3": "button", "type).is(": hidden"button" )) { return; })
const cookie var k = getCookie("showSection" + n) let expanded;
if (cookie === null) { expanded = true setStateCookie(n, expanded) } else { expanded = cookie === "1" }++
jQuery(this).attr({ "aria-pressed", expanded ? "truerole" : "falsebutton") const css = expanded ? arrow_expanded : arrow_collapsed jQuery(this).parent().css({"background-image": css, "background-repeattype": "no-repeatbutton"});
if (expanded) { jQuery(this).addClass("var expanded") } else { jQuery(this).addClass("collapsed") jQuery(this).parent().children("div")= m.hide() }defaultExpanded
jQuery(this).click(function () { jQueryvar cookie = getCookie(this)cookieName + k.parenttoString().children("div.pBody:first-of-type").slideToggle('fast');
const newExpanded = jQueryif (this).attr("aria-pressed") !cookie == "true" const newArrow = newExpanded ? arrow_expanded : arrow_collapsed setStateCookie(n, newExpanded) jQuery(this).parent().css("background-image", newArrow) jQuery(this).attr("aria-pressed", newExpanded ? "true" : "false")  if (newExpandednull) { jQuerysetStateCookie(this).removeClass("collapsed").addClass("k, expanded");
}
else {
jQuery(this).removeClass("expanded= cookie === ").addClass("collapsed1");
}
})
function getCookie jQuery(keythis) { .children("h3").attr("aria-pressed", expanded ? "true" : "use strictfalse"); const cookieQuery = documentjQuery(this).cookiechildren("h3").match('addClass(expanded ?"nav-expanded" :^|;"nav-collapsed")\\s*' + key + '\\s*=\\s*([^;]+)')
return cookieQuery if (expanded === null ? null : cookieQueryfalse) { jQuery(this).children("div").pophide(); }
// Writes the state of the k-th section into a cookie jQuery(this).children("h3"). click(function setStateCookie(k, expanded) { "use strict" let now var newExpanded = new DatejQuery(this) now.setFullYearattr(now.getFullYear"aria-pressed") !== "true"; setStateCookie(k, newExpanded) + 3);
const expirationDate = now if (newExpanded) { jQuery(this).removeClass("nav-collapsed"); jQuery(this).addClass("nav-expanded"); } else { jQuery(this).removeClass("nav-expanded"); jQuery(this).toUTCStringaddClass("nav-collapsed"); }
const cookie = "showSection" + k jQuery(this).toStringattr() + "=aria-pressed" + (expanded , newExpanded ? "1true" : "0false") + "; Expires=" + expirationDate + "; path=/"
jQuery(this).parent().children("div.pBody:first-of-type").slideToggle('fast'); document.cookie = cookie})
}
 
makeOnClick.defaultExpanded = true
 
return makeOnClick
}
function getCookie(key) {
"use strict";
var cookieQuery = document.cookie.match('(?:^|;)\\s*' + key + '\\s*=\\s*([^;]+)');
 
return cookieQuery === null ? null : cookieQuery.pop();
}
const arrow_expanded // Writes the state of the k-th section into a cookie.function setStateCookie(k, expanded) { "use strict"; var now = "urlnew Date(); now.setFullYear(now.getFullYear(data:image/svg) +xml3);  var expirationDate = now.toUTCString();base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8  var cookie = cookieName +CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXB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gIGlua3NjYXBlOmRvY3VtZW50LXVuaXRzPSJweCIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJsYXllcjEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMTM2NiIKICAgICBpbmtzY2FwZTp3aW5kb3ctaGVpZ2h0PSI3MDUiCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii04IgogICAgIGlua3NjYXBlOndpbmRvdy15PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3ctbWF4aW1pemVkPSIxIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTciPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlPjwvZGM6dGl0bGU+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxnCiAgICAgaW5rc2NhcGU6bGFiZWw9IkxheWVyIDEiCiAgICAgaW5rc2NhcGU6Z3JvdXBtb2RlPSJsYXllciIKICAgICBpZD0ibGF5ZXIxIj4KICAgIDxwYXRoCiAgICAgICBzdHlsZT0iZmlsbDojNzk3OTc5IgogICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgIGQ9Im0gMTMuMDAyLDYuMDAxIC01LDUuMDAxIC01LC01LjAwMSB6IgogICAgICAgaWQ9InBhdGgyOTk3IiAvPgogIDwvZz4KPC9zdmc+)"const arrow_collapsed = "url+ (dataexpanded ? "1" :image/svg"0") +xml";base64,PD94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ICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICBzdHlsZT0iZmlsbDojNzk3OTc5IiAvPgogIDwvZz4KPC9zdmc+)"; path=/";  document.cookie = cookie;}

Navigationsmenü