mistercrunch closed pull request #3702: Add support for IE 11 for markup slices URL: https://github.com/apache/incubator-superset/pull/3702
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/superset/assets/package.json b/superset/assets/package.json index 83c87fd9e7..634ba70532 100644 --- a/superset/assets/package.json +++ b/superset/assets/package.json @@ -49,10 +49,10 @@ "classnames": "^2.2.5", "d3": "^3.5.17", "d3-cloud": "^1.2.1", + "d3-hierarchy": "^1.1.5", "d3-sankey": "^0.4.2", "d3-svg-legend": "^1.x", "d3-tip": "^0.6.7", - "d3-hierarchy": "^1.1.5", "datamaps": "^0.5.8", "datatables.net-bs": "^1.10.15", "distributions": "^1.0.0", @@ -93,6 +93,7 @@ "redux-thunk": "^2.1.0", "shortid": "^2.2.6", "sprintf-js": "^1.1.1", + "srcdoc-polyfill": "^1.0.0", "supercluster": "https://github.com/georgeke/supercluster/tarball/ac3492737e7ce98e07af679623aad452373bbc40", "urijs": "^1.18.10", "viewport-mercator-project": "^2.1.0" diff --git a/superset/assets/visualizations/markup.js b/superset/assets/visualizations/markup.js index 27647daab0..739e4510d9 100644 --- a/superset/assets/visualizations/markup.js +++ b/superset/assets/visualizations/markup.js @@ -1,4 +1,4 @@ -const $ = require('jquery'); +const srcdoc = require('srcdoc-polyfill'); require('./markup.css'); @@ -23,9 +23,12 @@ function markupWidget(slice, payload) { <iframe id="${iframeId}" frameborder="0" height="${slice.height()}" - sandbox="allow-scripts"> - </iframe>`); - $('#' + iframeId)[0].srcdoc = html; + sandbox="allow-same-origin allow-scripts allow-top-navigation allow-popups"> + </iframe> + `); + + const iframe = document.getElementById(iframeId); + srcdoc.set(iframe, html); } module.exports = markupWidget; diff --git a/superset/data/__init__.py b/superset/data/__init__.py index 2671a3f5a4..39151062f2 100644 --- a/superset/data/__init__.py +++ b/superset/data/__init__.py @@ -688,7 +688,7 @@ def load_birth_names(): <h1>Birth Names Dashboard</h1> <p> The source dataset came from - <a href="https://github.com/hadley/babynames">[here]</a> + <a href="https://github.com/hadley/babynames" target="_blank">[here]</a> </p> <img src="/static/assets/images/babytux.jpg"> </div> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services