webstaff: Double scrollbars are bad, this stops them where we can.
authorMike Rylander <mrylander@gmail.com>
Thu, 23 Apr 2015 21:35:09 +0000 (17:35 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 19 Aug 2015 17:39:17 +0000 (13:39 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/web/js/ui/default/staff/services/eframe.js

index fec41b7..a1f0c87 100644 (file)
@@ -35,7 +35,7 @@ angular.module('egCoreMod')
             function($scope , $window , $location , $q , $timeout , egCore) {
 
             $scope.save_space = $scope.saveSpace ? $scope.saveSpace : 300;
-            // Set the iframe height to just under the window height.
+            // Set the initial iframe height to just under the window height.
             // leave room for the navbar, padding, margins, etc.
             $scope.height = $window.outerHeight - $scope.save_space;
 
@@ -77,6 +77,9 @@ angular.module('egCoreMod')
 
                 $scope.frame = {dom:iframe};
 
+                // Reset the iframe height to the final content height.
+                $scope.height = $scope.frame.dom.contentWindow.document.body.scrollHeight;
+
                 var page = iframe.contentWindow.location.href;
                 console.debug('egEmbedFrameLoader(): ' + page);