--- loncom/interface/lonhtmlcommon.pm 2016/06/10 22:31:27 1.372
+++ loncom/interface/lonhtmlcommon.pm 2016/10/31 12:59:03 1.375
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.372 2016/06/10 22:31:27 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.375 2016/10/31 12:59:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -538,6 +538,8 @@ sub date_setter {
if (! defined($state) || $state ne 'disabled') {
$state = '';
+ } else {
+ $state = 'disabled="disabled"';
}
if (! defined($no_hh_mm_ss)) {
$no_hh_mm_ss = 0;
@@ -1194,7 +1196,7 @@ sub Close_PrgWin {
# ------------------------------------------------------- Puts directory header
sub crumbs {
- my ($uri,$target,$prefix,$form,$skiplast)=@_;
+ my ($uri,$target,$prefix,$form,$skiplast,$onclick)=@_;
# You cannot crumbnify uploaded or adm resources
if ($uri=~/^\/*(uploaded|adm)\//) { return &mt('(Internal Course/Group Content)'); }
if ($target) {
@@ -1220,9 +1222,9 @@ sub crumbs {
&Apache::loncommon::inhibit_menu_check(\$href_path);
if ($form) {
my $href = 'javascript:'.$form.".action='".$href_path."';".$form.'.submit();';
- $output.=qq{$dir/};
+ $output.=qq{$dir/};
} else {
- $output.=qq{$dir/};
+ $output.=qq{$dir/};
}
}
} else {
@@ -3494,7 +3496,7 @@ ENDUTILITY
sub jump_to_editres {
my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath,
$title,$idx,$suppurl,$todocs) = @_;
- my $jscall;
+ my ($jscall,$anchor);
if ($switchserver) {
if ($home) {
$cfile = '/adm/switchserver?otherserver='.$home.'&role='.
@@ -3514,7 +3516,16 @@ sub jump_to_editres {
}
} else {
unless ($cfile =~ m{^/priv/}) {
+ if ($cfile =~ m{^(/adm/wrapper/ext/[^#]+)#([^#]+)$}) {
+ $cfile = $1;
+ $anchor = $2;
+ }
if ($symb) {
+ if ($anchor ne '') {
+ if ($symb =~ m{^([^#]+)\Q#$anchor\E$}) {
+ $symb = $1.&escape(&escape('#')).$anchor;
+ }
+ }
$cfile .= (($cfile=~/\?/)?'&':'?')."symb=$symb";
} elsif ($folderpath) {
$cfile .= (($cfile=~/\?/)?'&':'?').
@@ -3541,6 +3552,9 @@ sub jump_to_editres {
$cfile .= (($cfile=~/\?/)?'&':'?').'todocs=1';
}
}
+ if ($anchor ne '') {
+ $cfile .= '#'.$anchor;
+ }
$jscall = "go('".&Apache::loncommon::escape_single($cfile)."')";
}
return $jscall;