[RCD] Persistent messages

Marcus Don mdon at names.co.uk
Tue Jun 22 15:50:07 CEST 2010


I'd like to suggest a small alteration to app.js in order to allow
persistent messages to be generated when using rcmail::output::command()
within a page-generating callback function.

The rcube_webmail::display_message() function already accepts a "hold"
parameter, but this doesn't get stored in $pending_message if the page
hasn't yet loaded, so it gets lost. My suggestion is simply to add this
extra parameter to $pending_message and then pass it back to
display_message() within init().

So, on line 4323, I'd like to replace this...

this.pending_message = new Array(msg, type);

...with this...

this.pending_message = new Array(msg, type, hold);

And, on line 385, I'd like to replace this...

this.display_message(this.pending_message[0], this.pending_message[1]);

..with this...

this.display_message(this.pending_message[0], this.pending_message[1],

As a result of this change, I can now make messages persistent by calling
rcmail::output::command() like this:



Marcus Don
Senior Manager
Research and Development

Main Line:     +44 (0)845 363 3630
Main Fax:      +44 (0)845 363 3631
Tech Support:  +44 (0)845 363 3634
Email:         mdon at names.co.uk
Website:       http://www.names.co.uk
Address:       Acton House, Perdiswell Park, Worcester WR3 7GD

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.

If you have received this email in error please notify the sender
immediately.  If you are not the intended recipient you are notified that
disclosing, copying, distributing or taking any action in reliance on the
contents of this information is strictly prohibited. Please note that any
views or opinions presented in this email are solely those of the author and
do not necessarily represent those of the company.

Finally, the recipient should check this email and any attachments for the
presence of viruses.  The company accepts no liability for any damage caused
by any virus transmitted by this email.

List info: http://lists.roundcube.net/dev/

More information about the Dev mailing list