{"size": 1118, "ext": "js", "max_stars_repo_path": "client/js/modules/status/views/epicspages.js", "max_stars_repo_name": "Anthchirp/SynchWeb", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/js/modules/status/views/epicspages.js", "max_issues_repo_name": "Anthchirp/SynchWeb", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/js/modules/status/views/epicspages.js", "max_forks_repo_name": "Anthchirp/SynchWeb", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.2162162162, "max_line_length": 180, "alphanum_fraction": 0.5286225403}
define(['marionette',
    'views/dialog',
    'modules/status/collections/epicspages',
    'modules/status/views/motors',
    ], function(Marionette, DialogView, EpicsPages, MotorsView) {
    

    var EPButton = Marionette.ItemView.extend({
        tagName: 'li',
        template: _.template('<a href="#" class="button"><%=NAME%></a>'),
        
        events: {
            'click a.button': 'showMotors',
        },
        
        showMotors: function(e) {
            e.preventDefault()
            app.dialog.show(new DialogView({ title: 'EPICS '+this.model.get('NAME'), view: new MotorsView({ epid: this.model.get('ID'), bl: this.getOption('bl') }), autoSize: 1 }))
        },
    })
    
    return Marionette.CollectionView.extend({
        tagName: 'ul',
        childView: EPButton,
        childViewOptions: function() {
            return {
                bl: this.getOption('bl')
            }
        },
        
        initialize: function(options) {
            this.collection = new EpicsPages(null, { bl: this.getOption('bl') })
            this.collection.fetch()
        },
    })
        
})