Bug 12123: Make iframe large enough to remove scroll bars
authorKyle M Hall <kyle@bywatetsolutions.com>
Fri, 13 Apr 2018 13:57:38 +0000 (09:57 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 19 Apr 2018 15:32:14 +0000 (12:32 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt

index f43691c..81e940f 100644 (file)
                 var rowid = $(this).data("noticeid");
                 $("#notice"+rowid).toggle();
                 $("#resend_notice"+rowid).toggle();
+                var iframe = $("#notice"+rowid).children('iframe');
+                // Adding some padding to the height and width to remove scrollbars
+                var height = iframe.get(0).contentWindow.document.body.scrollHeight + 25;
+                var width = iframe.get(0).contentWindow.document.body.scrollWidth + 25;
+                iframe.css({
+                    'width':  width + 'px',
+                    'height': height + 'px'
+                });
             });
         });
     </script>