1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/AddSeries/RootFolders/ItemView.js
2013-07-11 14:28:57 -07:00

32 lines
730 B
JavaScript

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