mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 07:50:08 +08:00
Setup warning messages
- Set them do auto cole after preset timeout - Allow setting label key
This commit is contained in:
parent
801632388b
commit
f315b3f839
2 changed files with 8 additions and 1 deletions
|
@ -56,7 +56,7 @@ export class MessageUiComponent implements OnInit, AfterViewInit {
|
|||
}
|
||||
|
||||
this.messages.forEach(message => {
|
||||
if (message.type === MessageTypes.success) {
|
||||
if (message.type === MessageTypes.success || message.type === MessageTypes.warning) {
|
||||
setTimeout(() => {
|
||||
this.messageService.contains(message, true);
|
||||
}, this.timeout * 1000);
|
||||
|
|
|
@ -100,6 +100,13 @@ export class MessageService {
|
|||
});
|
||||
}
|
||||
|
||||
addWarningMessageByKey(labelKey: string): number {
|
||||
return this.addMessage({
|
||||
type: MessageTypes.warning,
|
||||
labelKey
|
||||
});
|
||||
}
|
||||
|
||||
addInfoMessage(text: string): number {
|
||||
return this.addMessage({
|
||||
type: MessageTypes.info,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue