From 5de7ee5a035d7ae44ba681edd922aff201abe863 Mon Sep 17 00:00:00 2001 From: alexandre-pereira Date: Fri, 20 Mar 2015 19:18:24 +0100 Subject: [PATCH 1/2] feefzfze --- SRC/app/Http/Controllers/GameController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SRC/app/Http/Controllers/GameController.php b/SRC/app/Http/Controllers/GameController.php index 167a99e..7cf3099 100755 --- a/SRC/app/Http/Controllers/GameController.php +++ b/SRC/app/Http/Controllers/GameController.php @@ -1,5 +1,5 @@ Date: Fri, 20 Mar 2015 19:22:13 +0100 Subject: [PATCH 2/2] x x --- SRC/resources/views/frontend/puzzle.blade.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/SRC/resources/views/frontend/puzzle.blade.php b/SRC/resources/views/frontend/puzzle.blade.php index d826d94..39afd99 100755 --- a/SRC/resources/views/frontend/puzzle.blade.php +++ b/SRC/resources/views/frontend/puzzle.blade.php @@ -179,10 +179,16 @@ trophee.height = 270; trophee.alpha = 0; tween = game.add.tween(trophee).to( { alpha: 1 }, 1000).start(); - setTimeout(function(){ - location.href ="{{URL::to('setRecords')}}" + "/" + trophy; - location.href = "{{URL::to('puzzle/jouer')}}" + "/" + trophy; - }, 5000); + var r = new XMLHttpRequest(); + r.open("GET", "{{URL::to('setRecords')}}", true); + r.onreadystatechange = function () { + if (r.readyState != 4 || r.status != 200) return; + setTimeout(function(){ + location.href = "{{URL::to('puzzle/jouer')}}" + "/" + trophy; + }, 3000); + }; + r.send(); + // TODO appel ajax //var t1 = game.world.create(game.world.centerX,game.world.centerY, "tableau1"); //t1.anchor.setTo(0.5,0.5);