Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.358.2.4 and 1.358.2.5

version 1.358.2.4, 2016/08/04 21:26:35 version 1.358.2.5, 2016/08/08 00:57:36
Line 2467  sub resource_info_box { Line 2467  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 2493  sub display_usage { Line 2493  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>';

Removed from v.1.358.2.4  
changed lines
  Added in v.1.358.2.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>