Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Standard types of messages


TypeColor
successgreen
infoblue
warningorange
errorred


Info
titleNote

 There is no default type. A message with no type would not be displayed.

 

Panel Messages Attributes:

AttributeTypeInfoDefault value
textstringThe text that would be displayed in the panel message.none
typestringAvailable values: info, success, warning, errornone
Info
titleNote

Both attributes are required!

 

Panel Messages Styling:

The scss variables for colors are the same with Smart Messages

Code Block
languagecss
titleStyle
.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
titleExample of panel message on form, type info
akioma.swat.form.addPanelMessage({
    text: 'An info message',
    type: 'info'
})
Code Block
titleExample on form with handlebars template, type error
akioma.swat.form.addPanelMessage({
    text: '{{selfno}} is not unique. Try again',
    type: 'error'
})
Code Block
titleExample on form, delete panel message with id = 0
akioma.swat.form.removePanelMessage(0)
Code Block
titleExample for form, clear all panel messages
akioma.swat.form.clearPanelMessage()
Code Block
titleExample on grid with handlebars, type warning
akioma.swat.grid.addPanelMessage({
    text: 'Currency is {{currencydesc}}',
    type: 'warning'
})
Code Block
titleExample on grid with handlebars, type success
akioma.swat.grid.addPanelMessage({
    text: 'Customer is set to {{customerdesc}}',
    type: 'success'
})
??
Code Block
titleExample on window, type success
akioma.swat.window.addWindowMessage({
    text: 'An window message',
    type: 'success'
})
Code Block
titleExample on window, type warning
akioma.swat.window.addWindowMessage({
    text: 'Something went wrong',
    type: 'warning'
})
Code Block
titleExample on window, clear all messages
akioma.swat.window.clearWindowMessage()
Code Block
titleExample on dataview, type info
akioma.swat.dataview.addPanelMessage({ text: 'Info message', type: 'info' })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
titleNote

 There is no default type. A message with no type would not be displayed.