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);
$(p.object).attr('role', 'alert');
// $('a', p.object).addClass('alert-link');
};
/**
@ -1787,18 +1785,17 @@ function rcube_elastic_ui()
error: 'alert-danger',
loading: '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'
type = type.split(' ')[0];
// we need the content to be non-text node for best alignment
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));
$(object).wrap('<span>');
}
// Type can be e.g. 'notice chat'
type = type.split(' ')[0];
if (tmp = map[type]) {
classes += ' ' + tmp;
if (addicon) {

Loading…
Cancel
Save