summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-18 13:46:11 +0300
committerAndrew Dolgov <[email protected]>2010-11-18 13:46:11 +0300
commit7b8a143f1b523a5b70b92af8389af1cb1cb0a844 (patch)
treeb50bd695af036e1f709fb0f2a1fa1abfe165316e /prefs.js
parent567810362c08bb66a81435a9280d34efec9a628f (diff)
allow onclick editing of categories and drag-reordering of feeds and categories
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js57
1 files changed, 57 insertions, 0 deletions
diff --git a/prefs.js b/prefs.js
index 556c71dbb..356338608 100644
--- a/prefs.js
+++ b/prefs.js
@@ -1165,6 +1165,7 @@ function init() {
dojo.require("dijit.form.DropDownButton");
dojo.require("dijit.Menu");
dojo.require("dijit.tree.dndSource");
+ dojo.require("dijit.TooltipDialog");
dojo.registerModulePath("lib", "..");
dojo.registerModulePath("fox", "../..");
@@ -2040,3 +2041,59 @@ function handle_rpc_reply(transport, scheduled_call) {
return true;
}
+function resetFeedOrder() {
+ try {
+ notify_progress("Loading, please wait...");
+
+ new Ajax.Request("backend.php", {
+ parameters: "?op=pref-feeds&subop=feedsortreset",
+ onComplete: function(transport) {
+ updateFeedList();
+ } });
+
+
+ } catch (e) {
+ exception_error("resetFeedOrder");
+ }
+}
+
+function resetCatOrder() {
+ try {
+ notify_progress("Loading, please wait...");
+
+ new Ajax.Request("backend.php", {
+ parameters: "?op=pref-feeds&subop=catsortreset",
+ onComplete: function(transport) {
+ updateFeedList();
+ } });
+
+
+ } catch (e) {
+ exception_error("resetCatOrder");
+ }
+}
+
+function editCat(id, item, event) {
+ try {
+ var new_name = prompt(__('Rename category to:'), item.name);
+
+ if (new_name && new_name != item.name) {
+
+ notify_progress("Loading, please wait...");
+
+ new Ajax.Request("backend.php", {
+ parameters: {
+ op: 'pref-feeds',
+ subop: 'renamecat',
+ id: id,
+ title: new_name,
+ },
+ onComplete: function(transport) {
+ updateFeedList();
+ } });
+ }
+
+ } catch (e) {
+ exception_error("editCat", e);
+ }
+}