version 1.84, 2023/11/18 21:45:11
|
version 1.85, 2023/11/18 21:50:06
|
Line 153 sub wrapper {
|
Line 153 sub wrapper {
|
# |
# |
|
|
unless ($clientmobile || ($exttool eq 'window') || ($exttool eq 'tab') || $uselink) { |
unless ($clientmobile || ($exttool eq 'window') || ($exttool eq 'tab') || $uselink) { |
$headjs = ' |
$headjs = &Apache::loncommon::iframe_wrapper_headjs(); |
<script type="text/javascript"> |
|
// <![CDATA[ |
|
var LCnotready = 0; |
|
var LCresizedef = 0; |
|
// ]]> |
|
</script>'."\n"; |
|
} |
} |
|
|
my $startpage = &Apache::loncommon::start_page('Menu',$headjs,$args).$countdown.$donemsg; |
my $startpage = &Apache::loncommon::start_page('Menu',$headjs,$args).$countdown.$donemsg; |
Line 302 ENDLINK
|
Line 296 ENDLINK
|
$linktext = &mt('Link to resource'); |
$linktext = &mt('Link to resource'); |
return $startpage.&create_link($url,$anchor,$title,$linktext).$endpage; |
return $startpage.&create_link($url,$anchor,$title,$linktext).$endpage; |
} else { |
} else { |
my $offset = 5; |
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); |
|
if (($env{'form.inhibitmenu'} eq 'yes') || ($env{'form.only_body'})) { |
|
$offset = 0; |
|
} |
|
my $script = &Apache::lonhtmlcommon::scripttag(<<SCRIPT); |
|
\$(document).ready( function() { |
|
\$(window).unbind('resize').resize(function(){ |
|
var header = null; |
|
var offset = $offset; |
|
var height = 0; |
|
var hdrtop = 0; |
|
if (\$('div.LC_head_subbox:first').length) { |
|
header = \$('div.LC_head_subbox:first'); |
|
offset = 9; |
|
} else { |
|
if (\$('#LC_breadcrumbs').length) { |
|
header = \$('#LC_breadcrumbs'); |
|
} |
|
} |
|
if (header != null && header.length) { |
|
height = header.height(); |
|
hdrtop = header.position().top; |
|
} |
|
var pos = height + hdrtop + offset; |
|
\$('.LC_iframecontainer').css('top', pos); |
|
}); |
|
LCresizedef = 1; |
|
if (LCnotready == 1) { |
|
LCnotready = 0; |
|
\$(window).trigger('resize'); |
|
} |
|
}); |
|
window.onload = function(){ |
|
if (LCresizedef) { |
|
LCnotready = 0; |
|
\$(window).trigger('resize'); |
|
} else { |
|
LCnotready = 1; |
|
} |
|
}; |
|
SCRIPT |
|
# javascript will position the iframe if window was resized (or zoomed) |
# javascript will position the iframe if window was resized (or zoomed) |
|
my $script = &Apache::loncommon::iframe_wrapper_resizejs(); |
my $dest = &HTML::Entities::encode($url.$anchor,'&<>"'); |
my $dest = &HTML::Entities::encode($url.$anchor,'&<>"'); |
return <<ENDFRAME; |
return <<ENDFRAME; |
$startpage |
$startpage |