mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
rjs -> webpack
This commit is contained in:
parent
344f3d66ef
commit
428a1439e5
399 changed files with 11591 additions and 16139 deletions
|
@ -1,41 +1,25 @@
|
|||
'use strict';
|
||||
var $ = require('jquery');
|
||||
var vent = require('../../vent');
|
||||
var Marionette = require('marionette');
|
||||
var NzbDroneCell = require('../../Cells/NzbDroneCell');
|
||||
|
||||
define(
|
||||
[
|
||||
'jquery',
|
||||
'vent',
|
||||
'marionette',
|
||||
'Cells/NzbDroneCell'
|
||||
], function ($, vent, Marionette, NzbDroneCell) {
|
||||
return NzbDroneCell.extend({
|
||||
|
||||
className: 'episode-actions-cell',
|
||||
|
||||
events: {
|
||||
'click .x-failed' : '_markAsFailed'
|
||||
},
|
||||
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
|
||||
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 () {
|
||||
var url = window.NzbDrone.ApiRoot + '/history/failed';
|
||||
var data = {
|
||||
id: this.model.get('id')
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'POST',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
module.exports = NzbDroneCell.extend({
|
||||
className : 'episode-actions-cell',
|
||||
events : {"click .x-failed" : '_markAsFailed'},
|
||||
render : function(){
|
||||
this.$el.empty();
|
||||
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(){
|
||||
var url = window.NzbDrone.ApiRoot + '/history/failed';
|
||||
var data = {id : this.model.get('id')};
|
||||
$.ajax({
|
||||
url : url,
|
||||
type : 'POST',
|
||||
data : data
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue