From 4d3b743e4de0000e9990029b1715600e277c7193 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 28 Jul 2016 16:19:10 +0100 Subject: [PATCH] display validation errors only when doing validation --- .../coffee/ide/pdf/controllers/PdfController.coffee | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index 5dff3acb04..780fda5aa3 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -134,7 +134,7 @@ define [ $scope.pdf.compileExited = true $scope.pdf.url = last_pdf_url $scope.shouldShowLogs = true - fetchLogs(fileByPath) + fetchLogs(fileByPath, { validation: true }) else if response.status == "exited" $scope.pdf.view = 'pdf' $scope.pdf.compileExited = true @@ -202,11 +202,13 @@ define [ } - fetchLogs = (fileByPath) -> + fetchLogs = (fileByPath, options) -> - logFile = fileByPath['output.log']; - blgFile = fileByPath['output.blg']; - chktexFile = fileByPath['output.chktex']; + if options?.validation + chktexFile = fileByPath['output.chktex'] + else + logFile = fileByPath['output.log'] + blgFile = fileByPath['output.blg'] getFile = (name, file) -> opts =