From f0dd6d526160fdb98a5f55b4e45b84652590df58 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Mon, 25 Jan 2016 12:40:23 +0100 Subject: bootstraping right panel --- src/web/js/actions/RightPanelActions.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/web/js/actions/RightPanelActions.js (limited to 'src/web/js/actions/RightPanelActions.js') 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; -- cgit