aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/actions/RightPanelActions.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/js/actions/RightPanelActions.js')
-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