Popup


Popup

[{Popup id="test1" sourceFileName="popup-content.wiki" sourcePageName="/OpenForum/Extensions/OneTimePopup"}] [{Popup id="test2" content="some content"]

Popup button

[{Popup id="test1" title="Pop me up"}] Pop me up [{Popup id="test2" title="Pop me up"}] Pop me up

Popup script

$('#test1').foundation('reveal', 'open'); $('#test2').foundation('reveal', 'open');

Source

/OpenForum/Extensions/Popup/renderer.sjs/* * Author: * Description: */ var id = extension.getAttribute("id"); var sourceFile = extension.getAttribute("sourceFileName"); var sourcePage = extension.getAttribute("sourcePageName"); var content = extension.getAttribute("content"); var title = extension.getAttribute("title"); var action = extension.getAttribute("action"); var html = ""; if(sourceFile!=null || content!=null) { if(content==null) { var content = openForum.renderWikiData(sourcePage,file.getAttachment(sourcePage,sourceFile)); } html = "<div id=\""+id+"\" class=\"reveal-modal\" data-reveal aria-labelledby=\""+id+"ModalTitle\" aria-hidden=\"true\" role=\"dialog\">" + content+ " <a class=\"close-reveal-modal\" aria-label=\"Close\">&#215;</a>" + "</div>"; } if(content!=null) { } else { if(action==null) { action=""; } html = "<a class='button small round' onClick=\"$('#"+id+"').foundation('reveal', 'open');"+action+";return false;\">"+title+"</a>"; } return html;