Elastic: Small code cleanup

pull/6528/head
Aleksander Machniak 6 years ago
parent 356e6c09f7
commit 3116c81ec6

@ -1768,8 +1768,6 @@ function rcube_elastic_ui()
alert_style(p.object, p.type, true); alert_style(p.object, p.type, true);
$(p.object).attr('role', 'alert'); $(p.object).attr('role', 'alert');
// $('a', p.object).addClass('alert-link');
}; };
/** /**
@ -1787,18 +1785,17 @@ function rcube_elastic_ui()
error: 'alert-danger', error: 'alert-danger',
loading: 'alert-info loading', loading: 'alert-info loading',
uploading: 'alert-info loading', uploading: 'alert-info loading',
vcardattachment: 'alert-info' /* vcard_attachments plugin */ vcardattachment: 'alert-info' // vcard_attachments plugin
}; };
// Type can be e.g. 'notice chat' // we need the content to be non-text node for best alignment
type = type.split(' ')[0];
if (wrap && addicon && !$(object).is('.aligned-buttons')) { if (wrap && addicon && !$(object).is('.aligned-buttons')) {
// we need the content to be non-text node for best alignment $(object).wrap('<span>');
tmp = $(object).html();
$(object).html($('<span>').html(tmp));
} }
// Type can be e.g. 'notice chat'
type = type.split(' ')[0];
if (tmp = map[type]) { if (tmp = map[type]) {
classes += ' ' + tmp; classes += ' ' + tmp;
if (addicon) { if (addicon) {

Loading…
Cancel
Save