Subversion Repositories DevTools

Rev

Rev 6873 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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