reset the 'failedLoad' state when a new entity is selected

This commit is contained in:
Shane Kilkelly 2016-05-04 10:08:48 +01:00
parent 9738703424
commit a1552aa872

View file

@ -1,9 +1,11 @@
define [
"base"
], (App) ->
App.controller "BinaryFileController", ["$scope", ($scope) ->
App.controller "BinaryFileController", ["$scope", "$rootScope", ($scope, $rootScope) ->
$scope.failedLoad = false
$rootScope.$on 'entity:selected', () ->
$scope.failedLoad = false
window.sl_binaryFilePreviewError = () =>
$scope.failedLoad = true