diff options
author | thomascube <thomas@roundcube.net> | 2011-10-19 15:28:11 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-10-19 15:28:11 +0000 |
commit | 5da48a95224e925f4b070f2581a121516df33829 (patch) | |
tree | fadc87888faae54cdb1efc6f7b73fbfce79e0fe7 /plugins/userinfo/userinfo.js | |
parent | b03854de3a36a322bf98c733ed9b75d996694e38 (diff) |
Copy plugins to release branch
Diffstat (limited to 'plugins/userinfo/userinfo.js')
-rw-r--r-- | plugins/userinfo/userinfo.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/userinfo/userinfo.js b/plugins/userinfo/userinfo.js new file mode 100644 index 000000000..70a5085b3 --- /dev/null +++ b/plugins/userinfo/userinfo.js @@ -0,0 +1,16 @@ +/* Show user-info plugin script */ + +if (window.rcmail) { + rcmail.addEventListener('init', function(evt) { + // <span id="settingstabdefault" class="tablink"><roundcube:button command="preferences" type="link" label="preferences" title="editpreferences" /></span> + var tab = $('<span>').attr('id', 'settingstabpluginuserinfo').addClass('tablink'); + + var button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.userinfo').html(rcmail.gettext('userinfo', 'userinfo')).appendTo(tab); + button.bind('click', function(e){ return rcmail.command('plugin.userinfo', this) }); + + // add button and register command + rcmail.add_element(tab, 'tabs'); + rcmail.register_command('plugin.userinfo', function(){ rcmail.goto_url('plugin.userinfo') }, true); + }) +} + |