I may have corrected the bug

This commit is contained in:
Thomas FORGIONE 2015-08-31 13:05:05 +02:00
parent dabe05c39b
commit 776ccfcc4f
4 changed files with 19 additions and 3 deletions

View File

@ -169,3 +169,7 @@ module.exports.userstudy = function(req, res) {
}); });
}; };
module.exports.next = function(req, res) {
res.redirect('/prototype/game')
};

View File

@ -9,5 +9,6 @@ module.exports = {
'/prototype/coin-creator/:scene': 'clicker', '/prototype/coin-creator/:scene': 'clicker',
'/prototype/coin-viewer/:scene': 'viewer', '/prototype/coin-viewer/:scene': 'viewer',
'/prototype/coin-checker/:scene': 'checker', '/prototype/coin-checker/:scene': 'checker',
'/user-study': 'userstudy' '/user-study': 'userstudy',
'/prototype/next': 'next'
}; };

View File

@ -1,4 +1,8 @@
module.exports.index = function(req, res) { module.exports.index = function(req, res) {
req.session = null;
res.locals.session = null;
res.setHeader('Content-Type', 'text/html'); res.setHeader('Content-Type', 'text/html');
res.render('index.jade', res.locals, function(err, result) { res.render('index.jade', res.locals, function(err, result) {

View File

@ -32,13 +32,20 @@ Coin.onCoinGot = function(coin) {
setTimeout(function() { setTimeout(function() {
$('#next').show(); $('#next').show();
$('#next').click(function() { $('#next').click(function() {
window.location = '/prototype/game'; window.location = '/prototype/next';
$('#next').unbind('click');
}); });
}, 60*1000); }, 60*1000);
} }
}; };
Coin.onLastCoin = function() {
$('#next').show();
$('#next').click(function() {
window.location = '/prototype/next';
});
}
function main() { function main() {
// Main container that holds everything // Main container that holds everything