Project

General

Profile

Bug #18422 » 7820_user_taskcenter_calcHeight.diff

Administrator Admin, 2008-03-11 00:12

View differences:

typo3/sysext/taskcenter/task/class.mod_user_task.php (working copy)
* @return string code that inserts the iframe (HTML)
*/
function urlInIframe($url,$max=0) {
return '<iframe onload="resizeIframe(this,'.$max.');" scrolling="auto" width="100%" src="'.$url.'" name="list_frame" frameborder="no" style="border: none;"></iframe>';
return '<iframe onload="resizeIframe(this,'.$max.');" scrolling="auto" width="100%" src="'.$url.'" name="list_frame" id="list_frame" frameborder="no" style="border: none;"></iframe>';
}
typo3/sysext/taskcenter/task/index.php (working copy)
$this->doc->divClass = '';
$this->doc->form = '<form action="index.php" method="POST" name="editform">';
$this->backPath = $this->doc->backPath = $BACK_PATH;
$this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
$this->doc->JScode = ' <script language="javascript" type="text/javascript">
script_ended = 0;
function jumpToUrl(URL) {
......
$this->doc->JScode .= $this->doc->getDynTabMenuJScode();
$this->doc->JScode .= '<script language="javascript" type="text/javascript">
function resizeIframe(frame,max) {
try {
innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
if(max==0) {
frame.height = innerDoc.body.scrollHeight + 30;
} else {
frame.height = Math.max(innerDoc.body.scrollHeight + 30,document.body.scrollHeight);
}
}
catch (e) {
window.status = e.message;
}
var parent = $("list_frame").up("body");
var pHeight = $(parent).getHeight();
$("list_frame").setStyle({height: pHeight+"px"});
}
</script>';
(1-1/3)