aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/actions
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-25 12:40:23 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 23:47:57 +0100
commitf0dd6d526160fdb98a5f55b4e45b84652590df58 (patch)
treef2a4e82f7618f9d22052f954b22ce8a03ef80ee1 /src/web/js/actions
parentdoing some design (diff)
downloadnewspipe-f0dd6d526160fdb98a5f55b4e45b84652590df58.tar.gz
newspipe-f0dd6d526160fdb98a5f55b4e45b84652590df58.tar.bz2
newspipe-f0dd6d526160fdb98a5f55b4e45b84652590df58.zip
bootstraping right panel
Diffstat (limited to 'src/web/js/actions')
-rw-r--r--src/web/js/actions/RightPanelActions.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/web/js/actions/RightPanelActions.js b/src/web/js/actions/RightPanelActions.js
new file mode 100644
index 00000000..3cd549e5
--- /dev/null
+++ b/src/web/js/actions/RightPanelActions.js
@@ -0,0 +1,20 @@
+var JarrDispatcher = require('../dispatcher/JarrDispatcher');
+var RightActionTypes = require('../constants/JarrConstants').RightPanelActionTypes;
+var jquery = require('jquery');
+var RightPanelStore = require('../stores/RightPanelStore');
+
+
+var RightPanelActions = {
+ load: function(obj_type, obj_id) {
+ filters = MiddlePanelStore.getRequestFilter();
+ jquery.getJSON('api/v2.0/' + obj_type + '/' + obj_id, function(payload) {
+ _last_fetched_with = filters;
+ JarrDispatcher.dispatch({
+ type: RightPanelActionTypes.LOAD_RIGHT_PANEL,
+ articles: payload.articles,
+ });
+ });
+ },
+};
+
+module.exports = RightPanelActions;
bgstack15