]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix forced selection of dropboxes (functions.js:dropboxSelect())
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 Dec 2005 11:14:24 +0000 (12:14 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 Dec 2005 11:14:24 +0000 (12:14 +0100)
feedlist.js
functions.js
tt-rss.js

index 8c9ca61d4056d3162e7a3ec4cd393643a77be093..c58dff61012cb72fb50924837d8711776652ca52 100644 (file)
@@ -192,7 +192,11 @@ function toggleCollapseCat(cat) {
 }
 
 function init() {
-       hideOrShowFeeds(document, getCookie("ttrss_vf_hreadf") == 1);
-       document.onkeydown = hotkey_handler;
-       parent.setTimeout("timeout()", 1000);
+       try {
+               hideOrShowFeeds(document, getCookie("ttrss_vf_hreadf") == 1);
+               document.onkeydown = hotkey_handler;
+               parent.setTimeout("timeout()", 1000);
+       } catch (e) {
+               exception_error("feedlist/init()", e);
+       }
 }
index ca51b1acd12e7e3a9d42381ab8f1dc56ca45e7d4..2764a5bb28db7cbc9557a3ab03db9c88ee285234 100644 (file)
@@ -744,3 +744,12 @@ function showBlockElement(id) {
 function hideParentElement(e) {
        e.parentNode.style.display = "none";
 }
+
+function dropboxSelect(e, v) {
+       for (i = 0; i < e.length; i++) {
+               if (e[i].value == v) {
+                       e.selectedIndex = i;
+                       break;
+               }
+       }
+}
index 45da03396d65eb8cc0f701841e815c1ba53d9915..10aa2d2b78a4b7cca9c6a03687adf69ef3c09ec7 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -365,16 +365,20 @@ function init_second_stage() {
                document.onkeydown = hotkey_handler;
        
                var content = document.getElementById("content");
+
+               dropboxSelect(viewbox, getCookie("ttrss_vf_vmode"));
        
-               if (getCookie("ttrss_vf_vmode")) {
-                       var viewbox = document.getElementById("viewbox");
-                       viewbox.value = getCookie("ttrss_vf_vmode");
+/*             if (getCookie("ttrss_vf_vmode")) {
+                       var viewbox = document.getElementById("viewbox");                       
+                       if (getCookie("ttrss_vf_vmode")) {
+                               viewbox.value = getCookie("ttrss_vf_vmode");
+                       }
                }
        
                if (getCookie("ttrss_vf_limit")) {
                        var limitbox = document.getElementById("limitbox");
                        limitbox.value = getCookie("ttrss_vf_limit");
-               }
+               } */
        
        //      if (getCookie("ttrss_vf_actfeed")) {
        //              viewfeed(getCookie("ttrss_vf_actfeed"), 0, '');