|
|
@ -5416,10 +5416,8 @@ function rcube_webmail()
|
|
|
|
+ (this.env.cancelicon ? '<img src="'+this.env.cancelicon+'" alt="'+label+'" />' : '<span class="inner">' + label + '</span>') + '</a>' + att.html;
|
|
|
|
+ (this.env.cancelicon ? '<img src="'+this.env.cancelicon+'" alt="'+label+'" />' : '<span class="inner">' + label + '</span>') + '</a>' + att.html;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
li.attr('id', name)
|
|
|
|
li.attr('id', name).addClass(att.classname).html(att.html)
|
|
|
|
.addClass(att.classname)
|
|
|
|
.find('.attachment-name').on('mouseover', function() { rcube_webmail.long_subject_title_ex(this); });
|
|
|
|
.html(att.html)
|
|
|
|
|
|
|
|
.on('mouseover', function() { rcube_webmail.long_subject_title_ex(this); });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// replace indicator's li
|
|
|
|
// replace indicator's li
|
|
|
|
if (upload_id && (indicator = document.getElementById(upload_id))) {
|
|
|
|
if (upload_id && (indicator = document.getElementById(upload_id))) {
|
|
|
@ -5508,24 +5506,14 @@ function rcube_webmail()
|
|
|
|
// update attachments list with the new name
|
|
|
|
// update attachments list with the new name
|
|
|
|
this.rename_attachment_handler = function(id, name)
|
|
|
|
this.rename_attachment_handler = function(id, name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var attachment = this.env.attachments ? this.env.attachments[id] : null,
|
|
|
|
var attachment = this.env.attachments ? this.env.attachments[id] : null;
|
|
|
|
item = $('#' + id + ' > a.filename'),
|
|
|
|
|
|
|
|
link = $('<a>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!attachment || !name)
|
|
|
|
if (!attachment || !name)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
attachment.name = name;
|
|
|
|
attachment.name = name;
|
|
|
|
|
|
|
|
|
|
|
|
// update attachments list
|
|
|
|
$('#' + id + ' .attachment-name').text(name).attr('title', '');
|
|
|
|
if (item.length == 1) {
|
|
|
|
|
|
|
|
// create a new element with new attachment name and cloned size
|
|
|
|
|
|
|
|
link.text(name).append($('span', item).clone());
|
|
|
|
|
|
|
|
// update attachment name element
|
|
|
|
|
|
|
|
item.html(link.html());
|
|
|
|
|
|
|
|
// reset parent's title which may contain the old name
|
|
|
|
|
|
|
|
item.parent().attr('title', '');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// send remote request to add a new contact
|
|
|
|
// send remote request to add a new contact
|
|
|
@ -10122,6 +10110,7 @@ rcube_webmail.long_subject_title_ex = function(elem)
|
|
|
|
if (!elem.title) {
|
|
|
|
if (!elem.title) {
|
|
|
|
var $elem = $(elem),
|
|
|
|
var $elem = $(elem),
|
|
|
|
txt = $.trim($elem.text()),
|
|
|
|
txt = $.trim($elem.text()),
|
|
|
|
|
|
|
|
indent = $('span.branch', $elem).width() || 0,
|
|
|
|
tmp = $('<span>').text(txt)
|
|
|
|
tmp = $('<span>').text(txt)
|
|
|
|
.css({position: 'absolute', 'float': 'left', visibility: 'hidden',
|
|
|
|
.css({position: 'absolute', 'float': 'left', visibility: 'hidden',
|
|
|
|
'font-size': $elem.css('font-size'), 'font-weight': $elem.css('font-weight')})
|
|
|
|
'font-size': $elem.css('font-size'), 'font-weight': $elem.css('font-weight')})
|
|
|
@ -10129,7 +10118,7 @@ rcube_webmail.long_subject_title_ex = function(elem)
|
|
|
|
w = tmp.width();
|
|
|
|
w = tmp.width();
|
|
|
|
|
|
|
|
|
|
|
|
tmp.remove();
|
|
|
|
tmp.remove();
|
|
|
|
if (w + $('span.branch', $elem).width() * 15 > $elem.width())
|
|
|
|
if (w + indent * 15 > $elem.width())
|
|
|
|
elem.title = rcube_webmail.subject_text(elem);
|
|
|
|
elem.title = rcube_webmail.subject_text(elem);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|