Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: luislopez on May 15, 2013, 11:44:37 AM

Title: Using Javascript
Post by: luislopez on May 15, 2013, 11:44:37 AM
HI all!  ;D

I'm writting a plugin that creates a button and enables it when it's necesary.
I added an eventlistener and the plugin enables my button (it's ok) but only when the mail is selected from the messages list.
I wana enable my button when the message is showed too.

What event/task/action should I use?

Example:

rcmail.message_list.addEventListener('select', function(list){ this.parseANDenable( $('tr#rcmrow' + list.get_selection() + '.message td.subject a').html() ) });

Title: Re: Using Javascript
Post by: luislopez on May 15, 2013, 12:31:45 PM
I solved it. Sorry, I'm so tired and did not see it...  :o

if (rcmail.env.task == 'mail' && rcmail.env.action == 'show')
   bla, bla, bla


Please, close this topic  :D