version 1.161, 2007/09/05 05:00:24
|
version 1.163, 2007/09/26 12:42:32
|
Line 1006 sub crumbs {
|
Line 1006 sub crumbs {
|
} |
} |
my $href_path = &HTML::Entities::encode($path,'<>&"'); |
my $href_path = &HTML::Entities::encode($path,'<>&"'); |
&Apache::loncommon::inhibit_menu_check(\$href_path); |
&Apache::loncommon::inhibit_menu_check(\$href_path); |
$output.=qq{<a href="$href_path" $target>$dir</a>/}; |
if ($form) { |
|
my $href = 'javascript:'.$form.".action='".$href_path."';".$form.'.submit();'; |
|
$output.=qq{<a href="$href" $target>$dir</a>/}; |
|
} else { |
|
$output.=qq{<a href="$href_path" $target>$dir</a>/}; |
|
} |
} |
} |
} else { |
} else { |
foreach my $dir (split('/',$uri)) { |
foreach my $dir (split('/',$uri)) { |
Line 1874 END
|
Line 1879 END
|
return $scripttag; |
return $scripttag; |
} |
} |
|
|
|
############################################## |
|
############################################## |
|
|
|
# javascript_window_dims |
|
# |
|
# Generates javascript to get the dimensions of the user's browser window. |
|
|
|
sub javascript_window_dims { |
|
my $scripttag .= <<'END'; |
|
function getDimensions(width,height) { |
|
width.value = getWindowWidth(); |
|
height.value = getWindowHeight(); |
|
return; |
|
} |
|
|
|
function getWindowWidth() { |
|
var width = 0; |
|
if( document.documentElement && document.documentElement.clientWidth ) { |
|
width = document.documentElement.clientWidth; |
|
} |
|
else if( document.body && document.body.clientWidth ) { |
|
width = document.body.clientWidth; |
|
} |
|
else if( window.innerWidth ) { |
|
width = window.innerWidth - 18; |
|
} |
|
return width; |
|
} |
|
|
|
function getWindowHeight() { |
|
var height = 0; |
|
if( document.documentElement && document.documentElement.clientHeight ) { |
|
height = document.documentElement.clientHeight; |
|
} |
|
else if( document.body && document.body.clientHeight ) { |
|
height = document.body.clientHeight; |
|
} |
|
else if( window.innerHeight ) { |
|
height = window.innerHeight - 18; |
|
} |
|
return height; |
|
} |
|
|
|
END |
|
return $scripttag; |
|
} |
1; |
1; |
|
|
__END__ |
__END__ |