Commit 6e1e24f5 authored by David Mudrak's avatar David Mudrak Committed by Nigel McNie
Browse files

Adds 'current-tab' to the <li> elements as well



This is useful for themers.
Signed-off-by: default avatarDavid Mudrak <david.mudrak@gmail.com>
(cherry picked from commit 7a6da270)
parent 8e8ec0a1
...@@ -19,11 +19,13 @@ addLoadEvent(function() { ...@@ -19,11 +19,13 @@ addLoadEvent(function() {
connect(a, 'onclick', function(e) { connect(a, 'onclick', function(e) {
forEach(fieldsets, function(fieldset) { forEach(fieldsets, function(fieldset) {
if (fieldset == legend.parentNode) { if (fieldset == legend.parentNode) {
addElementClass(fieldset.tabLink.parentNode, 'current-tab');
addElementClass(fieldset.tabLink, 'current-tab'); addElementClass(fieldset.tabLink, 'current-tab');
removeElementClass(fieldset, 'safe-hidden'); removeElementClass(fieldset, 'safe-hidden');
$('profileform_fs').value = fsid; $('profileform_fs').value = fsid;
} }
else { else {
removeElementClass(fieldset.tabLink.parentNode, 'current-tab');
removeElementClass(fieldset.tabLink, 'current-tab'); removeElementClass(fieldset.tabLink, 'current-tab');
addElementClass(fieldset, 'safe-hidden'); addElementClass(fieldset, 'safe-hidden');
} }
...@@ -41,6 +43,7 @@ addLoadEvent(function() { ...@@ -41,6 +43,7 @@ addLoadEvent(function() {
} }
else { else {
// not collapsed by default, probably was the default one to show // not collapsed by default, probably was the default one to show
addElementClass(fieldset.tabLink.parentNode, 'current-tab');
addElementClass(fieldset.tabLink, 'current-tab'); addElementClass(fieldset.tabLink, 'current-tab');
} }
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment