summaryrefslogtreecommitdiff
path: root/js/PrefFeedTree.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-02 16:17:36 +0300
committerAndrew Dolgov <[email protected]>2018-12-02 16:17:36 +0300
commitb9869dbc01f505e87def7463e032914cab49f26c (patch)
treeca6ac2261fa163b3735e4d740d7edebc0e54dce5 /js/PrefFeedTree.js
parent58e54282d36d54c2be0e50f78fbc500772a3b762 (diff)
prefs: remove some more stuff from global context (user management, etc)
Diffstat (limited to 'js/PrefFeedTree.js')
-rw-r--r--js/PrefFeedTree.js29
1 files changed, 19 insertions, 10 deletions
diff --git a/js/PrefFeedTree.js b/js/PrefFeedTree.js
index afb56faa1..dbb188a34 100644
--- a/js/PrefFeedTree.js
+++ b/js/PrefFeedTree.js
@@ -82,6 +82,15 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
getIconClass: function (item, opened) {
return (!item || this.model.store.getValue(item, 'type') == 'category') ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "feedIcon";
},
+ reload: function() {
+ const searchElem = $("feed_search");
+ let search = (searchElem) ? searchElem.value : "";
+
+ xhrPost("backend.php", { op: "pref-feeds", search: search }, (transport) => {
+ dijit.byId('feedConfigTab').attr('content', transport.responseText);
+ notify("");
+ });
+ },
checkItemAcceptance: function(target, source, position) {
const item = dijit.getEnclosingWidget(target).item;
@@ -113,14 +122,14 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
notify_progress("Loading, please wait...");
xhrPost("backend.php", {op: "pref-feeds", method: "feedsortreset"}, () => {
- updateFeedList();
+ this.reload();
});
},
resetCatOrder: function() {
notify_progress("Loading, please wait...");
xhrPost("backend.php", {op: "pref-feeds", method: "catsortreset"}, () => {
- updateFeedList();
+ this.reload();
});
},
removeCategory: function(id, item) {
@@ -129,7 +138,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
xhrPost("backend.php", {op: "pref-feeds", method: "removeCat", ids: id}, () => {
notify('');
- updateFeedList();
+ this.reload();
});
}
},
@@ -147,7 +156,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
};
xhrPost("backend.php", query, () => {
- updateFeedList();
+ this.reload();
});
}
@@ -189,7 +198,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
};
xhrPost("backend.php", query, () => {
- updateFeedList();
+ this.reload();
});
}
} else {
@@ -284,7 +293,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
xhrPost("backend.php", query, () => {
dialog.hide();
- updateFeedList();
+ dijit.byId("feedTree").reload();
});
}
},
@@ -306,7 +315,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
notify_progress("Loading, please wait...");
xhrPost("backend.php", { op: 'pref-feeds', method: 'renamecat', id: id, title: new_name }, () => {
- updateFeedList();
+ this.reload();
});
}
},
@@ -318,7 +327,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
xhrPost("backend.php", {op: "pref-feeds", method: "addCat", cat: title}, () => {
notify('');
- updateFeedList();
+ this.reload();
});
}
},
@@ -339,7 +348,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
xhrPost("backend.php", this.attr('value'), () => {
notify("");
- updateFeedList();
+ dijit.byId("feedTree").reload();
dialog.hide();
});
}
@@ -376,8 +385,8 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
xhrPost("backend.php", query, () => {
notify('');
+ dijit.byId("feedTree").reload();
dialog.hide();
- updateFeedList();
});
}