From 9ccda2c9e3e143065ab7673ebf7fe4507052b618 Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Wed, 12 Aug 2009 11:23:09 +0000 Subject: [PATCH] * add resizeIFrameOnLoad that can be used to adjust the height of iframe according to its content. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28345 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_xhtml_style/erp5.js.xml | 12 +++++++++++- .../ERP5/bootstrap/erp5_xhtml_style/bt/change_log | 5 ++++- product/ERP5/bootstrap/erp5_xhtml_style/bt/revision | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml index 8c07496919..a3a34deefe 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml @@ -228,7 +228,17 @@ function showPopik(dom_id, what, delay){\n obj.style.display=\'none\';}\n }\n \n -addLoadEvent(indexAllCheckBoxesAtBTInstallationOnLoad) +var resizeIFrameOnLoad = function() {\n + var iframe_list = window.getElementsByTagAndClassName("iframe", "auto_height");\n + for( var i=0; i<iframe_list.length; i++) {\n + var iframe = iframe_list[i];\n + var doc = iframe.contentWindow.document.documentElement;\n + var body = iframe.contentWindow.document.body;\n + iframe.style.height = doc.offsetHeight + \'px\';\n + }\n +}\n +\n +addLoadEvent(indexAllCheckBoxesAtBTInstallationOnLoad); ]]></string> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log index 82104a778a..15140a005e 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log @@ -1,3 +1,6 @@ +2009-08-12 Kazuhiko +* add resizeIFrameOnLoad that can be used to adjust the height of iframe according to its content. + 2009-08-05 Kazuhiko * escape LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) in fckeditor_wysiwyg_support otherwise FCKeditor will raise an error. @@ -303,4 +306,4 @@ 2006-06-15 Vincent * Initial commit. -* Valid XHTML1.0 Strict + CSS 2.0. \ No newline at end of file +* Valid XHTML1.0 Strict + CSS 2.0. diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index 84efa7e06a..a58cdef3e9 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -801 \ No newline at end of file +802 \ No newline at end of file -- 2.30.9