Roundcube Community Forum

 

Using Javascript

Started by luislopez, May 15, 2013, 11:44:37 AM

Previous topic - Next topic

luislopez

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() ) });


luislopez

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