Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #384 from LiskHQ/344-polish-voting-page
Browse files Browse the repository at this point in the history
Polish voting page - Closes #344
  • Loading branch information
yasharAyari authored Jun 12, 2017
2 parents 6ac39f2 + c908eec commit e66c779
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/components/delegates/delegates.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ delegates {
.downvote {
background-color: rgb(255, 228, 220);
}
.voted{
background-color: #d6f0ff;
}
.pending {
background-color: #eaeae9;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/delegates/delegates.pug
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ div.offline-hide
tbody(md-body, infinite-scroll='$ctrl.showMore()', infinite-scroll-distance='1')
tr(md-row, ng-if='!$ctrl.filteredDelegates.length && !$ctrl.loading')
td(md-cell, colspan='6') No delegates found
tr(md-row, ng-repeat="delegate in ($ctrl.filteredDelegates = ($ctrl.delegates | filter : {username: search} )) | limitTo : $ctrl.delegatesDisplayedCount", ng-class='{"downvote": delegate.status.voted && !delegate.status.selected, "upvote": !delegate.status.voted && delegate.status.selected, "pending": delegate.status.pending}')
tr(md-row, ng-repeat="delegate in ($ctrl.filteredDelegates = ($ctrl.delegates | filter : {username: search} )) | limitTo : $ctrl.delegatesDisplayedCount", ng-class='{"downvote": delegate.status.voted && !delegate.status.selected, "upvote": !delegate.status.voted && delegate.status.selected, "pending": delegate.status.pending, "voted": delegate.status.voted && delegate.status.selected}')
td(md-cell)
md-checkbox(ng-model='delegate.status.selected', ng-change='$ctrl.selectionChange(delegate)', ng-disabled='delegate.status.pending', aria-label='delegate selected for voting')
md-checkbox.md-primary(ng-model='delegate.status.selected', ng-change='$ctrl.selectionChange(delegate)', ng-disabled='delegate.status.pending', aria-label='delegate selected for voting')
td(md-cell, ng-bind='delegate.rank')
td(md-cell, ng-bind='delegate.username')
td(md-cell, ng-bind='delegate.address')
Expand Down
2 changes: 1 addition & 1 deletion src/components/delegates/vote.pug
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ div.dialog-vote(aria-label='Vote for delegates')
md-dialog-actions(layout='row')
md-button(ng-click="$ctrl.$mdDialog.cancel()") Cancel
span(flex)
md-button.md-primary.md-raised.submit-button(ng-disabled='!$ctrl.canVote()', ng-click="$ctrl.vote()") {{$ctrl.votingInProgress ? 'Voting...' : 'Confirm vote'}}
md-button.md-primary.md-raised.submit-button(ng-disabled='!$ctrl.canVote()', ng-click="$ctrl.vote()") {{$ctrl.votingInProgress ? 'Voting...' : 'Confirm'}}

0 comments on commit e66c779

Please sign in to comment.