From 4d430b79bad2233b0a5f36e6a89ed09fd9007074 Mon Sep 17 00:00:00 2001 From: Aleix Suau Date: Wed, 30 Sep 2020 12:58:41 +0200 Subject: [PATCH] Correct arrow back selected + styles improvements --- frontend/src/app/globals/onboarding/tours/boards_tour.ts | 5 ++++- .../src/app/globals/onboarding/tours/work_package_tour.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/globals/onboarding/tours/boards_tour.ts b/frontend/src/app/globals/onboarding/tours/boards_tour.ts index fb63a76fc8..82978f039c 100644 --- a/frontend/src/app/globals/onboarding/tours/boards_tour.ts +++ b/frontend/src/app/globals/onboarding/tours/boards_tour.ts @@ -37,7 +37,10 @@ export function boardTourSteps() { 'nextButton': { text: I18n.t('js.onboarding.buttons.next') }, 'containerClass': '-dark -hidden-arrow', onNext: function () { - jQuery('.main-menu--arrow-left-to-project')[0].click(); + const backArrows = Array.from(document.getElementsByClassName('main-menu--arrow-left-to-project')); + const boardsBackArrow = backArrows.find((backArrow) => (backArrow.nextElementSibling as HTMLElement).innerText === 'Boards') as HTMLElement; + + boardsBackArrow && boardsBackArrow.click(); } } ]; diff --git a/frontend/src/app/globals/onboarding/tours/work_package_tour.ts b/frontend/src/app/globals/onboarding/tours/work_package_tour.ts index 6310aa6809..8e641facb7 100644 --- a/frontend/src/app/globals/onboarding/tours/work_package_tour.ts +++ b/frontend/src/app/globals/onboarding/tours/work_package_tour.ts @@ -47,7 +47,7 @@ export function wpOnboardingTourSteps():any[] { 'next #wp-view-toggle-button': I18n.t('js.onboarding.steps.wp.timeline_button'), 'showSkip': false, 'nextButton': { text: I18n.t('js.onboarding.buttons.next') }, - 'bottom': '-100', + 'bottom': '-64', onNext: function () { jQuery('#wp-view-context-menu .icon-view-timeline')[0].click(); }