diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-02-26 11:27:31 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-02-26 11:27:31 +0100 |
commit | 62b3afeeedfe054345f86093e2d243e956c1e3c9 (patch) | |
tree | bbd58f5c8c07f5d87b1c1cca73fa1d5af6178f48 /src/web/js/actions/RightPanelActions.js | |
parent | Updated Python dependencies. (diff) | |
download | newspipe-62b3afeeedfe054345f86093e2d243e956c1e3c9.tar.gz newspipe-62b3afeeedfe054345f86093e2d243e956c1e3c9.tar.bz2 newspipe-62b3afeeedfe054345f86093e2d243e956c1e3c9.zip |
The project is now using Poetry.
Diffstat (limited to 'src/web/js/actions/RightPanelActions.js')
-rw-r--r-- | src/web/js/actions/RightPanelActions.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/web/js/actions/RightPanelActions.js b/src/web/js/actions/RightPanelActions.js deleted file mode 100644 index 5d78e001..00000000 --- a/src/web/js/actions/RightPanelActions.js +++ /dev/null @@ -1,42 +0,0 @@ -var jquery = require('jquery'); -var JarrDispatcher = require('../dispatcher/JarrDispatcher'); -var ActionTypes = require('../constants/JarrConstants'); -var MenuActions = require('../actions/MenuActions'); - -var RightPanelActions = { - loadArticle: function(article_id, was_read_before, to_parse) { - var suffix = ''; - if(to_parse) { - suffix = '/parse'; - } - jquery.getJSON('/getart/' + article_id + suffix, - function(payload) { - JarrDispatcher.dispatch({ - type: ActionTypes.LOAD_ARTICLE, - article: payload, - was_read_before: was_read_before, - }); - } - ); - }, - _apiReq: function(meth, id, obj_type, data, success_callback) { - var args = {type: meth, contentType: 'application/json', - url: "api/v2.0/" + obj_type + "/" + id} - if(data) {args.data = JSON.stringify(data);} - if(success_callback) {args.success = success_callback;} - jquery.ajax(args); - }, - putObj: function(id, obj_type, fields) { - this._apiReq('PUT', id, obj_type, fields, MenuActions.reload); - }, - delObj: function(id, obj_type, fields) { - this._apiReq('DELETE', id, obj_type, null, MenuActions.reload); - }, - resetErrors: function(feed_id) { - this._apiReq('PUT', feed_id, 'feed', {error_count: 0, last_error: ''}, - MenuActions.reload); - - }, -}; - -module.exports = RightPanelActions; |