summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorMatt Katz <[email protected]>2010-04-09 20:04:57 -0400
committerMatt Katz <[email protected]>2010-04-09 20:04:57 -0400
commitef7b7bbd55cae0927faad2cc865902e1d3ecf092 (patch)
treec44de9ed34fe29df526a31f1e05d05a494ec542e /prefs.js
parentc8640edadb151dbae7d23945264d09b502b67c10 (diff)
adding in the backend connection bits so that the dialog works
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/prefs.js b/prefs.js
index ee53cf27a..6d5e5a90c 100644
--- a/prefs.js
+++ b/prefs.js
@@ -1672,6 +1672,42 @@ function pubRegenKey() {
return false;
}
+function opmlRegenKey() {
+
+ try {
+ var ok = confirm(__("Replace current OPML publishing address with a new one?"));
+
+ if (ok) {
+
+ notify_progress("Trying to change address...", true);
+
+ var query = "?op=rpc&subop=regenOPMLKey";
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ var new_link = transport.responseXML.getElementsByTagName("link")[0];
+
+ var e = $('pub_opml_url');
+
+ if (new_link) {
+ e.href = new_link.firstChild.nodeValue;
+ e.innerHTML = new_link.firstChild.nodeValue;
+
+ new Effect.Highlight(e);
+
+ notify('');
+
+ } else {
+ notify_error("Could not change feed URL.");
+ }
+ } });
+ }
+ } catch (e) {
+ exception_error("opmlRegenKey", e);
+ }
+ return false;
+}
function validatePrefsSave() {
try {