Skip to content

Commit

Permalink
[Improvement][MOD-178] Disable the modify decision button until submi…
Browse files Browse the repository at this point in the history
…ssion related actions are loaded (#90)

* Disable button until related actions is loaded

* update loading label

* Add padding to icon

* Separate class for button loading indicator

* Apply requested changes
  • Loading branch information
sheriefvt authored and aaxelb committed Nov 8, 2017
1 parent 1d150ff commit ad1447a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/components/preprint-status-banner/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
.reviewer-feedback {
padding-right: 15px;

.button-loading-indicator {
margin-right: 8px;
}
.dropdown-menu {
font-size:62.5%;
background-color: $color-bg-gray-lighter;
Expand Down
9 changes: 7 additions & 2 deletions app/components/preprint-status-banner/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@
</div>
<div class="dropdown reviewer-feedback">
{{#bs-dropdown closeOnMenuClick=false as |dd|}}
{{#dd.button type="success"}}
{{t labelDecisionDropdown}} <i class="fa fa-caret-down" aria-hidden="true"></i>
{{#dd.button type="success" disabled=submission.actions.isPending}}
{{#if submission.actions.isPending}}
<i class='button-loading-indicator fa fa-circle-o-notch fa-spin'></i>
{{t 'components.preprint-status-banner.loading'}}
{{else}}
{{t labelDecisionDropdown}} <i class="fa fa-caret-down" aria-hidden="true"></i>
{{/if}}
{{/dd.button}}
{{#dd.menu}}
<div class="feedback-header">
Expand Down
1 change: 1 addition & 0 deletions app/locales/en/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export default {
pending: 'pending',
accepted: 'accepted',
rejected: 'rejected',
loading: 'Loading...',
decision: {
make_decision: 'Make decision',
modify_decision: 'Modify decision',
Expand Down

0 comments on commit ad1447a

Please sign in to comment.