mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 07:12:50 +00:00
Show confirmation for deleting projects forever
This commit is contained in:
parent
0a334939ce
commit
608e9476b6
2 changed files with 13 additions and 1 deletions
|
@ -177,7 +177,7 @@ block content
|
|||
data-original-title="Delete Forever",
|
||||
data-toggle="tooltip",
|
||||
data-placement="bottom",
|
||||
ng-click="deleteSelectedProjects()"
|
||||
ng-click="openDeleteProjectsModal()"
|
||||
) Delete Forever
|
||||
|
||||
.row.row-spaced
|
||||
|
|
|
@ -345,6 +345,18 @@ ProjectPageApp.controller "ProjectPageController", ($scope, $modal, $http, $q) -
|
|||
|
||||
$scope.updateVisibleProjects()
|
||||
|
||||
|
||||
$scope.openDeleteProjectsModal = () ->
|
||||
modalInstance = $modal.open(
|
||||
templateUrl: "deleteProjectsModalTemplate"
|
||||
controller: "DeleteProjectsModalController"
|
||||
resolve:
|
||||
projects: () -> $scope.getSelectedProjects()
|
||||
)
|
||||
|
||||
modalInstance.result.then () ->
|
||||
$scope.deleteSelectedProjects()
|
||||
|
||||
$scope.deleteSelectedProjects = () ->
|
||||
selected_projects = $scope.getSelectedProjects()
|
||||
selected_project_ids = $scope.getSelectedProjectIds()
|
||||
|
|
Loading…
Reference in a new issue