Node.js based forum software built for the modern web
added login message + ajaxify.go to homepage (should add redirect code to originating page later)
psychobunny7e637a93bb72
diff --git a/public/templates/login.tpl b/public/templates/login.tplindex 85e3ddf419..52dd03745b 100644--- a/public/templates/login.tpl+++ b/public/templates/login.tpl@@ -29,8 +29,8 @@jQuery('#error').show(50);jQuery('#error p').html(data.message);} else {- alert('success');jQuery('#error').hide(50);+ ajaxify.go('/');}});}());diff --git a/src/user.js b/src/user.jsindex e08727f3d4..21da359f80 100644--- a/src/user.js+++ b/src/user.js@@ -32,6 +32,14 @@ var config = require('../config.js'),});global.uid = uid;++ global.socket.emit('event:alert', {+ title: 'Welcome ' + user.username,+ message: 'You have successfully logged in.',+ type: 'notify',+ timeout: 2000+ });+return global.socket.emit('user.login', {'status': 1, 'message': 'Logged in!'});}});