fixed a tiny bug that loading icon sometimes doesn't appear at the right place / doesn't go away
This commit is contained in:
@@ -124,7 +124,7 @@ if Backbone?
|
||||
url = @model.urlFor('retrieve')
|
||||
DiscussionUtil.safeAjax
|
||||
$elem: $elem
|
||||
$loading: $(event.target) if event
|
||||
$loading: @$(".discussion-show-comments")
|
||||
type: "GET"
|
||||
url: url
|
||||
success: (response, textStatus) =>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
$ ->
|
||||
$.fn.extend
|
||||
loading: ->
|
||||
$(this).after("<span class='discussion-loading'></span>")
|
||||
@$_loading = $("<span class='discussion-loading'></span>")
|
||||
$(this).after(@$_loading)
|
||||
loaded: ->
|
||||
$(this).parent().children(".discussion-loading").remove()
|
||||
@$_loading.remove()
|
||||
|
||||
class @DiscussionUtil
|
||||
|
||||
|
||||
Reference in New Issue
Block a user