actually use the rendering-error state.

This commit is contained in:
Shane Kilkelly 2016-04-25 12:42:03 +01:00
parent ce34ce6865
commit 07ad6eb704
2 changed files with 7 additions and 1 deletions

View file

@ -156,10 +156,14 @@ div.full-size.pdf(ng-controller="PdfController")
.pdf-errors(ng-switch-when="errors")
.alert.alert-danger(ng-show="pdf.error || pdf.renderingError")
.alert.alert-danger(ng-show="pdf.error")
strong #{translate("server_error")}
span #{translate("somthing_went_wrong_compiling")}
.alert.alert-danger(ng-show="pdf.renderingError")
strong #{translate("pdf_rendering_error")}
span #{translate("something_went_wrong_rendering_pdf")}
.alert.alert-danger(ng-show="pdf.clsiMaintenance")
strong #{translate("server_error")}
span #{translate("clsi_maintenance")}

View file

@ -46,6 +46,7 @@ define [
$scope.pdf.url = null
$scope.pdf.clsiMaintenance = false
$scope.pdf.tooRecentlyCompiled = false
$scope.pdf.renderingError = false
if response.status == "timedout"
$scope.pdf.view = 'errors'
@ -179,6 +180,7 @@ define [
parseCompileResponse(data)
.error () ->
$scope.pdf.compiling = false
$scope.pdf.renderingError = false
$scope.pdf.error = true
$scope.pdf.view = 'errors'