...
Standard types of messages
Type | Color |
---|
success | green |
info | blue |
warning | orange |
error | red |
Info |
---|
|
There is no default type. A message with no type would not be displayed. |
Panel Messages Attributes:
Attribute | Type | Info | Default value |
---|
text | string | The text that would be displayed in the panel message. | none |
type | string | Available values: info, success, warning, error | none |
Info |
---|
|
Both attributes are required! |
Panel Messages Styling:
The scss variables for colors are the same with Smart Messages
Code Block |
---|
|
.panel-msg:empty {
display: none;
}
.panel-msg {
padding: 20px 0px 20px 45px;
p {
margin: 2px 0px;
font-family: $light_font;
}
}
.msg-error {
color: $msg_error_color;
}
.msg-warning {
color: $msg_warning_color;
}
.msg-info {
color: $msg_info_color;
}
.msg-success {
color: $msg_success_color;
}
|
Panel Messages Examples:
Code Block |
---|
title | Example of panel message on form, type info |
---|
|
akioma.swat.form.addPanelMessage({
text: 'An info message',
type: 'info'
}) |
Code Block |
---|
title | Example on form with handlebars template, type error |
---|
|
akioma.swat.form.addPanelMessage({
text: '{{selfno}} is not unique. Try again',
type: 'error'
}) |
Code Block |
---|
title | Example on form, delete panel message with id = 0 |
---|
|
akioma.swat.form.removePanelMessage(0) |
Code Block |
---|
title | Example for form, clear all panel messages |
---|
|
akioma.swat.form.clearPanelMessage() |
Code Block |
---|
title | Example on grid with handlebars, type warning |
---|
|
akioma.swat.grid.addPanelMessage({
text: 'Currency is {{currencydesc}}',
type: 'warning'
}) |
Code Block |
---|
title | Example on grid with handlebars, type success |
---|
|
akioma.swat.grid.addPanelMessage({
text: 'Customer is set to {{customerdesc}}',
type: 'success'
})
?? |
Code Block |
---|
title | Example on window, type success |
---|
|
akioma.swat.window.addWindowMessage({
text: 'An window message',
type: 'success'
}) |
Code Block |
---|
title | Example on window, type warning |
---|
|
akioma.swat.window.addWindowMessage({
text: 'Something went wrong',
type: 'warning'
}) |
Code Block |
---|
title | Example on window, clear all messages |
---|
|
akioma.swat.window.clearWindowMessage() |
Code Block |
---|
title | Example on dataview, type info |
---|
|
akioma.swat.dataview.addPanelMessage({
text: 'Info message',
type: 'info'
}) |
____________________________________
Code Block |
---|
language | js |
---|
title | Example for Grid Control |
---|
|
var offer_largebGrid = akioma.root.dynObject.getObject('offer_largeb').controller;
// add messages
offer_largebGrid.parent.addPanelMessage({text: 'Deprecated', type: 'warning'})
offer_largebGrid.parent.addPanelMessage({text: 'There was an <u>error</u>', type: 'error'})
offer_largebGrid.parent.addPanelMessage({text: 'There was a tester', type: 'error'})
// remove one message by index
offer_largebGrid.parent.removePanelMessage(1);
// clear all messages
offer_largebGrid.parent.clearPanelMessages(); |
Code Block |
---|
language | js |
---|
title | Example for Treegrid Control |
---|
|
var otreee = akioma.root.dynObject.getObject('itTree').controller;
otreee.parent.addPanelMessage({ text: 'Info message', type:'info' }) |
Code Block |
---|
language | js |
---|
title | Example for a Form Control |
---|
|
var OfferHeaderData = akioma.root.dynObject.getObject('OfferHeaderData').controller;
// add messages
OfferHeaderData.parent.addPanelMessage({text: 'Deprecated', type: 'warning'})
OfferHeaderData.parent.addPanelMessage({text: 'There was an error', type: 'error'})
OfferHeaderData.parent.addPanelMessage({text: 'There was a tester', type: 'error'})
// remove one message by index
OfferHeaderData.parent.removePanelMessage(1);
// clear all messages
OfferHeaderData.parent.clearPanelMessages()Any other type can be specified and add the style to the corresponding class with an "msg-" prefix. Ex: type: special class: msg-special |
Info |
---|
|
There is no default type. A message with no type would not be displayed. |