From 58eda2f1529e4d1e9b3bcdd5ccc3e949cc87e90d Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Mon, 23 Dec 2024 17:11:35 +0100 Subject: [PATCH] Upgraded iframe-resizer package --- package.json | 3 ++- public/css/grocy.css | 1 + public/js/grocy.js | 2 +- views/layout/default.blade.php | 4 ++-- yarn.lock | 22 +++++++++++++++++----- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index e5c3d3ff..f0ce7b27 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,8 @@ "@ericblade/quagga2": "^1.2.1", "@fontsource/open-sans": "^5.0.0", "@fortawesome/fontawesome-free": "^6.1.1", + "@iframe-resizer/child": "^5.3.2", + "@iframe-resizer/parent": "^5.3.2", "animate.css": "^3.7.2", "bootbox": "^6.0.0", "bootstrap": "^4.5.2", @@ -27,7 +29,6 @@ "daterangepicker": "^3.1.0", "fullcalendar": "^3.10.1", "gettext-translator": "3.0.1", - "iframe-resizer": "^4.3.9", "jquery": "^3.6.0", "jquery-serializejson": "^2.9.0", "moment": "^2.27.0", diff --git a/public/css/grocy.css b/public/css/grocy.css index 604f7acd..3faf032a 100755 --- a/public/css/grocy.css +++ b/public/css/grocy.css @@ -111,6 +111,7 @@ iframe.embed-responsive { border: 0; width: 1px; min-width: 100%; + min-height: 700px; } /* Hide the default up/down arrow buttons for number inputs because we use our own buttons in numberpicker */ diff --git a/public/js/grocy.js b/public/js/grocy.js index fa3b4e00..3e75bf1e 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -562,7 +562,7 @@ $(window).on('resize', function() if (GetUriParam("embedded")) { - window.parent.iFrameResize({ "checkOrigin": false, "warningTimeout": 0, "minHeight": 700 }, "iframe.embed-responsive"); + window.parent.iframeResize({ "checkOrigin": false, "warningTimeout": 0, "license": "GPLv3" }, "iframe.embed-responsive"); } function WindowMessageBag(message, payload = null) diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php index 68503b3d..e23ba6e8 100644 --- a/views/layout/default.blade.php +++ b/views/layout/default.blade.php @@ -746,9 +746,9 @@ @endif @if($embedded) - + @endif - + diff --git a/yarn.lock b/yarn.lock index 0c4ff5b1..40866dbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38,6 +38,23 @@ resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz#8249de9b7e22fcb3ceb5e66090c30a1d5492b81a" integrity sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA== +"@iframe-resizer/child@^5.3.2": + version "5.3.2" + resolved "https://registry.yarnpkg.com/@iframe-resizer/child/-/child-5.3.2.tgz#a7035d277cd9dab69f5e4a04db5b4a765c2f1f18" + integrity sha512-y4uX26NzdAU1XRURiFCQCNTuLI04WTGUFQNcG4hfNZGvWO/BnfQ3fiVokQwZjnaQH7mzbGE2SLJqYUb1JIqF1Q== + +"@iframe-resizer/core@5.3.2": + version "5.3.2" + resolved "https://registry.yarnpkg.com/@iframe-resizer/core/-/core-5.3.2.tgz#0c7f10341bcf18236756b291a16588ffe7fcb2da" + integrity sha512-is6VXW1m/9y7ZUwyjUuHu5101TPFa69Rv8jNY0HrT5svwb1ICPZKeaoVzDw0TTBBa5eE7XfEFcXCeiP6UR9W3w== + +"@iframe-resizer/parent@^5.3.2": + version "5.3.2" + resolved "https://registry.yarnpkg.com/@iframe-resizer/parent/-/parent-5.3.2.tgz#5edb16cce4484f5ec0627a8bda82d104c7bd4463" + integrity sha512-xjrQpRtsC9p1pBUKewYI9cmHoxomhGGSvspLq7Xgh4uYiifORaHqrqOnAgWKsV6Gl83s16g3RE1v1hRM7ZNOMQ== + dependencies: + "@iframe-resizer/core" "5.3.2" + "@scarf/scarf@=1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@scarf/scarf/-/scarf-1.4.0.tgz#3bbb984085dbd6d982494538b523be1ce6562972" @@ -435,11 +452,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -iframe-resizer@^4.3.9: - version "4.4.5" - resolved "https://registry.yarnpkg.com/iframe-resizer/-/iframe-resizer-4.4.5.tgz#f5048636e7f2fb5d9a09cc2ae78eb2da55ad555c" - integrity sha512-U8bCywf/Gh07O69RXo6dXAzTtODQrxaHGHRI7Nt4ipXsuq6EMxVsOP/jjaP43YtXz/ibESS0uSVDN3sOGCzSmw== - iota-array@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/iota-array/-/iota-array-1.0.0.tgz#81ef57fe5d05814cd58c2483632a99c30a0e8087"