fix doubleclick bug on user hint popover

main
Philip Häusler 10 years ago
parent ac086614fd
commit 4aec1b1536

@ -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>';
}

Loading…
Cancel
Save