diff plugins/userinfo/userinfo.js @ 0:1e000243b222

vanilla 1.3.3 distro, I hope
author Charlie Root
date Thu, 04 Jan 2018 15:50:29 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/userinfo/userinfo.js	Thu Jan 04 15:50:29 2018 -0500
@@ -0,0 +1,18 @@
+/* Show user-info plugin script */
+
+if (window.rcmail) {
+  rcmail.addEventListener('init', function() {
+    // <span id="settingstabdefault" class="tablink"><roundcube:button command="preferences" type="link" label="preferences" title="editpreferences" /></span>
+    var tab = $('<span>').attr('id', 'settingstabpluginuserinfo').addClass('tablink');
+
+    $('<a>').attr('href', rcmail.env.comm_path + '&_action=plugin.userinfo')
+      .text(rcmail.get_label('userinfo', 'userinfo'))
+      .click(function(e) { return rcmail.command('plugin.userinfo', '', this, e); })
+      .appendTo(tab);
+
+    // add button and register command
+    rcmail.add_element(tab, 'tabs');
+    rcmail.register_command('plugin.userinfo', function() { rcmail.goto_url('plugin.userinfo') }, true);
+  })
+}
+