}
function labellist_callback2(transport) {
-
try {
-
dijit.byId('labelConfigTab').attr('content', transport.responseText);
- closeInfoBox();
-
notify("");
-
} catch (e) {
exception_error("labellist_callback2", e);
}
}
function updateFeedList(sort_key) {
-
- try {
-
- var feed_search = $("feed_search");
- var search = "";
- if (feed_search) { search = feed_search.value; }
-
- var slat = $("show_last_article_times");
-
- var slat_checked = false;
- if (slat) {
- slat_checked = slat.checked;
- }
-
- var query = "?op=pref-feeds" +
- "&sort=" + param_escape(sort_key) +
- "&slat=" + param_escape(slat_checked) +
- "&search=" + param_escape(search);
-
new Ajax.Request("backend.php", {
- parameters: query,
+ parameters: "?op=pref-feeds",
onComplete: function(transport) {
feedlist_callback2(transport);
} });
- } catch (e) {
- exception_error("updateFeedList", e);
- }
}
function updateUsersList(sort_key) {
}
-function editFilter(id, event) {
+function editFilter(id) {
try {
var query = "backend.php?op=pref-filters&subop=edit&id=" + param_escape(id);
}
}
+function opmlImportComplete(iframe) {
+ try {
+ if (!iframe.contentDocument.body.innerHTML) return false;
+
+ notify('');
+
+ if (dijit.byId('opmlImportDlg'))
+ dijit.byId('opmlImportDlg').destroyRecursive();
+
+ var content = iframe.contentDocument.body.innerHTML;
+
+ dialog = new dijit.Dialog({
+ id: "opmlImportDlg",
+ title: __("OPML Import"),
+ style: "width: 600px",
+ onCancel: function() {
+ updateFeedList();
+ },
+ content: content});
+
+ dialog.show();
+
+ } catch (e) {
+ exception_error("opmlImportComplete", e);
+ }
+}
+
function opmlImport() {
var opml_file = $("opml_file");
try {
if (!noupdate) {
notify_progress("Loading, please wait...");
- closeInfoBox();
if (id == "feedConfig") {
updateFeedList();
dojo.require("dijit.InlineEditBox");
dojo.require("dijit.ColorPalette");
dojo.require("dijit.ProgressBar");
+ dojo.require("dijit.form.SimpleTextarea");
dojo.registerModulePath("lib", "..");
dojo.registerModulePath("fox", "../..");
function pref_hotkey_handler(e) {
try {
-
- if (dijit.getEnclosingWidget(e.target)) return;
+ if (e.target.nodeName == "INPUT") return;
var keycode;
var shift_key = false;
closeInfoBox();
}
- var dialog = dijit.byId("infoBox");
- var dialog_visible = false;
-
- if (dialog)
- dialog_visible = Element.visible(dialog.domNode);
-
- if (dialog_visible || !hotkeys_enabled) {
- console.log("hotkeys disabled");
- return;
- }
-
if (keycode == 16) return; // ignore lone shift
if (keycode == 17) return; // ignore lone ctrl
return false;
}
-function opmlImportDone() {
- closeInfoBox();
- updateFeedList();
-}
-
-function opmlImportHandler(iframe) {
- try {
- var tmp = new Object();
- tmp.responseText = iframe.document.body.innerHTML;
- notify('');
- infobox_callback2(tmp);
- } catch (e) {
- exception_error("opml_import_handler", e);
- }
-}
-
function clearFeedAccessKeys() {
var ok = confirm(__("This will invalidate all previously generated feed URLs. Continue?"));
}
}
+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);
+ }
+}