From 53dac705376495e1796e8d1178376b2b4f708221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Fri, 20 May 2011 12:03:18 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20d'un=20PtiBug=20(quand=20l'url=20c?= =?UTF-8?q?hange=20juste=20le=20num=C3=A9ro=20de=20partie,=20=C3=A7a=20aff?= =?UTF-8?q?iche=20toujours=20l'ancienne=20au=20lieu=20de=20charger=20une?= =?UTF-8?q?=20nouvelle)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + suppression des console.log() qui traînaient. --- code/serveur/php/ressources/pticlic.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/serveur/php/ressources/pticlic.js b/code/serveur/php/ressources/pticlic.js index 51b2bb9..6602795 100644 --- a/code/serveur/php/ressources/pticlic.js +++ b/code/serveur/php/ressources/pticlic.js @@ -127,7 +127,7 @@ init(function() { // ==== Écran connexion runstate.pendingGetPrefs = function() { - console.log('Should execute pendingGetPrefs'); + UI().log('Should execute pendingGetPrefs'); }; init(function() { @@ -161,7 +161,6 @@ $.ajaj = function(url, data, callback) { if (!data.user) data.user = user; if (!data.passwd) data.passwd = passwd; } - console.log('ajaj', data, user, passwd); return $.getJSON(url, data, callback); }; @@ -223,6 +222,10 @@ init(function() { }); game.bind('update', function(e) { + if (state.pgid != runstate.game.pgid) { + $('#game').trigger('goto'); + return; + } var direction = state.answers.length - oldstate.answers.length; var mn = $("#game .mn-caption"); var clone = $();