From b6a6e262bebfdcea6b9523e63c287f94b4ffcff6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 13 Jan 2010 23:59:02 +0300 Subject: rework OPML import to use popup dialog --- prefs.js | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'prefs.js') diff --git a/prefs.js b/prefs.js index 27a86c9d3..6c7f6f636 100644 --- a/prefs.js +++ b/prefs.js @@ -576,15 +576,17 @@ function removeSelectedFeeds() { if (ok) { - notify_progress("Unsubscribing from selected feeds..."); + notify_progress("Unsubscribing from selected feeds...", true); var query = "?op=pref-feeds&subop=remove&ids="+ param_escape(sel_rows.toString()); - + + debug(query); + new Ajax.Request("backend.php", { parameters: query, onComplete: function(transport) { - feedlist_callback2(transport); + updateFeedList(); } }); } @@ -996,7 +998,7 @@ function piggie(enable) { } } -function validateOpmlImport() { +function opmlImport() { var opml_file = $("opml_file"); @@ -1006,6 +1008,8 @@ function validateOpmlImport() { } else { return true; } + + notify_progress("Importing, please wait...", true); } function updateFilterList(sort_key) { @@ -2224,4 +2228,19 @@ function activatePrefProfile() { return false; } +function opmlImportDone() { + closeInfoBox(); + updateFeedList(); +} + +function opml_import_handler(iframe) { + try { + var tmp = new Object(); + tmp.responseText = iframe.document.body.innerHTML; + notify(''); + infobox_callback2(tmp); + } catch (e) { + exception_error("opml_import_handler", e); + } +} -- cgit v1.2.3