Sonarr/src/UI/Activity/Blacklist/BlacklistActionsCell.js

29 lines
774 B
JavaScript
Raw Normal View History

var vent = require('vent');
2015-02-03 01:18:45 +00:00
var NzbDroneCell = require('../../Cells/NzbDroneCell');
var BlacklistDetailsLayout = require('./Details/BlacklistDetailsLayout');
2015-02-03 01:18:45 +00:00
module.exports = NzbDroneCell.extend({
className : 'blacklist-actions-cell',
2015-02-13 21:03:50 +00:00
events : {
'click .x-details' : '_details',
'click .x-delete' : '_delete'
2015-02-03 01:18:45 +00:00
},
2015-02-13 21:03:50 +00:00
render : function() {
2015-02-03 01:18:45 +00:00
this.$el.empty();
this.$el.html('<i class="icon-sonarr-info x-details"></i>' +
'<i class="icon-sonarr-delete x-delete"></i>');
2015-02-13 21:03:50 +00:00
2015-02-03 01:18:45 +00:00
return this;
},
2015-02-13 21:03:50 +00:00
_details : function() {
vent.trigger(vent.Commands.OpenModalCommand, new BlacklistDetailsLayout({ model : this.model }));
},
2015-02-13 21:03:50 +00:00
_delete : function() {
2015-02-03 01:18:45 +00:00
this.model.destroy();
}
2015-02-13 21:03:50 +00:00
});