changed the buttons
This commit is contained in:
parent
e14af79691
commit
3fcb819881
@ -23,16 +23,6 @@
|
||||
|
||||
<% steps.each_with_index do |(key, step), index| %>
|
||||
Walter.tours["<%= tour_name %>"].addStep({
|
||||
when: {
|
||||
show() {
|
||||
const currentStepElement = shepherd.currentStep.el;
|
||||
const header = currentStepElement.querySelector('.shepherd-header');
|
||||
const progress = document.createElement('span');
|
||||
progress.style['margin-right'] = '315px';
|
||||
progress.innerText = `${shepherd.steps.indexOf(shepherd.currentStep) + 1}/${shepherd.steps.length}`;
|
||||
header.insertBefore(progress, currentStepElement.querySelector('.shepherd-cancel-icon'));
|
||||
}
|
||||
},
|
||||
id: 'step-<%= key %>',
|
||||
<% if step.key?('title') %>
|
||||
title: "<%== step['title'] %>",
|
||||
@ -46,6 +36,7 @@
|
||||
},
|
||||
<% end %>
|
||||
buttons: [
|
||||
{ text: '<%= t('walter.exit') %>', action: Walter.tours["<%= tour_name %>"].cancel, classes: 'shepherd-button-secondary' },
|
||||
<% if index == steps.size - 1 %>
|
||||
<% if steps.size > 1 %>
|
||||
{ text: '<%= t('walter.back') %>', action: Walter.tours["<%= tour_name %>"].back, classes: 'shepherd-button-secondary' },
|
||||
@ -55,7 +46,6 @@
|
||||
<% if index == 0 %>
|
||||
{ text: '<%= t('walter.later') %>', action: Walter.tours["<%= tour_name %>"].cancel, classes: 'shepherd-button-secondary' },
|
||||
<% else %>
|
||||
{ text: '<%= t('walter.exit') %>', action: Walter.tours["<%= tour_name %>"].cancel, classes: 'shepherd-button-secondary' },
|
||||
{ text: '<%= t('walter.back') %>', action: Walter.tours["<%= tour_name %>"].back, classes: 'shepherd-button-secondary' },
|
||||
<% end %>
|
||||
{ text: '<%= t('walter.continue') %>', action: Walter.tours["<%= tour_name %>"].next },
|
||||
|
Loading…
x
Reference in New Issue
Block a user