Author Topic: Plugin Basic Change  (Read 1385 times)

Offline jon10

  • Newbie
  • *
  • Posts: 4
Plugin Basic Change
« on: May 06, 2015, 08:50:30 AM »
Hey,

Apologies if this is a very basic question but I have been working on this for a few hours now.
I am attempting to add a new button to the 'mail' page*
Here is my javascript code:
Code: [Select]
if (window.rcmail) {
  rcmail.addEventListener('init', function(evt) {
var button = $('<a>').attr('id', 'sendmailbutton').html('test').addClass('button sample');
rcmail.add_element(button, 'toolbar');
rcmail.register_button('plugin.sendmail', 'sendmailbutton');
        alert('is js loaded?');
  })
}

The alert is working, the button doesn't appear (I tried searching through using the inspector tool in g chrome).
I have worked with many variations of the above code but no results.
Are there any books I could buy on roundcube plugin development since there is almost no documentation?
Thanks for your help
- J

*the docs are not very good although I have read them over multiple times, does anybody have a good tutorial they can refer me to?