$
/* renderInline: render the button as an element in the content flow by removing the absolute position */
var renderInline = parseInt(article.value("renderInline", "0"));
var cssClass = article.cssClass || ""; var inlineCss = article.inlineCss || "";
if ( cssClass ) {cssClass = "wzp-obenkreis " + cssClass;}
else {cssClass = "wzp-obenkreis";}
if ( inlineCss ) {inlineCss = ' style="' + inlineCss + '"';}
var HgCol = article.value('hg-col', '');
var Corner = article.value('corner', '');
var PfCol = article.value('pfeil-col', '');
var cssselector = '#wzp_back_top2' + (article.id || "");
var headstyle = "";
if ( HgCol !== "" ){headstyle += cssselector + "{background-color: " + HgCol + " !important;}\n";}
if ( Corner !== "" ){headstyle += cssselector + "{border-radius: " + Corner + "px !important;}\n";}
if ( PfCol !== "" ){headstyle += cssselector + " span {color: " + PfCol + " !important;}\n";}
cssClass = article.cssClass || ""; var inlineCss = article.inlineCss || "";
if ( cssClass ) {cssClass = "wzp-obenpfeil-1, .wzp-obenpfeil-2 " + cssClass;}
else {cssClass = "wzp-obenpfeil-1, .wzp-obenpfeil-2";}
if ( inlineCss ) {inlineCss = ' style="' + inlineCss + '"';}
cssselector = '#wzp_back_top2' + (article.id || "") + ' .wzp-obenpfeil-1, #wzp_back_top2' + (article.id || "") + ' .wzp-obenpfeil-2';
if ( PfCol !== "" ){headstyle += cssselector + "{border-color: " + PfCol + " !important;}\n";}
cssClass = article.cssClass || ""; var inlineCss = article.inlineCss || "";
if ( cssClass ) {cssClass = "wzp_back_top2 " + cssClass;}
else {cssClass = "wzp_back_top2";}
if ( inlineCss ) {inlineCss = ' style="' + inlineCss + '"';}
var PosR = article.value('pos-r', '');
var PosB = article.value('pos-b', '');
cssselector = '#wzp_back_top2' + (article.id || "");
if (!renderInline) {
if ( PosR !== "" ){headstyle += cssselector + "{right: " + PosR + "% !important;}\n";}
if ( PosB !== "" ){headstyle += cssselector + "{bottom: " + PosB + "% !important;}\n";}
var Break = article.value("breakpoint","");
var MobR = article.value('pos-r-mob', '');
var MobB = article.value("pos-b-mob","");
headstyle += '@media (max-width: ' + Break + 'px) {';
headstyle += '#wzp_back_top2' + (article.id || "") + ' {';
headstyle += 'right: ' + MobR + '% !important;';
headstyle += 'bottom: ' + MobB + '% !important;';
headstyle += '}';
headstyle += '}';
}
var title = article.value("title", "");
var textLeft = article.value("textLeft", "");
var textRight = article.value("textRight", "");
if (textLeft != "" || textRight != "") {
/* Add padding only if there's text */
headstyle += '#wzp_back_top2' + (article.id || "") + ' a {padding: 4px 10px;}';
/* the icon has to be smaller when text is being displayed in order for the padding to work */
headstyle += '#wzp_back_top2' + (article.id || "") + ' .wzp-obenkreis {width: 20px !important}';
}
if (renderInline) {
headstyle += '#wzp_back_top2' + (article.id || "") + '{';
headstyle += 'position: relative !important;';
headstyle += 'width: max-content;';
if (!PosR || parseInt(PosR) >= 0) {
headstyle += 'margin: 0 auto;';
}
headstyle += '}';
}
system.addHtmlHeadElement("
Nach Oben Type2 ⇡
Hier können Sie das Widget öffnen oder löschen. Dieser Hinweis wird nur in der internen Vorschau angezeigt.