1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
itunes-extras-template/src/controllers/home.js
Kim Wittenburg a83ef869d5 Archive Project
2017-10-31 14:39:33 +01:00

33 lines
835 B
JavaScript

const homeController = new TKController({
id: 'home',
actions: [
{selector: '.play', action: bookletController.playFeature}
],
navigatesTo: [
{selector: '.features', controller: 'features'}
],
highlightedElement: '.play'
});
homeController.viewDidLoad = function () {
let mainMenuItems = [];
mainMenuItems.push({
type: 'div',
className: 'play button',
content: _('Play')
});
if (typeof appData.features !== 'undefined' && appData.features.length > 0) {
mainMenuItems.push({
type: 'div',
className: 'features button',
content: _('Features')
})
}
this.view.appendChild(TKUtils.buildElement({
type: 'container',
className: 'main-menu',
children: mainMenuItems
}));
};