Browse Source

Better placement of step loading spinner

Angus McLeod 7 years ago
parent
commit
cbdad79c90

+ 9 - 13
assets/javascripts/wizard/templates/components/wizard-step.hbs

@@ -32,28 +32,24 @@
       <a href {{action "quit"}} class='action-link quit' tabindex="11">{{i18n "wizard.quit"}}</a>
     {{/if}}
 
-    {{#if showBackButton}}
-      <a href {{action "backStep"}} class='action-link back' tabindex="11">{{i18n "wizard.back"}}</a>
+    {{#if saving}}
+      {{loading-spinner size='small'}}
+    {{else}}
+      {{#if showBackButton}}
+        <a href {{action "backStep"}} class='action-link back' tabindex="11">{{i18n "wizard.back"}}</a>
+      {{/if}}
     {{/if}}
 
     {{#if showNextButton}}
       <button class='wizard-btn next primary' {{action "nextStep"}} disabled={{saving}} tabindex="10">
-        {{#if saving}}
-          {{loading-spinner size='small'}}
-        {{else}}
-          {{i18n "wizard.next"}}
-          {{d-icon "chevron-right"}}
-        {{/if}}
+        {{i18n "wizard.next"}}
+        {{d-icon "chevron-right"}}
       </button>
     {{/if}}
 
     {{#if showDoneButton}}
       <button class='wizard-btn done' {{action "done"}} disabled={{saving}} tabindex="10">
-        {{#if saving}}
-          {{loading-spinner size='small'}}
-        {{else}}
-          {{i18n "wizard.done"}}
-        {{/if}}
+        {{i18n "wizard.done"}}
       </button>
     {{/if}}
   </div>

+ 4 - 4
assets/stylesheets/wizard/wizard_custom.scss

@@ -115,13 +115,13 @@
     padding: 0;
   }
 
-  .wizard-buttons > a, .wizard-buttons > button {
+  .wizard-buttons > a, .wizard-buttons > button, .spinner {
     display: inline-block;
     vertical-align: middle;
+  }
 
-    &.done {
-      min-width: 55px;
-    }
+  .spinner.small {
+    margin-right: 10px;
   }
 }