消息弹框
This commit is contained in:
parent
184c17d52f
commit
1396cae14c
|
@ -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
|
||||
|
|
|
@ -78,12 +78,28 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="navHomepageNews">
|
||||
<div class="navHomepageNews" id="user_messages">
|
||||
<%= link_to "", user_message_path(User.current), :class => "homepageNewsIcon", :target =>"_Blank", :title => "您的所有消息" %>
|
||||
<% if User.current.count_new_message.to_i >0 %>
|
||||
<div ><%= link_to User.current.count_new_message , user_message_path(User.current), :class => "newsActive", :target =>"_Blank" %></div>
|
||||
<% end %>
|
||||
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
|
||||
<div class="shadowbox_news undis" id="user_messages_list">
|
||||
<font></font>
|
||||
<h4 class="shadowbox_news_title">未读消息</h4>
|
||||
<ul class="shadowbox_news_list">
|
||||
<% user_messages = User.current.user_messages_unviewed %>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试辅测试老辅测试老老师</a><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank"><span class="c_red">【课程通知】</span>发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
|
||||
</ul>
|
||||
<%= link_to '查看全部', user_message_path(User.current), :class => "shadowbox_news_all", :target =>"_Blank" %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -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();
|
||||
|
|
|
@ -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;}
|
||||
|
||||
|
|
|
@ -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;}
|
||||
|
|
Loading…
Reference in New Issue