mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
sort latex output files into order in dropdown
This commit is contained in:
parent
7863b7cab6
commit
7bec656bc2
1 changed files with 6 additions and 1 deletions
|
@ -195,12 +195,17 @@ define [
|
||||||
qs.clsiserverid = response.clsiServerId
|
qs.clsiserverid = response.clsiServerId
|
||||||
for file in response.outputFiles
|
for file in response.outputFiles
|
||||||
if IGNORE_FILES.indexOf(file.path) == -1
|
if IGNORE_FILES.indexOf(file.path) == -1
|
||||||
|
isOutputFile = file.path.match(/^output\./)
|
||||||
$scope.pdf.outputFiles.push {
|
$scope.pdf.outputFiles.push {
|
||||||
# Turn 'output.blg' into 'blg file'.
|
# 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
|
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) ->
|
fetchLogs = (fileByPath, options) ->
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue