aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/actions/RightPanelActions.js
blob: 3cd549e522b9a02e8036fcb6628f7d041a98e042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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