Show spinner when loading MR diff

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-06-20 12:17:06 +03:00
parent 995d193d32
commit 8401ec56e3
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
2 changed files with 4 additions and 3 deletions

View File

@ -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'

View File

@ -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;