New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #24563: JS error when opening directive form more than once #5505
Fixes #24563: JS error when opening directive form more than once #5505
Conversation
downloadsUrl: apiPath, | ||
dir: "/", | ||
hasWriteRights : hasWriteRights, | ||
initRun : true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a syntax error so the app was not even functioning in the Directives page...
I removed the whole script to keep the same behavior, it looks like it does nothing at all in this page
PR updated with a new commit |
<script type="text/javascript" data-lift="with-cached-resource" src="/javascript/rudder/elm/rudder-filemanager.js"></script> | ||
<script type="text/javascript" data-lift="with-cached-resource" src="/javascript/rudder/elm/rudder-tags.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those two lines were moved up here from a nested container for each directive
<div data-lift="configuration.DirectiveManagement.userLibrary" ></div> | ||
<script> | ||
var main = document.getElementById("filters-app") | ||
var initValues = { | ||
contextPath : contextPath, | ||
objectType : "directive" | ||
}; | ||
filterApp = Elm.Filters.init({node: main, flags: initValues}); | ||
filterApp.ports.toggleTree.subscribe(function(result) { | ||
toggleTree('#activeTechniquesTree', this); | ||
}); | ||
filterApp.ports.searchTree.subscribe(function(filters) { | ||
$("#activeTechniquesTree").jstree("searchtag", filters.filter, filters.tags, {"key":false , "value":false}); | ||
}); | ||
filterApp.ports.sendFilterTags.subscribe(function(tags) { | ||
if (typeof tagsApp === "undefined") return false; | ||
tagsApp.ports.getFilterTags.send(tags); | ||
}); | ||
$(".bsTooltip").bsTooltip({container: "#boxDirectiveTree" }) | ||
</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script was within the configuration.DirectiveManagement.userLibrary
template which updates (destroys) itself after a directive is created, so we also need to move it up here
b1cde4e
to
6ae13a6
Compare
PR rebased |
PR updated with a new commit |
This PR is not mergeable to upper versions. |
OK, squash merging this PR |
4db95d9
to
52a353b
Compare
OK, merging this PR |
https://issues.rudder.io/issues/24563