Added toggle for admin menu. Some work needed to make generic.

--HG--
branch : dev
This commit is contained in:
Jonathan Wall
2010-07-20 11:22:53 -07:00
parent b8d05875f4
commit 2cf2931745
8 changed files with 22 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
$(document).ready(function(){
$("#navigation li span").click(function() {
$(this).next().next().slideToggle(600);
return false;
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -239,7 +239,7 @@ form.link button:hover {
width:0; width:0;
} }
#navigation li { #navigation li {
margin:7px 0 20px 0; margin:7px 0 20px 4px;
} }
#navigation ul li { #navigation ul li {
border:0; border:0;
@@ -270,6 +270,19 @@ form.link button:hover {
text-decoration:underline; text-decoration:underline;
} }
/* todo: make generic so all toggles can use this and clean up jQuery */
.menuGlyph {
display:block;
height:11px;
width:11px;
margin:0 0 -22px -8px;
background:url("images/menuOpen.gif") no-repeat center top;
}
.menuGlyph:hover {
background:url("images/menuOpenHover.gif") no-repeat center top;
cursor:pointer;
}
/* Content /* Content
----------------------------------------------------------*/ ----------------------------------------------------------*/
#main h1 { #main h1 {

View File

@@ -8,6 +8,7 @@ Model.Zones.AddRenderPartial("header", "Header", Model);
Model.Zones.AddRenderPartial("header:after", "User", Model); // todo: (heskew) should be a user display or widget Model.Zones.AddRenderPartial("header:after", "User", Model); // todo: (heskew) should be a user display or widget
Model.Zones.AddRenderPartial("menu", "Menu", Model); Model.Zones.AddRenderPartial("menu", "Menu", Model);
%> %>
<script src="<%: Url.Content("~/Themes/TheAdmin/Scripts/admin.js") %>" type="text/javascript"></script>
<div id="header" role="banner"><% Html.Zone("header"); %></div> <div id="header" role="banner"><% Html.Zone("header"); %></div>
<div id="content"> <div id="content">
<div id="navshortcut"><a href="#menu"><%: T("Skip to navigation") %></a></div> <div id="navshortcut"><a href="#menu"><%: T("Skip to navigation") %></a></div>

View File

@@ -15,7 +15,7 @@
classification += "last "; classification += "last ";
%> %>
<li<%=!string.IsNullOrEmpty(classification) ? string.Format(" class=\"{0}\"", classification.TrimEnd()) : "" %>><h3><%=sectionHeaderMarkup %></h3><ul><%foreach (var menuItem in menuSection.Items) { %> <li<%=!string.IsNullOrEmpty(classification) ? string.Format(" class=\"{0}\"", classification.TrimEnd()) : "" %>><span class="menuGlyph"></span><h3><%=sectionHeaderMarkup %></h3><ul class="menuItems"><%foreach (var menuItem in menuSection.Items) { %>
<li><%: Html.ActionLink(menuItem.Text, (string)menuItem.RouteValues["action"], menuItem.RouteValues)%></li> <li><%: Html.ActionLink(menuItem.Text, (string)menuItem.RouteValues["action"], menuItem.RouteValues)%></li>
<%} %></ul></li> <%} %></ul></li>
<% <%