[Svn] r4212 - trunk/roundcubemail/skins/default

trac at roundcube.net trac at roundcube.net
Wed Nov 10 13:44:13 CET 2010


Author: alec
Date: 2010-11-10 06:44:13 -0600 (Wed, 10 Nov 2010)
New Revision: 4212

Modified:
   trunk/roundcubemail/skins/default/functions.js
Log:
- Fix for nested fieldsets (inside tabbed fieldsets)


Modified: trunk/roundcubemail/skins/default/functions.js
===================================================================
--- trunk/roundcubemail/skins/default/functions.js	2010-11-10 08:53:45 UTC (rev 4211)
+++ trunk/roundcubemail/skins/default/functions.js	2010-11-10 12:44:13 UTC (rev 4212)
@@ -26,8 +26,12 @@
 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;
 
   // first hide not selected tabs
@@ -38,7 +42,9 @@
 
   // 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', '#');

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list