From 203610630a5c2d077cbfb1d69e89c1e60d8b074e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 30 Oct 2007 09:22:01 +0100 Subject: add 3pane theme --- tt-rss.js | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'tt-rss.js') diff --git a/tt-rss.js b/tt-rss.js index 1773e64af..617791ce0 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -357,27 +357,37 @@ function resize_headlines() { if (!c_frame || !h_frame) return; - debug("resize_headlines"); + if (getInitParam("theme") == "3pane") { + debug("resize_headlines: HOR-mode"); - if (!is_msie()) { - h_frame.style.height = 30 + "%"; - c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px"; - h_frame.style.height = h_frame.offsetHeight + "px"; - } else { - h_frame.style.height = document.documentElement.clientHeight * 0.3 + "px"; - c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px"; + c_frame.style.width = '30%'; + h_frame.style.right = c_frame.offsetWidth - 1 + "px"; - var c_bottom = document.documentElement.clientHeight; + } else { + debug("resize_headlines: VER-mode"); - if (f_frame) { - c_bottom = f_frame.offsetTop; + if (!is_msie()) { + h_frame.style.height = 30 + "%"; + c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px"; + h_frame.style.height = h_frame.offsetHeight + "px"; + } else { + h_frame.style.height = document.documentElement.clientHeight * 0.3 + "px"; + c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px"; + + var c_bottom = document.documentElement.clientHeight; + + if (f_frame) { + c_bottom = f_frame.offsetTop; + } + + c_frame.style.height = c_bottom - (h_frame.offsetTop + + h_frame.offsetHeight + 1) + "px"; + h_frame.style.height = h_frame.offsetHeight + "px"; + } - c_frame.style.height = c_bottom - (h_frame.offsetTop + - h_frame.offsetHeight + 1) + "px"; - h_frame.style.height = h_frame.offsetHeight + "px"; - } + } function init_second_stage() { -- cgit v1.2.3