diff --git a/app/assets/javascripts/controllers/home.js b/app/assets/javascripts/controllers/home.js index ead6ce2f5..e5af866c1 100644 --- a/app/assets/javascripts/controllers/home.js +++ b/app/assets/javascripts/controllers/home.js @@ -1,7 +1,7 @@ 'use strict'; -Application.Controllers.controller('HomeController', ['$scope', '$stateParams', 'homeContentPromise', 'uiTourService', - function ($scope, $stateParams, homeContentPromise, uiTourService) { +Application.Controllers.controller('HomeController', ['$scope', '$stateParams', 'homeContentPromise', 'uiTourService', '_t', + function ($scope, $stateParams, homeContentPromise, uiTourService, _t) { /* PUBLIC SCOPE */ // Home page HTML content @@ -24,6 +24,30 @@ Application.Controllers.controller('HomeController', ['$scope', '$stateParams', // setup the tour const uitour = uiTourService.getTour(); + uitour.createStep({ + selector: 'head', + stepId: 'welcome', + order: 0, + title: _t('app.public.tour.welcome.title'), + content: _t('app.public.tour.welcome.content'), + placement: 'bottom' + }); + uitour.createStep({ + selector: '.nav-primary li.home-link', + stepId: 'home', + order: 1, + title: _t('app.public.tour.home.title'), + content: _t('app.public.tour.home.content'), + placement: 'right' + }); + uitour.createStep({ + selector: '.nav-primary li.reserve-machine-link', + stepId: 'machines', + order: 2, + title: _t('app.public.tour.machines.title'), + content: _t('app.public.tour.machines.content'), + placement: 'right' + }); uitour.start(); }; diff --git a/app/assets/javascripts/controllers/main_nav.js b/app/assets/javascripts/controllers/main_nav.js index fc2ec42dc..dd6373f81 100644 --- a/app/assets/javascripts/controllers/main_nav.js +++ b/app/assets/javascripts/controllers/main_nav.js @@ -19,33 +19,39 @@ Application.Controllers.controller('MainNavController', ['$scope', function ($sc { state: 'app.public.home', linkText: 'app.public.common.home', - linkIcon: 'home' + linkIcon: 'home', + class: 'home-link' }, { state: 'app.public.machines_list', linkText: 'app.public.common.reserve_a_machine', - linkIcon: 'cogs' + linkIcon: 'cogs', + class: 'reserve-machine-link' }, { state: 'app.public.trainings_list', linkText: 'app.public.common.trainings_registrations', - linkIcon: 'graduation-cap' + linkIcon: 'graduation-cap', + class: 'reserve-training-link' }, { state: 'app.public.events_list', linkText: 'app.public.common.events_registrations', - linkIcon: 'tags' + linkIcon: 'tags', + class: 'reserve-event-link' }, { state: 'app.public.calendar', linkText: 'app.public.common.public_calendar', - linkIcon: 'calendar' + linkIcon: 'calendar', + class: 'public-calendar-link' }, { state: 'app.public.projects_list', linkText: 'app.public.common.projects_gallery', - linkIcon: 'th' + linkIcon: 'th', + class: 'projects-gallery-link' } ]; @@ -54,7 +60,8 @@ Application.Controllers.controller('MainNavController', ['$scope', function ($sc $scope.navLinks.push({ state: 'app.public.plans', linkText: 'app.public.common.subscriptions', - linkIcon: 'credit-card' + linkIcon: 'credit-card', + class: 'plans-link' }); } @@ -62,7 +69,8 @@ Application.Controllers.controller('MainNavController', ['$scope', function ($sc $scope.navLinks.splice(3, 0, { state: 'app.public.spaces_list', linkText: 'app.public.common.reserve_a_space', - linkIcon: 'rocket' + linkIcon: 'rocket', + class: 'reserve-space-link' }); } diff --git a/app/assets/stylesheets/modules/tour.scss b/app/assets/stylesheets/modules/tour.scss index 5725bc3b7..bbc6e8026 100644 --- a/app/assets/stylesheets/modules/tour.scss +++ b/app/assets/stylesheets/modules/tour.scss @@ -1,4 +1,5 @@ .ui-tour-backdrop { background-color: rgba(0, 0, 0, 0.5); fill: rgba(0, 0, 0, 0.5); + z-index: 1000; } diff --git a/app/assets/templates/shared/header.html.erb b/app/assets/templates/shared/header.html.erb index 2eff258f4..768668a4f 100644 --- a/app/assets/templates/shared/header.html.erb +++ b/app/assets/templates/shared/header.html.erb @@ -1,5 +1,5 @@ -