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,53 +1,34 @@
|
|||
'use strict';
|
||||
var vent = require('../vent');
|
||||
var NzbDroneCell = require('./NzbDroneCell');
|
||||
var CommandController = require('../Commands/CommandController');
|
||||
|
||||
define(
|
||||
[
|
||||
'vent',
|
||||
'Cells/NzbDroneCell',
|
||||
'Commands/CommandController'
|
||||
], function (vent, NzbDroneCell, CommandController) {
|
||||
return NzbDroneCell.extend({
|
||||
|
||||
className: 'series-actions-cell',
|
||||
|
||||
ui: {
|
||||
refresh: '.x-refresh'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-edit' : '_editSeries',
|
||||
'click .x-refresh' : '_refreshSeries'
|
||||
},
|
||||
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
|
||||
this.$el.html(
|
||||
'<i class="icon-refresh x-refresh hidden-xs" title="" data-original-title="Update series info and scan disk"></i> ' +
|
||||
'<i class="icon-nd-edit x-edit" title="" data-original-title="Edit Series"></i>'
|
||||
);
|
||||
|
||||
CommandController.bindToCommand({
|
||||
element: this.$el.find('.x-refresh'),
|
||||
command: {
|
||||
name : 'refreshSeries',
|
||||
seriesId : this.model.get('id')
|
||||
}
|
||||
});
|
||||
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
},
|
||||
|
||||
_editSeries: function () {
|
||||
vent.trigger(vent.Commands.EditSeriesCommand, {series:this.model});
|
||||
},
|
||||
|
||||
_refreshSeries: function () {
|
||||
CommandController.Execute('refreshSeries', {
|
||||
name : 'refreshSeries',
|
||||
seriesId: this.model.id
|
||||
});
|
||||
module.exports = NzbDroneCell.extend({
|
||||
className : 'series-actions-cell',
|
||||
ui : {refresh : '.x-refresh'},
|
||||
events : {
|
||||
"click .x-edit" : '_editSeries',
|
||||
"click .x-refresh" : '_refreshSeries'
|
||||
},
|
||||
render : function(){
|
||||
this.$el.empty();
|
||||
this.$el.html('<i class="icon-refresh x-refresh hidden-xs" title="" data-original-title="Update series info and scan disk"></i> ' + '<i class="icon-nd-edit x-edit" title="" data-original-title="Edit Series"></i>');
|
||||
CommandController.bindToCommand({
|
||||
element : this.$el.find('.x-refresh'),
|
||||
command : {
|
||||
name : 'refreshSeries',
|
||||
seriesId : this.model.get('id')
|
||||
}
|
||||
});
|
||||
});
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
},
|
||||
_editSeries : function(){
|
||||
vent.trigger(vent.Commands.EditSeriesCommand, {series : this.model});
|
||||
},
|
||||
_refreshSeries : function(){
|
||||
CommandController.Execute('refreshSeries', {
|
||||
name : 'refreshSeries',
|
||||
seriesId : this.model.id
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue