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) { /* {{{ */ 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 = ' $html = '
<span class="openpopupbox">'.$title.'</span> <span class="openpopupbox" data-href="#'.$id.'">'.$title.'</span>
<div class="popupbox" style="display: none;"> <div id="'.$id.'" class="popupbox" style="display: none;">
'.$content.' '.$content.'
<span class="closepopupbox"><i class="icon-remove"></i></span>
</div>'; </div>';
if($ret) if($ret)
return $html; return $html;