1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-21 22:05:43 -04:00
Files
Radarr/src/UI/Activity/Queue/RemoveFromQueueView.js
T
2015-02-14 19:12:20 +01:00

35 lines
829 B
JavaScript

var vent = require('../../vent');
var Marionette = require('marionette');
module.exports = Marionette.ItemView.extend({
template : 'Activity/Queue/RemoveFromQueueViewTemplate',
events : {
'click .x-confirm-remove' : 'removeItem'
},
ui : {
blacklist : '.x-blacklist',
indicator : '.x-indicator'
},
initialize : function(options) {
this.templateHelpers = {
showBlacklist : options.showBlacklist
};
},
removeItem : function() {
var blacklist = this.ui.blacklist.prop('checked') || false;
this.ui.indicator.show();
this.model.destroy({
data : { 'blacklist' : blacklist },
wait : true
}).done(function() {
vent.trigger(vent.Commands.CloseModalCommand);
});
}
});