Changeset 1776 in subversion


Ignore:
Timestamp:
Sep 12, 2008 12:48:23 PM (5 years ago)
Author:
alec
Message:
  • Fixed quota img height/width setting from template (#1484857)
Location:
trunk/roundcubemail
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r1767 r1776  
    77- Added possibility to view all headers in message view 
    88- Fixed splitter drag/resize on Opera (#1485170) 
     9- Fixed quota img height/width setting from template (#1484857) 
    910 
    10112008/09/12 (thomasb) 
  • trunk/roundcubemail/bin/quotaimg.php

    r1124 r1776  
    160160 
    161161                $quota_width = $quota / 100 * $width; 
    162                 imagefilledrectangle($im, $border, 0, $quota, $height-2*$border, $fill); 
     162                imagefilledrectangle($im, $border, 0, $quota_width, $height-2*$border, $fill); 
    163163 
    164164                $string = $quota . '%'; 
  • trunk/roundcubemail/program/steps/mail/func.inc

    r1773 r1776  
    447447 
    448448  $out = '<span' . $attrib_str . '>'; 
    449   $out .= rcmail_quota_content(); 
     449  $out .= rcmail_quota_content(NULL, $attrib); 
    450450  $out .= '</span>'; 
    451451  return $out; 
     
    456456 * 
    457457 */ 
    458 function rcmail_quota_content($quota=NULL) 
     458function rcmail_quota_content($quota=NULL, $attrib=NULL) 
    459459  { 
    460460  global $IMAP, $COMM_PATH, $RCMAIL; 
     
    482482    if ($display == 'image' && function_exists('imagegif')) 
    483483      { 
    484       $attrib = array('width' => 100, 'height' => 14); 
     484      if (!$attrib['width']) 
     485        $attrib['width'] = isset($_SESSION['quota_width']) ? $_SESSION['quota_width'] : 100; 
     486      else 
     487        $_SESSION['quota_width'] = $attrib['width']; 
     488 
     489      if (!$attrib['height']) 
     490        $attrib['height'] = isset($_SESSION['quota_height']) ? $_SESSION['quota_height'] : 14; 
     491      else 
     492        $_SESSION['quota_height'] = $attrib['height']; 
     493             
    485494      $quota_text = sprintf('<img src="./bin/quotaimg.php?u=%s&amp;q=%d&amp;w=%d&amp;h=%d" width="%d" height="%d" alt="%s" title="%s / %s" />', 
    486495                            $quota['used'], $quota['total'], 
     
    488497                            $attrib['width'], $attrib['height'], 
    489498                            $quota_text, 
    490                             show_bytes($quota["used"] * 1024), 
    491                             show_bytes($quota["total"] * 1024)); 
     499                            show_bytes($quota['used'] * 1024), 
     500                            show_bytes($quota['total'] * 1024)); 
    492501      } 
    493502    } 
  • trunk/roundcubemail/skins/default/templates/mail.html

    r1766 r1776  
    110110<roundcube:button command="select-none" label="none" classAct="active" /> &nbsp;&nbsp;&nbsp; 
    111111<roundcube:if condition="env:quota" /> 
    112 <roundcube:label name="quota" />: <roundcube:object name="quotaDisplay" display="image" width="120" id="quotadisplay" /> 
     112<roundcube:label name="quota" />: <roundcube:object name="quotaDisplay" display="image" width="100" id="quotadisplay" /> 
    113113<roundcube:endif /> 
    114114</div> 
Note: See TracChangeset for help on using the changeset viewer.