New: Scheduled tasks shwon in UI under System

This commit is contained in:
Mark McDowall 2014-09-11 23:06:11 -07:00
parent 879035b28a
commit 2b0ddb6131
14 changed files with 310 additions and 8 deletions

View file

@ -0,0 +1,41 @@
'use strict';
define(
[
'Cells/NzbDroneCell',
'Commands/CommandController'
], function (NzbDroneCell, CommandController) {
return NzbDroneCell.extend({
className: 'execute-task-cell',
events: {
'click .x-execute' : '_executeTask'
},
render: function () {
this.$el.empty();
var task = this.model.get('name');
this.$el.html(
'<i class="icon-cogs x-execute" title="Execute {0}"></i>'.format(task)
);
CommandController.bindToCommand({
element: this.$el.find('.x-execute'),
command: {
name : task
}
});
return this;
},
_executeTask: function () {
CommandController.Execute(this.model.get('name'), {
name : this.model.get('name')
});
}
});
});