diff options
author | alecpl <alec@alec.pl> | 2010-06-17 19:08:00 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-06-17 19:08:00 +0000 |
commit | ce06d32dd81e3a9c5c5c8a5e27562b5c55b49c81 (patch) | |
tree | a5267605f04f183e42263b652f27b5c475950722 /skins/default/functions.js | |
parent | 37e467d55cfb0323989127ba04c4e449ce2ed784 (diff) |
- UI unification
- Added button to hide/unhide the preview pane (#1484215)
Diffstat (limited to 'skins/default/functions.js')
-rw-r--r-- | skins/default/functions.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/skins/default/functions.js b/skins/default/functions.js index 3a37b6d8d..4ef069b88 100644 --- a/skins/default/functions.js +++ b/skins/default/functions.js @@ -325,6 +325,38 @@ body_keypress: function(evt, p) this[k].hide(); } } +}, + +switch_preview_pane: function(elem) +{ + var uid, prev_frm = $('#mailpreviewframe'); + + if (elem.checked) { + rcmail.env.contentframe = 'messagecontframe'; + if (mailviewsplit.layer) { + mailviewsplit.resize(); + mailviewsplit.layer.elm.style.display = ''; + } else + mailviewsplit.init(); + prev_frm.show(); + if (uid = rcmail.message_list.get_single_selection()) + rcmail.show_message(uid, false, true); + rcmail.http_post('save-pref', '_name=preview_pane&_value=1'); + } else { + prev_frm.hide(); + if (bw.ie6 || bw.ie7) { + var fr = document.getElementById('mailcontframe'); + fr.style.bottom = 0; + fr.style.height = parseInt(fr.parentNode.offsetHeight)+'px'; + } + else + $('#mailcontframe').css({height: 'auto', bottom: 0}); + if (mailviewsplit.layer) + mailviewsplit.layer.elm.style.display = 'none'; + rcmail.env.contentframe = null; + rcmail.show_contentframe(false); + rcmail.http_post('save-pref', '_name=preview_pane&_value=0'); + } } }; |