1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-25 22:51:29 +00:00

allow onclick editing of categories and drag-reordering of feeds and categories

This commit is contained in:
Andrew Dolgov
2010-11-18 13:46:11 +03:00
parent 567810362c
commit 7b8a143f1b
5 changed files with 257 additions and 40 deletions

View File

@@ -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);
}
}