Issue #263 - dont display ajax loader on commit page if commits < limit
This commit is contained in:
parent
814eeb45e6
commit
32ebd438c2
2 changed files with 8 additions and 7 deletions
|
@ -12,12 +12,12 @@ class CommitsController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@repo = project.repo
|
@repo = project.repo
|
||||||
limit, offset = (params[:limit] || 20), (params[:offset] || 0)
|
@limit, @offset = (params[:limit] || 20), (params[:offset] || 0)
|
||||||
|
|
||||||
@commits = if params[:path]
|
@commits = if params[:path]
|
||||||
@repo.log(@ref, params[:path], :max_count => limit, :skip => offset)
|
@repo.log(@ref, params[:path], :max_count => @limit, :skip => @offset)
|
||||||
else
|
else
|
||||||
@repo.commits(@ref, limit, offset)
|
@repo.commits(@ref, @limit, @offset)
|
||||||
end
|
end
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
.loading{ :style => "display:none;"}
|
.loading{ :style => "display:none;"}
|
||||||
%center= image_tag "ajax-loader.gif"
|
%center= image_tag "ajax-loader.gif"
|
||||||
|
|
||||||
:javascript
|
- if @commits.count == @limit
|
||||||
$(function(){
|
:javascript
|
||||||
CommitsList.init("#{@ref}", 20);
|
$(function(){
|
||||||
});
|
CommitsList.init("#{@ref}", 20);
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue