diff --git a/app/views/organizations/_org_course_create.html.erb b/app/views/organizations/_org_course_create.html.erb index 875c45059..a09246dc7 100644 --- a/app/views/organizations/_org_course_create.html.erb +++ b/app/views/organizations/_org_course_create.html.erb @@ -34,4 +34,9 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/organizations/_org_course_homework.html.erb b/app/views/organizations/_org_course_homework.html.erb index 64c032518..4ffaa93fb 100644 --- a/app/views/organizations/_org_course_homework.html.erb +++ b/app/views/organizations/_org_course_homework.html.erb @@ -372,4 +372,7 @@ $("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap'); $("#moreProject_<%=user_activity_id %>").show(); }); + $(function(){ + user_card_show_hide(); + }); \ No newline at end of file diff --git a/app/views/organizations/_org_course_message.html.erb b/app/views/organizations/_org_course_message.html.erb index 9a9943e9b..56dafed08 100644 --- a/app/views/organizations/_org_course_message.html.erb +++ b/app/views/organizations/_org_course_message.html.erb @@ -157,3 +157,8 @@ <% end %> + diff --git a/app/views/organizations/_org_course_news.html.erb b/app/views/organizations/_org_course_news.html.erb index 7f50b3725..a6183e891 100644 --- a/app/views/organizations/_org_course_news.html.erb +++ b/app/views/organizations/_org_course_news.html.erb @@ -121,3 +121,8 @@ + diff --git a/app/views/organizations/_org_course_poll.html.erb b/app/views/organizations/_org_course_poll.html.erb index 10d1919a2..cb390f7f5 100644 --- a/app/views/organizations/_org_course_poll.html.erb +++ b/app/views/organizations/_org_course_poll.html.erb @@ -56,3 +56,8 @@ <% end %> + diff --git a/app/views/organizations/_org_project_issue.html.erb b/app/views/organizations/_org_project_issue.html.erb index 9b7dbfa8f..98c1e2df3 100644 --- a/app/views/organizations/_org_project_issue.html.erb +++ b/app/views/organizations/_org_project_issue.html.erb @@ -139,3 +139,8 @@ + diff --git a/app/views/organizations/_org_subfield_message.html.erb b/app/views/organizations/_org_subfield_message.html.erb index bf0cc8734..fc6cc6ee0 100644 --- a/app/views/organizations/_org_subfield_message.html.erb +++ b/app/views/organizations/_org_subfield_message.html.erb @@ -159,3 +159,8 @@ + diff --git a/app/views/organizations/_org_subfield_news.html.erb b/app/views/organizations/_org_subfield_news.html.erb index 3d2a316cf..daa81e96c 100644 --- a/app/views/organizations/_org_subfield_news.html.erb +++ b/app/views/organizations/_org_subfield_news.html.erb @@ -143,4 +143,7 @@ diff --git a/app/views/organizations/_project_create.html.erb b/app/views/organizations/_project_create.html.erb index 5003fd0e2..ef59d154e 100644 --- a/app/views/organizations/_project_create.html.erb +++ b/app/views/organizations/_project_create.html.erb @@ -36,4 +36,9 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/organizations/_project_message.html.erb b/app/views/organizations/_project_message.html.erb index a818939d6..26cf3b318 100644 --- a/app/views/organizations/_project_message.html.erb +++ b/app/views/organizations/_project_message.html.erb @@ -133,3 +133,8 @@ + diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb index fdd6772e7..6012dd0d4 100644 --- a/app/views/organizations/_show_org_document.html.erb +++ b/app/views/organizations/_show_org_document.html.erb @@ -152,4 +152,7 @@ target.eq(2).show(); } } + $(function(){ + user_card_show_hide(); + }); \ No newline at end of file diff --git a/app/views/projects/_project_create.html.erb b/app/views/projects/_project_create.html.erb index ef0c7c4c3..bd118418d 100644 --- a/app/views/projects/_project_create.html.erb +++ b/app/views/projects/_project_create.html.erb @@ -36,4 +36,9 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/projects/_project_news.html.erb b/app/views/projects/_project_news.html.erb index 4ea0e9f17..8756ff26f 100644 --- a/app/views/projects/_project_news.html.erb +++ b/app/views/projects/_project_news.html.erb @@ -120,4 +120,9 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/users/_course_attachment.html.erb b/app/views/users/_course_attachment.html.erb index 6f6cf82f3..63c57f708 100644 --- a/app/views/users/_course_attachment.html.erb +++ b/app/views/users/_course_attachment.html.erb @@ -38,4 +38,9 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/users/_course_create.html.erb b/app/views/users/_course_create.html.erb index dc1e0ee81..6b2234337 100644 --- a/app/views/users/_course_create.html.erb +++ b/app/views/users/_course_create.html.erb @@ -34,4 +34,9 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index c48b23667..b90b0368e 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -382,4 +382,7 @@ $("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap'); $("#moreProject_<%=user_activity_id %>").show(); }); + $(function(){ + user_card_show_hide(); + }); diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index f9a59f024..1d0c4cba5 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -107,4 +107,9 @@ + diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 0ac756f71..356a152a6 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -175,4 +175,8 @@ <% end %> - + \ No newline at end of file diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index efaa72beb..403a922ed 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -146,3 +146,8 @@ + diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb index 970fb516e..dab970cdf 100644 --- a/app/views/users/_course_poll.html.erb +++ b/app/views/users/_course_poll.html.erb @@ -55,3 +55,8 @@ <% end %> + diff --git a/app/views/users/_project_attachment.html.erb b/app/views/users/_project_attachment.html.erb index b3d904104..795432008 100644 --- a/app/views/users/_project_attachment.html.erb +++ b/app/views/users/_project_attachment.html.erb @@ -38,4 +38,9 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/users/_project_create.html.erb b/app/views/users/_project_create.html.erb index 0e35bca25..83bfe3f04 100644 --- a/app/views/users/_project_create.html.erb +++ b/app/views/users/_project_create.html.erb @@ -36,4 +36,9 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 008f08706..daa7c71c2 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -96,3 +96,8 @@ <%= render :partial => 'users/project_issue_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %> + \ No newline at end of file diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index c071f4a13..0a41dbbf5 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -167,3 +167,8 @@ <% end %> + diff --git a/app/views/users/_user_blog.html.erb b/app/views/users/_user_blog.html.erb index 841fd9377..74f090344 100644 --- a/app/views/users/_user_blog.html.erb +++ b/app/views/users/_user_blog.html.erb @@ -144,4 +144,7 @@ $("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap'); $("#moreProject_<%=user_activity_id %>").show(); }); + $(function(){ + user_card_show_hide(); + }); diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index 7402cee9f..0678cffd1 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -387,4 +387,7 @@ $("#relatePWrap_<%=homework_common.id %>").toggleClass('relatePWrap'); $("#moreProject_<%=homework_common.id %>").show(); }); + $(function(){ + user_card_show_hide(); + }); \ No newline at end of file diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index dde4f34ce..944477e88 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -149,4 +149,9 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 9c3afd48b..3fdabd2f8 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -23,6 +23,31 @@ function description_show_hide(id){ }); } +//名片的显示 +function user_card_show_hide() { + $(".homepagePostPortrait").mouseover(function(){ + onImage = true; + $(this).children(".userCard").css("display","block"); + }); + $(".homepagePostPortrait").mouseout(function(){ + var cur = $(this); + onImage = false; + setTimeout(function(){ + if (onUserCard == false && onImage == false){ + $(cur).children(".userCard").css("display", "none"); + } + }, 500); + }); + $(".userCard").mouseover(function(){ + onUserCard = true; + $(this).css("display","block"); + }); + $(".userCard").mouseout(function(){ + onUserCard = false; + $(this).css("display","none"); + }); +} + function cleanArray (actual){ var newArray = new Array(); for (var i = 0; i< actual.length; i++){