Changeset 46cdbf0 in github


Ignore:
Timestamp:
Nov 10, 2011 6:16:32 AM (19 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.8
Children:
55a8a8c
Parents:
d617566
Message:
  • Fix inconsistent behaviour of Compose button in Drafts folder, add Edit button for drafts
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rd617566 r46cdbf0  
    22=========================== 
    33 
     4- Fix inconsistent behaviour of Compose button in Drafts folder, add Edit button for drafts 
    45- Fix problem with parsing HTML message body with non-unicode characters (#1487813) 
    56- Add option to define matching method for addressbook search (#1486564, #1487907) 
  • program/include/rcube_imap.php

    raa07b22 r46cdbf0  
    479479    function get_mailbox_name() 
    480480    { 
    481         return $this->conn->connected() ? $this->mailbox : ''; 
     481        return $this->mailbox; 
    482482    } 
    483483 
  • program/js/app.js

    r62c8618 r46cdbf0  
    208208          'print', 'load-attachment', 'load-headers', 'forward-attachment']; 
    209209 
    210         if (this.env.action=='show' || this.env.action=='preview') { 
     210        if (this.env.action == 'show' || this.env.action == 'preview') { 
    211211          this.enable_command(this.env.message_commands, this.env.uid); 
    212212          this.enable_command('reply-list', this.env.list_post); 
     
    461461 
    462462    // check input before leaving compose step 
    463     if (this.task=='mail' && this.env.action=='compose' && $.inArray(command, this.env.compose_commands)<0) { 
     463    if (this.task == 'mail' && this.env.action == 'compose' && $.inArray(command, this.env.compose_commands)<0) { 
    464464      if (this.cmp_hash != this.compose_field_hash() && !confirm(this.get_label('notsentwarning'))) 
    465465        return false; 
     
    816816        if (this.task == 'mail') { 
    817817          url += '&_mbox='+urlencode(this.env.mailbox); 
    818  
    819           if (this.env.mailbox == this.env.drafts_mailbox) { 
    820             var uid; 
    821             if (uid = this.get_single_uid()) 
    822               url += '&_draft_uid='+uid; 
    823           } 
    824           else if (props) 
     818          if (props) 
    825819             url += '&_to='+urlencode(props); 
    826820        } 
  • program/localization/en_US/labels.inc

    r1cc9e21 r46cdbf0  
    226226$labels['showimages'] = 'Display images'; 
    227227$labels['alwaysshow'] = 'Always show images from $sender'; 
     228$labels['isdraft']    = 'This is a draft message.'; 
    228229 
    229230$labels['htmltoggle'] = 'HTML'; 
  • program/localization/pl_PL/labels.inc

    r32226f73 r46cdbf0  
    486486$labels['dateformat'] = 'Format daty'; 
    487487$labels['timeformat'] = 'Format czasu'; 
     488$labels['isdraft'] = 'To jest kopia robocza wiadomości.'; 
    488489 
    489490?> 
  • program/steps/mail/show.inc

    r9e54e6f r46cdbf0  
    151151} 
    152152 
    153 function rcmail_remote_objects_msg($attrib) 
     153function rcmail_remote_objects_msg() 
    154154{ 
    155155  global $MESSAGE, $RCMAIL; 
    156156 
    157   if (!$attrib['id']) 
    158     $attrib['id'] = 'rcmremoteobjmsg'; 
     157  $attrib['id']    = 'remote-objects-message'; 
     158  $attrib['class'] = 'notice'; 
     159  $attrib['style'] = 'display: none'; 
    159160 
    160161  $msg = Q(rcube_label('blockedimages')) . '&nbsp;'; 
     
    169170  $RCMAIL->output->add_gui_object('remoteobjectsmsg', $attrib['id']); 
    170171  return html::div($attrib, $msg); 
     172} 
     173 
     174function rcmail_message_buttons() 
     175{ 
     176  global $MESSAGE, $RCMAIL, $CONFIG; 
     177 
     178  $mbox  = $RCMAIL->imap->get_mailbox_name(); 
     179  $delim = $RCMAIL->imap->get_hierarchy_delimiter(); 
     180  $dbox  = $CONFIG['drafts_mbox']; 
     181 
     182  // the message is not a draft 
     183  if ($mbox != $dbox && strpos($mbox, $dbox.$delim) !== 0) { 
     184    return ''; 
     185  } 
     186 
     187  $attrib['id']    = 'message-buttons'; 
     188  $attrib['class'] = 'notice'; 
     189 
     190  $msg = Q(rcube_label('isdraft')) . '&nbsp;'; 
     191  $msg .= html::a(array('href' => "#edit", 'onclick' => JS_OBJECT_NAME.".command('edit')"), Q(rcube_label('edit'))); 
     192 
     193  return html::div($attrib, $msg); 
     194} 
     195 
     196function rcmail_message_objects($attrib) 
     197{ 
     198  global $RCMAIL, $MESSAGE; 
     199 
     200  if (!$attrib['id']) 
     201    $attrib['id'] = 'message-objects'; 
     202 
     203  $content = array( 
     204    rcmail_message_buttons(), 
     205    rcmail_remote_objects_msg(), 
     206  ); 
     207 
     208  $plugin = $RCMAIL->plugins->exec_hook('message_objects', 
     209    array('content' => $content, 'message' => $MESSAGE)); 
     210 
     211  $content = implode("\n", $plugin['content']); 
     212 
     213  return html::div($attrib, $content); 
    171214} 
    172215 
     
    190233  'messageattachments' => 'rcmail_message_attachments', 
    191234  'mailboxname' => 'rcmail_mailbox_name_display', 
    192   'blockedobjects' => 'rcmail_remote_objects_msg')); 
     235  'messageobjects' => 'rcmail_message_objects', 
     236)); 
    193237 
    194238 
  • skins/default/common.css

    r58487bb r46cdbf0  
    231231 
    232232#message div.notice, 
    233 #remote-objects-message 
     233#message-objects div.notice 
    234234{ 
    235235  background: url(images/display/icons.png) 6px 3px no-repeat; 
     
    239239 
    240240#message div.error, 
    241 #message div.warning 
     241#message div.warning, 
     242#message-objects div.warning, 
     243#message-objects div.error 
    242244{ 
    243245  background: url(images/display/icons.png) 6px -97px no-repeat; 
     
    246248} 
    247249 
    248 #message div.confirmation 
     250#message div.confirmation, 
     251#message-objects div.confirmation 
    249252{ 
    250253  background: url(images/display/icons.png) 6px -47px no-repeat; 
     
    253256} 
    254257 
    255 #message div.loading 
     258#message div.loading, 
     259#message-objects div.loading 
    256260{ 
    257261  background: url(images/display/loading.gif) 6px 3px no-repeat; 
  • skins/default/ie6hacks.css

    r7a2bade r46cdbf0  
    2121#message div.warning, 
    2222#message div.confirmation, 
    23 #remote-objects-message 
     23#message-objects div.notice, 
     24#message-objects div.error, 
     25#message-objects div.warning, 
     26#message-objects div.confirmation 
    2427{ 
    2528  background-image: url(images/display/icons.gif); 
  • skins/default/mail.css

    r57863c1 r46cdbf0  
    11981198} 
    11991199 
    1200 #remote-objects-message 
    1201 { 
    1202   display: none; 
     1200#message-objects div 
     1201{ 
    12031202  margin: 8px; 
    12041203  min-height: 20px; 
     
    12061205} 
    12071206 
    1208 #remote-objects-message a 
     1207#message-objects div a 
    12091208{ 
    12101209  color: #666666; 
     
    12121211} 
    12131212 
    1214 #remote-objects-message a:hover 
     1213#message-objects div a:hover 
    12151214{ 
    12161215  color: #333333; 
  • skins/default/templates/message.html

    r8e99ffb r46cdbf0  
    3737<roundcube:object name="messageFullHeaders" id="full-headers" /> 
    3838<roundcube:object name="messageAttachments" id="attachment-list" /> 
    39  
    40 <roundcube:object name="blockedObjects" id="remote-objects-message" /> 
     39<roundcube:object name="messageObjects" id="message-objects" /> 
    4140<roundcube:object name="messageBody" id="messagebody" /> 
    4241</div> 
  • skins/default/templates/messagepreview.html

    rc6be456 r46cdbf0  
    1414</div> 
    1515 
    16 <roundcube:object name="blockedObjects" id="remote-objects-message" /> 
     16<roundcube:object name="messageObjects" id="message-objects" /> 
    1717<roundcube:object name="messageBody" id="messagebody" /> 
    1818 
Note: See TracChangeset for help on using the changeset viewer.