aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/actions/RightPanelActions.js
blob: 7a7b935acc271b2acb67649ec23420922b62e7c4 (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 ActionTypes = require('../constants/JarrConstants');
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: ActionTypes.LOAD_RIGHT_PANEL,
                articles: payload.articles,
            });
        });
    },
};

module.exports = RightPanelActions;
bgstack15