Fixed Tab Form for better behavior under older browsers, less resource usage, and a cookie bug that would log out the users.
This commit is contained in:
parent
ba7640aa02
commit
f67226545b
4 changed files with 71 additions and 14 deletions
40
www/extras/tabs/tabs.css
Normal file
40
www/extras/tabs/tabs.css
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
.tab {
|
||||
display: inline;
|
||||
text-decoration: none;
|
||||
margin-right: 3px;
|
||||
font-weight: bold;
|
||||
padding: 2px 9px 1px 9px;
|
||||
z-index: 100;
|
||||
border-bottom-width: 0;
|
||||
border-top-width: 1 !important;
|
||||
border-bottom-width: 0px !important;
|
||||
}
|
||||
|
||||
.tabBody {
|
||||
width: auto;
|
||||
position: relative;
|
||||
padding: 8px 12px 12px 12px;
|
||||
z-index: 500;
|
||||
}
|
||||
|
||||
div.tabs {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
left: 8px;
|
||||
white-space: nowrap;
|
||||
cursor: default !important;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.tabHover {
|
||||
z-index: 1200;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
.tabActive {
|
||||
padding: 3px 9px 3px 9px;
|
||||
z-index: 10000;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
|
||||
28
www/extras/tabs/tabs.js
Normal file
28
www/extras/tabs/tabs.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
function hoverOn(){
|
||||
this.className = 'tab tabHover';
|
||||
}
|
||||
|
||||
function hoverOff(){
|
||||
this.className = 'tab';
|
||||
}
|
||||
|
||||
function toggleTab(i){
|
||||
if (document.getElementById){
|
||||
for (f=1;f<numberOfTabs+1;f++){
|
||||
document.getElementById('tabcontent'+f).style.display='none';
|
||||
document.getElementById('tab'+f).className = 'tab';
|
||||
document.getElementById('tab'+f).onmouseover = hoverOn;
|
||||
document.getElementById('tab'+f).onmouseout = hoverOff;
|
||||
}
|
||||
document.getElementById('tabcontent'+i).style.display='block';
|
||||
document.getElementById('tab'+i).className = 'tab tabActive';
|
||||
document.getElementById('tab'+i).onmouseover = '';
|
||||
document.getElementById('tab'+i).onmouseout = '';
|
||||
}
|
||||
}
|
||||
|
||||
function initTabs () {
|
||||
toggleTab(1);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue