mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
refactor: alerts
This commit is contained in:
@@ -243,7 +243,7 @@ define('forum/topic', [
|
|||||||
span.html('').addClass('hidden');
|
span.html('').addClass('hidden');
|
||||||
}
|
}
|
||||||
if ($(window).scrollTop() > 300) {
|
if ($(window).scrollTop() > 300) {
|
||||||
app.removeAlert('bookmark');
|
alerts.remove('bookmark');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ define('messages', ['bootbox', 'translator', 'storage', 'alerts'], function (boo
|
|||||||
if (!app.user.email) {
|
if (!app.user.email) {
|
||||||
msg.message = '[[error:no-email-to-confirm]]';
|
msg.message = '[[error:no-email-to-confirm]]';
|
||||||
msg.clickfn = function () {
|
msg.clickfn = function () {
|
||||||
app.removeAlert('email_confirm');
|
alerts.remove('email_confirm');
|
||||||
ajaxify.go('user/' + app.user.userslug + '/edit/email');
|
ajaxify.go('user/' + app.user.userslug + '/edit/email');
|
||||||
};
|
};
|
||||||
alerts.alert(msg);
|
alerts.alert(msg);
|
||||||
} else if (!app.user['email:confirmed'] && !app.user.isEmailConfirmSent) {
|
} else if (!app.user['email:confirmed'] && !app.user.isEmailConfirmSent) {
|
||||||
msg.message = message || '[[error:email-not-confirmed]]';
|
msg.message = message || '[[error:email-not-confirmed]]';
|
||||||
msg.clickfn = function () {
|
msg.clickfn = function () {
|
||||||
app.removeAlert('email_confirm');
|
alerts.remove('email_confirm');
|
||||||
socket.emit('user.emailConfirm', {}, function (err) {
|
socket.emit('user.emailConfirm', {}, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return alerts.error(err);
|
return alerts.error(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user