From 4f1b7a447dab993dfd3a3b1b6d4091b9d32ce24b Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Fri, 23 Dec 2011 13:02:47 -0500 Subject: [PATCH] Add generic template for plugins --- skins/larry/ui.js | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 7033ebf..7c0b035 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -104,12 +104,14 @@ } } else if (rcmail.env.task == 'settings') { - var tab = '#settingstabpreferences'; - if (rcmail.env.action) - tab = '#settingstab' + (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action.replace(/\./g, '')); + rcmail.addEventListener('init', function(){ + var tab = '#settingstabpreferences'; + if (rcmail.env.action) + tab = '#settingstab' + (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action.replace(/\./g, '')); - $(tab).addClass('selected') - .children().first().removeAttr('onclick').click(function() { return false; }); + $(tab).addClass('selected') + .children().first().removeAttr('onclick').click(function() { return false; }); + }); if (rcmail.env.action == 'folders') { new rcube_splitter({ id:'folderviewsplitter', p1:'#folderslist', p2:'#folder-details', -- Gitblit v1.9.1