1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

rjs -> webpack

This commit is contained in:
Keivan Beigi
2015-02-02 17:18:45 -08:00
parent 344f3d66ef
commit 428a1439e5
399 changed files with 11591 additions and 16139 deletions
+34 -46
View File
@@ -1,49 +1,37 @@
'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: 'episode-actions-cell',
events: {
'click .x-automatic-search' : '_automaticSearch',
'click .x-manual-search' : '_manualSearch'
},
render: function () {
this.$el.empty();
this.$el.html(
'<i class="icon-search x-automatic-search" title="Automatic Search"></i>' +
'<i class="icon-nd-manual-search x-manual-search" title="Manual Search"></i>'
);
CommandController.bindToCommand({
element: this.$el.find('.x-automatic-search'),
command: {
name : 'episodeSearch',
episodeIds : [ this.model.get('id') ]
}
});
this.delegateEvents();
return this;
},
_automaticSearch: function () {
CommandController.Execute('episodeSearch', {
name : 'episodeSearch',
episodeIds : [ this.model.get('id') ]
});
},
_manualSearch: function () {
vent.trigger(vent.Commands.ShowEpisodeDetails, { episode: this.cellValue, hideSeriesLink: true, openingTab: 'search' });
module.exports = NzbDroneCell.extend({
className : 'episode-actions-cell',
events : {
"click .x-automatic-search" : '_automaticSearch',
"click .x-manual-search" : '_manualSearch'
},
render : function(){
this.$el.empty();
this.$el.html('<i class="icon-search x-automatic-search" title="Automatic Search"></i>' + '<i class="icon-nd-manual-search x-manual-search" title="Manual Search"></i>');
CommandController.bindToCommand({
element : this.$el.find('.x-automatic-search'),
command : {
name : 'episodeSearch',
episodeIds : [this.model.get('id')]
}
});
});
this.delegateEvents();
return this;
},
_automaticSearch : function(){
CommandController.Execute('episodeSearch', {
name : 'episodeSearch',
episodeIds : [this.model.get('id')]
});
},
_manualSearch : function(){
vent.trigger(vent.Commands.ShowEpisodeDetails, {
episode : this.cellValue,
hideSeriesLink : true,
openingTab : 'search'
});
}
});