Author Topic: Using Javascript  (Read 3381 times)

Offline luislopez

  • Newbie
  • *
  • Posts: 9
Using Javascript
« 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:
Code: [Select]
rcmail.message_list.addEventListener('select', function(list){ this.parseANDenable( $('tr#rcmrow' + list.get_selection() + '.message td.subject a').html() ) });

Offline luislopez

  • Newbie
  • *
  • Posts: 9
Re: Using Javascript
« Reply #1 on: May 15, 2013, 12:31:45 PM »
I solved it. Sorry, I'm so tired and did not see it...  :o
Code: [Select]
if (rcmail.env.task == 'mail' && rcmail.env.action == 'show')
   bla, bla, bla

Please, close this topic  :D