Rev 6873 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%'==========================================' Tab Menus'==========================================Private Sub Draw_Tab_LiEntry (SSenable, SSitem, SSlink)Dim sClass : sClass = ""If SSenable Then sClass="current"If SSlink = "#" ThenResponse.write "<li class='tabsText "& sClass &"'>"& SSitem &"</li>"ElseResponse.write "<li class='" & sClass & "'><a href='"& SSlink &"'>"& SSitem &"</a></li>"End IfEnd Sub'-------------------------------------------------' Function: GenStyle' Description: Generate a local style sheet with a few options configured globally'Private Function GenStyle (sName, sfgColor, sbgColor)Dim classPrefix : classPrefix = sName & "_"GenStyle = classPrefix & "tabs"%><style type="text/css">.<%=classPrefix%>tabs {overflow: hidden;width: 100%;margin: 0;padding: 0;list-style: none;font-size: 11px;white-space: nowrap;height: 19px;}.<%=classPrefix%>tabs li {display: inline-block;margin: 0 3px 0 0;line-height: 17px;}.<%=classPrefix%>tabs .tabsText,.<%=classPrefix%>tabs a {position: relative;background: #c2c3c2;padding: 1px .7em;float: left;text-decoration: none;color: black;border-radius: 5px 0 0 0;box-shadow: 0 2px 2px rgba(0,0,0,.5);}.<%=classPrefix%>tabs a:hover,.<%=classPrefix%>tabs a:hover::after,.<%=classPrefix%>tabs a:focus,.<%=classPrefix%>tabs a:focus::after {background: <%=sbgColor%>;color: <%=sfgColor%>;}.<%=classPrefix%>tabs a:focus {outline: 0;}.<%=classPrefix%>tabs .tabsText::after,.<%=classPrefix%>tabs a::after {content:'';position:absolute;z-index: 1;top: 0;right: -.5em;bottom: 0;width: 1em;background: #c2c3c2;box-shadow: 2px 2px 2px rgba(0,0,0,.4);transform: skew(10deg);border-radius: 0 5px 0 0;}.<%=classPrefix%>tabs .tabsText.current,.<%=classPrefix%>tabs .tabsText.current::after,.<%=classPrefix%>tabs .current a,.<%=classPrefix%>tabs .current a::after {background: <%=sbgColor%>;color: <%=sfgColor%>;z-index: 3;}</style><%End FunctionSub Generate_Tab_Menu ( SSarray, SSselected, SScolorStyle )Dim FirstTab, LastTab, enabled, iDim classNameIf SScolorStyle = "blue" ThenclassName = GenStyle (SScolorStyle, "white", "#003399")ElseIf SScolorStyle = "grey" ThenclassName = GenStyle (SScolorStyle, "black", "#f2f0e4")ElseclassName = GenStyle (SScolorStyle, "black", "#ffcc33")End IfFirstTab = LBound(SSarray)LastTab = UBound(SSarray)' With CSS only'Response.write "<ul class="&className&">"For i = FirstTab To LastTabDim tempArraytempArray = SSarray(i)enabled = FALSEIf isNumeric(SSselected) ThenIf Cint(SSselected) = i Then enabled = TRUEElseIf SSselected <> "" Then enabled = (tempArray(1) = SSselected)End IfCall Draw_Tab_LiEntry ( enabled, tempArray(0) & tempArray(1), tempArray(2) )NextResponse.write "</ul>"End Sub%>