UI Cleanup - Updated Episode subtree.

This commit is contained in:
Taloth Saldono 2015-02-13 22:05:08 +01:00
parent 7b7f199587
commit fb7988edb8
11 changed files with 295 additions and 174 deletions

View file

@ -4,18 +4,28 @@ var Marionette = require('marionette');
var NzbDroneCell = require('../../Cells/NzbDroneCell');
module.exports = NzbDroneCell.extend({
className : 'episode-actions-cell',
events : {"click .x-failed" : '_markAsFailed'},
render : function(){
className : 'episode-actions-cell',
events : {
'click .x-failed' : '_markAsFailed'
},
render : function() {
this.$el.empty();
if(this.model.get('eventType') === 'grabbed') {
if (this.model.get('eventType') === 'grabbed') {
this.$el.html('<i class="icon-nd-delete x-failed" title="Mark download as failed"></i>');
}
return this;
},
_markAsFailed : function(){
_markAsFailed : function() {
var url = window.NzbDrone.ApiRoot + '/history/failed';
var data = {id : this.model.get('id')};
var data = {
id : this.model.get('id')
};
$.ajax({
url : url,
type : 'POST',