diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-05-20 10:32:52 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-05-20 10:32:52 +0200 |
commit | 2355045dedc96274ca6b1c29612006e736b6f540 (patch) | |
tree | b573b7bd48d40e21d26c1d21f9259508e14f7a90 /skins | |
parent | c8bc8c97f3f6e5c04fa7b459bdb1c922d7f4e6ad (diff) |
Change Reply-All button label/title when mailing list is detected (#1488938)
Diffstat (limited to 'skins')
-rw-r--r-- | skins/classic/functions.js | 11 | ||||
-rw-r--r-- | skins/larry/ui.js | 14 |
2 files changed, 24 insertions, 1 deletions
diff --git a/skins/classic/functions.js b/skins/classic/functions.js index 0d2f2231a..d980627aa 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -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); + } } }; @@ -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'); @@ -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); diff --git a/skins/larry/ui.js b/skins/larry/ui.js index a461b64a0..693448097 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -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 }); @@ -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) { @@ -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 */ |