92 lines
4.0 KiB
Plaintext
92 lines
4.0 KiB
Plaintext
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
|
|
<script>
|
|
var onUserCard = false;
|
|
var onImage = false;
|
|
$(document).ready(function(){
|
|
$("#relateProject,.relatePInfo").mouseover(function(){
|
|
$(".relatePInfo").css("display","block");
|
|
})
|
|
$("#relateProject,.relatePInfo").mouseout(function(){
|
|
$(".relatePInfo").css("display","none");
|
|
})
|
|
$(".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");
|
|
})
|
|
$(".coursesLineGrey").mouseover(function(){
|
|
$(this).css("color","#ffffff");
|
|
})
|
|
$(".coursesLineGrey").mouseout(function(){
|
|
$(this).css("color","#808080");
|
|
})
|
|
$(".homepagePostSetting,.coursesLineGrey").mouseover(function(){
|
|
$(this).prev().css("color","#ffffff");
|
|
$(this).css("z-index", "9999");
|
|
})
|
|
$(".homepagePostSetting").mouseout(function(){
|
|
$(this).prev().css("color","#808080");
|
|
$(this).css("z-index", "1");
|
|
})
|
|
})
|
|
</script>
|
|
|
|
<% unless forge_acts.empty? %>
|
|
<% forge_acts.each do |activity| -%>
|
|
<script>
|
|
$(function () {
|
|
sd_create_editor_from_data(<%= activity.id %>, null, "100%", "<%= activity.class.to_s %>");
|
|
});
|
|
</script>
|
|
<!--创建-->
|
|
<% case activity.forge_act_type %>
|
|
<% when "Project" %>
|
|
<%= render :partial => 'projects/project_create', :locals => {:activity => activity, :user_activity_id => activity.id} %>
|
|
<!--缺陷动态-->
|
|
<% when "Issue" %>
|
|
<%= render :partial => 'users/project_issue', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id, :project_id => activity.project_id} %>
|
|
<!--message -->
|
|
<% when "Message" %>
|
|
<%= render :partial => 'users/project_message', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id, :is_course => 1, :is_board => 0} %>
|
|
<!--new 新闻-->
|
|
<% when "News" %>
|
|
<% if !activity.forge_act.nil? and activity.forge_act.project %>
|
|
<%= render :partial => 'projects/project_news', :locals => {:activity=>activity.forge_act, :user_activity_id=>activity.id} %>
|
|
<% end %>
|
|
<!--Attachment -->
|
|
<% when "Attachment" %>
|
|
<%= render :partial => 'users/project_attachment', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id } %>
|
|
<% when "Commit" %>
|
|
<%= render :partial => 'projects/project_commit', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id, :identifier => get_rep_identifier_by_project(@project) } %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% if forge_acts.count == 10 %>
|
|
<!--<div id="show_more_forge_activities" class="loadMore mt10 f_grey">点击展开更多<%#= link_to "", project_path(@project.id, :type => type, :page => page), :id => "more_forge_activities_link", :remote => "true", :class => "none" %></div>-->
|
|
<%= link_to "点击展开更多",project_path(@project.id, :type => type, :page => page),:id => "show_more_forge_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
|
<% end %>
|
|
|
|
<!--
|
|
<script type="text/javascript">
|
|
$("#show_more_forge_activities").mouseover(function () {
|
|
$("#more_forge_activities_link").click();
|
|
});
|
|
</script>-->
|