summaryrefslogtreecommitdiff
path: root/js/feedlist.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/feedlist.js')
-rw-r--r--js/feedlist.js36
1 files changed, 33 insertions, 3 deletions
diff --git a/js/feedlist.js b/js/feedlist.js
index ddef1a586..f2f5e60ba 100644
--- a/js/feedlist.js
+++ b/js/feedlist.js
@@ -190,7 +190,7 @@ const Feeds = {
try {
Feeds.init();
- setLoadingProgress(25);
+ Utils.setLoadingProgress(25);
} catch (e) {
exception_error(e);
}
@@ -204,7 +204,7 @@ const Feeds = {
init: function() {
console.log("in feedlist init");
- setLoadingProgress(50);
+ Utils.setLoadingProgress(50);
document.onkeydown = App.hotkeyHandler;
setInterval(hotkeyPrefixTimeout, 3 * 1000);
@@ -602,5 +602,35 @@ const Feeds = {
if (nuf)
return tree.model.store.getValue(nuf, 'bare_id');
- }
+ },
+ search: function() {
+ const query = "backend.php?op=feeds&method=search&param=" +
+ param_escape(Feeds.getActiveFeedId() + ":" + Feeds.activeFeedIsCat());
+
+ if (dijit.byId("searchDlg"))
+ dijit.byId("searchDlg").destroyRecursive();
+
+ const dialog = new dijit.Dialog({
+ id: "searchDlg",
+ title: __("Search"),
+ style: "width: 600px",
+ execute: function () {
+ if (this.validate()) {
+ Feeds._search_query = this.attr('value');
+ this.hide();
+ Feeds.viewCurrentFeed();
+ }
+ },
+ href: query
+ });
+
+ dialog.show();
+ },
+ updateRandomFeed: function() {
+ console.log("in update_random_feed");
+
+ xhrPost("backend.php", {op: "rpc", method: "updateRandomFeed"}, (transport) => {
+ Utils.handleRpcJson(transport, true);
+ });
+ },
};