diff options
author | Andrew Dolgov <[email protected]> | 2007-04-13 07:59:07 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-04-13 07:59:07 +0100 |
commit | a9d42cf72f056069363bbc99c9280c8c6c7a7042 (patch) | |
tree | 2512960150cfab108bba0af1eaa8e0551f012a7e /tt-rss.js | |
parent | 197c999e58348dc1104c3314ce2d491f92a0017f (diff) |
auto-resize headlines container to 30% of window height
Diffstat (limited to 'tt-rss.js')
-rw-r--r-- | tt-rss.js | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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"]; |