version 1.371, 2016/04/02 04:30:20
|
version 1.375, 2016/10/31 12:59:03
|
Line 538 sub date_setter {
|
Line 538 sub date_setter {
|
|
|
if (! defined($state) || $state ne 'disabled') { |
if (! defined($state) || $state ne 'disabled') { |
$state = ''; |
$state = ''; |
|
} else { |
|
$state = 'disabled="disabled"'; |
} |
} |
if (! defined($no_hh_mm_ss)) { |
if (! defined($no_hh_mm_ss)) { |
$no_hh_mm_ss = 0; |
$no_hh_mm_ss = 0; |
Line 1194 sub Close_PrgWin {
|
Line 1196 sub Close_PrgWin {
|
# ------------------------------------------------------- Puts directory header |
# ------------------------------------------------------- Puts directory header |
|
|
sub crumbs { |
sub crumbs { |
my ($uri,$target,$prefix,$form,$skiplast)=@_; |
my ($uri,$target,$prefix,$form,$skiplast,$onclick)=@_; |
# You cannot crumbnify uploaded or adm resources |
# You cannot crumbnify uploaded or adm resources |
if ($uri=~/^\/*(uploaded|adm)\//) { return &mt('(Internal Course/Group Content)'); } |
if ($uri=~/^\/*(uploaded|adm)\//) { return &mt('(Internal Course/Group Content)'); } |
if ($target) { |
if ($target) { |
Line 1220 sub crumbs {
|
Line 1222 sub crumbs {
|
&Apache::loncommon::inhibit_menu_check(\$href_path); |
&Apache::loncommon::inhibit_menu_check(\$href_path); |
if ($form) { |
if ($form) { |
my $href = 'javascript:'.$form.".action='".$href_path."';".$form.'.submit();'; |
my $href = 'javascript:'.$form.".action='".$href_path."';".$form.'.submit();'; |
$output.=qq{<a href="$href"$target>$dir</a>/}; |
$output.=qq{<a href="$href"$onclick$target>$dir</a>/}; |
} else { |
} else { |
$output.=qq{<a href="$href_path"$target>$dir</a>/}; |
$output.=qq{<a href="$href_path"$onclick$target>$dir</a>/}; |
} |
} |
} |
} |
} else { |
} else { |
Line 2673 sub resource_info_box {
|
Line 2675 sub resource_info_box {
|
# |
# |
|
|
sub display_usage { |
sub display_usage { |
my ($current_disk_usage,$disk_quota) = @_; |
my ($current_disk_usage,$disk_quota,$context) = @_; |
my $usage = $current_disk_usage/1000; |
my $usage = $current_disk_usage/1024; |
my $quota = $disk_quota/1000; |
my $quota = $disk_quota/1024; |
my $percent; |
my $percent; |
if ($disk_quota == 0) { |
if ($disk_quota == 0) { |
$percent = 100.0; |
$percent = 100.0; |
Line 2699 sub display_usage {
|
Line 2701 sub display_usage {
|
if ($prog_width > 100) { |
if ($prog_width > 100) { |
$prog_width = 100; |
$prog_width = 100; |
} |
} |
|
my $display = 'block'; |
|
if ($context eq 'authoring') { |
|
$display = 'inline'; |
|
} |
return ' |
return ' |
<div id="meter1" align="left" '.$cssclass.'>'.&mt('Currently using [_1] of the [_2] available.',$usage.' MB <span style="font-weight:bold;">('.$percent.'%)</span>',$quota.' MB')."\n". |
<div id="meter1" align="left" style="display:'.$display.'" '.$cssclass.'>'.&mt('Currently using [_1] of the [_2] available.',$usage.' MB <span style="font-weight:bold;">('.$percent.'%)</span>',$quota.' MB')."\n". |
' <div id="meter2" style="display:block; margin-top:5px; margin-bottom:5px; margin-left:0px; margin-right:0px; width:400px; border:1px solid #000000; height:10px;">'."\n". |
' <div id="meter2" style="display:block; margin-top:3px; margin-bottom:3px; margin-left:0px; margin-right:0px; width:400px; border:1px solid #000000; height:10px;">'."\n". |
' <div id="meter3" style="display:block; background-color:'.$color.'; width:'.$prog_width.'%; height:10px; color:#000000; margin:0px;"></div>'."\n". |
' <div id="meter3" style="display:block; background-color:'.$color.'; width:'.$prog_width.'%; height:10px; color:#000000; margin:0px;"></div>'."\n". |
' </div>'."\n". |
' </div>'."\n". |
' </div>'; |
' </div>'; |
Line 3490 ENDUTILITY
|
Line 3496 ENDUTILITY
|
sub jump_to_editres { |
sub jump_to_editres { |
my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath, |
my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath, |
$title,$idx,$suppurl,$todocs) = @_; |
$title,$idx,$suppurl,$todocs) = @_; |
my $jscall; |
my ($jscall,$anchor); |
if ($switchserver) { |
if ($switchserver) { |
if ($home) { |
if ($home) { |
$cfile = '/adm/switchserver?otherserver='.$home.'&role='. |
$cfile = '/adm/switchserver?otherserver='.$home.'&role='. |
Line 3510 sub jump_to_editres {
|
Line 3516 sub jump_to_editres {
|
} |
} |
} else { |
} else { |
unless ($cfile =~ m{^/priv/}) { |
unless ($cfile =~ m{^/priv/}) { |
|
if ($cfile =~ m{^(/adm/wrapper/ext/[^#]+)#([^#]+)$}) { |
|
$cfile = $1; |
|
$anchor = $2; |
|
} |
if ($symb) { |
if ($symb) { |
|
if ($anchor ne '') { |
|
if ($symb =~ m{^([^#]+)\Q#$anchor\E$}) { |
|
$symb = $1.&escape(&escape('#')).$anchor; |
|
} |
|
} |
$cfile .= (($cfile=~/\?/)?'&':'?')."symb=$symb"; |
$cfile .= (($cfile=~/\?/)?'&':'?')."symb=$symb"; |
} elsif ($folderpath) { |
} elsif ($folderpath) { |
$cfile .= (($cfile=~/\?/)?'&':'?'). |
$cfile .= (($cfile=~/\?/)?'&':'?'). |
Line 3537 sub jump_to_editres {
|
Line 3552 sub jump_to_editres {
|
$cfile .= (($cfile=~/\?/)?'&':'?').'todocs=1'; |
$cfile .= (($cfile=~/\?/)?'&':'?').'todocs=1'; |
} |
} |
} |
} |
|
if ($anchor ne '') { |
|
$cfile .= '#'.$anchor; |
|
} |
$jscall = "go('".&Apache::loncommon::escape_single($cfile)."')"; |
$jscall = "go('".&Apache::loncommon::escape_single($cfile)."')"; |
} |
} |
return $jscall; |
return $jscall; |