allow to place several popup boxes on a page

This commit is contained in:
Uwe Steinmann 2017-01-18 08:10:21 +01:00
parent 3dcf867634
commit b8d4d12f4e

View File

@ -2443,10 +2443,20 @@ mayscript>
} /* }}} */
protected function printPopupBox($title, $content, $ret=false) { /* {{{ */
$id = md5(uniqid());
/*
$this->addFooterJS('
$("body").on("click", "span.openpopupbox", function(e) {
$(""+$(e.target).data("href")).toggle();
// $("div.popupbox").toggle();
});
');
*/
$html = '
<span class="openpopupbox">'.$title.'</span>
<div class="popupbox" style="display: none;">
<span class="openpopupbox" data-href="#'.$id.'">'.$title.'</span>
<div id="'.$id.'" class="popupbox" style="display: none;">
'.$content.'
<span class="closepopupbox"><i class="icon-remove"></i></span>
</div>';
if($ret)
return $html;