From 374421780aef5b07f0c60a77d5620835f08f9fc2 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Tue, 4 Aug 2015 22:18:37 +0200 Subject: [PATCH] Corrected bugs and add timeout --- controllers/prototype/dbrequests.js | 2 +- js/l3d/apps/prototype/interactive/main.js | 7 +++++++ js/l3d/apps/prototype/tutorial/TutorialSteps.js | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/controllers/prototype/dbrequests.js b/controllers/prototype/dbrequests.js index f752f57..bd1f668 100644 --- a/controllers/prototype/dbrequests.js +++ b/controllers/prototype/dbrequests.js @@ -914,7 +914,7 @@ DBReq.TutorialCreator.prototype.execute = function() { this.client.query( // Generate random coins "SELECT Scene.id AS scene_id, generate_series AS id\n" + - "FROM Scene, generate_series(1,Scene.coin_number)\n" + + "FROM Scene, generate_series(0,Scene.coin_number-1)\n" + "WHERE Scene.name = 'peachcastle'\n" + "ORDER BY RANDOM()\n" + "LIMIT 8;", diff --git a/js/l3d/apps/prototype/interactive/main.js b/js/l3d/apps/prototype/interactive/main.js index d32ddbf..ddab4f5 100644 --- a/js/l3d/apps/prototype/interactive/main.js +++ b/js/l3d/apps/prototype/interactive/main.js @@ -27,6 +27,13 @@ window.onbeforeunload = function() { }; +setTimeout(function() { + $('#next').show(); + $('#next').click(function() { + window.location = '/prototype/games'; + }); +}, 3*60*60*1000); + function main() { // Main container that holds everything diff --git a/js/l3d/apps/prototype/tutorial/TutorialSteps.js b/js/l3d/apps/prototype/tutorial/TutorialSteps.js index ce3c309..b437096 100644 --- a/js/l3d/apps/prototype/tutorial/TutorialSteps.js +++ b/js/l3d/apps/prototype/tutorial/TutorialSteps.js @@ -210,6 +210,13 @@ TutorialSteps.prototype.nextStep = function() { }); break; case 17: + setTimeout(function() { + $('#next').show(); + $('#next').click(function() { + window.location = '/before-begin'; + }); + }, 3*60*60*1000); + var cams = L3D.createPeachRecommendations(this.container_size.width(), this.container_size.height()); for (var i = 2; i < cams.length; i++) { this.addRecommendation(cams[i]);