diff options
author | alecpl <alec@alec.pl> | 2010-11-10 12:44:13 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-11-10 12:44:13 +0000 |
commit | 7403abdac961a4779169e537ee0cf29b359d9e8a (patch) | |
tree | d96b539b87f69e530fe9dff0607747c38e492acc /skins | |
parent | e3af1f2d6d8e9f5dd88edc365af7bd889d06d285 (diff) |
- Fix for nested fieldsets (inside tabbed fieldsets)
Diffstat (limited to 'skins')
-rw-r--r-- | skins/default/functions.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/skins/default/functions.js b/skins/default/functions.js index d5e38d5cd..3197c9847 100644 --- a/skins/default/functions.js +++ b/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', '#'); |