Nu ska nog fasen menyn fungera
git-svn-id: svn://svn.dsv.su.se/scipro/scipro/trunk@516 73ecded7-942e-4092-bab0-0e58ef0ee984
This commit is contained in:
parent
f2c6277654
commit
1bbb564444
src/main
@ -24,6 +24,17 @@
|
||||
}
|
||||
});
|
||||
|
||||
$(document).mouseover(function(e) {
|
||||
if ($(e.target).parents("#main-nav").length == 0) {
|
||||
closeMenus(null);
|
||||
}
|
||||
});
|
||||
|
||||
testingFeature = function() {
|
||||
var t = $("#nav-list").find("#current").parents(".nav-list-item").get(0);
|
||||
$(t).addClass("current");
|
||||
}
|
||||
|
||||
closeMenus = function(node) {
|
||||
$("#nav-list .parent").children(".over").each(function() {
|
||||
if (this != node || node == null) {
|
||||
@ -40,6 +51,8 @@
|
||||
thisMenu.find("div.submenu").toggleClass("over");
|
||||
}
|
||||
}
|
||||
|
||||
testingFeature();
|
||||
});
|
||||
</script>
|
||||
</wicket:head>
|
||||
@ -53,7 +66,7 @@
|
||||
<li class="nav-list-item"><span class="menu-item"><a href="#">Messages</a></span></li>
|
||||
<li class="parent nav-list-item" id="project-menu-item"><span class="menu-item"><a href="#" wicket:id="projectStartPage">Project</a><img class="nav-arrow" src="images/site_nav_arrow2.png" /></span>
|
||||
<div id="project-sub" class="submenu rounded-bl rounded-br">
|
||||
<a href="#">Message Board</a>
|
||||
<a href="#" wicket:id="messageBoardPage">Message Board</a>
|
||||
<a href="#">Scheduling</a>
|
||||
<a href="#">Bookmarks</a>
|
||||
</div>
|
||||
|
@ -8,6 +8,7 @@ import org.apache.wicket.markup.html.panel.Panel;
|
||||
|
||||
import se.su.dsv.scipro.SciProApplication;
|
||||
import se.su.dsv.scipro.basepages.MenuPage;
|
||||
import se.su.dsv.scipro.message.pages.PrivateMessagePage;
|
||||
import se.su.dsv.scipro.project.pages.ProjectStartPage;
|
||||
import se.su.dsv.scipro.schedule.templates.pages.ScheduleTemplatePage;
|
||||
|
||||
@ -19,15 +20,18 @@ public class MainMenuPanel extends Panel {
|
||||
super(id);
|
||||
add(getMenuLink("homePage", SciProApplication.get().getHomePage(), containerClass));
|
||||
add(getMenuLink("projectStartPage", ProjectStartPage.class, containerClass));
|
||||
add(getMenuLink("messageBoardPage", PrivateMessagePage.class, containerClass));
|
||||
UserLinksPanel userLinksPanel = new UserLinksPanel("userLinksPanel");
|
||||
add(new Link<Void>("supervisorTemplatesLink"){
|
||||
Link<Void> supervisorTemplatesLink = new Link<Void>("supervisorTemplatesLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public void onClick() {
|
||||
setResponsePage(new ScheduleTemplatePage(new PageParameters(), false));
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
add(supervisorTemplatesLink);
|
||||
|
||||
|
||||
add(new Link<Void>("sysadminTemplatesLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#nav-list {
|
||||
margin-top: 4px;
|
||||
z-index: 8001;
|
||||
}
|
||||
|
||||
#nav-list li.nav-list-item {
|
||||
@ -53,6 +54,7 @@
|
||||
border-top-right-radius: 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
#nav-list li.current .menu-item a,
|
||||
#nav-list li.nav-list-item:hover .menu-item a {
|
||||
color: #002f5f;
|
||||
}
|
||||
@ -68,7 +70,7 @@
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
z-index: 9999;
|
||||
z-index: 8000;
|
||||
}
|
||||
#nav-list li.nav-list-item.parent .over {
|
||||
display: block;
|
||||
|
Loading…
x
Reference in New Issue
Block a user