From: Andrew Dolgov Date: Fri, 13 Apr 2007 06:59:07 +0000 (+0100) Subject: auto-resize headlines container to 30% of window height X-Git-Tag: 1.2.10~8 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a9d42cf72f056069363bbc99c9280c8c6c7a7042;p=tt-rss.git auto-resize headlines container to 30% of window height --- diff --git a/tt-rss.js b/tt-rss.js index 5f913f86..4b2f3ece 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -376,6 +376,19 @@ function init() { } } +function resize_headlines() { + var h_frame = document.getElementById("headlines-frame"); + var c_frame = document.getElementById("content-frame"); + + debug("resize_headlines"); + + if (c_frame && h_frame) { + 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"; + } +} + function init_second_stage() { try { @@ -384,7 +397,9 @@ function init_second_stage() { delCookie("ttrss_vf_test"); - document.onkeydown = hotkey_handler; + document.onresize = resize_headlines; + + resize_headlines(); var toolbar = document.forms["main_toolbar_form"]; diff --git a/tt-rss.php b/tt-rss.php index 420aaf5f..c9e2555d 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -68,7 +68,7 @@ - +