Clone project action button

This commit is contained in:
Alasdair Smith 2018-05-17 14:28:34 +01:00
parent 2354f4156b
commit 7dffc56804
2 changed files with 5 additions and 0 deletions

View file

@ -53,6 +53,7 @@ if settings.overleaf
tooltip=translate('copy'), tooltip=translate('copy'),
tooltip-placement="top", tooltip-placement="top",
tooltip-append-to-body="true", tooltip-append-to-body="true",
ng-click="clone($event)"
) )
i.icon.fa.fa-files-o i.icon.fa.fa-files-o
button.btn.btn-link.action-btn( button.btn.btn-link.action-btn(

View file

@ -493,6 +493,10 @@ define [
if value? if value?
$scope.updateSelectedProjects() $scope.updateSelectedProjects()
$scope.clone = (e) ->
e.stopPropagation()
$scope.cloneProject($scope.project, "#{$scope.project.name} (Copy)")
$scope.download = (e) -> $scope.download = (e) ->
e.stopPropagation() e.stopPropagation()
$scope.downloadProjectsById([$scope.project.id]) $scope.downloadProjectsById([$scope.project.id])