Display full attachment name using title attribute when name is too long to display (#1489320)
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Display full attachment name using title attribute when name is too long to display (#1489320) |
| | | - Fix XSS issue in addressbook group name field [CVE-2013-5646] (#1489333) |
| | | - Fix attachment icon issue when rare font/language is used (#1489326) |
| | | - After message is sent refresh messages list of replied message folder (#1489249) |
| | |
| | | html = expando; |
| | | else if (c == 'subject') { |
| | | if (bw.ie) { |
| | | col.onmouseover = function() { rcube_webmail.long_subject_title_ie(this, message.depth+1); }; |
| | | col.onmouseover = function() { rcube_webmail.long_subject_title_ex(this, message.depth+1); }; |
| | | if (bw.ie8) |
| | | tree = '<span></span>' + tree; // #1487821 |
| | | } |
| | |
| | | att.html = '<a title="'+this.get_label('cancel')+'" onclick="return rcmail.cancel_attachment_upload(\''+name+'\', \''+att.frame+'\');" href="#cancelupload" class="cancelupload">' |
| | | + (this.env.cancelicon ? '<img src="'+this.env.cancelicon+'" alt="" />' : this.get_label('cancel')) + '</a>' + att.html; |
| | | |
| | | var indicator, li = $('<li>').attr('id', name).addClass(att.classname).html(att.html); |
| | | var indicator, li = $('<li>'); |
| | | |
| | | li.attr('id', name) |
| | | .addClass(att.classname) |
| | | .html(att.html) |
| | | .on('mouseover', function() { rcube_webmail.long_subject_title_ex(this, 0); }); |
| | | |
| | | // replace indicator's li |
| | | if (upload_id && (indicator = document.getElementById(upload_id))) { |
| | |
| | | if (!elem.title) { |
| | | var $elem = $(elem); |
| | | if ($elem.width() + indent * 15 > $elem.parent().width()) |
| | | elem.title = $elem.html(); |
| | | elem.title = $elem.text(); |
| | | } |
| | | }; |
| | | |
| | | rcube_webmail.long_subject_title_ie = function(elem, indent) |
| | | rcube_webmail.long_subject_title_ex = function(elem, indent) |
| | | { |
| | | if (!elem.title) { |
| | | var $elem = $(elem), |
| | |
| | | 'alt' => rcube_label('delete') |
| | | )); |
| | | } |
| | | else { |
| | | else if ($COMPOSE['textbuttons']) { |
| | | $button = Q(rcube_label('delete')); |
| | | } |
| | | else { |
| | | $button = ''; |
| | | } |
| | | |
| | | $content = html::a(array( |
| | | 'href' => "#delete", |
| | |
| | | |
| | | $out = "\n"; |
| | | $jslist = array(); |
| | | $button = ''; |
| | | |
| | | if (is_array($COMPOSE['attachments'])) { |
| | | if ($attrib['deleteicon']) { |
| | |
| | | 'alt' => rcube_label('delete') |
| | | )); |
| | | } |
| | | else |
| | | else if (rcube_utils::get_boolean($attrib['textbuttons'])) { |
| | | $button = Q(rcube_label('delete')); |
| | | } |
| | | |
| | | foreach ($COMPOSE['attachments'] as $id => $a_prop) { |
| | | if (empty($a_prop)) |
| | | continue; |
| | | |
| | | $out .= html::tag('li', array('id' => 'rcmfile'.$id, 'class' => rcmail_filetype2classname($a_prop['mimetype'], $a_prop['name'])), |
| | | $out .= html::tag('li', |
| | | array( |
| | | 'id' => 'rcmfile'.$id, |
| | | 'class' => rcmail_filetype2classname($a_prop['mimetype'], $a_prop['name']), |
| | | 'onmouseover' => "rcube_webmail.long_subject_title_ex(this, 0)", |
| | | ), |
| | | html::a(array( |
| | | 'href' => "#delete", |
| | | 'title' => rcube_label('delete'), |
| | | 'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", JS_OBJECT_NAME, $id), |
| | | 'class' => 'delete'), |
| | | $button) . Q($a_prop['name'])); |
| | | 'class' => 'delete' |
| | | ), |
| | | $button |
| | | ) . Q($a_prop['name']) |
| | | ); |
| | | |
| | | $jslist['rcmfile'.$id] = array('name' => $a_prop['name'], 'complete' => true, 'mimetype' => $a_prop['mimetype']); |
| | | } |
| | |
| | | |
| | | if ($attrib['deleteicon']) |
| | | $COMPOSE['deleteicon'] = $CONFIG['skin_path'] . $attrib['deleteicon']; |
| | | else if (rcube_utils::get_boolean($attrib['textbuttons'])) |
| | | $COMPOSE['textbuttons'] = true; |
| | | if ($attrib['cancelicon']) |
| | | $OUTPUT->set_env('cancelicon', $CONFIG['skin_path'] . $attrib['cancelicon']); |
| | | if ($attrib['loadingicon']) |
| | |
| | | $ol .= html::tag('li', null, Q(sprintf("%s (%s)", $filename, $size))); |
| | | } |
| | | else { |
| | | if (mb_strlen($filename) > 50) { |
| | | if ($attrib['maxlength'] && mb_strlen($filename) > $attrib['maxlength']) { |
| | | $title = $filename; |
| | | $filename = abbreviate_string($filename, 50); |
| | | $filename = abbreviate_string($filename, $attrib['maxlength']); |
| | | } |
| | | else { |
| | | $title = ''; |
| | |
| | | 'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), |
| | | 'onclick' => sprintf('return %s.command(\'load-attachment\',\'%s\',this)', |
| | | JS_OBJECT_NAME, $attach_prop->mime_id), |
| | | 'onmouseover' => $title ? '' : 'rcube_webmail.long_subject_title_ex(this, 0)', |
| | | 'title' => Q($title), |
| | | ), Q($filename)); |
| | | $ol .= html::tag('li', array('class' => $class, 'id' => $id), $link); |
| | |
| | | </div> |
| | | <roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" addicon="/images/icons/silhouette.png" summary="Message headers" /> |
| | | <roundcube:object name="messageFullHeaders" id="full-headers" /> |
| | | <roundcube:object name="messageAttachments" id="attachment-list" /> |
| | | <roundcube:object name="messageAttachments" id="attachment-list" maxlength="50" /> |
| | | <roundcube:object name="messageObjects" id="message-objects" /> |
| | | <roundcube:object name="messageBody" id="messagebody" /> |
| | | </div> |
| | |
| | | </div> |
| | | <roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" addicon="/images/icons/silhouette.png" summary="Message headers" /> |
| | | <roundcube:object name="messageFullHeaders" id="full-headers" /> |
| | | <roundcube:object name="messageAttachments" id="attachment-list" /> |
| | | <roundcube:object name="messageAttachments" id="attachment-list" maxlength="50" /> |
| | | </div> |
| | | |
| | | <roundcube:object name="messageObjects" id="message-objects" /> |