From 9b22efbd98a9e075d78de10f63d5a06d0c833330 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Mon, 21 Mar 2016 13:20:03 +0000 Subject: [PATCH] split errors into normal error, and renderingError. --- services/web/app/views/project/editor/pdf.jade | 10 +++++----- .../coffee/ide/pdf/controllers/PdfController.coffee | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/services/web/app/views/project/editor/pdf.jade b/services/web/app/views/project/editor/pdf.jade index 7b4039b92e..d07f5be611 100644 --- a/services/web/app/views/project/editor/pdf.jade +++ b/services/web/app/views/project/editor/pdf.jade @@ -32,7 +32,7 @@ div.full-size.pdf(ng-controller="PdfController") a.log-btn( href ng-click="toggleLogs()" - ng-class="{ 'active': (pdf.view == 'logs' || pdf.failure) && !pdf.timeout && !pdf.uncompiled }" + ng-class="{ 'active': (pdf.view == 'logs' || pdf.failure) && !pdf.error && !pdf.timeout && !pdf.uncompiled }" tooltip="#{translate('logs_and_output_files')}" tooltip-placement="bottom" ) @@ -75,7 +75,7 @@ div.full-size.pdf(ng-controller="PdfController") i.split-screen i.split-screen - .pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error") + .pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error && !pdf.renderingError") div( pdfng ng-if="settings.pdfViewer == 'pdfjs'" @@ -97,8 +97,8 @@ div.full-size.pdf(ng-controller="PdfController") i.fa.fa-level-up.fa-flip-horizontal.fa-2x |   #{translate('click_here_to_preview_pdf')} - .pdf-errors(ng-show="pdf.timedout || pdf.error") - .alert.alert-danger(ng-show="pdf.error") + .pdf-errors(ng-show="pdf.timedout || pdf.error || pdf.renderingError") + .alert.alert-danger(ng-show="pdf.error || pdf.renderingError") strong #{translate("server_error")} span #{translate("somthing_went_wrong_compiling")} @@ -162,7 +162,7 @@ div.full-size.pdf(ng-controller="PdfController") - .pdf-logs(ng-show="(pdf.view == 'logs' || pdf.failure) && !pdf.timeout && !pdf.uncompiled") + .pdf-logs(ng-show="(pdf.view == 'logs' || pdf.failure) && !pdf.error && !pdf.timeout && !pdf.uncompiled") .alert.alert-success(ng-show="pdf.logEntries.all.length == 0") | #{translate("no_errors_good_job")} diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index 8586d218a7..10d6a1f51b 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -12,7 +12,7 @@ define [ $scope.hasPremiumCompile = $scope.project.features.compileGroup == "priority" $scope.$on "pdf:error:display", () -> - $scope.pdf.error = true + $scope.pdf.renderingError = true $scope.draft = localStorage("draft:#{$scope.project_id}") or false $scope.$watch "draft", (new_value, old_value) ->