MDL-60985 tool_usertours: Hide next on last, prev on first and primary.

This commit is contained in:
Luca Bösch 2019-12-11 14:44:45 +01:00
parent 7850f76a93
commit 3bd2e330ab
3 changed files with 5 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -646,14 +646,15 @@ export default class Tour {
// Is this the first step?
if (this.isFirstStep(stepConfig.stepNumber)) {
template.find('[data-role="previous"]').prop('disabled', true);
template.find('[data-role="previous"]').hide();
} else {
template.find('[data-role="previous"]').prop('disabled', false);
}
// Is this the final step?
if (this.isLastStep(stepConfig.stepNumber)) {
template.find('[data-role="next"]').prop('disabled', true);
template.find('[data-role="next"]').hide();
template.find('[data-role="end"]').removeClass("btn-secondary").addClass("btn-primary");
} else {
template.find('[data-role="next"]').prop('disabled', false);
}