Hid the progress bar on load failed

This commit is contained in:
Ruben Vereecken 2014-07-06 21:48:31 +02:00
parent 1f02b99942
commit 128008daa1

View file

@ -137,12 +137,14 @@ module.exports = class CocoView extends Backbone.View
resourceIndex: r.rid,
responseText: r.jqxhr?.responseText
})).i18n()
@$el.find('.progress').hide()
onRetryResource: (e) ->
res = @supermodel.getResource($(e.target).data('resource-index'))
# different views may respond to this call, and not all have the resource to reload
return unless res and res.isFailed
res.load()
@$el.find('.progress').show()
$(e.target).closest('.loading-error-alert').remove()
# Modals