mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
rjs -> webpack
This commit is contained in:
@@ -1,41 +1,29 @@
|
||||
'use strict';
|
||||
var vent = require('../../vent');
|
||||
var Marionette = require('marionette');
|
||||
var CommandController = require('../../Commands/CommandController');
|
||||
|
||||
define(
|
||||
[
|
||||
'vent',
|
||||
'marionette',
|
||||
'Commands/CommandController'
|
||||
], function (vent, Marionette, CommandController) {
|
||||
return Marionette.ItemView.extend({
|
||||
|
||||
ui: {
|
||||
refresh : '.x-refresh'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-edit' : '_editSeries',
|
||||
'click .x-refresh' : '_refreshSeries'
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
CommandController.bindToCommand({
|
||||
element: this.ui.refresh,
|
||||
command: {
|
||||
name : 'refreshSeries',
|
||||
seriesId : this.model.get('id')
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_editSeries: function () {
|
||||
vent.trigger(vent.Commands.EditSeriesCommand, {series: this.model});
|
||||
},
|
||||
|
||||
_refreshSeries: function () {
|
||||
CommandController.Execute('refreshSeries', {
|
||||
name : 'refreshSeries',
|
||||
seriesId: this.model.id
|
||||
});
|
||||
module.exports = Marionette.ItemView.extend({
|
||||
ui : {refresh : '.x-refresh'},
|
||||
events : {
|
||||
"click .x-edit" : '_editSeries',
|
||||
"click .x-refresh" : '_refreshSeries'
|
||||
},
|
||||
onRender : function(){
|
||||
CommandController.bindToCommand({
|
||||
element : this.ui.refresh,
|
||||
command : {
|
||||
name : 'refreshSeries',
|
||||
seriesId : this.model.get('id')
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
_editSeries : function(){
|
||||
vent.trigger(vent.Commands.EditSeriesCommand, {series : this.model});
|
||||
},
|
||||
_refreshSeries : function(){
|
||||
CommandController.Execute('refreshSeries', {
|
||||
name : 'refreshSeries',
|
||||
seriesId : this.model.id
|
||||
});
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user