pui.breakMessageFormat( message, stringwrapper )
This is a user defined function that overrides the default break-message text formatting. When defined, this function is called whenever a break message is received by a session running Genie or Rich Display.
Parameters:
message - (input). This is an object passed by Profound UI to your function containing the following fields:
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.
stringwrap - (output). This is an object that holds your formatted text. Profound UI looks for text in the following fields:
title - The message box's title text becomes the value of message.title.
body - The content of the message box becomes the value of message.body.
Default text formatting:
Message title format: date time, Sender's Job Number / Sender's Job User Name / Sender's Job Name.
Body format: receiving username : message content.
Break Messaging is available with Profound UI Version 5, Fix Pack 4.0.
Example Custom Format
Override the default break message text format by defining pui.breakMessageFormat 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.breakMessageFormat = function(message, stringwrap ){
stringwrap.title = "PUIBRKMSG: "+message.date+" "+message.time;
stringwrap.body = "MESSAGE:<p>" + message.msg + "</p>"
+ "<p><b>From:</b> "
+ "<br> Job Name: " + message.jobName
+ "<br> Job User Name: " + message.jobUserName
+ "<br> Job Number: " + message.jobNum
+ "<br> Job Current Profile Name: " + message.jobCurProfName;
};
Custom formatted message: