diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index fd133e1bc3..418a55f8a5 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -195,12 +195,17 @@ define [ qs.clsiserverid = response.clsiServerId for file in response.outputFiles if IGNORE_FILES.indexOf(file.path) == -1 + isOutputFile = file.path.match(/^output\./) $scope.pdf.outputFiles.push { # Turn 'output.blg' into 'blg file'. - name: if file.path.match(/^output\./) then "#{file.path.replace(/^output\./, "")} file" else file.path + name: if isOutputFile then "#{file.path.replace(/^output\./, "")} file" else file.path url: "/project/#{project_id}/output/#{file.path}" + createQueryString qs + main: if isOutputFile then true else false } + # sort the output files into order, main files first, then others + $scope.pdf.outputFiles.sort (a,b) -> (b.main - a.main) || a.name.localeCompare(b.name) + fetchLogs = (fileByPath, options) ->