{"size": 980, "ext": "js", "max_stars_repo_path": "js/views/participants/paginatedList.js", "max_stars_repo_name": "bmeurant/tournament-front", "max_stars_repo_stars_event_min_datetime": "2015-05-02T18:47:01.000Z", "max_stars_repo_stars_event_max_datetime": "2015-05-02T18:47:01.000Z", "max_issues_repo_path": "js/views/participants/paginatedList.js", "max_issues_repo_name": "bmeurant/tournament-front", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/views/participants/paginatedList.js", "max_forks_repo_name": "bmeurant/tournament-front", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 32.6666666667, "max_line_length": 112, "alphanum_fraction": 0.6346938776}
define([
    'backbone',
    'hbs!templates/participants/paginatedList.html',
    'views/participants/list',
    'views/participants/pagination',
    'collections/participants',
    'pubsub'
], function(Backbone, paginatedListTemplate, ListView, PaginationView, ParticipantsCollection, Pubsub) {

    var PaginatedListView = Backbone.View.extend({

        template: paginatedListTemplate,
        elemType: 'participant',

        initialize: function() {
            this.collection = new ParticipantsCollection();
            this.refreshView();
            new ListView({root: this.$('.elements'), params: this.options.params, collection: this.collection});
            new PaginationView({root: this.$('.pagination'), collection: this.collection});
        },

        refreshView: function() {
            this.render();
            Pubsub.trigger(App.Events.VIEW_CHANGED, this.elemType, 'list');
            return this;
        }
    });

    return PaginatedListView;
});