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.
Radarr/UI/AddSeries/RootFolders/ItemView.js

38 lines
853 B

'use strict';
12 years ago
define(
[
'marionette'
], function (Marionette) {
return Marionette.ItemView.extend({
template: 'AddSeries/RootFolders/ItemViewTemplate',
12 years ago
tagName : 'tr',
initialize: function () {
this.listenTo(this.model, 'change', this.render);
},
12 years ago
events: {
'click .x-delete': 'removeFolder',
12 years ago
'click .x-folder': 'folderSelected'
},
removeFolder: function () {
var self = this;
this.model.destroy()
.success(function(){
self.close();
});
12 years ago
},
folderSelected: function () {
this.trigger('folderSelected', this.model);
}
});
});