Ignore:
Timestamp:
2012-07-28T08:08:38+02:00 (21 months ago)
Author:
moo
Message:

htdocs: blue skin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/cacher/cacher.php

    r1066 r1068  
    3434        if ($config['percent_graph_type'] != 'free') { 
    3535            $v = 1 - $v; 
     36        } 
     37        if ($k % 30 == 0) { 
     38            $v = 1; 
    3639        } 
    3740        $v = (int) ($v * $c); 
     
    8689    $percent = (int) ($percent * 100); 
    8790    $a = $active ? ' active' : ''; 
     91    $height = 20; 
     92    $valueHeight = ceil($height * $percent / 100); 
     93    $paddingHeight = $height - $valueHeight; 
     94    $valueHeight = $valueHeight ? $valueHeight . "px" : 0; 
     95    $paddingHeight = $paddingHeight ? $paddingHeight . "px" : 0; 
    8896    return '<div title="' . $v . '">' 
    89         . '<div class="barf' . $a . '" style="height: ' . (100 - $percent) . '%"></div>' 
    90         . '<div class="barv' . $a . '" style="background: rgb(' . "$r,$g,$b" . '); height: ' . $percent . '%"></div>' 
     97        . '<div class="barf' . $a . '" style="height: ' . $paddingHeight . '"></div>' 
     98        . '<div class="barv' . $a . '" style="background: rgb(' . "$r,$g,$b" . '); height: ' . $valueHeight . '"></div>' 
    9199        . '</div>'; 
    92100} 
Note: See TracChangeset for help on using the changeset viewer.