-
Notifications
You must be signed in to change notification settings - Fork 0
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
Evaluate iframe Integration #18
Labels
BB: UI Integration Platform
UI Integration Platform Building Block
enhancement
New feature or request
Milestone
Comments
To be investigated:
|
See also clarity-h2020/csis-theme#2 (comment) for problems related to embedding seamless.js into the drupal theme. |
Closed
Integrate iFrame with: <script type="text/javascript">
window.onload = function() {
window.seamless(document.getElementById('mcda'));
};
</script>
<iframe id="mcda" src="/apps/scenario-analysis/target/dist/index.html"></iframe> See also clarity-h2020/scenario-analysis#2 |
If JS Dependecies are available, the following code can be used: <script type="text/javascript">
if (typeof $ == 'undefined') {
var $ = jQuery;
}
if (typeof $ == 'undefined') {
var $ = window.jQuery;
}
window.Drupal.behaviors.myBehavior = {
attach: function (context, settings) {
// Using once() to apply the mcdaIFrameBehavior effect when you want to run just one function.
$(window, context).once('mcdaIFrameBehavior').each(function () {
var mcdaApp = window.seamless(document.getElementById('mcda'));
var currentNodeId = window.location.pathname.split("/").pop()
mcdaApp .send({
nodeId: currentNodeId
});
});
}
};
</script>
<iframe id="mcda" src="/apps/scenario-analysis/app/index.html"></iframe> |
Full Example: nodeConnector.js. |
p-a-s-c-a-l
added
the
BB: UI Integration Platform
UI Integration Platform Building Block
label
Jan 15, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
BB: UI Integration Platform
UI Integration Platform Building Block
enhancement
New feature or request
As alternative to #11 check if iframe integration would work better.
The text was updated successfully, but these errors were encountered: