From: Andrew Dolgov Date: Sat, 24 Jan 2009 05:14:06 +0000 (+0100) Subject: use popup feedbrowser for main UI (3) X-Git-Tag: git2svn-syncpoint-master~35 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2bab8824ebab623f127c98429587bf6c5444b110;p=tt-rss.git use popup feedbrowser for main UI (3) --- diff --git a/functions.js b/functions.js index 35ca9e77..ca94dd93 100644 --- a/functions.js +++ b/functions.js @@ -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); + } +} + + diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 6c80d69a..e4738749 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -1131,7 +1131,7 @@ if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) { print " "; + onclick=\"javascript:browseFeeds()\" value=\"".__('Other Feeds')."\">"; } $feeds_sort = db_escape_string($_GET["sort"]); @@ -1481,9 +1481,18 @@ $class = ($feedctr % 2) ? "even" : "odd"; + if ($details["site_url"]) { + $site_url = " + www"; + } else { + $site_url = ""; + } + print "
  • $check_box". "$feed_icon " . $details["title"] . - " ($subscribers)
  • "; + " ($subscribers) + $site_url + "; ++$feedctr; } diff --git a/prefs.js b/prefs.js index 266703f6..b3b88467 100644 --- a/prefs.js +++ b/prefs.js @@ -2234,8 +2234,4 @@ function batchFeedsToggleField(cb, elem, label) { } } -function updateFeedBrowser() { - alert("FIXME"); -} - diff --git a/tt-rss.js b/tt-rss.js index 0bcf20cf..98f79958 100644 --- 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 {