COREmanager Documentation

Notifications

 

A Notification bar is a block with icons located in the upper left corner of a control panel. The number of notifications are displayed below the icon. A hint will be shown when moving your mouse cursor over the notification. Clicking the hint will redirect you to a corresponding list or form. Notifications can be also used to change a page heading or to play a sound. If the user is a client of the control panel, then he can receive information about the balance change through notification.

The XML example:

<xml>
  <doc lang="en" func="notify" ...\>
    <notify>
      <item name="ticket" type="list" img="m-support" action="ticket">
        <msg>33</msg>
      </item>
     <item name="title" title="yes">
        <msg>33 new support tickets</msg>
      </item>
     <item name="sound" sound="yes">
        <src>\manimg\userdata\beep.mp3</src>
      </item>
      <item balance="yes" action="desktop">
        <value>1577.98 $</value>
      </item>
    </notify>
    <timeout>60</timeout>
    <messages>
      <msg name="hint_ticket">33 support tickets are awaiting replies</msg>
      <msg name="hint_problem"> 
        A new notification has been registered! Total number of notifications in the system: 265. Errors - 265. Click the icon to go to the Notifications module
      </msg>
    </messages>
    <tparams>
      <out>devel</out>
      <func>notify</func>
    </tparams>
</doc>
</xml>

The notify element

Contains a list of notifications

The item element

This element describes a notification

the img attribute defines a notification icon

the name attribute is a notification name, which is used for localization

the typе attribute defines a that will open when clicking the icon. It is used together with @action

the action attribute defines a module that will open when clicking the icon. It is used together with @type

the title attribute defines that the notification is used to change the browser window heading

the sound attribute defines a module that the notification is used to play sound

the balance attribute instructs to update the balance from the tag value. It usually comes for the client, not for the administrator

The msg element

The element specifies a digit to be displayed below the notification; if @title="yes", it specifies a heading

The src element

The element specifies a path to the sound file. It is used together with @sound="yes"

The value element

 Client balance value, comes in the same line with the currency, used in combination with @balance="yes"

Hints

A pop-up hint for a notification element, which will be taken from the localization messages based on the notification name + hint_

The timeout element

Specifies a timeout to call the notification function