<$ // This widget should only be placed on a page once, as we are referencing some elements by their HTML id // TODO: Use classes instead, to allow more than one widget. Move the JS to a separate file var pageArticles = page.articles; var widgetsOnPage = 0; var thisWidgetName = article.widgetName; for (var i=0; i < pageArticles.count; i++) { var currentArticle = pageArticles.item(i); if (currentArticle.widgetName == thisWidgetName && currentArticle.active ){ widgetsOnPage++; } } var MMaxw = article.value('m-maxw', ''); var MMaxh = article.value('m-maxh', ''); var MPosVert = article.value('m-pos-vert', ''); var MAbstVert = article.value('m-abst-vert', ''); var MPadO = article.value('m-pad-o', ''); var MPadU = article.value('m-pad-u', ''); var MPadLR = article.value('m-pad-lr', ''); var MBordStyle = article.value('m-bord-style', ''); var MBordW = article.value('m-bord-w', ''); var MBordCol = article.value('m-bord-col', ''); var Corner = article.value('corner', ''); var MBg = article.value('m-bg', ''); var ZIndex = article.value('z-index', ''); var MBgOverl = article.value('m-bg-overl', ''); var CloseCol = article.value('close-col', ''); var CloseAni = article.value('close-ani', ''); var CloseAnitime = article.value('close-anitime', ''); var ClosePosO = article.value('close-pos-o', ''); var ClosePosR = article.value('close-pos-r', ''); var hideAfterClose = article.value('hideAfterClose', '0') == '1'; var headstyle = ""; headstyle += '.wzp-modalonl {'; headstyle += 'max-width:' + MMaxw + ';'; headstyle += ' max-height:' + MMaxh + ';'; headstyle += ' ' + MPosVert + ':' + MAbstVert + ';'; headstyle += ' left:50%;'; headstyle += ' margin-left:calc(-' + MMaxw + ' / 2);'; headstyle += ' padding:' + MPadO + ' ' + MPadLR + ' ' + MPadU + ';'; headstyle += ' border:' + MBordStyle + ' ' + MBordW + ' ' + MBordCol + ';'; headstyle += ' border-radius:' + Corner + ';'; headstyle += ' background-color:' + MBg + ';'; headstyle += ' z-index:' + ZIndex + ';'; headstyle += '}\n'; headstyle += '#wzp-modalonl_overlay {';; headstyle += 'background-color:' + MBgOverl + ';'; headstyle += ' z-index:calc(' + ZIndex + ' - 1);'; headstyle += '}\n'; headstyle += '#wzp-modalonl_close {';; headstyle += 'color:' + CloseCol + ';'; headstyle += ' transform:rotate(1deg);'; headstyle += ' transition:all ' + CloseAnitime + 's;'; headstyle += ' top:' + ClosePosO + ';'; headstyle += ' right:' + ClosePosR + ';'; headstyle += '}\n'; headstyle += '#wzp-modalonl_close:hover {';; headstyle += 'transform: rotate(' + CloseAni + ');'; headstyle += '}'; system.addHtmlHeadElement("\n" + headstyle + "\n"); var MobAbstO = article.value("mob-abst-o",""); var headstyle = '@media (max-width:calc(' + MMaxw + ' + 40px)) {'; headstyle += '.wzp-modalonl {'; headstyle += 'top:' + MobAbstO + ';'; headstyle += ' left:0 !important;'; headstyle += ' right:0 !important;'; headstyle += ' margin:10px;'; headstyle += '}'; headstyle += '}'; system.addHtmlHeadElement("\n" + headstyle + "\n"); $> <$= system.partial("article-begin.html") $> <$ if ( system.preview ) { $> <$ if ( widgetsOnPage > 1 ){ $>
Es ist nur ein "Modal Onload" Widget pro Seite zugelassen! Bitte löschen Sie alle anderen "Modal Onload" Widgets. <$ } $>

Modal Onload

Hier können Sie das Widget öffnen oder löschen. Dieser Hinweis wird nur in der internen Vorschau angezeigt.
Die Darstellung in Zeta Producer ist nicht immer korrekt, bitte zur Browser-Vorschau wechseln.

<$ } else { $>
; display: non">
" aria-hidden="true">
<$ for ( var i = 1; i <= 1; i++) { var TEXTEDIT = (article.value("text-" + i)); if ( isNull(TEXTEDIT) ){ continue; } $> <$= TEXTEDIT $> <$ } $> <$ for ( var i = 1; i <= 1; i++) { var HTMLEDIT = (article.value("html-" + i)); if ( isNull(HTMLEDIT) ){ continue; } $> <$= HTMLEDIT $> <$ } $>
<$ } $> <$= system.partial("article-end.html") $>