Lidarr/UI/Series/Index/Posters/ItemView.js

40 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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