Changeset 1767 in subversion


Ignore:
Timestamp:
Sep 12, 2008 8:27:46 AM (5 years ago)
Author:
thomasb
Message:

Add link to open message in new window + tweaked some header styles

Location:
trunk/roundcubemail
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r1766 r1767  
    1212- Refactor drag & drop functionality. Don't rely on browser events anymore (#1484453) 
    1313- Insert "virtual" folders in subscription list (#1484779) 
     14- Added link to open message in new window 
    1415 
    15162008/09/05 (thomasb) 
  • trunk/roundcubemail/program/include/rcube_template.php

    r1766 r1767  
    753753            // make valid href to specific buttons 
    754754            if (in_array($attrib['command'], rcmail::$main_tasks)) { 
    755                 $attrib['href'] = Q(rcmail_url(null, null, $attrib['command'])); 
     755                $attrib['href'] = rcmail_url(null, null, $attrib['command']); 
    756756            } 
    757757            else if (in_array($attrib['command'], $a_static_commands)) { 
    758                 $attrib['href'] = Q(rcmail_url($attrib['command'])); 
     758                $attrib['href'] = rcmail_url($attrib['command']); 
     759            } 
     760            else if ($attrib['command'] == 'permaurl' && !empty($this->env['permaurl'])) { 
     761                $attrib['href'] = $this->env['permaurl']; 
    759762            } 
    760763        } 
     
    818821                $btn_content .= ' '.$attrib['label']; 
    819822            } 
    820             $link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'title'); 
     823            $link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'title', 'target'); 
    821824        } 
    822825        else if ($attrib['type']=='link') { 
    823826            $btn_content = $attrib['label'] ? $attrib['label'] : $attrib['command']; 
    824             $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style', 'tabindex'); 
     827            $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style', 'tabindex', 'target'); 
    825828        } 
    826829        else if ($attrib['type']=='input') { 
  • trunk/roundcubemail/program/js/app.js

    r1766 r1767  
    122122    // enable general commands 
    123123    this.enable_command('logout', 'mail', 'addressbook', 'settings', true); 
     124     
     125    if (this.env.permaurl) 
     126      this.enable_command('permaurl', true); 
    124127     
    125128    switch (this.task) 
     
    530533        break; 
    531534 
     535      case 'permaurl': 
     536        if (obj && obj.href && obj.target) 
     537          return true; 
     538        else if (this.env.permaurl) 
     539          parent.location.href = this.env.permaurl; 
     540          break; 
    532541 
    533542      // misc list commands 
  • trunk/roundcubemail/program/localization/de_CH/labels.inc

    r1741 r1767  
    131131$labels['quicksearch'] = 'Schnellsuche'; 
    132132$labels['resetsearch'] = 'Löschen'; 
     133$labels['openinextwin'] = 'In neuem Fenster öffnen'; 
    133134$labels['compose'] = 'Neue Nachricht verfassen'; 
    134135$labels['savemessage'] = 'Nachricht speichern'; 
  • trunk/roundcubemail/program/localization/de_DE/labels.inc

    r1761 r1767  
    130130$labels['quicksearch'] = 'Schnellsuche'; 
    131131$labels['resetsearch'] = 'Suche zurÃŒcksetzen'; 
     132$labels['openinextwin'] = 'In neuem Fenster öffnen'; 
    132133$labels['compose'] = 'Neue Nachricht verfassen'; 
    133134$labels['savemessage'] = 'Nachricht speichern'; 
  • trunk/roundcubemail/program/localization/en_US/labels.inc

    r1766 r1767  
    161161$labels['resetsearch']  = 'Reset search'; 
    162162 
     163$labels['openinextwin'] = 'Open in new window'; 
    163164 
    164165// message compose 
  • trunk/roundcubemail/program/steps/mail/show.inc

    r1745 r1767  
    8181  $OUTPUT->set_env('safemode', $MESSAGE->is_safe); 
    8282  $OUTPUT->set_env('sender', $MESSAGE->sender['string']); 
     83  $OUTPUT->set_env('permaurl', rcmail_url('show', array('_uid' => $MESSAGE->uid, '_mbox' => $mbox_name))); 
    8384   
    8485  // check for unset disposition notification 
     
    153154      } 
    154155      else { 
    155         if (rc_strlen($attach_prop->filename) > 50) { 
    156           $filename = rc_substr($attach_prop->filename, 0, 25) . '...' . rc_substr($attach_prop->filename, strlen($attach_prop->filename)-20, 20); 
    157           $title = $attach_prop->filename; 
    158         } else { 
    159           $filename = $attach_prop->filename; 
    160           $title = ''; 
    161         } 
    162                    
     156        if (rc_strlen($attach_prop->filename) > 50) { 
     157          $filename = abbreviate_string($attach_prop->filename, 50); 
     158          $title = $attach_prop->filename; 
     159      } 
     160      else { 
     161        $filename = $attach_prop->filename; 
     162        $title = ''; 
     163      } 
     164 
    163165        $ol .= html::tag('li', null, 
    164166          html::a(array( 
     
    169171              $attach_prop->mime_id, 
    170172              $attach_prop->mimetype), 
    171             'title' => Q($title),   
     173              'title' => Q($title), 
    172174            ), 
    173175            Q($filename))); 
  • trunk/roundcubemail/skins/default/mail.css

    r1766 r1767  
    633633div.messageheaderbox 
    634634{ 
     635  position: relative; 
    635636  margin: 6px 8px 0px 8px; 
    636637  border: 1px solid #ccc; 
     
    650651  background-color: #F4F4F4; 
    651652  border: 1px solid #ccc; 
     653} 
     654 
     655#messageframe table.headers-table 
     656{ 
     657  border-bottom: 1px solid #ccc; 
    652658} 
    653659 
     
    814820} 
    815821 
     822#messageviewlink 
     823{ 
     824  position: absolute; 
     825  top: 1px; 
     826  right: 1px; 
     827  width: 15px; 
     828  height: 15px; 
     829  border: 0; 
     830} 
    816831 
    817832/** message compose styles */ 
     
    979994} 
    980995 
    981 .more-headers 
     996table.headers-table tr td.more-headers 
    982997{ 
    983998  cursor: pointer; 
    984999  width: 100%; 
    985   height: 6px; 
    986 } 
    987  
    988 .show-headers 
     1000  height: 8px; 
     1001  border-bottom: 0; 
     1002} 
     1003 
     1004td.show-headers 
    9891005{ 
    9901006  background: url(images/icons/down_small.gif) no-repeat center; 
    9911007} 
    9921008 
    993 .hide-headers 
     1009td.hide-headers 
    9941010{ 
    9951011  background: url(images/icons/up_small.gif) no-repeat center; 
     
    10051021{ 
    10061022  margin: 0 5px; 
    1007   width: 100%; 
     1023  padding: 0.5em; 
    10081024  height: 145px; 
    10091025  background: white; 
     
    10141030  display: none; 
    10151031  text-align: left; 
    1016   color: #666666; 
     1032  color: #333; 
    10171033} 
    10181034 
  • trunk/roundcubemail/skins/default/templates/messagepreview.html

    r1396 r1767  
    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" /> 
    1112<roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" addicon="/images/icons/plus.gif" summary="Message headers" /> 
    1213<roundcube:object name="messageAttachments" id="attachment-list" /> 
Note: See TracChangeset for help on using the changeset viewer.