]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix resize_feed_list if header or footer are disabled (closes #65)
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 1 Jun 2006 14:24:17 +0000 (15:24 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 1 Jun 2006 14:24:17 +0000 (15:24 +0100)
tt-rss.js

index f6a50733e8efc81423ecf0fda113821764456b44..7167d058410a217c68593802bbb743466b194ccb 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -365,9 +365,20 @@ function resize_feeds_frame() {
        var f = document.getElementById("feeds-frame");
        var tf = document.getElementById("mainFooter");
        var th = document.getElementById("mainHeader");
-                
-       f.style.height = document.body.scrollHeight - tf.scrollHeight - 
-               th.scrollHeight - 50 + "px";
+
+       var footer_height = 0;
+       var header_height = 0;
+
+       if (tf) {
+               footer_height = tf.scrollHeight;
+       }
+
+       if (th) {
+               header_height = th.scrollHeight;
+       }       
+        
+       f.style.height = document.body.scrollHeight - footer_height - 
+               header_height - 50 + "px";
 }
 
 function init_second_stage() {