Changeset 2523 in subversion


Ignore:
Timestamp:
May 23, 2009 10:17:07 AM (4 years ago)
Author:
alec
Message:
  • Added message menu (some image needed), removed Print and Source buttons
  • Added possibility to save message as .eml file (#1485861)
Location:
trunk/roundcubemail
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r2513 r2523  
    22=========================== 
    33 
    4 - Add 1 minute interval in autosave options (#1485854) 
     4- Added message menu, removed Print and Source buttons 
     5- Added possibility to save message as .eml file (#1485861) 
     6- Added 1 minute interval in autosave options (#1485854) 
    57- Support UTF-7 encoding in messages (#1485832) 
    68- Better support for malformed character names (#1485758) 
  • trunk/roundcubemail/program/include/rcube_template.php

    r2519 r2523  
    797797                $attrib['href'] = rcmail_url($attrib['command']); 
    798798            } 
    799             else if ($attrib['command'] == 'permaurl' && !empty($this->env['permaurl'])) { 
    800                 $attrib['href'] = $this->env['permaurl']; 
    801             } 
    802799        } 
    803800 
  • trunk/roundcubemail/program/js/app.js

    r2493 r2523  
    151151    this.enable_command('logout', 'mail', 'addressbook', 'settings', true); 
    152152     
    153     if (this.env.permaurl) 
    154       this.enable_command('permaurl', true); 
    155      
    156153    switch (this.task) 
    157154      { 
     
    189186        if (this.env.action=='show' || this.env.action=='preview') 
    190187          { 
    191           this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete', 'mark', 'viewsource', 'print', 'load-attachment', 'load-headers', true); 
     188          this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete', 
     189            'open', 'mark', 'viewsource', 'download', 'print', 'load-attachment', 'load-headers', true); 
     190 
    192191          if (this.env.next_uid) 
    193192            { 
     
    200199            this.enable_command('firstmessage', true); 
    201200            } 
     201         
     202          if (this.env.blockedobjects) 
     203            { 
     204            if (this.gui_objects.remoteobjectsmsg) 
     205              this.gui_objects.remoteobjectsmsg.style.display = 'block'; 
     206            this.enable_command('load-images', 'always-load', true); 
     207            } 
    202208          } 
    203209 
     
    210216          this.enable_command('compose', 'add-contact', false); 
    211217          parent.rcmail.show_contentframe(true); 
    212           } 
    213  
    214         if ((this.env.action=='show' || this.env.action=='preview') && this.env.blockedobjects) 
    215           { 
    216           if (this.gui_objects.remoteobjectsmsg) 
    217             this.gui_objects.remoteobjectsmsg.style.display = 'block'; 
    218           this.enable_command('load-images', 'always-load', true); 
    219218          } 
    220219 
     
    561560        break; 
    562561 
    563       case 'permaurl': 
    564         if (obj && obj.href && obj.target) 
    565           return true; 
    566         else if (this.env.permaurl) 
    567           parent.location.href = this.env.permaurl; 
    568           break; 
     562      case 'open': 
     563        var uid; 
     564        if (uid = this.get_single_uid()) 
     565          { 
     566          obj.href = '?_task='+this.env.task+'&_action=show&_mbox='+urlencode(this.env.mailbox)+'&_uid='+uid; 
     567          return true; 
     568          } 
     569        break; 
    569570 
    570571      // misc list commands 
     
    993994        if (uid = this.get_single_uid()) 
    994995          { 
    995           ref.sourcewin = window.open(this.env.comm_path+'&_action=viewsource&_uid='+this.env.uid+'&_mbox='+urlencode(this.env.mailbox)); 
     996          ref.sourcewin = window.open(this.env.comm_path+'&_action=viewsource&_uid='+uid+'&_mbox='+urlencode(this.env.mailbox)); 
    996997          if (this.sourcewin) 
    997998            window.setTimeout(function(){ ref.sourcewin.focus(); }, 20); 
    998999          } 
     1000        break; 
     1001 
     1002      case 'download': 
     1003        var uid; 
     1004        if (uid = this.get_single_uid()) 
     1005          this.goto_url('viewsource', '&_uid='+uid+'&_mbox='+urlencode(this.env.mailbox)+'&_save=1'); 
    9991006        break; 
    10001007 
     
    13581365      { 
    13591366      this.enable_command('reply', 'reply-all', 'forward', false); 
    1360       this.enable_command('show', 'print', selected); 
     1367      this.enable_command('show', 'print', 'open', 'download', 'viewsource', selected); 
    13611368      this.enable_command('delete', 'moveto', 'mark', (list.selection.length > 0 ? true : false)); 
    13621369      } 
    13631370    else 
    13641371      { 
    1365       this.enable_command('show', 'reply', 'reply-all', 'forward', 'print', selected); 
     1372      this.enable_command('show', 'reply', 'reply-all', 'forward', 'print', 'open', 'download', 'viewsource', selected); 
    13661373      this.enable_command('delete', 'moveto', 'mark', (list.selection.length > 0 ? true : false)); 
    13671374      } 
  • trunk/roundcubemail/program/localization/en_GB/labels.inc

    r2513 r2523  
    135135$labels['msgtext']  = 'Entire message'; 
    136136$labels['openinextwin'] = 'Open in new window'; 
     137$labels['emlsave'] = 'Save (.eml)'; 
    137138$labels['compose'] = 'Compose a message'; 
    138139$labels['savemessage'] = 'Save this draft'; 
  • trunk/roundcubemail/program/localization/en_US/labels.inc

    r2513 r2523  
    166166 
    167167$labels['openinextwin'] = 'Open in new window'; 
     168$labels['emlsave'] = 'Save (.eml)'; 
    168169 
    169170// message compose 
  • trunk/roundcubemail/program/localization/pl_PL/labels.inc

    r2513 r2523  
    161161$labels['msgtext']  = 'Cała wiadomość'; 
    162162$labels['openinextwin'] = 'Otwórz w nowym oknie'; 
     163$labels['emlsave'] = 'Zapisz (.eml)'; 
    163164$labels['compose'] = 'Utwórz wiadomość'; 
    164165$labels['savemessage'] = 'Zapisz kopię roboczĠ
  • trunk/roundcubemail/program/steps/mail/show.inc

    r2401 r2523  
    6666  $OUTPUT->set_env('safemode', $MESSAGE->is_safe); 
    6767  $OUTPUT->set_env('sender', $MESSAGE->sender['string']); 
    68   $OUTPUT->set_env('permaurl', rcmail_url('show', array('_uid' => $MESSAGE->uid, '_mbox' => $mbox_name))); 
    6968  $OUTPUT->set_env('mailbox', $mbox_name); 
    7069  if ($CONFIG['trash_mbox']) 
  • trunk/roundcubemail/program/steps/mail/viewsource.inc

    r2237 r2523  
    2727  $charset = $headers->charset ? $headers->charset : $IMAP->default_charset; 
    2828  header("Content-Type: text/plain; charset={$charset}"); 
     29 
     30  if (!empty($_GET['_save'])) { 
     31    $filename = ($headers->subject ? $headers->subject : 'roundcube') . '.eml'; 
     32    $browser = new rcube_browser; 
     33     
     34    if ($browser->ie && $browser->ver < 7) 
     35      $filename = rawurlencode(abbreviate_string($filename, 55)); 
     36    else if ($browser->ie) 
     37      $filename = rawurlencode($filename); 
     38    else 
     39      $filename = addcslashes($filename, '"'); 
     40       
     41    header("Content-Disposition: attachment; filename=\"$filename\""); 
     42  } 
     43   
    2944  $IMAP->print_raw_body($uid); 
    3045} 
  • trunk/roundcubemail/skins/default/mail.css

    r2446 r2523  
    4747 
    4848#markmessagemenu, 
    49 #searchmenu 
     49#searchmenu, 
     50#messagemenu 
    5051{ 
    5152  position: absolute; 
     
    99100{ 
    100101  vertical-align: middle; 
     102} 
     103 
     104ul.toolbarmenu li hr 
     105{ 
     106  width: 90%; 
     107  margin: 2px 10px; 
    101108} 
    102109 
     
    906913} 
    907914 
    908 #messageviewlink 
    909 { 
    910   position: absolute; 
    911   top: 8px; 
    912   right: 10px; 
    913   width: 15px; 
    914   height: 15px; 
    915   border: 0; 
    916 } 
    917  
    918915/** message compose styles */ 
    919916 
  • trunk/roundcubemail/skins/default/templates/mail.html

    r2446 r2523  
    2828<roundcube:include file="/includes/taskbar.html" /> 
    2929<roundcube:include file="/includes/header.html" /> 
     30<roundcube:include file="/includes/messagemenu.html" /> 
    3031 
    3132<div id="mainscreen"> 
     
    114115<roundcube:button command="checkmail" imageSel="/images/buttons/inbox_sel.png" imageAct="/images/buttons/inbox_act.png" imagePas="/images/buttons/inbox_pas.png" width="32" height="32" title="checkmail" /> 
    115116<roundcube:button command="compose" imageSel="/images/buttons/compose_sel.png" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="writenewmessage" /> 
    116 <roundcube:button name="markreadbutton" id="markreadbutton" image="/images/buttons/markread_act.png" width="32" height="32" title="markmessages" onclick="rcmail_ui.show_markmenu();return false" /> 
    117117<roundcube:button command="reply" imageSel="/images/buttons/reply_sel.png" imageAct="/images/buttons/reply_act.png" imagePas="/images/buttons/reply_pas.png" width="32" height="32" title="replytomessage" /> 
    118118<roundcube:button command="reply-all" imageSel="/images/buttons/replyall_sel.png" imageAct="/images/buttons/replyall_act.png" imagePas="/images/buttons/replyall_pas.png" width="32" height="32" title="replytoallmessage" /> 
    119119<roundcube:button command="forward" imageSel="/images/buttons/forward_sel.png" imageAct="/images/buttons/forward_act.png" imagePas="/images/buttons/forward_pas.png" width="32" height="32" title="forwardmessage" /> 
    120120<roundcube:button command="delete" imageSel="/images/buttons/delete_sel.png" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" /> 
    121 <roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" /> 
     121<roundcube:button name="markreadbutton" id="markreadbutton" image="/images/buttons/markread_act.png" width="32" height="32" title="markmessages" onclick="rcmail_ui.show_markmenu();return false" /> 
     122<roundcube:button name="messagemenulink" id="messagemenulink" image="/images/icons/extwin.png" width="32" height="32" title="messagemenu" onclick="rcmail_ui.show_messagemenu();return false" /> 
    122123<roundcube:container name="toolbar" id="messagetoolbar" /> 
    123124 
  • trunk/roundcubemail/skins/default/templates/message.html

    r2401 r2523  
    66<link rel="stylesheet" type="text/css" href="/mail.css" /> 
    77<script type="text/javascript" src="/splitter.js"></script> 
     8<script type="text/javascript" src="/functions.js"></script> 
    89<style type="text/css"> 
    910#mailboxlist-container { width: <roundcube:exp expression="!empty(cookie:mailviewsplitterv) ? cookie:mailviewsplitterv-5 : 160" />px; } 
     
    1415</style> 
    1516</head> 
    16 <body> 
     17<body onload="rcube_init_mail_ui()"> 
    1718 
    1819<roundcube:include file="/includes/taskbar.html" /> 
    1920<roundcube:include file="/includes/header.html" /> 
     21<roundcube:include file="/includes/messagemenu.html" /> 
    2022 
    2123<div id="messagecountbar"> 
     
    3436<roundcube:button command="forward" imageSel="/images/buttons/forward_sel.png" imageAct="/images/buttons/forward_act.png" imagePas="/images/buttons/forward_pas.png" width="32" height="32" title="forwardmessage" /> 
    3537<roundcube:button command="delete" imageSel="/images/buttons/delete_sel.png" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" /> 
    36 <roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" /> 
    37 <roundcube:button command="viewsource" imageSel="/images/buttons/source_sel.png" imageAct="/images/buttons/source_act.png" imagePas="/images/buttons/source_pas.png" width="32" height="32" title="viewsource" /> 
     38<roundcube:button name="messagemenulink" image="/images/icons/extwin.png" width="32" height="32" title="messagemenu" onclick="rcmail_ui.show_messagemenu();return false" id="messagemenulink" /> 
    3839<roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mboxlist" /> 
    3940<roundcube:container name="toolbar" id="messagetoolbar" /> 
  • trunk/roundcubemail/skins/default/templates/messagepreview.html

    r1767 r2523  
    99 
    1010<div class="messageheaderbox"> 
    11 <roundcube:button command="permaurl" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="messageviewlink" target="_blank" /> 
     11<roundcube:button command="messagemenu" image="/images/icons/extwin.png" width="15" height="15" title="messageactions" id="messagemenulink" /> 
    1212<roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" addicon="/images/icons/plus.gif" summary="Message headers" /> 
    1313<roundcube:object name="messageAttachments" id="attachment-list" /> 
Note: See TracChangeset for help on using the changeset viewer.