From 8714f44195abe833650af287c25cd752617523f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Thu, 16 Jul 2015 14:58:17 +0200 Subject: Implemented pop-up with bootstrap's popover. --- js/prolog.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/prolog.js b/js/prolog.js index b697fca..2037524 100644 --- a/js/prolog.js +++ b/js/prolog.js @@ -58,8 +58,8 @@ 'popup': function (type, template, serverHint) { codeq.log.debug('Processing popup hint'); var mark = addMark(serverHint.start, serverHint.end), // add the mark - jqMark = jqEditor.find('.' + mark.className), - jqPopup = null, + jqMark = jqEditor.find('.' + mark.className); +/* jqPopup = null, onBlur = function () { codeq.log.debug('Removing popup'); if (jqPopup) { @@ -94,7 +94,10 @@ jqMark = null; } mark = null; - }); + });*/ + + jqMark.popover({content: template, html: true, placement: 'auto bottom', trigger: 'click'}); + hintCleaners.push(function () { if (jqMark) { jqMark.popover('destroy'); jqMark = null; } }); }, 'dropdown': function (type, template, serverHint) { codeq.log.debug('Processing dropdown hint'); -- cgit v1.2.1