summaryrefslogtreecommitdiff
path: root/skins/larry/ui.js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-01-06 13:40:37 +0000
committerthomascube <thomas@roundcube.net>2012-01-06 13:40:37 +0000
commitf4aaf84b5052bb2686a12e4a41837bef36c5a426 (patch)
tree7117af6d7d33d83c1970bc01640837b9a4663157 /skins/larry/ui.js
parente86a21bd83a0ae6cadfe9c919582951f306d3b64 (diff)
Display short headers in preview mode, with toggle to show all
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r--skins/larry/ui.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index 9e9e6b701..55ea98aa0 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -78,6 +78,7 @@ function rcube_mail_ui()
if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
layout_messageview();
$("#all-headers").resizable({ handles: 's', minHeight: 50 });
+ $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false });
}
else if (rcmail.env.action == 'compose') {
rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 100); });
@@ -425,6 +426,26 @@ function rcube_mail_ui()
/**
+ * Switch between short and full headers display in message preview
+ */
+ function toggle_preview_headers(button)
+ {
+ $('#preview-shortheaders').toggle();
+ var full = $('#preview-allheaders').toggle();
+
+ // 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);
+ }
+ }
+
+
+ /**
*
*/
function switch_view_mode(mode)