mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
6c9ea60382
New: Refresh button on series lists (replaces delete) New: Show series title on poster on hover
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
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
|
|
});
|
|
}
|
|
});
|
|
});
|