Merge branch 'master' of github.com:psychobunny/node-forum

v1.18.x
Julian Lam 12 years ago
commit 19f9a48a8c

@ -18,13 +18,19 @@ var ajaxify = {};
current_state = url;
window.history.pushState({}, url, "/" + url);
content.innerHTML = templates[tpl_url];
exec_body_scripts(content);
ajaxify.enable();
if (callback) {
callback();
}
jQuery('#content').fadeOut(100, function() {
content.innerHTML = templates[tpl_url];
exec_body_scripts(content);
ajaxify.enable();
if (callback) {
callback();
}
jQuery('#content').fadeIn(200);
});
}
return true;
@ -42,6 +48,7 @@ var ajaxify = {};
if (ajaxify.go(url)) {
ev.preventDefault();
return false;
}
}

@ -13,6 +13,10 @@ var socket,
socket.on('event:connect', function(data) {
});
socket.on('event:alert', function(data) {
app.alert(data);
});
},
async: false

@ -58,14 +58,7 @@
socket.on('user.create', function(data) {
//console.log('user create: ' + data.status);
ajaxify.go('/', function() {
app.alert({
title: 'Thank you for registering',
message: 'You have successfully registered - welcome to nodebb!',
type: 'notify',
timeout: 2000
});
});
ajaxify.go('/');
});
socket.on('user.exists', function(data) {

@ -68,6 +68,13 @@ var config = require('../config.js'),
io.sockets.emit('user.latest', {username: username});
global.socket.emit('user.create', {'status': 1});
global.socket.emit('event:alert', {
title: 'Thank you for registering',
message: 'You have successfully registered - welcome to nodebb!',
type: 'notify',
timeout: 2000
});
});
});
};

Loading…
Cancel
Save