mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
tweaking app.alert so that on regular fadeout (after timeout expiry), the alert is removed from the DOM
This commit is contained in:
@@ -71,14 +71,18 @@ var socket,
|
|||||||
|
|
||||||
if (params.timeout) {
|
if (params.timeout) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
jQuery(div).fadeOut(1000);
|
jQuery(div).fadeOut(1000, function() {
|
||||||
|
this.remove();
|
||||||
|
});
|
||||||
}, params.timeout)
|
}, params.timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.clickfn) {
|
if (params.clickfn) {
|
||||||
div.onclick = function() {
|
div.onclick = function() {
|
||||||
params.clickfn();
|
params.clickfn();
|
||||||
jQuery(div).fadeOut(500);
|
jQuery(div).fadeOut(500, function() {
|
||||||
|
this.remove();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ var config = require('../config.js'),
|
|||||||
}
|
}
|
||||||
|
|
||||||
User.getUserField(uid, 'password', function(user_password) {
|
User.getUserField(uid, 'password', function(user_password) {
|
||||||
|
|
||||||
bcrypt.compare(password, user_password, function(err, res) {
|
bcrypt.compare(password, user_password, function(err, res) {
|
||||||
if (res === true) {
|
if (res === true) {
|
||||||
next({
|
next({
|
||||||
|
|||||||
Reference in New Issue
Block a user