mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-18 03:23:42 -05:00
Hid the progress bar on load failed
This commit is contained in:
parent
1f02b99942
commit
128008daa1
1 changed files with 2 additions and 0 deletions
|
@ -137,12 +137,14 @@ module.exports = class CocoView extends Backbone.View
|
||||||
resourceIndex: r.rid,
|
resourceIndex: r.rid,
|
||||||
responseText: r.jqxhr?.responseText
|
responseText: r.jqxhr?.responseText
|
||||||
})).i18n()
|
})).i18n()
|
||||||
|
@$el.find('.progress').hide()
|
||||||
|
|
||||||
onRetryResource: (e) ->
|
onRetryResource: (e) ->
|
||||||
res = @supermodel.getResource($(e.target).data('resource-index'))
|
res = @supermodel.getResource($(e.target).data('resource-index'))
|
||||||
# different views may respond to this call, and not all have the resource to reload
|
# different views may respond to this call, and not all have the resource to reload
|
||||||
return unless res and res.isFailed
|
return unless res and res.isFailed
|
||||||
res.load()
|
res.load()
|
||||||
|
@$el.find('.progress').show()
|
||||||
$(e.target).closest('.loading-error-alert').remove()
|
$(e.target).closest('.loading-error-alert').remove()
|
||||||
|
|
||||||
# Modals
|
# Modals
|
||||||
|
|
Loading…
Reference in a new issue