Changeset f7b58af in github


Ignore:
Timestamp:
Aug 29, 2011 1:30:11 PM (21 months ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.7, release-0.8
Children:
bd38911
Parents:
d78771a
Message:

Make list of mimetypes that open in preview window configurable (#1487625)

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r13d45df rf7b58af  
    22=========================== 
    33 
     4- Make list of mimetypes that open in preview window configurable (#1487625) 
     5- Added plugin hook 'message_part_get' for attachment downloads 
    46- Localize forwarded message header (#1488058) 
    57- Added unique connection identifier to IMAP debug messages 
  • config/main.inc.php.dist

    r7a2bade rf7b58af  
    326326// 3 - one identity with possibility to edit all params but not email address 
    327327$rcmail_config['identities_level'] = 0; 
     328 
     329// Mimetypes supported by the browser. 
     330// attachments of these types will open in a preview window 
     331// either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf' 
     332$rcmail_config['client_mimetypes'] = null;  # null == default 
    328333 
    329334// mime magic database 
  • program/js/app.js

    r1a716d2 rf7b58af  
    4141 
    4242  this.identifier_expr = new RegExp('[^0-9a-z\-_]', 'gi'); 
    43  
    44   // mimetypes supported by the browser (default settings) 
    45   this.mimetypes = new Array('text/plain', 'text/html', 'text/xml', 
    46     'image/jpeg', 'image/gif', 'image/png', 
    47     'application/x-javascript', 'application/pdf', 'application/x-shockwave-flash'); 
    4843 
    4944  // default environment vars 
     
    750745 
    751746        // open attachment in frame if it's of a supported mimetype 
    752         if (this.env.uid && props.mimetype && $.inArray(props.mimetype, this.mimetypes)>=0) { 
     747        if (this.env.uid && props.mimetype && this.env.mimetypes && $.inArray(props.mimetype, this.env.mimetypes)>=0) { 
    753748          if (props.mimetype == 'text/html') 
    754749            qstring += '&_safe=1'; 
  • program/steps/mail/show.inc

    r40a1860 rf7b58af  
    5353  $OUTPUT->set_env('mailbox', $mbox_name); 
    5454 
     55  // mimetypes supported by the browser (default settings) 
     56  $mimetypes = $RCMAIL->config->get('client_mimetypes', 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/x-javascript,application/pdf,application/x-shockwave-flash'); 
     57  $OUTPUT->set_env('mimetypes', is_string($mimetypes) ? explode(',', $mimetypes) : (array)$mimetypes); 
     58 
    5559  if ($CONFIG['trash_mbox']) 
    5660    $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']); 
Note: See TracChangeset for help on using the changeset viewer.