fix filename of downloaded pdf files

This commit is contained in:
Brian Gough 2016-06-01 16:47:55 +01:00
parent daf8f6f3cf
commit b8e31dfc71
3 changed files with 3 additions and 2 deletions

View file

@ -15,7 +15,7 @@ aside#left-menu.full-size(
| #{translate("source")}
li
a(
ng-href="{{pdf.url}}"
ng-href="{{pdf.downloadUrl || pdf.url}}"
target="_blank"
ng-if="pdf.url"
)

View file

@ -46,7 +46,7 @@ div.full-size.pdf(ng-controller="PdfController")
) {{ pdf.logEntries.errors.length + pdf.logEntries.warnings.length }}
a(
ng-href="{{pdf.url}}"
ng-href="{{pdf.downloadUrl || pdf.url}}"
target="_blank"
ng-if="pdf.url"
tooltip="#{translate('download_pdf')}"

View file

@ -100,6 +100,7 @@ define [
qs_args = ("#{k}=#{v}" for k, v of qs)
$scope.pdf.qs = if qs_args.length then "?" + qs_args.join("&") else ""
$scope.pdf.url += $scope.pdf.qs
$scope.pdf.downloadUrl = "/Project/#{$scope.project_id}/output/output.pdf" + $scope.pdf.qs
fetchLogs(fileByPath['output.log'], fileByPath['output.blg'])