added external lib for handling tooltips

This commit is contained in:
Alexandru Stefan committed 2021-11-10 23:12:07 +02:00
1 parent 105c5db3b1
commit 0df7c165dc
7 files changed
+42 -42

No files matched your search

@@ -187,6 +187,10 @@ function newFoundationsDocsDocumentPage() {
*/
let docsContentDiv = document.getElementById('docs-content-div')
docsContentDiv.innerHTML = HTML + UI.projects.education.spaces.docsSpace.footer.addFooter()
// Create tooltip objects for all the elements
tippy('#tooltip-container', {
theme: "superalgos"
});
hightlightEmbeddedCode()
UI.projects.education.spaces.docsSpace.mainSearchPage.detectEnterOnSearchBox()
@@ -1543,7 +1543,10 @@ function newEducationTutorialSpace() {
tutorialDiv.innerHTML = html
_self.Prism.highlightAllUnder(tutorialDiv, true)
// Create tooltip objects for all the elements
tippy('#tooltip-container', {
theme: "superalgos"
});
}
}
+1 -1
View File
@@ -523,7 +523,7 @@ function newEducationUtilitiesDocs() {
function addToolTips(text, excludedType) {
const TOOL_TIP_HTML = '<div onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-tooltip">TYPE_LABEL<span class="docs-tooltiptext">DEFINITION</span></div>'
const TOOL_TIP_HTML = '<div onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-tooltip" id="tooltip-container" data-tippy-content="DEFINITION">TYPE_LABEL</div>'
const LINK_ONLY_HTML = '<div onClick="UI.projects.education.spaces.docsSpace.navigateTo(\'PROJECT\', \'CATEGORY\', \'TYPE\')" class="docs-link">TYPE_LABEL<span class="docs-tooltiptext"></span></div>'
let resultingText = ''