]> git.wh0rd.org Git - tt-rss.git/commitdiff
more opera feeds frame size work
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 25 Feb 2006 04:46:08 +0000 (05:46 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 25 Feb 2006 04:46:08 +0000 (05:46 +0100)
tt-rss.js
tt-rss.php

index b72e9734622f6bc3cb3e435c92976752f7cd6785..758e3e8954feeef395ae1ac2c60328f63b9e38a7 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -394,6 +394,15 @@ function init() {
        }
 }
 
+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";
+}
+
 function init_second_stage() {
 
        try {
@@ -411,9 +420,10 @@ function init_second_stage() {
 
                daemon_enabled = getCookie("ttrss_vf_daemon");
 
+               // FIXME should be callled after window resize
+
                if (navigator.userAgent.match("Opera")) {
-                       var f = document.getElementById("feeds-frame");
-                       f.style.height = document.body.scrollHeight - 200 + "px";
+                       resize_feeds_frame();
                }
        
        } catch (e) {
index 89982ca140f71ad06dd0c4a32c9610bc74978755..03bbc0f6151f13465e51cabdcf7e830131c57d25 100644 (file)
@@ -68,7 +68,7 @@ window.onload = init;
 <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
 <? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
 <tr>
-       <td colspan="2" class="headerBox">
+       <td colspan="2" class="headerBox" id="mainHeader">
                <table cellspacing="0" cellpadding="0" width="100%"><tr>
                        <td rowspan="2" class="header" valign="middle"> 
                                <img src="images/ttrss_logo.png" alt="logo">    
@@ -90,7 +90,7 @@ window.onload = init;
 </tr>
 <? } else { ?>
 <tr>
-       <td class="small">
+       <td class="small" id="mainHeader">
                <div id="notify"><span id="notify_body">&nbsp;</span></div>
                <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
        </td><td class="welcomePrompt">
@@ -273,7 +273,7 @@ window.onload = init;
 <? } ?>
 <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
 <tr>
-       <td colspan="2" class="footer">
+       <td colspan="2" class="footer" id="mainFooter">
                <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
                <? if (WEB_DEMO_MODE) { ?>
                <br>Running in demo mode, some functionality is disabled.