summaryrefslogtreecommitdiff
path: root/skins/default/functions.js
diff options
context:
space:
mode:
Diffstat (limited to 'skins/default/functions.js')
-rw-r--r--skins/default/functions.js32
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');
+ }
}
};