diff options
author | alecpl <alec@alec.pl> | 2012-02-27 10:00:00 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-02-27 10:00:00 +0000 |
commit | 9bd97cc7073dc381569d5a2563b1b93497ba36e1 (patch) | |
tree | 9d96d53d9c220980ac4d8a72ba81f4604fdfc6bf /skins/larry/ui.js | |
parent | 2c1937220e6e0eab0e527e6ebeec716a846afd70 (diff) |
- Improve headers toggle button
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r-- | skins/larry/ui.js | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 979ed05c7..aed41bb21 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -462,17 +462,14 @@ function rcube_mail_ui() function toggle_preview_headers(button) { $('#preview-shortheaders').toggle(); - var full = $('#preview-allheaders').toggle(); - + var full = $('#preview-allheaders').toggle(), + button = $('a#previewheaderstoggle'); + // add toggle button to full headers table - if (!full.data('mod')) { - $('<a>').attr('href', '#hide') - .addClass('iconlink remove') - .html('Hide') - .appendTo($('<td>').appendTo($('tr:first', full))) - .click(function(){ toggle_preview_headers(this);return false }); - full.data('mod', true); - } + if (full.is(':visible')) + button.attr('href', '#hide').removeClass('add').addClass('remove') + else + button.attr('href', '#details').removeClass('remove').addClass('add') } |