Corrected bootstrap dismiss icon markup.

This commit is contained in:
Alex Tselegidis 2016-07-23 16:15:11 +02:00
parent d828befb32
commit 511da5b7ce
1 changed files with 10 additions and 5 deletions

View File

@ -114,20 +114,25 @@ window.Backend = window.Backend || {};
}, 7000); }, 7000);
} }
var notificationHtml = var customActionsHtml = '';
'<div class="notification alert">' +
'<strong>' + message + '</strong>';
$.each(actions, function(index, action) { $.each(actions, function(index, action) {
var actionId = action['label'].toLowerCase().replace(' ', '-'); var actionId = action['label'].toLowerCase().replace(' ', '-');
notificationHtml += '<button id="' + actionId + '" class="btn btn-default btn-xs">' customActionsHtml += '<button id="' + actionId + '" class="btn btn-default btn-xs">'
+ action['label'] + '</button>'; + action['label'] + '</button>';
$(document).off('click', '#' + actionId); $(document).off('click', '#' + actionId);
$(document).on('click', '#' + actionId, action['function']); $(document).on('click', '#' + actionId, action['function']);
}); });
notificationHtml += '<a class="close" data-dismiss="alert" href="#">&times;</a></div>'; var notificationHtml =
'<div class="notification alert">' +
'<button type="button" class="close" data-dismiss="alert" aria-label="Close">' +
'<span aria-hidden="true">&times;</span>' +
'</button>' +
'<strong>' + message + '</strong>' +
customActionsHtml +
'</div>';
$('#notification').html(notificationHtml); $('#notification').html(notificationHtml);
$('#notification').show('blind'); $('#notification').show('blind');