pui["brkmsg handler"]





pui["brkmsg handler"] is a user defined function that overrides the default break-message text handler. When defined, this function is called whenever a break message is received by a session running Genie or Rich Display.

Custom code can be written to display or handle break messages on the screen that departs from the default popups.

Parameters:

  • messages - This is an array of objects passed by Profound UI to your function containing the following fields in each object:

    • date - The date the message was sent.

    • time - The time the message was sent.

    • msg - The message content.

    • jobName - The jobName of the user who sent the message.

    • jobUserName - The user name of the user who sent the message.

    • jobNum - The job number of the user who sent the message.

    • jobCurProfName - The Current Profile Name of the user who sent the message.



This function is available with Profound UI fix packs later than Version 6, Fix Pack 1.2.

Example Custom Format

Override the default break message text format by defining pui["brkmsg handler"] in a script in your Genie skin folder. If you are also using Rich Display files, you'll also need to define the function in your userdata/custom/js/ folder. For example, if your installation is named "profoundui", then you can define the function in /profoundui/userdata/custom/js/custom.js in your htdocs folder for Rich Display files. For Genie, the location would be /profoundui/userdata/genie skins/YourSkinName/custom.js.

A sample definition is:

pui["brkmsg handler"] = function(messages){ if (messages != null && messages.length > 0 ){ console.log("break messages:", messages); var uid = "brkmsgMessages_" + pui.appJob.user; setTimeout(function(){ localStorage.removeItem(uid); //A delay is necessary. },1); } };