UI Cleanup - Updated Cells subtree.

This commit is contained in:
Taloth Saldono
2015-02-13 22:04:39 +01:00
parent 83b8ab8fe9
commit 7b5c0a952b
23 changed files with 334 additions and 143 deletions
+13 -6
View File
@@ -3,17 +3,24 @@ var Backgrid = require('backgrid');
module.exports = Backgrid.Cell.extend({
className : 'delete-episode-file-cell',
events : {"click" : '_onClick'},
render : function(){
events : {
'click' : '_onClick'
},
render : function() {
this.$el.empty();
this.$el.html('<i class="icon-nd-delete"></i>');
return this;
},
_onClick : function(){
_onClick : function() {
var self = this;
if(window.confirm('Are you sure you want to delete \'{0}\' from disk?'.format(this.model.get('path')))) {
this.model.destroy().done(function(){
vent.trigger(vent.Events.EpisodeFileDeleted, {episodeFile : self.model});
if (window.confirm('Are you sure you want to delete \'{0}\' from disk?'.format(this.model.get('path')))) {
this.model.destroy().done(function() {
vent.trigger(vent.Events.EpisodeFileDeleted, { episodeFile : self.model });
});
}
}