Commit fe00d0f5 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'mr-diff-loading-spinner' into 'master'

MR diff loading spinner

When you click `Changes` tab if diff is big - you now see loading spinner
parents 0759266c 8401ec56
...@@ -109,10 +109,10 @@ class MergeRequest ...@@ -109,10 +109,10 @@ class MergeRequest
type: 'GET' type: 'GET'
url: this.$('.merge-request-tabs .diffs-tab a').attr('href') url: this.$('.merge-request-tabs .diffs-tab a').attr('href')
beforeSend: => beforeSend: =>
this.$('.status').addClass 'loading' this.$('.mr-loading-status .loading').show()
complete: => complete: =>
@diffs_loaded = true @diffs_loaded = true
this.$('.status').removeClass 'loading' this.$('.mr-loading-status .loading').hide()
success: (data) => success: (data) =>
this.$(".diffs").html(data.html) this.$(".diffs").html(data.html)
dataType: 'json' dataType: 'json'
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
= render "projects/merge_requests/show/diffs" = render "projects/merge_requests/show/diffs"
.notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
= render "projects/notes/notes_with_form" = render "projects/notes/notes_with_form"
.status .mr-loading-status
= spinner
:javascript :javascript
var merge_request; var merge_request;
......
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