diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-02-20 13:47:26 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-02-20 13:47:26 +0000 |
| commit | 5e4aa55d42f41eba3db261f70f5fb144c59ed451 (patch) | |
| tree | ffc5c40e0e21068de3ff1b0b5bc85383a9546d1b | |
| parent | 80bec459ccdbf0f696de93d80856fd61bff76363 (diff) | |
- Make sure About tab is always the last tab (#1488257)
git-svn-id: https://svn.roundcube.net/trunk@5894 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/skins/default/functions.js | 20 |
2 files changed, 17 insertions, 4 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 2bd325c46..d164970ac 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Make sure About tab is always the last tab (#1488257) - Fix issue with folder creation under INBOX. namespace (#1488349) - Added mailto: protocol handler registration link in User Preferences (#1486580) - Handle identity details box with an iframe (#1487020) diff --git a/roundcubemail/skins/default/functions.js b/roundcubemail/skins/default/functions.js index 8482e375a..1576aeffc 100644 --- a/roundcubemail/skins/default/functions.js +++ b/roundcubemail/skins/default/functions.js @@ -8,12 +8,24 @@ function rcube_init_settings_tabs() { - var tab = '#settingstabdefault'; - if (window.rcmail && rcmail.env.action) - tab = '#settingstab' + (rcmail.env.action=='preferences' ? 'default' : (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action.replace(/\./g, ''))); + var el, cl, container = $('#tabsbar'), + last_tab = $('span:last', container), + tab = '#settingstabdefault', + action = window.rcmail && rcmail.env.action ? rcmail.env.action : null; + + // move About tab to the end + if (last_tab && last_tab.attr('id') != 'settingstababout' && (el = $('#settingstababout'))) { + cl = el.clone(true); + el.remove(); + last_tab.after(cl); + } + + // get selected tab + if (action) + tab = '#settingstab' + (action == 'preferences' ? 'default' : (action.indexOf('identity')>0 ? 'identities' : action.replace(/\./g, ''))); $(tab).addClass('tablink-selected'); - $(tab + '> a').removeAttr('onclick').click(function() { return false; }); + $(a, tab).removeAttr('onclick').click(function() { return false; }); } function rcube_show_advanced(visible) |
