Aleksander Machniak
2015-02-02 e8fc8d303a30658abd70419917a1373131802e28
commit | author | age
48e9c1 1 /* Show user-info plugin script */
T 2
3 if (window.rcmail) {
4   rcmail.addEventListener('init', function(evt) {
5     // <span id="settingstabdefault" class="tablink"><roundcube:button command="preferences" type="link" label="preferences" title="editpreferences" /></span>
6     var tab = $('<span>').attr('id', 'settingstabpluginuserinfo').addClass('tablink');
7     
8     var button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.userinfo').html(rcmail.gettext('userinfo', 'userinfo')).appendTo(tab);
9     button.bind('click', function(e){ return rcmail.command('plugin.userinfo', this) });
10     
11     // add button and register command
12     rcmail.add_element(tab, 'tabs');
13     rcmail.register_command('plugin.userinfo', function(){ rcmail.goto_url('plugin.userinfo') }, true);
14   })
15 }
16