From ed1d212ae2daea5e4bd043417610177093e99f19 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sat, 16 Jan 2016 03:03:51 -0500 Subject: [PATCH] Improved SVG cleanup code --- plugins/userinfo/userinfo.js | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/userinfo/userinfo.js b/plugins/userinfo/userinfo.js index 70a5085..5b9c942 100644 --- a/plugins/userinfo/userinfo.js +++ b/plugins/userinfo/userinfo.js @@ -1,16 +1,18 @@ /* Show user-info plugin script */ if (window.rcmail) { - rcmail.addEventListener('init', function(evt) { + 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'); - - 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) }); - + + $('<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); + rcmail.register_command('plugin.userinfo', function() { rcmail.goto_url('plugin.userinfo') }, true); }) } -- Gitblit v1.9.1