var init_params = new Array();
-var caller_subop = false;
var hotkey_prefix = false;
var hotkey_prefix_pressed = false;
var seq = "";
function feedlist_callback2(transport) {
-
try {
-
dijit.byId('feedConfigTab').attr('content', transport.responseText);
-
selectTab("feedConfig", true);
-
- if (caller_subop) {
- var tuple = caller_subop.split(":");
- if (tuple[0] == 'editFeed') {
- window.setTimeout('editFeed('+tuple[1]+')', 100);
- }
-
- caller_subop = false;
- }
notify("");
-
} catch (e) {
exception_error("feedlist_callback2", e);
}
}
function labellist_callback2(transport) {
-
try {
-
dijit.byId('labelConfigTab').attr('content', transport.responseText);
- closeInfoBox();
-
notify("");
-
} catch (e) {
exception_error("labellist_callback2", e);
}
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
- handle_rpc_reply(transport);
- var response = transport.responseXML;
+ var reply = JSON.parse(transport.responseText);
- if (response) {
- var s = response.getElementsByTagName("status")[0].firstChild.nodeValue;
-
+ if (reply) {
notify('');
- if (s == "INVALID") {
+ if (!reply['status']) {
alert("Match regular expression seems to be invalid.");
return;
} else {
try {
if (!noupdate) {
notify_progress("Loading, please wait...");
- closeInfoBox();
if (id == "feedConfig") {
updateFeedList();
try {
document.onkeydown = pref_hotkey_handler;
-
- caller_subop = getURLParam('subop');
-
- if (getURLParam("subopparam")) {
- caller_subop = caller_subop + ":" + getURLParam("subopparam");
- }
-
loading_set_progress(50);
-
notify("");
dojo.addOnLoad(function() {
tab = dijit.byId(tab + "Tab");
if (tab) dijit.byId("pref-tabs").selectChild(tab);
}
+
+ var subop = getURLParam('subop');
+
+ if (subop == 'editFeed') {
+ var param = getURLParam('subopparam');
+
+ window.setTimeout('editFeed(' + param + ')', 100);
+ }
});
setTimeout("hotkey_prefix_timeout()", 5*1000);
dojo.require("dijit.InlineEditBox");
dojo.require("dijit.ColorPalette");
dojo.require("dijit.ProgressBar");
+ dojo.require("dijit.form.SimpleTextarea");
dojo.registerModulePath("lib", "..");
dojo.registerModulePath("fox", "../..");
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
- var new_link = transport.responseXML.getElementsByTagName("link")[0];
+ var reply = JSON.parse(transport.responseText);
+
+ var new_link = reply.link;
var e = $('pub_opml_url');
if (new_link) {
- e.href = new_link.firstChild.nodeValue;
- e.innerHTML = new_link.firstChild.nodeValue;
+ e.href = new_link;
+ e.innerHTML = new_link;
new Effect.Highlight(e);
}
}
+function clearTwitterCredentials() {
+ try {
+ var ok = confirm(__("This will clear your stored authentication information for Twitter. Continue?"));
+ if (ok) {
+ notify_progress("Clearing credentials...");
+
+ var query = "?op=pref-feeds&subop=remtwitterinfo";
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ notify_info("Twitter credentials have been cleared.");
+ updateFeedList();
+ } });
+ }
+
+ } catch (e) {
+ exception_error("clearTwitterCredentials", e);
+ }
+}
+
+function customizeCSS() {
+ try {
+ var query = "backend.php?op=dlg&id=customizeCSS";
+
+ if (dijit.byId("cssEditDlg"))
+ dijit.byId("cssEditDlg").destroyRecursive();
+
+ dialog = new dijit.Dialog({
+ id: "cssEditDlg",
+ title: __("Customize stylesheet"),
+ style: "width: 600px",
+ execute: function() {
+ notify_progress('Saving data...', true);
+ new Ajax.Request("backend.php", {
+ parameters: dojo.objectToQuery(this.attr('value')),
+ onComplete: function(transport) {
+ notify('');
+ window.location.reload();
+ } });
+
+ },
+ href: query});
+
+ dialog.show();
+
+ } catch (e) {
+ exception_error("customizeCSS", e);
+ }
+}