mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 00:45:47 +01:00
change some socket calls to use the callback, when user changes their email if they are using a gravatar picture it will be updated too, fixed email updating
This commit is contained in:
@@ -195,7 +195,29 @@ var socket,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
app.alertSuccess = function(message, timeout) {
|
||||
if(!timeout)
|
||||
timeout = 2000;
|
||||
|
||||
app.alert({
|
||||
title: 'Success',
|
||||
message: message,
|
||||
type: 'success',
|
||||
timeout: timeout
|
||||
});
|
||||
}
|
||||
|
||||
app.alertError = function(message, timeout) {
|
||||
if(!timeout)
|
||||
timeout = 2000;
|
||||
|
||||
app.alert({
|
||||
title: 'Error',
|
||||
message: message,
|
||||
type: 'error',
|
||||
timeout: timeout
|
||||
});
|
||||
}
|
||||
|
||||
app.current_room = null;
|
||||
app.enter_room = function(room) {
|
||||
@@ -254,9 +276,8 @@ var socket,
|
||||
}, 100);
|
||||
}
|
||||
|
||||
|
||||
app.showLoginMessage = function() {
|
||||
if(location.href.indexOf('loggedin') !== -1) {
|
||||
function showAlert() {
|
||||
app.alert({
|
||||
type: 'success',
|
||||
title: 'Welcome Back ' + app.username + '!',
|
||||
@@ -264,6 +285,14 @@ var socket,
|
||||
timeout: 5000
|
||||
});
|
||||
}
|
||||
|
||||
if(location.href.indexOf('loggedin') !== -1) {
|
||||
if(document.readyState !== 'complete') {
|
||||
$(document).ready(showAlert);
|
||||
} else {
|
||||
showAlert();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jQuery('document').ready(function() {
|
||||
@@ -272,7 +301,7 @@ var socket,
|
||||
|
||||
loadConfig();
|
||||
|
||||
|
||||
|
||||
function addTouchEvents() {
|
||||
return; // later.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user