From 7057a4cfeab35593d9c7ed8b621756205e2a6306 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 7 Dec 2015 14:31:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=A1=B5=E9=A6=96=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=80=80=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org.html.erb | 30 ++++++++++++++++++++++++++--- public/stylesheets/org.css | 6 +++++- 2 files changed, 32 insertions(+), 4 deletions(-) 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