Merge branch 'seeddms-4.3.x' into seeddms-5.0.x

This commit is contained in:
Uwe Steinmann 2017-01-18 08:10:59 +01:00
commit c943c2d81b
3 changed files with 25 additions and 8 deletions

View File

@ -193,7 +193,13 @@ div.popupbox {
padding: 15px;
display: none;
position: absolute;
width: 200px;
width: 250px;
}
div.popupbox span.closepopupbox {
position: absolute;
right: 5px;
top: 0px;
}
@media (max-width: 480px) {

View File

@ -989,9 +989,10 @@ $(document).ready(function() { /* {{{ */
});
});
$('span.openpopupbox').on('click', function(e) {
$('div.popupbox').toggle();
console.log('Hallo');
$("body").on("click", "span.openpopupbox", function(e) {
$(""+$(e.target).data("href")).toggle();
});
$("body").on("click", "span.closepopupbox", function(e) {
$(this).parent().hide();
});
}); /* }}} */

View File

@ -2554,10 +2554,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;">
'.$content.'
<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;