version 1.38, 2010/03/03 21:33:20
|
version 1.40, 2011/01/03 14:19:41
|
Line 42 sub wrapper {
|
Line 42 sub wrapper {
|
{ 'force_register' =>1, 'bgcolor' => '#FFFFFF',}) ; |
{ 'force_register' =>1, 'bgcolor' => '#FFFFFF',}) ; |
my $endpage = Apache::loncommon::end_page(); |
my $endpage = Apache::loncommon::end_page(); |
|
|
# javascript will position the iframe if window was resized (or zoomed) |
my $script = Apache::lonhtmlcommon::scripttag(<<SCRIPT ); |
return <<ENDFRAME; |
|
$startpage |
|
<script type="text/javascript"> |
|
\$(document).ready( function() { |
\$(document).ready( function() { |
\$(window).unbind('resize').resize(function(){ |
\$(window).unbind('resize').resize(function(){ |
var header = \$('#LC_head_subbox')[0] ? \$('#LC_head_subbox') : \$('#LC_breadcrumbs'); |
var header = \$('.LC_head_subbox')[0] ? \$('.LC_head_subbox') |
|
: \$('#LC_breadcrumbs'); |
var pos = header.height() + header.position().top + 5; |
var pos = header.height() + header.position().top + 5; |
\$('.iframecontainer').css('top', pos); |
\$('.LC_iframecontainer').css('top', pos); |
}); |
}); |
}); |
}); |
window.onload = function(){ \$(window).trigger('resize') }; |
window.onload = function(){ \$(window).trigger('resize') }; |
</script> |
SCRIPT |
|
|
|
# javascript will position the iframe if window was resized (or zoomed) |
|
return <<ENDFRAME; |
|
$startpage |
|
$script |
<div class="LC_iframecontainer"> |
<div class="LC_iframecontainer"> |
<iframe src="$url">No iframe support!</iframe> |
<iframe src="$url">No iframe support!</iframe> |
</div> |
</div> |