You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/src/UI/Cells/SeriesActionsCell.js

45 lines
1.3 KiB

var vent = require('vent');
var NzbDroneCell = require('./NzbDroneCell');
var CommandController = require('../Commands/CommandController');
module.exports = NzbDroneCell.extend({
className : 'series-actions-cell',
ui : {
refresh : '.x-refresh'
},
events : {
'click .x-edit' : '_editSeries',
'click .x-refresh' : '_refreshSeries'
},
render : function() {
this.$el.empty();
this.$el.html('<i class="icon-lidarr-refresh x-refresh hidden-xs" title="" data-original-title="Update series info and scan disk"></i> ' +
'<i class="icon-lidarr-edit x-edit" title="" data-original-title="Edit Series"></i>');
CommandController.bindToCommand({
element : this.$el.find('.x-refresh'),
command : {
name : 'refreshSeries',
seriesId : this.model.get('id')
}
});
this.delegateEvents();
return this;
},
_editSeries : function() {
vent.trigger(vent.Commands.EditSeriesCommand, { series : this.model });
},
_refreshSeries : function() {
CommandController.Execute('refreshSeries', {
name : 'refreshSeries',
seriesId : this.model.id
});
}
});