diff options
author | Andrew Dolgov <[email protected]> | 2018-12-01 17:21:26 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-01 17:21:26 +0300 |
commit | d86ddbc635376231ba2e0a70c04f526cb9fedd58 (patch) | |
tree | 6bc975b9c984fe815962e5d1afcde5fba1c816c8 /js/viewfeed.js | |
parent | 049a37aa0e7d37cafd979e7d470c7649700b5010 (diff) |
further objectification of JS code
Diffstat (limited to 'js/viewfeed.js')
-rwxr-xr-x | js/viewfeed.js | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js index 637aa0473..bb3f5ef98 100755 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -75,7 +75,7 @@ const Headlines = { const view_mode = document.forms["main_toolbar_form"].view_mode.value; const unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length; const num_all = $$("#headlines-frame > div[id*=RROW]").length; - const num_unread = getFeedUnread(Feeds.getActiveFeedId(), Feeds.activeFeedIsCat()); + const num_unread = Feeds.getFeedUnread(Feeds.getActiveFeedId(), Feeds.activeFeedIsCat()); // TODO implement marked & published @@ -248,7 +248,7 @@ const Headlines = { } }, onLoaded: function(transport, offset) { - const reply = App.handleRpcJson(transport); + const reply = Utils.handleRpcJson(transport); console.log("Headlines.onLoaded: offset=", offset); @@ -436,7 +436,7 @@ function view(id, noexpand) { xhrPost("backend.php", {op: "article", method: "view", id: id, cids: cids.toString()}, (transport) => { try { - const reply = App.handleRpcJson(transport); + const reply = Utils.handleRpcJson(transport); if (reply) { @@ -491,7 +491,7 @@ function toggleMark(id, client_only) { if (!client_only) xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); }); } } @@ -518,7 +518,7 @@ function togglePub(id, client_only) { if (!client_only) xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); }); } @@ -642,7 +642,7 @@ function toggleUnread(id, cmode) { if (row.className != origClassName) xhrPost("backend.php", {op: "rpc", method: "catchupSelected", cmode: cmode, ids: id},(transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); }); } } @@ -659,7 +659,7 @@ function selectionRemoveLabel(id, ids) { ids: ids.toString(), lid: id }; xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); updateHeadlineLabels(transport); }); } @@ -676,7 +676,7 @@ function selectionAssignLabel(id, ids) { ids: ids.toString(), lid: id }; xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); updateHeadlineLabels(transport); }); } @@ -719,7 +719,7 @@ function selectionToggleUnread(params) { notify_progress("Loading, please wait..."); xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); if (callback) callback(transport); }); } @@ -740,7 +740,7 @@ function selectionToggleMarked(ids) { ids: rows.toString(), cmode: 2 }; xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); }); } @@ -762,7 +762,7 @@ function selectionTogglePublished(ids) { ids: rows.toString(), cmode: 2 }; xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); }); } } @@ -862,7 +862,7 @@ function deleteSelection() { return; } - const fn = getFeedName(Feeds.getActiveFeedId(), Feeds.activeFeedIsCat()); + const fn = Feeds.getFeedName(Feeds.getActiveFeedId(), Feeds.activeFeedIsCat()); let str; if (Feeds.getActiveFeedId() != 0) { @@ -881,7 +881,7 @@ function deleteSelection() { const query = { op: "rpc", method: "delete", ids: rows.toString() }; xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); Feeds.viewCurrentFeed(); }); } @@ -896,7 +896,7 @@ function archiveSelection() { return; } - const fn = getFeedName(Feeds.getActiveFeedId(), Feeds.activeFeedIsCat()); + const fn = Feeds.getFeedName(Feeds.getActiveFeedId(), Feeds.activeFeedIsCat()); let str; let op; @@ -924,7 +924,7 @@ function archiveSelection() { const query = {op: "rpc", method: op, ids: rows.toString()}; xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); Feeds.viewCurrentFeed(); }); } @@ -938,7 +938,7 @@ function catchupSelection() { return; } - const fn = getFeedName(Feeds.getActiveFeedId(), Feeds.activeFeedIsCat()); + const fn = Feeds.getFeedName(Feeds.getActiveFeedId(), Feeds.activeFeedIsCat()); let str = ngettext("Mark %d selected article in %s as read?", "Mark %d selected articles in %s as read?", rows.length); @@ -1091,7 +1091,7 @@ function catchupBatchedArticles(callback) { cmode: 0, ids: batch.toString() }; xhrPost("backend.php", query, (transport) => { - const reply = App.handleRpcJson(transport); + const reply = Utils.handleRpcJson(transport); if (reply) { const batch = reply.ids; @@ -1167,7 +1167,7 @@ function catchupRelativeToArticle(below, id) { cmode: 0, ids: ids_to_mark.toString() }; xhrPost("backend.php", query, (transport) => { - App.handleRpcJson(transport); + Utils.handleRpcJson(transport); }); } } @@ -1489,7 +1489,7 @@ function initHeadlinesMenu() { menu.addChild(new dijit.MenuItem({ label: __("Mark feed as read"), onClick: function () { - catchupFeedInGroup(this.getParent().currentTarget.getAttribute("data-feed-id")); + Feeds.catchupFeedInGroup(this.getParent().currentTarget.getAttribute("data-feed-id")); } })); |