diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-10 12:44:13 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-10 12:44:13 +0000 |
| commit | a5fc638a9aa395172ecd49b2c8f880398f98a6ba (patch) | |
| tree | b989fb73ab0ec59d6f57ccc2668dd03f1d66b3ca | |
| parent | a52532cf7cbd84060947f4361428e029e0b8654b (diff) | |
- Fix for nested fieldsets (inside tabbed fieldsets)
git-svn-id: https://svn.roundcube.net/trunk@4212 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/skins/default/functions.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/roundcubemail/skins/default/functions.js b/roundcubemail/skins/default/functions.js index d5e38d5cd..3197c9847 100644 --- a/roundcubemail/skins/default/functions.js +++ b/roundcubemail/skins/default/functions.js @@ -26,7 +26,11 @@ function rcube_show_advanced(visible) function rcube_init_tabs(id, current) { var content = document.getElementById(id), - fs = $('fieldset', content); + // get fieldsets of the higher-level (skip nested fieldsets) + fs = $('fieldset', content).not('fieldset > fieldset'); + + if (!fs.length) + return; current = current ? current : 0; @@ -38,7 +42,9 @@ function rcube_init_tabs(id, current) // convert fildsets into tabs fs.each(function(idx) { - var tab, a, elm = $(this), legend = $('legend', elm); + var tab, a, elm = $(this), + // get first legend element + legend = $(elm).children('legend'); // create a tab a = $('<a>').text(legend.text()).attr('href', '#'); |
