mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 16:41:59 +00:00
Hook up front end download
This commit is contained in:
parent
2b349039c3
commit
5513a0b436
2 changed files with 12 additions and 1 deletions
|
@ -173,7 +173,7 @@ block content
|
|||
data-original-title="Download",
|
||||
data-toggle="tooltip",
|
||||
data-placement="bottom",
|
||||
title=""
|
||||
ng-click="downloadSelectedProjects()"
|
||||
)
|
||||
i.fa.fa-cloud-download
|
||||
a.btn.btn-default(
|
||||
|
|
|
@ -400,6 +400,17 @@ define [
|
|||
controller: "UploadProjectModalController"
|
||||
)
|
||||
|
||||
$scope.downloadSelectedProjects = () ->
|
||||
selected_project_ids = $scope.getSelectedProjectIds()
|
||||
|
||||
if selected_project_ids.length > 1
|
||||
path = "/project/download/zip?project_ids=#{selected_project_ids.join(',')}"
|
||||
else
|
||||
path = "/project/#{selected_project_ids[0]}/download/zip"
|
||||
|
||||
window.location = path
|
||||
|
||||
|
||||
App.controller "ProjectListItemController", ($scope) ->
|
||||
$scope.onSelectedChange = () ->
|
||||
$scope.$emit "selected:on-change"
|
||||
|
|
Loading…
Reference in a new issue