Changeset ce86f0f in github


Ignore:
Timestamp:
Dec 11, 2011 1:12:33 PM (18 months ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.8
Children:
312ad9d
Parents:
98c2d69
Message:

Make string for unread count configureable by skin; add file type classes to attachments list

Location:
program
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • program/include/main.inc

    r854397b rce86f0f  
    11711171  static $a_mailboxes; 
    11721172 
    1173   $attrib += array('maxlength' => 100, 'realnames' => false); 
     1173  $attrib += array('maxlength' => 100, 'realnames' => false, 'unreadwrap' => ' (%s)'); 
    11741174 
    11751175  // add some labels to client 
     
    12181218    $RCMAIL->output->add_gui_object('mailboxlist', $attrib['id']); 
    12191219    $RCMAIL->output->set_env('mailboxes', $js_mailboxlist); 
     1220    $RCMAIL->output->set_env('unreadwrap', $attrib['unreadwrap']); 
    12201221    $RCMAIL->output->set_env('collapsed_folders', (string)$RCMAIL->config->get('collapsed_folders')); 
    12211222  } 
     
    13731374 
    13741375    $js_name = JQ($folder['id']); 
    1375     $html_name = Q($foldername) . ($unread ? html::span('unreadcount', " ($unread)") : ''); 
     1376    $html_name = Q($foldername) . ($unread ? html::span('unreadcount', sprintf($attrib['unreadwrap'], $unread)) : ''); 
    13761377    $link_attrib = $folder['virtual'] ? array() : array( 
    13771378      'href' => rcmail_url('', array('_mbox' => $folder['id'])), 
  • program/js/app.js

    r7e263ea2 rce86f0f  
    56255625 
    56265626      if (mycount && text_obj.length) 
    5627         text_obj.html(' ('+mycount+')'); 
     5627        text_obj.html(this.env.unreadwrap.replace(/%[sd]/, mycount)); 
    56285628      else if (text_obj.length) 
    56295629        text_obj.remove(); 
  • program/steps/mail/show.inc

    rb6da0b7 rce86f0f  
    131131      } 
    132132 
    133         $ol .= html::tag('li', null, 
     133        $classes = array($attach_prop->ctype_primary ? $attach_prop->ctype_primary : 'unknown'); 
     134        if ($attach_prop->ctype_secondary) 
     135          $classes[] = $attach_prop->ctype_secondary; 
     136        if (preg_match('/\.([a-z0-9]+)$/', $attach_prop->filename, $m)) 
     137          $classes[] = $m[1]; 
     138         
     139        $ol .= html::tag('li', join(' ', $classes), 
    134140          html::a(array( 
    135141            'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), 
Note: See TracChangeset for help on using the changeset viewer.