mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
define(
|
|
[
|
|
'app',
|
|
'marionette'
|
|
], function (App, Marionette) {
|
|
|
|
return Marionette.ItemView.extend({
|
|
tagName : 'li',
|
|
template: 'Series/Index/Posters/ItemTemplate',
|
|
|
|
|
|
ui: {
|
|
'progressbar': '.progress .bar',
|
|
'controls' : '.series-controls'
|
|
},
|
|
|
|
events: {
|
|
'click .x-edit' : 'editSeries',
|
|
'click .x-remove' : 'removeSeries',
|
|
'mouseenter .x-series-poster': 'posterHoverAction',
|
|
'mouseleave .x-series-poster': 'posterHoverAction'
|
|
},
|
|
|
|
|
|
editSeries: function () {
|
|
App.vent.trigger(App.Commands.EditSeriesCommand, {series:this.model});
|
|
},
|
|
|
|
removeSeries: function () {
|
|
App.vent.trigger(App.Commands.DeleteSeriesCommand, {series:this.model});
|
|
},
|
|
|
|
posterHoverAction: function () {
|
|
this.ui.controls.slideToggle();
|
|
}
|
|
});
|
|
});
|