fixed issue where an updated alert didn't contain changes to the clickfn, closes #2798

v1.18.x
Julian Lam 10 years ago
parent 339619fc9d
commit a2c6f58782

@ -77,6 +77,19 @@ define('alerts', function() {
alert.children().fadeIn(100);
alert.html(translatedHTML);
});
// Handle changes in the clickfn
alert.off('click').removeClass('pointer');
if (typeof params.clickfn === 'function') {
alert
.addClass('pointer')
.on('click', function (e) {
if(!$(e.target).is('.close')) {
params.clickfn();
}
fadeOut(alert);
});
}
}
function fadeOut(alert) {

Loading…
Cancel
Save