Skip to content

Node.js based forum software built for the modern web

closes #6069

Julian Lamcf9fe0d5af76
diff --git a/public/src/modules/alerts.js b/public/src/modules/alerts.js
index ccd90eb790..62f6da940e 100644
--- a/public/src/modules/alerts.js
+++ b/public/src/modules/alerts.js
@@ -63,7 +63,7 @@ define('alerts', ['translator', 'components', 'benchpress'], function (translato
function updateAlert(alert, params) {
alert.find('strong').html(params.title);
alert.find('p').html(params.message);
- alert.attr('class', 'alert alert-dismissable alert-' + params.type);
+ alert.attr('class', 'alert alert-dismissable alert-' + params.type + ' clearfix');
clearTimeout(parseInt(alert.attr('timeoutId'), 10));
if (params.timeout) {
@@ -102,6 +102,23 @@ define('alerts', ['translator', 'components', 'benchpress'], function (translato
}, timeout);
alert.attr('timeoutId', timeoutId);
+
+ // Reset and start animation
+ alert.css('transition-property', 'none');
+ alert.removeClass('animate');
+
+ setTimeout(function () {
+ alert.css('transition-property', '');
+ alert.css('transition', 'width ' + (timeout + 450) + 'ms linear, background-color ' + (timeout + 450) + 'ms ease-in');
+ alert.addClass('animate');
+ }, 50);
+
+ // Handle mouseenter/mouseleave
+ alert
+ .on('mouseenter', function () {
+ $(this).css('transition-duration', 0);
+ console.log(this);
+ });
}
return module;