From 1396cae14c9a29d5afad0fba4692eb46c2256759 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 3 Jun 2016 08:59:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 4 ++++ app/views/layouts/_logined_header.html.erb | 24 +++++++++++++++++++++- public/stylesheets/new_user.css | 12 +++++++++++ public/stylesheets/public.css | 11 ++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 44ef54c95..a07f2421f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -370,6 +370,10 @@ class User < Principal messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count + org_count end + def user_messages_unviewed + + end + # 查询指派给我的缺陷记录 def issue_status_update self.status_updates diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index f5b421f62..e3fad5c6a 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -78,12 +78,28 @@ - @@ -95,6 +111,12 @@ $("#navHomepageSearchType").hide(); }); + $("#user_messages").mouseover(function(){ + $("#user_messages_list").show(); + }).mouseout(function(){ + $("#user_messages_list").hide(); + }); + $("#navHomepageProfile").mouseenter(function(){ $("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover"); $("#topnav_login_list").show(); diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 0231f6a8a..1edb4ff80 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1616,3 +1616,15 @@ ul.wlist li a{ border:1px solid #15bccf; padding: 1px 4px 1px 4px; margin-left:3 ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;} /*.wlist_select { background-color:#64bdd9; color:#fff; padding: 1px 5px 0px 5px; margin-left:3px;margin-top: -2px; border:1px solid #64bdd9;}*/ .wlist_select a{background-color: #64bdd9;cursor: default;} + +/*消息弹框*/ +.shadowbox_news{ width:305px; background-color:#fff; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position: absolute; left: -131px; top: 45px; z-index: 9999;} +.shadowbox_news_title{ height:40px; line-height:40px;padding-left:10px; font-size:12px; color:#333;border-bottom:1px solid #eee;} +.shadowbox_news font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } +.shadowbox_news_list{ max-height:200px; overflow:hidden;} +.shadowbox_news_list a{ color:#999;} +.shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} +.shadowbox_news_list li:hover{ background-color:#eee;} +a.shadowbox_news_user{ color:#3b94d6;} +a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;} + diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 98fd0ec20..c28560506 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -1144,3 +1144,14 @@ a.st_down{ display: block; width:8px; float:left; height:13px; background:url(.. /*弹框*/ .apply_content{ border:1px solid #ddd;line-height: 16px; height:80px;width:420px; background:#fff; margin-bottom:10px;} + +/*消息弹框*/ +.shadowbox_news{ width:305px; background-color:#fff; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position: absolute; left: -131px; top: 45px; z-index: 9999;} +.shadowbox_news_title{ height:40px; line-height:40px;padding-left:10px; font-size:12px; color:#333;border-bottom:1px solid #eee;} +.shadowbox_news font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } +.shadowbox_news_list{ max-height:200px; overflow:hidden;} +.shadowbox_news_list a{ color:#999;} +.shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} +.shadowbox_news_list li:hover{ background-color:#eee;} +a.shadowbox_news_user{ color:#3b94d6;} +a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;}