fix doubleclick bug on user hint popover

This commit is contained in:
Philip Häusler 2015-07-12 20:06:34 +02:00
parent ac086614fd
commit 4aec1b1536
1 changed files with 11 additions and 2 deletions

View File

@ -85,9 +85,18 @@ function toolbar_dropdown($glyphicon, $label, $submenu, $class = '') {
function toolbar_popover($glyphicon, $label, $content, $class = '') {
$id = md5(microtime() . $glyphicon . $label);
return '<li class="dropdown messages ' . $class . '">
<a id="' . $id . '" href="#" tabindex="0">' . ($glyphicon != '' ? '<span class="glyphicon glyphicon-' . $glyphicon . '"></span> ' : '') . $label . ' <span class="caret"></span></a>
<a id="' . $id . '" href="#">' . ($glyphicon != '' ? '<span class="glyphicon glyphicon-' . $glyphicon . '"></span> ' : '')
. $label . ' <span class="caret"></span></a>
<script type="text/javascript">
$(document).ready(function(){$("#' . $id . '").popover({trigger: "click focus", html: true, content: "' . addslashes(join('', $content)) . '", placement: "bottom", container: "#navbar-collapse-1"})});
$(function(){
$("#' . $id . '").popover({
trigger: "focus",
html: true,
content: "' . addslashes(join('', $content)) . '",
placement: "bottom",
container: "#navbar-collapse-1"
})
});
</script></li>';
}