This commit is contained in:
lizanle 2015-12-16 15:55:40 +08:00
parent 2aa241bffa
commit b13ae8f599
5 changed files with 27 additions and 15 deletions

View File

@ -81,7 +81,7 @@ class IssuesController < ApplicationController
@status_id = params[:status_id]
@subject = params[:subject]
@issue_count = @query.issue_count
@issue_pages = Paginator.new @issue_count, @limit, params['page']
@issue_pages = Paginator.new @issue_count, @limit, params['page'].to_i + 1
@offset ||= @issue_pages.offset
@issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version],
:order => sort_clause,

View File

@ -39,6 +39,15 @@
</script>
<%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %>
<% end %>
<ul class="wlist">
<%= pagination_links_full issue_pages, issue_count, :per_page_links => false, :remote => true, :flag => true %>
</ul>
<% if issues.count == 10%>
<div id="show_more_issues" class="loadMore mt10 f_grey">展开更多<%=link_to "", project_issues_path(:project_id => project.id,:page => issue_pages.page),:id => "more_issues_link",:remote => "true",:class => "none" %></div>
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end%>
<!--<ul class="wlist">-->
<!--<%#= pagination_links_full issue_pages, issue_count, :per_page_links => false, :remote => true, :flag => true %>-->
<!--</ul>-->
<script type="text/javascript">
$("#show_more_issues").mouseover(function(){
$("#more_issues_link").click();
});
</script>

View File

@ -144,19 +144,19 @@
</p>
<% else %>
<div id="issue_list">
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count} %>
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} %>
</div>
<% end %>
<div style="float: left; padding-top: 30px">
<% other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
<%= f.link_to 'PDF', :url => params %>
<% end %>
</div>
<!--<div style="float: left; padding-top: 30px">-->
<!--<%# other_formats_links do |f| %>-->
<!--<%#= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>-->
<!--<%#= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>-->
<!--<%#= f.link_to 'PDF', :url => params %>-->
<!--<%# end %>-->
<!--</div>-->
<div id="csv-export-options" style="display:none;">
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>

View File

@ -1,3 +1,2 @@
$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
$("#v_subject").focus();
$("#v_subject").blur();
//$("#issue_list").html("<%#= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
$("#show_more_issues").replaceWith("<%= escape_javascript( render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} )%>");

View File

@ -590,7 +590,11 @@ function setupAjaxIndicator() {
$('#ajax-indicator').hide();
if(MathJax && MathJax.Hub)
MathJax.Hub.Queue(['Typeset', MathJax.Hub]); //如果是ajax刷新页面的话手动执行MathJax的公式显示
try{
prettyPrint(); //如果刷新出来的页面如果存在代码行的话,也需要美化
}catch (e){
}
});
}