diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb index 9ca590390..5af5c9ad0 100644 --- a/app/views/layouts/base_org.html.erb +++ b/app/views/layouts/base_org.html.erb @@ -43,7 +43,16 @@ <%#= link_to '首页', organization_path(@organization, :show_homepage => 1),:class=>"linkGrey8 f14" %> <% if User.current.logged? %> - + + + <% else %> @@ -183,10 +192,25 @@ } else { - alert("您还没有设置首页! 您可以把您喜欢的文章设为组织首页。"); + alert("您还未设置首页!"); } } - + $(document).ready(function(){ + $("#orgUser,#orgSwitch").click(function(){ + $(".org_login_list").toggle(); + if($("#orgArrow").attr("class") == "orgMenuArrow"){ + $("#orgArrow").attr("class","orgMenuArrow2"); + } + else { + $("#orgArrow").attr("class","orgMenuArrow") ; + } + }); + if($(".org_login_list").children().click){ + $(".org_login_list").css("display","none"); + $("#orgArrow").attr("class","orgMenuArrow"); + }; + }); + diff --git a/public/stylesheets/org.css b/public/stylesheets/org.css index 897eb8734..220120346 100644 --- a/public/stylesheets/org.css +++ b/public/stylesheets/org.css @@ -64,4 +64,8 @@ a.cancelBtn:hover {background-color:#717171; color:#ffffff;} a.linkGrey8 {color:#888888;} a.linkGrey8:hover {color:#585858;} .orgBorder {width:583px; height:21px; border-bottom:3px solid #e4e4e4; float:left;} -.orgListRow {border-bottom:1px solid #e4e4e4; padding-bottom:5px; color:#555555;} \ No newline at end of file +.orgListRow {border-bottom:1px solid #e4e4e4; padding-bottom:5px; color:#555555;} +.orgMenuArrow {background:url(../images/nav_icon.png) -10px -165px no-repeat; position:relative; display:inline-block; width:20px; height:30px;} +.orgMenuArrow2 {background:url(../images/nav_icon.png) -10px -132px no-repeat; position:relative; display:inline-block; width:20px; height:30px;} +.org_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-53px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 30px;} +#orgUserName {max-width:50px; overflow:hidden; white-space: nowrap; text-overflow: ellipsis; display:inline-block;} \ No newline at end of file