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 ...@@ -24,19 +24,16 @@ 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()
@setOpacity(0.5) @content.fadeTo('fast', 0.5)
$.ajax $.ajax
type: "GET" type: "GET"
url: form.attr("action") url: form.attr("action")
data: form.serialize() data: form.serialize()
complete: => complete: =>
@setOpacity(1.0) @content.fadeTo('fast', 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
history.replaceState {page: commitsUrl}, document.title, commitsUrl history.replaceState {page: commitsUrl}, document.title, commitsUrl
dataType: "json" 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