Skip to content

Commit

Permalink
don't show add button in new game player list
Browse files Browse the repository at this point in the history
  • Loading branch information
btouellette committed May 11, 2018
1 parent 31c09ff commit 45845d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions views/game.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,16 @@ $(document).ready(function() {
$('#new-game-popup .friend-listing').remove();
$('#friends-menu .fa-edit').hide();
$('#friends-menu-selection').click();
// hide user symbols
$('#friends-list .fa-user').attr('class','fa-user hidden');
// unhide add symbols
$('#friends-list .fa-plus-square-o').attr('class','fa-plus-square-o');
$('#friends-list .friend-listing').on('click', function() {
if($('#new-game-popup .friend-listing').length < 5) {
$('#solo-notifier').hide();
var element = $(this);
element.clone().attr('id', 'add-' + element.attr('id')).css('cursor', 'default').addClass('add-friend-listing').appendTo('#new-game-popup');
$('#add-' + element.attr('id') + ' svg').remove();
}
});
},
Expand Down

0 comments on commit 45845d5

Please sign in to comment.