define([ 'timeline', 'view/base' ], function( Timeline, BaseView ){ var AlertTimelineView = BaseView.extend({ events : { 'shown .accordion-body' : 'publishTimelineHeight', 'hidden .accordion-body' : 'publishTimelineHeight' }, subscriptions : { 'view:dashboard:complete' : 'render' }, initialize : function(options) { _.bindAll(this); this.templar = options.templar; this.dashboardId = options.dashboardId; this.status = options.status; this.popovers = []; this.openPopovers = []; this.alertData = []; }, render : function() { this.templar.render({ path : 'alerttimeline', el : this.$el, data : {} }); this.$timeline = this.$el.find('.alert-timeline .accordion-inner'); this.$accordion = this.$el.find('.alert-timeline .accordion-body'); // this.setupAlertTimeline(); // // notify user with red bell indicator // this.setAlertStatus(); }, addPopover : function() { var self = this; jobAlertIdList = _.uniq(self.jobAlertList); for (var i = jobAlertIdList.length - 1; i >= 0; i--) { var initPopover = function(jobId) { var $content = $("
"), $closeBtn = $('