Skip to content

Commit

Permalink
Merge pull request #129 from PureHacks/pong-96
Browse files Browse the repository at this point in the history
#96 custom checkboxes on player stats page
  • Loading branch information
mattmcfad committed Jun 19, 2015
2 parents 038b025 + 48226f6 commit 1a66194
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
Binary file added client/public/assets/img/checkbox-check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/public/assets/img/checkbox-uncheck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions client/public/views/partials/playerStats.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ <h2>All Player Stats</h2>
<td class="rank">{{player.rank}}</td>
<td class="compare-check">
<div class="checkbox-container">
<label for="checkbox-{{$index}}" class="checkbox-label">
<input value="{{player.id}}" name="checkbox-{{$index}}" id="checkbox-{{$index}}"type="checkbox" ng-model="player.selected" ng-click="addPlayerToCompare(player.id)"/>
</label>
<input value="{{player.id}}" name="checkbox-{{$index}}" id="checkbox-{{$index}}"type="checkbox" ng-model="player.selected" ng-click="addPlayerToCompare(player.id)"/>
<label for="checkbox-{{$index}}" class="checkbox-label"></label>
</div>
</td>
</tr>
Expand Down
21 changes: 16 additions & 5 deletions client/stylus/playerStats.styl
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,26 @@
vertical-align middle

.checkbox-container
position relative
label
display block
width 100%
height 100%
position relative
input
position absolute
bottom 50%
right 40%
cursor pointer
input[type="checkbox"]
position absolute
opacity 0
top 0
left 0
input[type="checkbox"] + label
background url("/assets/img/checkbox-uncheck.png") no-repeat
background-position-x 66px
background-position-y 18px

input[type="checkbox"]:checked + label
background url("/assets/img/checkbox-check.png") no-repeat
background-position-x 66px
background-position-y 18px

.profile-img-name
img
Expand Down

0 comments on commit 1a66194

Please sign in to comment.