Skip to content
Browse files

Show correctly the thriumph dialog. Fixes #36

  • Loading branch information...
1 parent 0efe7e4 commit ce3d57f777b725efb00b066d767d1c564cd47af6 @pokoli committed Apr 19, 2012
Showing with 4 additions and 3 deletions.
  1. +3 −1 src/public/client.js
  2. +1 −2 src/public/ui.js
View
4 src/public/client.js
@@ -116,8 +116,9 @@ function onPlayCard(){
socket.on('play-card',onPlayCard);
socket.on('select-thriumph', function(data){
- if(data && data.length>0)
+ if(data && data.length>0 && !thriumphedThisRound)
{
+ thriumphedThisRound=true;
showThriumphDialog(data,makeThriumph);
}
});
@@ -149,6 +150,7 @@ socket.on('notify-thriumph', function (data){
socket.on('round-ended',function(data){
currentThriumph=undefined;
+ thriumphedThisRound=false;
controInfo=[];
var mult = data['multiplier'];
//If is botifarra the score must be multiplied by two.
View
3 src/public/ui.js
@@ -310,7 +310,6 @@ var ids = [];
- y: The Y offset where we have to write the message
*/
function writeMessageDialog(message, x,y){
- debugger;
if($('#message-dialog').length==0)
{
var odiv = '<div id="message-dialog" title="Info">';
@@ -669,7 +668,7 @@ function showThriumphDialog(selections,callback)
$('#thriumph-selector').children().remove();
for(var i=0;i<selections.length;i++)
{
- $('#show-thriumph-dialog > #thriumph').append('<option value="'+selections[i]+'">'+selections[i]+'</option>');
+ $('#thriumph-selector').append('<option value="'+selections[i]+'">'+selections[i]+'</option>');
}
}
$('#show-thriumph-dialog').dialog('open');

0 comments on commit ce3d57f

Please sign in to comment.
Something went wrong with that request. Please try again.