Commit b2b4e9a7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Prevent loading first 20 commits twice

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 04568559
...@@ -8,7 +8,7 @@ class @CommitsList ...@@ -8,7 +8,7 @@ class @CommitsList
e.stopPropagation() e.stopPropagation()
return false return false
Pager.init limit, true Pager.init limit, false
@content = $("#commits-list") @content = $("#commits-list")
@searchField = $("#commits-search") @searchField = $("#commits-search")
...@@ -24,14 +24,14 @@ class @CommitsList ...@@ -24,14 +24,14 @@ class @CommitsList
form = $(".commits-search-form") form = $(".commits-search-form")
search = @searchField.val() search = @searchField.val()
commitsUrl = form.attr("action") + '?' + form.serialize() commitsUrl = form.attr("action") + '?' + form.serialize()
@setOpacitiy("0.5") @setOpacitiy(0.5)
$.ajax $.ajax
type: "GET" type: "GET"
url: form.attr("action") url: form.attr("action")
data: form.serialize() data: form.serialize()
complete: => complete: =>
@setOpacitiy("1.0") @setOpacitiy(1.0)
success: (data) => success: (data) =>
@content.html(data.html) @content.html(data.html)
# Change url so if user reload a page - search results are saved # Change url so if user reload a page - search results are saved
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment