]> git.wh0rd.org Git - tt-rss.git/commitdiff
use popup feedbrowser for main UI (3)
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 24 Jan 2009 05:14:06 +0000 (06:14 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 24 Jan 2009 05:14:06 +0000 (06:14 +0100)
functions.js
modules/pref-feeds.php
prefs.js
tt-rss.js

index 35ca9e77f04e6b2a0337bcc9677784958a4728ec..ca94dd93da92b1503d9c1578c6160221b7b6d9b3 100644 (file)
@@ -2039,3 +2039,51 @@ function getSelectedFeedsFromBrowser() {
        return selected;
 }
 
+function updateFeedBrowser() {
+       try {
+
+               var query = "backend.php?op=rpc&subop=feedBrowser";
+
+               var search = document.getElementById("feed_browser_search");
+               var limit = document.getElementById("feed_browser_limit");
+
+               if (limit) {
+                       query = query + "&limit=" + limit[limit.selectedIndex].value;
+               }
+
+               if (search) {
+                       query = query + "&search=" + param_escape(search.value);
+               }
+
+               notify_progress("Loading, please wait...", true);
+
+               new Ajax.Request(query, {
+                       onComplete: function(transport) { 
+                               notify('');
+
+                               var c = document.getElementById("browseFeedList");
+                               var r = transport.responseXML.getElementsByTagName("content")[0];
+                               var nr = transport.responseXML.getElementsByTagName("num-results")[0];
+                               var sb = document.getElementById("feed_browser_subscribe");
+
+                               if (c && r) {
+                                       c.innerHTML = r.firstChild.nodeValue;
+                               }
+       
+                               if (nr && sb) {
+                                       if (nr.getAttribute("value") > 0) {
+                                               sb.disabled = false;
+                                       } else {
+                                               sb.disabled = true;
+                                       }
+                               }
+
+                       } });
+
+
+       } catch (e) {
+               exception_error("updateFeedBrowser", e);
+       }
+}
+
+
index 6c80d69a3b98988ea105f277c95bbd5d0c3c9672..e47387497608f36c607be025e4455b27ab4060f4 100644 (file)
                if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) {
                        print " <input type=\"submit\" class=\"button\"
                                id=\"top25_feeds_btn\"
-                               onclick=\"javascript:browseFeeds()\" value=\"".__('Top 25')."\">";
+                               onclick=\"javascript:browseFeeds()\" value=\"".__('Other Feeds')."\">";
                }
 
                $feeds_sort = db_escape_string($_GET["sort"]);
 
                                $class = ($feedctr % 2) ? "even" : "odd";
 
+                               if ($details["site_url"]) {
+                                       $site_url = "<a target=\"_blank\" href=\"".$details["site_url"]."\">
+                                               <img style='border-width : 0px' src='images/www.png' alt='www'></a>";
+                               } else {
+                                       $site_url = "";
+                               }
+
                                print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
                                        "$feed_icon " . $details["title"] . 
-                                       "&nbsp;<span class='subscribers'>($subscribers)</span></li>";
+                                       "&nbsp;<span class='subscribers'>($subscribers)</span>
+                                       $site_url
+                                       </li>";
 
                                        ++$feedctr;
                        }
index 266703f6454e047e19f80567520761c3ac62775c..b3b884675660dcd78c075b23e13af3200969e588 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -2234,8 +2234,4 @@ function batchFeedsToggleField(cb, elem, label) {
        }
 }
 
-function updateFeedBrowser() {
-       alert("FIXME");
-}
-
 
index 0bcf20cf2d25f0c1fc0792a060f2660d9b9fcf82..98f7995834b097264a088b54e110c2651c7fbd92 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -1442,53 +1442,6 @@ function browseFeeds(limit) {
        }
 }
 
-function updateFeedBrowser() {
-       try {
-
-               var query = "backend.php?op=rpc&subop=feedBrowser";
-
-               var search = document.getElementById("feed_browser_search");
-               var limit = document.getElementById("feed_browser_limit");
-
-               if (limit) {
-                       query = query + "&limit=" + limit[limit.selectedIndex].value;
-               }
-
-               if (search) {
-                       query = query + "&search=" + param_escape(search.value);
-               }
-
-               notify_progress("Loading, please wait...", true);
-
-               new Ajax.Request(query, {
-                       onComplete: function(transport) { 
-                               notify('');
-
-                               var c = document.getElementById("browseFeedList");
-                               var r = transport.responseXML.getElementsByTagName("content")[0];
-                               var nr = transport.responseXML.getElementsByTagName("num-results")[0];
-                               var sb = document.getElementById("feed_browser_subscribe");
-
-                               if (c && r) {
-                                       c.innerHTML = r.firstChild.nodeValue;
-                               }
-       
-                               if (nr && sb) {
-                                       if (nr.getAttribute("value") > 0) {
-                                               sb.disabled = false;
-                                       } else {
-                                               sb.disabled = true;
-                                       }
-                               }
-
-                       } });
-
-
-       } catch (e) {
-               exception_error("updateFeedBrowser", e);
-       }
-}
-
 
 function feedBrowserSubscribe() {
        try {