LP#1753008 Load iframeResizer via script tag
authorBill Erickson <berickxx@gmail.com>
Mon, 5 Mar 2018 16:50:19 +0000 (11:50 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 8 Mar 2018 20:46:00 +0000 (15:46 -0500)
iframeResizer does not currently play nicely with webpack.  Load it
directly via script tag for now.

This resolves a problem where the iframe fails to fill the screen when
loading the reports UI in the browser client.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/base_js.tt2
Open-ILS/web/js/ui/default/staff/webpack.config.js

index 7b3d07f..e2e88de 100644 (file)
@@ -75,6 +75,12 @@ UpUp.start({
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/moment-with-locales.min.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/moment-timezone-with-data.min.js"></script>
 
+<!--
+  Load iframeResize via script tag
+  https://bugs.launchpad.net/evergreen/+bug/1753008
+-->
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/iframeResizer.min.js"></script>
+
 <!-- evergreen core services -->
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/core.bundle.js"></script>
 
index 3aa54ed..32e97b1 100644 (file)
@@ -42,7 +42,9 @@ const IMAGE_FILES = [
 // https://github.com/webpack/webpack/issues/3128
 const JS_FILES = [
   './node_modules/moment/min/moment-with-locales.min.js',
-  './node_modules/moment-timezone/builds/moment-timezone-with-data.min.js'
+  './node_modules/moment-timezone/builds/moment-timezone-with-data.min.js',
+  './node_modules/iframe-resizer/js/iframeResizer.contentWindow.min.js',
+  './node_modules/iframe-resizer/js/iframeResizer.min.js'
 ]
 
 
@@ -99,7 +101,6 @@ const vendorJsFiles = [
   'ng-toast',
   'angular-tree-control',
   'angular-tree-control/context-menu.js',
-  'iframe-resizer',
   'angular-order-object-by',
   'lovefield',
   'angular-tablesort'