diff --git a/services/web/app/coffee/Features/Compile/CompileController.coffee b/services/web/app/coffee/Features/Compile/CompileController.coffee index 000465a83c..00f4a880ff 100755 --- a/services/web/app/coffee/Features/Compile/CompileController.coffee +++ b/services/web/app/coffee/Features/Compile/CompileController.coffee @@ -29,8 +29,8 @@ module.exports = CompileController = options.compiler = req.body.compiler if req.body?.draft options.draft = req.body.draft - if req.body?.check - options.check = if req.body.check is "validate" then "validate" else undefined + if req.body?.check in ['validate', 'error', 'silent'] + options.check = req.body.check logger.log {options:options, project_id:project_id, user_id:user_id}, "got compile request" CompileManager.compile project_id, user_id, options, (error, status, outputFiles, clsiServerId, limits, validationProblems) -> return next(error) if error? diff --git a/services/web/app/views/beta_program/opt_in.jade b/services/web/app/views/beta_program/opt_in.jade index c6411cb211..f54766f30d 100644 --- a/services/web/app/views/beta_program/opt_in.jade +++ b/services/web/app/views/beta_program/opt_in.jade @@ -22,7 +22,7 @@ block content ul.list-unstyled.text-center li i.fa.fa-fw.fa-book - |  #{translate("mendeley_integration")} + |  #{translate("syntax_checking")} .row.text-centered .col-md-12 if user.betaProgram diff --git a/services/web/app/views/project/editor/pdf.jade b/services/web/app/views/project/editor/pdf.jade index 844f0f51dc..492f75f582 100644 --- a/services/web/app/views/project/editor/pdf.jade +++ b/services/web/app/views/project/editor/pdf.jade @@ -36,13 +36,11 @@ div.full-size.pdf(ng-controller="PdfController") i.fa.fa-fw(ng-class="{'fa-check': draft}") |  #{translate("fast")}  span.subdued [draft] - if user.betaProgram - li.dropdown-header #{translate("file_checks")} - li - a(href, ng-click="recompile({check:true})") - i.fa.fa-fw() - |  #{translate("run_syntax_check")} - span.beta-feature-badge + li.dropdown-header #{translate("file_checks")} + li + a(href, ng-click="recompile({check:true})") + i.fa.fa-fw() + |  #{translate("run_syntax_check")} a( href ng-click="stop()" diff --git a/services/web/public/coffee/ide/editor/EditorManager.coffee b/services/web/public/coffee/ide/editor/EditorManager.coffee index 64cbe1d884..be15958c37 100644 --- a/services/web/public/coffee/ide/editor/EditorManager.coffee +++ b/services/web/public/coffee/ide/editor/EditorManager.coffee @@ -46,8 +46,11 @@ define [ done = () => if options.gotoLine? - @$scope.$broadcast "editor:gotoLine", options.gotoLine, options.gotoColumn - + # allow Ace to display document before moving, delay until next tick + setTimeout () => + @$scope.$broadcast "editor:gotoLine", options.gotoLine, options.gotoColumn + ,0 + if doc.id == @$scope.editor.open_doc_id and !options.forceReopen @$scope.$apply () => done() diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee index 6e238122e1..8a38c317be 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee @@ -55,4 +55,5 @@ define [], () -> gotoLine: (line, column) -> @editor.gotoLine(line, column) + @editor.scrollToLine(line,true,true) @editor.focus() diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index fd133e1bc3..a31a336885 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -86,7 +86,7 @@ define [ return $http.post url, { rootDoc_id: options.rootDocOverride_id or null draft: $scope.draft - check: if options.check then "validate" else null + check: if options.check then "validate" else "silent" _csrf: window.csrfToken }, {params: params} @@ -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) ->