parent
b556eda4a0
commit
f5118fc430
@ -1,3 +1,5 @@
|
||||
var Marionette = require('marionette');
|
||||
|
||||
module.exports = Marionette.CompositeView.extend({template : 'AddSeries/EmptyViewTemplate'});
|
||||
module.exports = Marionette.CompositeView.extend({
|
||||
template : 'AddSeries/EmptyViewTemplate'
|
||||
});
|
@ -1,11 +1,13 @@
|
||||
var Marionette = require('marionette');
|
||||
|
||||
module.exports = Marionette.CompositeView.extend({
|
||||
template : 'AddSeries/ErrorViewTemplate',
|
||||
initialize : function(options){
|
||||
template : 'AddSeries/ErrorViewTemplate',
|
||||
|
||||
initialize : function(options) {
|
||||
this.options = options;
|
||||
},
|
||||
templateHelpers : function(){
|
||||
|
||||
templateHelpers : function() {
|
||||
return this.options;
|
||||
}
|
||||
});
|
@ -1,11 +1,13 @@
|
||||
var Marionette = require('marionette');
|
||||
|
||||
module.exports = Marionette.CompositeView.extend({
|
||||
template : 'AddSeries/NotFoundViewTemplate',
|
||||
initialize : function(options){
|
||||
template : 'AddSeries/NotFoundViewTemplate',
|
||||
|
||||
initialize : function(options) {
|
||||
this.options = options;
|
||||
},
|
||||
templateHelpers : function(){
|
||||
|
||||
templateHelpers : function() {
|
||||
return this.options;
|
||||
}
|
||||
});
|
@ -1,22 +1,27 @@
|
||||
var Marionette = require('marionette');
|
||||
|
||||
module.exports = Marionette.ItemView.extend({
|
||||
template : 'AddSeries/RootFolders/RootFolderItemViewTemplate',
|
||||
tagName : 'tr',
|
||||
initialize : function(){
|
||||
template : 'AddSeries/RootFolders/RootFolderItemViewTemplate',
|
||||
tagName : 'tr',
|
||||
|
||||
initialize : function() {
|
||||
this.listenTo(this.model, 'change', this.render);
|
||||
},
|
||||
events : {
|
||||
|
||||
events : {
|
||||
'click .x-delete' : 'removeFolder',
|
||||
'click .x-folder' : 'folderSelected'
|
||||
},
|
||||
removeFolder : function(){
|
||||
|
||||
removeFolder : function() {
|
||||
var self = this;
|
||||
this.model.destroy().success(function(){
|
||||
|
||||
this.model.destroy().success(function() {
|
||||
self.close();
|
||||
});
|
||||
},
|
||||
folderSelected : function(){
|
||||
|
||||
folderSelected : function() {
|
||||
this.trigger('folderSelected', this.model);
|
||||
}
|
||||
});
|
Loading…
Reference in new issue