Issue模块动态优化

This commit is contained in:
huang 2016-03-25 15:46:40 +08:00
parent 3855f5effb
commit 9ce39d2f4a
4 changed files with 6 additions and 37 deletions

View File

@ -24,19 +24,6 @@
</ul> </ul>
</div> </div>
<script> <script>
<%# type = type%>
// $(function (){
// if('<%#= type %>' != null && '<%#= type %>' == 'courses' ){
// $('input:radio[value="courses"]').attr('checked','checked');
// }
// if('<%#= type %>' != null && '<%#= type %>' == 'projects' ){
// $('input:radio[value="projects"]').attr('checked','checked');
// }
// if('<%#= type %>' != null && '<%#= type %>' == 'users' ){
// $('input:radio[value="users"]').attr('checked','checked');
// }
// });
$(function(){ $(function(){
$("#navHomepageSearchInput").keypress(function(e){ $("#navHomepageSearchInput").keypress(function(e){
var name = $.trim($('#navHomepageSearchInput').val()); var name = $.trim($('#navHomepageSearchInput').val());
@ -65,23 +52,6 @@
<input type="text" style="display: none;"/> <input type="text" style="display: none;"/>
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a> <a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
<% end %> <% end %>
<!--<div class="navSearchTypeBox" id="navHomepageSearchType">-->
<!--<div class="fl mr15 mt8">-->
<!--<input type="radio" value="courses" name="search_type" checked/>-->
<!--课程-->
<!--</div>-->
<!--<div class="fl mr15 mt8">-->
<!--<input type="radio" value="projects" name="search_type" />-->
<!--项目-->
<!--</div>-->
<!--<div class="fl mr15 mt8">-->
<!--<input type="radio" value="users" name="search_type" />-->
<!--用户-->
<!--</div>-->
<!--<div id="navSearchAlert" class="fr mr10">-->
<!--<span class="c_red">请选择搜索类型</span>-->
<!--</div>-->
<!--</div>-->
</div> </div>
<div class="navHomepageProfile" id="navHomepageProfile"> <div class="navHomepageProfile" id="navHomepageProfile">

View File

@ -29,7 +29,7 @@
showMathMenuMSIE: false, showMathMenuMSIE: false,
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
}); });
</script> </script>
</head> </head>
<!--add by huang--> <!--add by huang-->

View File

@ -73,10 +73,9 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id => user_activity_id, :content => activity.description} %>
<div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<%# 局部刷新修改xissue属性 %> <%# 局部刷新修改xissue属性 %>
<% if User.current.member_of?(activity.project) %> <% if User.current.member_of?(activity.project) %>

View File

@ -25,7 +25,7 @@
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.journals.reorder("created_on desc").each do |reply| %> <% activity.journals.includes(:user, :details).reorder("created_on desc").each do |reply| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
@ -44,7 +44,7 @@
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<% end %> <% end %>
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%= reply.id %>">
<% if reply.user == User.current %> <% if reply.user == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %> <% else %>