From ea983250dc14583b7594aa7af4d942ddc3f38ad6 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 13 Apr 2018 09:57:38 -0400 Subject: [PATCH] Bug 12123: Make iframe large enough to remove scroll bars Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/modules/members/notices.tt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt index f43691c614..81e940fb93 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -105,6 +105,14 @@ 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' + }); }); }); -- 2.39.5