I'm calling this a "bug" because it means the themes
don't have 100% control over the look-and-feel... You
may decide this is more of a feature request.
I was trying to create a "high-contrast" version of the
cloudy theme, because I have a user with poor eyesight.
In individual.php, in the tabswitch method, there's the
following lines of javascript:
...
// empty tabs
for (i=0; i<tabid.length; i++) {
var elt = document.getElementById('door'+i);
if (document.getElementById('no_tab'+i)) { // empty ?
if (<?php if (userCanEdit(getUserName())) echo
'true'; else echo 'false';?>) {
elt.style.display='block';
elt.style.opacity='0.4';
elt.style.filter='alpha(opacity=40)';
}
else elt.style.display='none'; // empty and not
editable ==> hide
//if (i==3 && <?php if
($SHOW_SOURCES>=getUserAccessLevel(getUserName())) echo
'true'; else echo 'false';?>) elt.style.display='none';
// no sources
if (i==4 && <?php if (!$MULTI_MEDIA) echo 'true';
else echo 'false';?>) elt.style.display='none'; // no
multimedia
if (i==6) elt.style.display='none'; // hide researchlog
// ALL : hide empty contents
if (n==0)
document.getElementById(tabid[i]).style.display='none';
}
else elt.style.display='block';
}
// current door
for (i=0; i<tabid.length; i++) {
document.getElementById('door'+i).className='door
optionbox rela';
//document.getElementById('door'+i).className='tab_cell_inactive';
}
document.getElementById('door'+n).className='door
optionbox';
//document.getElementById('door'+n).className='tab_cell_active';
...
IMHO, this should instead be more like:
...
// empty tabs
for (i=0; i<tabid.length; i++) {
var elt =
document.getElementById('door'+i);
if
(document.getElementById('no_tab'+i)) { // empty ?
if (<?php if
(userCanEdit(getUserName())) echo 'true'; else echo
'false';?>) {
elt.style.display='block';
elt.className='tab_cell_inactive_empty';
}
else elt.style.display='none';
// empty and not editable ==> hide
// ALL : hide empty contents
if (n==0)
document.getElementById(tabid[i]).style.display='none';
}
else {
elt.style.display='block';
elt.className='tab_cell_inactive';
}
}
// current door
document.getElementById('door'+n).className='tab_cell_active';
...
This is using "active", "inactive" and "inactive_empty"
css styles instead of just setting the opacity (In my
case, I didn't want opacity to decrease because it
makes the text hard to read).
I tested this (with my updated css) on mozilla,
firefox, and safari and it seemed to work. Obviously
IE would be a good test but I'm on a Mac and MS has
ceased supporting IE on Mac.
Veit - assigning to you, as you are working in this area.
Has to be done in line with the new tab menu. I will check if its fixed with this.