Commit c7fc84f5 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use fadeTo instead of css

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 44dc9aa6
......@@ -24,19 +24,16 @@ class @CommitsList
form = $(".commits-search-form")
search = @searchField.val()
commitsUrl = form.attr("action") + '?' + form.serialize()
@setOpacity(0.5)
@content.fadeTo('fast', 0.5)
$.ajax
type: "GET"
url: form.attr("action")
data: form.serialize()
complete: =>
@setOpacity(1.0)
@content.fadeTo('fast', 1.0)
success: (data) =>
@content.html(data.html)
# Change url so if user reload a page - search results are saved
history.replaceState {page: commitsUrl}, document.title, commitsUrl
dataType: "json"
@setOpacity: (opacity) ->
@content.css("opacity", opacity)
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