mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-23 11:04:52 +02:00
28 lines
672 B
JavaScript
28 lines
672 B
JavaScript
|
"use strict";
|
||
|
|
||
|
define(
|
||
|
[
|
||
|
'marionette'
|
||
|
], function (Marionette) {
|
||
|
|
||
|
return Marionette.ItemView.extend({
|
||
|
|
||
|
template: 'AddSeries/RootFolders/RootFolderItemTemplate',
|
||
|
tagName : 'tr',
|
||
|
|
||
|
events: {
|
||
|
'click .x-remove': 'removeFolder',
|
||
|
'click .x-folder': 'folderSelected'
|
||
|
},
|
||
|
|
||
|
removeFolder: function () {
|
||
|
this.model.destroy({ wait: true });
|
||
|
this.model.collection.remove(this.model);
|
||
|
},
|
||
|
|
||
|
folderSelected: function () {
|
||
|
this.trigger('folderSelected', this.model);
|
||
|
}
|
||
|
});
|
||
|
});
|