Support for .boxinformation without the icon

pull/5742/merge
Aleksander Machniak 7 years ago
parent 647e0bd2f6
commit e926162767

@ -1431,6 +1431,7 @@ function rcube_elastic_ui()
function alert_style(object, type, wrap)
{
var tmp, classes = 'ui alert',
addicon = !$(object).is('.noicon'),
map = {
information: 'alert-info',
notice: 'alert-info',
@ -1441,7 +1442,7 @@ function rcube_elastic_ui()
vcardattachment: 'alert-info' /* vcard_attachments plugin */
};
if (wrap && !$(object).is('.aligned-buttons')) {
if (wrap && addicon && !$(object).is('.aligned-buttons')) {
// we need the content to be non-text node for best alignment
tmp = $(object).html();
$(object).html($('<span>').html(tmp));
@ -1449,8 +1450,10 @@ function rcube_elastic_ui()
if (tmp = map[type]) {
classes += ' ' + tmp;
if (addicon) {
$('<i>').attr('class', 'icon').prependTo(object);
}
}
$(object).addClass(classes);
};

Loading…
Cancel
Save