You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/UI/Series/Index/Posters/ItemView.js

40 lines
1.1 KiB

'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();
}
});
});