Skip to content

Commit

Permalink
Add pick # validations, make links in swals readable
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhorner committed Oct 22, 2015
1 parent e96c195 commit 9d0e6a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ io.on('connection', function(socket){
});

socket.on("deck:card:black", function(card){
if(socket.deck && parseInt(card.pick) !== NaN && card.text.trim() !== "" && card.pick.trim() !== ""){
if(socket.deck && parseInt(card.pick) !== NaN && parseInt(card.pick) > 0 && card.text.trim() !== "" && card.pick.trim() !== ""){
decks[socket.deck].blackCards.push({text: card.text, pick: parseInt(card.pick)});
socket.to(socket.deck).emit("deck:card:black", {text: card.text, pick: parseInt(card.pick)});
socket.emit("deck:card:black", {text: card.text, pick: parseInt(card.pick)});
Expand Down
5 changes: 5 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ input[type=number]::-webkit-outer-spin-button {
transition: .3s all;
}

/* swal */
.sweet-alert a{
color: black;
}

@keyframes dots-loader {
0% {
box-shadow: #f86 -14px -14px 0 7px, #fc6 14px -14px 0 7px, #6d7 14px 14px 0 7px, #4ae -14px 14px 0 7px;
Expand Down

0 comments on commit 9d0e6a8

Please sign in to comment.