Improve display_message() for sophisticated 'loading' messages

So it's possible to display more than one message of type 'loading'
at a time and define custom timeout.
pull/6697/head
Aleksander Machniak 6 years ago
parent fae26eab13
commit dbf6e0a81d

@ -7906,6 +7906,14 @@ function rcube_webmail()
if (!type) if (!type)
type = 'notice'; type = 'notice';
else if (type == 'loading') {
if (!key)
key = 'loading';
if (!timeout)
timeout = this.env.request_timeout * 1000;
if (!msg)
msg = this.get_label('loading');
}
if (!key) if (!key)
key = this.html_identifier(msg); key = this.html_identifier(msg);
@ -7929,13 +7937,6 @@ function rcube_webmail()
} }
} }
if (type == 'loading') {
key = 'loading';
timeout = this.env.request_timeout * 1000;
if (!msg)
msg = this.get_label('loading');
}
// The same message is already displayed // The same message is already displayed
if (this.messages[key]) { if (this.messages[key]) {
// replace label // replace label

Loading…
Cancel
Save