2013-06-22 06:24:24 +00:00
|
|
|
|
'use strict';
|
2013-06-21 01:43:58 +00:00
|
|
|
|
|
|
|
|
|
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 });
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
folderSelected: function () {
|
|
|
|
|
this.trigger('folderSelected', this.model);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|