Skip to content
Snippets Groups Projects
Commit e7d3c49c authored by Martin Massenberg's avatar Martin Massenberg
Browse files

feat: neue Methoden zum löschen der Nachricht und prüfung auf leere Nachricht...

See merge request oss/libraries/javascript/monster!57
parents 6a838a3b 193fcb0b
No related branches found
No related tags found
No related merge requests found
......@@ -210,11 +210,25 @@ class MessageStateButton extends Popper {
}
/**
* clears the Message
*
* @return {Monster.Components.Form.MessageStateButton}
*/
clearMessage() {
this.setOption("message.title", undefined);
this.setOption("message.content", undefined);
this.setOption("message.icon", undefined);
return this;
}
/**
* With this method you can show the popper with timeout feature.
*
* @param {number} timeout
* @return {MessageStateButton}
*/
showMessage(timeout) {
super.showDialog();
this.showDialog.call(this);
if (timeout !== undefined) {
setTimeout(() => {
......@@ -225,6 +239,19 @@ class MessageStateButton extends Popper {
return this;
}
/**
* With this method you can show the popper.
*
* @return {MessageStateButton}
*/
showDialog(){
if (this.getOption("message.content") === undefined) {
return;
}
super.showDialog();
return this;
}
/**
*
* @return {Monster.Components.Form.MessageStateButton}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment