Skip to content

Commit

Permalink
Change Reply-All button label/title when mailing list is detected (#1…
Browse files Browse the repository at this point in the history
…488938)
  • Loading branch information
alecpl committed May 20, 2013
1 parent c8bc8c9 commit 2355045
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================

- Change Reply-All button label/title when mailing list is detected (#1488938)
- Fix SMTP connection using IPv6 address in smtp_server option (#1489024)
- Added attachment_reminder plugin
- Make PHP code eval() free, use create_function()
Expand Down
1 change: 1 addition & 0 deletions program/js/app.js
Expand Up @@ -1179,6 +1179,7 @@ function rcube_webmail()
if (typeof cmd === 'string') {
this.commands[cmd] = enable;
this.set_button(cmd, (enable ? 'act' : 'pas'));
this.triggerEvent('enable-command', {command: cmd, status: enable});
}
// push array elements into commands array
else {
Expand Down
3 changes: 1 addition & 2 deletions program/js/common.js
Expand Up @@ -298,8 +298,7 @@ addEventListener: function(evt, func, obj)
if (!this._events[evt])
this._events[evt] = [];

var e = {func:func, obj:obj ? obj : window};
this._events[evt][this._events[evt].length] = e;
this._events[evt].push({func:func, obj:obj ? obj : window});
},

/**
Expand Down
2 changes: 1 addition & 1 deletion program/steps/mail/func.inc
Expand Up @@ -120,7 +120,7 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
if (!$OUTPUT->ajax_call)
$OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash',
'movingmessage', 'copyingmessage', 'deletingmessage', 'markingmessage',
'copy', 'move', 'quota');
'copy', 'move', 'quota', 'replyall', 'replylist');

$pagetitle = $RCMAIL->localize_foldername($RCMAIL->storage->mod_folder($mbox_name), true);
$pagetitle = str_replace($delimiter, " \xC2\xBB ", $pagetitle);
Expand Down
2 changes: 1 addition & 1 deletion program/steps/mail/show.inc
Expand Up @@ -116,7 +116,7 @@ if ($uid) {

if (!$OUTPUT->ajax_call)
$OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash',
'movingmessage', 'deletingmessage', 'markingmessage');
'movingmessage', 'deletingmessage', 'markingmessage', 'replyall', 'replylist');

$prefer_html = $RCMAIL->config->get('prefer_html');
if ($MESSAGE->has_html_part()) {
Expand Down
11 changes: 10 additions & 1 deletion skins/classic/functions.js
Expand Up @@ -617,6 +617,14 @@ prev_sibling: function(elm)
while (ps && ps.nodeType == 3)
ps = ps.previousSibling;
return ps;
},

enable_command: function(p)
{
if (p.command == 'reply-list') {
var label = rcmail.gettext(p.status ? 'replylist' : 'replyall');
$('a.button.replyAll').attr('title', label);
}
}

};
Expand Down Expand Up @@ -792,7 +800,7 @@ function percent_indicator(obj, data)
var bar2 = $('<div>');
bar2.css({position: 'absolute', top: pos.top + 1, left: pos.left + 1,
width: width + 'px', height: height + 'px', zIndex: 98})
.addClass('quota_bg');
.addClass('quota_bg');

if (quota >= limit_high) {
main.addClass(' quota_text_high');
Expand Down Expand Up @@ -835,6 +843,7 @@ function rcube_init_mail_ui()
.contents().mouseup(function(e){rcmail_ui.body_mouseup(e)});

if (rcmail.env.task == 'mail') {
rcmail.addEventListener('enable-command', 'enable_command', rcmail_ui);
rcmail.addEventListener('menu-open', 'menu_open', rcmail_ui);
rcmail.addEventListener('menu-save', 'menu_save', rcmail_ui);
rcmail.addEventListener('aftersend-attachment', 'uploadmenu', rcmail_ui);
Expand Down
14 changes: 14 additions & 0 deletions skins/larry/ui.js
Expand Up @@ -94,6 +94,7 @@ function rcube_mail_ui()
}

if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
rcmail.addEventListener('enable-command', enable_command);
rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); });
rcmail.addEventListener('afterhide-headers', function() { layout_messageview(); });
$('#previewheaderstoggle').click(function(e){ toggle_preview_headers(); return false });
Expand Down Expand Up @@ -145,6 +146,7 @@ function rcube_mail_ui()
new rcube_scroller('#folderlist-content', '#folderlist-header', '#folderlist-footer');

rcmail.addEventListener('setquota', update_quota);
rcmail.addEventListener('enable-command', enable_command);
}

if ($('#mailview-left').length) {
Expand Down Expand Up @@ -435,6 +437,18 @@ function rcube_mail_ui()
}


function enable_command(p)
{
if (p.command == 'reply-list') {
var label = rcmail.gettext(p.status ? 'replylist' : 'replyall');
if (rcmail.env.action == 'preview')
$('a.button.replyall').attr('title', label);
else
$('a.button.reply-all').text(label).attr('title', label);
}
}


/**
* Register a popup menu
*/
Expand Down

0 comments on commit 2355045

Please sign in to comment.