diff --git a/assets/app.js b/assets/app.js index d6cce402581712b0be9001a1b24bde4821367486..dc44da08cc2031eccc3c88d613b8d0e2459fddac 100644 --- a/assets/app.js +++ b/assets/app.js @@ -10,6 +10,8 @@ const $ = require('jquery'); // the bootstrap module doesn't export/return anything require('bootstrap'); +import PubSub from 'pubsub-js' + // any CSS you import will output into a single css file (app.css in this case) // import './styles/app.css'; import './styles/app.scss'; diff --git a/legacy/create.zip b/legacy/create.zip index f4d442b6316831971a96e58f64a0bef7712069c3..352b2fc9479e5519f6e1f6a2879c5b197169fc5f 100644 Binary files a/legacy/create.zip and b/legacy/create.zip differ diff --git a/package-lock.json b/package-lock.json index fbf9b0231f187d4348588fd2d06ea1920a72514f..13861b8968bba922d255ed04d9b270eaf580ac09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,8 @@ "license": "UNLICENSED", "dependencies": { "autoprefixer": "^10.4.0", - "postcss-loader": "^6.2.0" + "postcss-loader": "^6.2.0", + "pubsub-js": "^1.9.4" }, "devDependencies": { "@babel/core": "^7.16.0", @@ -7400,6 +7401,11 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "node_modules/pubsub-js": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/pubsub-js/-/pubsub-js-1.9.4.tgz", + "integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A==" + }, "node_modules/regenerator-runtime": { "version": "0.13.9", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", @@ -18069,6 +18075,11 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "pubsub-js": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/pubsub-js/-/pubsub-js-1.9.4.tgz", + "integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A==" + }, "regenerator-runtime": { "version": "0.13.9", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", diff --git a/package.json b/package.json index aec00569fe1be8ce21b41bce677e3f050ab85210..7112c8be56dd5c2ed9741e927faa6f773e04cbf8 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ }, "dependencies": { "autoprefixer": "^10.4.0", - "postcss-loader": "^6.2.0" + "postcss-loader": "^6.2.0", + "pubsub-js": "^1.9.4" } } diff --git a/templates/layout.html.twig b/templates/layout.html.twig index 311626e2853fab8419497719f081f82aacc138b8..9e91d14ef915f8497966bf68e48e3c33fab4349e 100644 --- a/templates/layout.html.twig +++ b/templates/layout.html.twig @@ -38,5 +38,6 @@ {% block connexion %} {% endblock %} {% block body %}{% endblock %} +{% block script %}{% endblock %} </body> </html> \ No newline at end of file diff --git a/templates/project/edit.html.twig b/templates/project/edit.html.twig index 4eb523f9dedcaf75f564615b1d3074fe29dedd82..82a101839135fd026f977e33e49a9cae2d3ebad4 100644 --- a/templates/project/edit.html.twig +++ b/templates/project/edit.html.twig @@ -3,12 +3,20 @@ {% block body %} <iframe src="{{ url }}" + id="legacyContent" class="w-100 h-100 top-0 start-0 position-absolute border-0" -{# style="width:100%;height:100%;top:0;left:0;position:absolute"#} -{# frameborder="0"#} webkitallowfullscreen mozallowfullscreen allowfullscreen> </iframe> +{% endblock %} + +{% block script %} + <script> + window.onload = function (){ + const iframe = document.getElementById('legacyContent').contentWindow; + iframe.init('init', PubSub); + } + </script> {% endblock %} \ No newline at end of file