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.
28 lines
693 B
28 lines
693 B
var vent = require('vent');
|
|
var Marionette = require('marionette');
|
|
|
|
module.exports = Marionette.Layout.extend({
|
|
template : 'ManualImport/Season/SelectSeasonLayoutTemplate',
|
|
|
|
events : {
|
|
'change .x-select-season' : '_selectSeason'
|
|
},
|
|
|
|
initialize : function(options) {
|
|
|
|
this.templateHelpers = {
|
|
seasons : options.seasons
|
|
};
|
|
},
|
|
|
|
_selectSeason : function (e) {
|
|
var seasonNumber = parseInt(e.target.value, 10);
|
|
|
|
if (seasonNumber === -1) {
|
|
return;
|
|
}
|
|
|
|
this.trigger('manualimport:selected:season', { seasonNumber: seasonNumber });
|
|
vent.trigger(vent.Commands.CloseModal2Command);
|
|
}
|
|
}); |