Subversion Repositories DevTools

Rev

Rev 6788 | Rev 6879 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%
2
'==========================================
3
'				Tab Menus
4
'==========================================
5
 
6873 dpurdie 6
Private Sub Draw_Tab_LiEntry (SSenable, SSitem, SSlink)
7
    Dim sClass : sClass = ""
8
    If SSenable Then sClass="current"
9
    If SSlink = "#" Then
10
        Response.write "<li class='tabsText "& sClass &"'>"& SSitem &"</li>"
11
    Else
12
        Response.write "<li class='" & sClass & "'><a href='"& SSlink &"'>"& SSitem &"</a></li>"
13
    End If
14
End Sub
119 ghuddy 15
 
6873 dpurdie 16
'-------------------------------------------------
17
' Function:    GenStyle
18
' Description: Generate a local style sheet with a few options configured globally
19
'
20
Private Sub GenStyle (sfgColor, sbgColor)
119 ghuddy 21
%>
6873 dpurdie 22
<style type="text/css">
23
.tabs {
24
  overflow: hidden;
25
  width: 100%;
26
  margin: 0;
27
  padding: 0;
28
  list-style: none;
29
  font-size: 11px;
30
  white-space: nowrap;
31
  height: 19px;
32
}
119 ghuddy 33
 
6873 dpurdie 34
.tabs li {
35
  display: inline-block;
36
  margin: 0 3px 0 0;
37
  line-height: 17px;
38
}
119 ghuddy 39
 
6873 dpurdie 40
.tabsText,
41
.tabs a {
42
  position: relative;
43
  background: #c2c3c2;
44
  padding: 1px .7em;
45
  float: left;
46
  text-decoration: none;
47
  color: black;
48
  border-radius: 5px 0 0 0;
49
  box-shadow: 0 2px 2px rgba(0,0,0,.5);
50
}
119 ghuddy 51
 
6873 dpurdie 52
.tabs a:hover,
53
.tabs a:hover::after,
54
.tabs a:focus,
55
.tabs a:focus::after {
56
  background: <%=sbgColor%>;
57
  color: <%=sfgColor%>;
58
}
119 ghuddy 59
 
6873 dpurdie 60
.tabs a:focus {
61
  outline: 0;
62
}
63
 
64
.tabsText::after,
65
.tabs a::after {
66
  content:'';
67
  position:absolute;
68
  z-index: 1;
69
  top: 0;
70
  right: -.5em;  
71
  bottom: 0;
72
  width: 1em;
73
  background: #c2c3c2;
74
  box-shadow: 2px 2px 2px rgba(0,0,0,.4);
75
  transform: skew(10deg);
76
  border-radius: 0 5px 0 0;  
77
}
78
 
79
.tabs .tabsText.current,
80
.tabs .tabsText.current::after,
81
.tabs .current a,
82
.tabs .current a::after {
83
  background: <%=sbgColor%>;
84
  color: <%=sfgColor%>;
85
  z-index: 3;
86
}
87
</style>
88
<%
6788 dpurdie 89
End Sub
119 ghuddy 90
 
6788 dpurdie 91
 
119 ghuddy 92
Sub Generate_Tab_Menu ( SSarray, SSselected, SScolorStyle )
6873 dpurdie 93
	Dim FirstTab, LastTab, enabled, i
119 ghuddy 94
 
6873 dpurdie 95
    If SScolorStyle = "blue" Then
96
        Call GenStyle ("white", "#003399")
97
    Else
98
        Call GenStyle ("black", "#ffcc33")
99
    End If
100
 
119 ghuddy 101
	FirstTab = LBound(SSarray)
102
	LastTab = UBound(SSarray)
6873 dpurdie 103
 
104
    ' With CSS only
105
    '
106
	Response.write "<ul class=tabs>"
119 ghuddy 107
	For i = FirstTab To LastTab
6873 dpurdie 108
        Dim tempArray
6788 dpurdie 109
		tempArray = SSarray(i)
119 ghuddy 110
		enabled = FALSE
6788 dpurdie 111
		If SSselected <> "" Then enabled = (tempArray(1) = SSselected)
6873 dpurdie 112
		Call Draw_Tab_LiEntry ( enabled, tempArray(0) & tempArray(1), tempArray(2) )
119 ghuddy 113
	Next
6873 dpurdie 114
	Response.write "</ul>"
119 ghuddy 115
End Sub
116
%>
117
 
118
 
119