mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #297 from sharelatex/roll-out-chktex
Roll out chktex
This commit is contained in:
commit
7fcae775ee
6 changed files with 21 additions and 14 deletions
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()"
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -55,4 +55,5 @@ define [], () ->
|
|||
|
||||
gotoLine: (line, column) ->
|
||||
@editor.gotoLine(line, column)
|
||||
@editor.scrollToLine(line,true,true)
|
||||
@editor.focus()
|
||||
|
|
|
@ -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) ->
|
||||
|
||||
|
|
Loading…
Reference in a new issue