From 7ac01b4c062e7821b216b20a945e24ce606aa02f Mon Sep 17 00:00:00 2001 From: yariplus Date: Sun, 12 Nov 2017 02:44:13 -0500 Subject: [PATCH 1/2] Fixes https://github.com/NodeBB/nodebb-rewards-essentials/issues/6 Fixes https://github.com/NodeBB/nodebb-rewards-essentials/issues/11 --- src/views/admin/extend/rewards.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/admin/extend/rewards.tpl b/src/views/admin/extend/rewards.tpl index 5177d1a77e..9df8ac01d0 100644 --- a/src/views/admin/extend/rewards.tpl +++ b/src/views/admin/extend/rewards.tpl @@ -27,9 +27,9 @@

From cf9fe0d5af76ad0219c313e9f2a3a5ce0a506781 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 15 Nov 2017 12:38:22 -0500 Subject: [PATCH 2/2] closes #6069 --- public/src/modules/alerts.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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;