Skip to content

Commit

Permalink
Merge branch 'bug_23819/sometimes_tooltips_in_the_directives_tree_rem…
Browse files Browse the repository at this point in the history
…ain_displayed_pr' into branches/rudder/7.3
  • Loading branch information
RaphaelGauthier committed Dec 5, 2023
2 parents 2210661 + 113979c commit 48ba7a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ function createTooltiptr() {
});
}

function removeBsTooltips(){
document.querySelectorAll(".tooltip").forEach(e => e.remove());
}

function callPopupWithTimeout(timeout, popupName){
setTimeout("createPopup('"+popupName+"')", timeout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ class DirectiveManagement extends DispatchSnippet with Loggable {
if( directiveId != null && directiveId.length > 0) {
${SHtml.ajaxCall(JsVar("directiveId"), displayDetails _)._2.toJsCmd};
}
removeBsTooltips();
""")
}

Expand Down Expand Up @@ -219,10 +220,12 @@ class DirectiveManagement extends DispatchSnippet with Loggable {
} catch(e) {
directiveId = '';
}

buildDirectiveTree('#${htmlId_activeTechniquesTree}', [ directiveId ], '${S.contextPath}', 1);
$$('#activeTechniquesTree').on('scroll',function(){$$('.tooltip').hide();});
removeBsTooltips();
createTooltip();
$$('.sidebar-body').on('scroll', function(){
removeBsTooltips();
});
""")
}

Expand Down Expand Up @@ -416,6 +419,7 @@ class DirectiveManagement extends DispatchSnippet with Loggable {
scope.$$apply(function(){
scope.init(${dataArray.toJsCmd});
} );
removeBsTooltips();
createTooltip();""")))
}

Expand Down Expand Up @@ -573,7 +577,7 @@ class DirectiveManagement extends DispatchSnippet with Loggable {
this.window.location.hash = "#" + JSON.stringify(${json})
sessionStorage.removeItem('tags-${directiveId.uid.value}');
""".stripMargin) &
After(TimeSpan(0), JsRaw("""createTooltip();""")) // OnLoad or JsRaw createTooltip does not work ...
After(TimeSpan(0), JsRaw("""removeBsTooltips();createTooltip();""")) // OnLoad or JsRaw createTooltip does not work ...
}

private[this] case class MissingTechniqueException(directive: Directive) extends Exception(
Expand Down

0 comments on commit 48ba7a3

Please sign in to comment.