diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-17 19:08:00 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-17 19:08:00 +0000 |
| commit | d0190da3e2b98fd213ddb97f6729259f9422b9d2 (patch) | |
| tree | 04042f15605d7f096f2b00b4cc7c5ae5a82be203 /roundcubemail/skins/default/functions.js | |
| parent | 2456a3181102773e541b4c8c908932c5dd2f3ae0 (diff) | |
- UI unification
- Added button to hide/unhide the preview pane (#1484215)
git-svn-id: https://svn.roundcube.net/trunk@3757 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/skins/default/functions.js')
| -rw-r--r-- | roundcubemail/skins/default/functions.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/roundcubemail/skins/default/functions.js b/roundcubemail/skins/default/functions.js index 3a37b6d8d..4ef069b88 100644 --- a/roundcubemail/skins/default/functions.js +++ b/roundcubemail/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'); + } } }; |
