mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
rjs -> webpack
This commit is contained in:
parent
344f3d66ef
commit
428a1439e5
399 changed files with 11591 additions and 16139 deletions
|
@ -1,42 +1,21 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'Cells/NzbDroneCell',
|
||||
'Commands/CommandController'
|
||||
], function (NzbDroneCell, CommandController) {
|
||||
return NzbDroneCell.extend({
|
||||
var NzbDroneCell = require('../../Cells/NzbDroneCell');
|
||||
var CommandController = require('../../Commands/CommandController');
|
||||
|
||||
className: 'execute-task-cell',
|
||||
|
||||
events: {
|
||||
'click .x-execute' : '_executeTask'
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
||||
this.$el.empty();
|
||||
|
||||
var name = this.model.get('name');
|
||||
var task = this.model.get('taskName');
|
||||
|
||||
this.$el.html(
|
||||
'<i class="icon-refresh icon-can-spin x-execute" title="Execute {0}"></i>'.format(name)
|
||||
);
|
||||
|
||||
CommandController.bindToCommand({
|
||||
element: this.$el.find('.x-execute'),
|
||||
command: {
|
||||
name : task
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
_executeTask: function () {
|
||||
CommandController.Execute(this.model.get('taskName'), {
|
||||
name : this.model.get('taskName')
|
||||
});
|
||||
}
|
||||
module.exports = NzbDroneCell.extend({
|
||||
className : 'execute-task-cell',
|
||||
events : {"click .x-execute" : '_executeTask'},
|
||||
render : function(){
|
||||
this.$el.empty();
|
||||
var name = this.model.get('name');
|
||||
var task = this.model.get('taskName');
|
||||
this.$el.html('<i class="icon-refresh icon-can-spin x-execute" title="Execute {0}"></i>'.format(name));
|
||||
CommandController.bindToCommand({
|
||||
element : this.$el.find('.x-execute'),
|
||||
command : {name : task}
|
||||
});
|
||||
});
|
||||
return this;
|
||||
},
|
||||
_executeTask : function(){
|
||||
CommandController.Execute(this.model.get('taskName'), {name : this.model.get('taskName')});
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue