summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleš Smodiš <aless@guru.si>2015-07-16 14:58:17 +0200
committerAleš Smodiš <aless@guru.si>2015-07-16 14:58:17 +0200
commit8714f44195abe833650af287c25cd752617523f1 (patch)
tree606a72db3e734eedab931a8dd6ee9133a4c9c24f
parentdc90704bca718c2214c782f78259c1bf6cb30f46 (diff)
Implemented pop-up with bootstrap's popover.
-rw-r--r--js/prolog.js9
1 files 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');