From 759e5132a1311a1b56787b97e82ddad4b5348aa1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 23 Sep 2012 13:38:58 +0400 Subject: subscribe_to_feed: stop fetching URL multiple times while subscribing, various other speedups --- js/functions.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'js/functions.js') diff --git a/js/functions.js b/js/functions.js index 97df318e5..e9dcf3f3a 100644 --- a/js/functions.js +++ b/js/functions.js @@ -881,7 +881,7 @@ function quickAddFeed() { alert(__("Specified URL doesn't seem to contain any feeds.")); break; case 4: - notify_progress("Searching for feed urls...", true); + /* notify_progress("Searching for feed urls...", true); new Ajax.Request("backend.php", { parameters: 'op=rpc&method=extractfeedurls&url=' + param_escape(feed_url), @@ -912,6 +912,23 @@ function quickAddFeed() { Effect.Appear('feedDlg_feedsContainer', {duration : 0.5}); } }); + break; */ + + feeds = rc['feeds']; + + var select = dijit.byId("feedDlg_feedContainerSelect"); + + while (select.getOptions().length > 0) + select.removeOption(0); + + var count = 0; + for (var feedUrl in feeds) { + select.addOption({value: feedUrl, label: feeds[feedUrl]}); + count++; + } + + Effect.Appear('feedDlg_feedsContainer', {duration : 0.5}); + break; case 5: alert(__("Couldn't download the specified URL: %s"). -- cgit v1.2.3