mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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-original-title="Download",
|
||||||
data-toggle="tooltip",
|
data-toggle="tooltip",
|
||||||
data-placement="bottom",
|
data-placement="bottom",
|
||||||
title=""
|
ng-click="downloadSelectedProjects()"
|
||||||
)
|
)
|
||||||
i.fa.fa-cloud-download
|
i.fa.fa-cloud-download
|
||||||
a.btn.btn-default(
|
a.btn.btn-default(
|
||||||
|
|
|
@ -400,6 +400,17 @@ define [
|
||||||
controller: "UploadProjectModalController"
|
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) ->
|
App.controller "ProjectListItemController", ($scope) ->
|
||||||
$scope.onSelectedChange = () ->
|
$scope.onSelectedChange = () ->
|
||||||
$scope.$emit "selected:on-change"
|
$scope.$emit "selected:on-change"
|
||||||
|
|
Loading…
Reference in a new issue