ui: replace inline state styles with css classes
This commit is contained in:
@@ -84,15 +84,7 @@
|
||||
|
||||
var backButton = document.querySelector('.btn-back');
|
||||
if (backButton) {
|
||||
if (step === 1) {
|
||||
backButton.disabled = true;
|
||||
backButton.style.opacity = '0.35';
|
||||
backButton.style.cursor = 'not-allowed';
|
||||
} else {
|
||||
backButton.disabled = false;
|
||||
backButton.style.opacity = '';
|
||||
backButton.style.cursor = '';
|
||||
}
|
||||
backButton.disabled = step === 1;
|
||||
}
|
||||
|
||||
var continueButton = document.querySelector('.btn-continue');
|
||||
@@ -100,10 +92,10 @@
|
||||
if (step === TOTAL_STEPS) {
|
||||
var finalLabel = window.wizardMode === 'edit' ? tKey('wizard.button.save_changes') : tKey('wizard.button.create');
|
||||
continueButton.innerHTML = finalLabel + ' ' + ARROW_SVG;
|
||||
continueButton.style.cssText = 'background:#3fb950;border-color:#2ea043;box-shadow:0 1px 4px rgba(63,185,80,0.4);';
|
||||
continueButton.classList.add('is-final-step');
|
||||
} else {
|
||||
continueButton.innerHTML = tKey('wizard.button.continue') + ' ' + ARROW_SVG;
|
||||
continueButton.style.cssText = '';
|
||||
continueButton.classList.remove('is-final-step');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user