mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 22:53:31 -05:00
Add loading spinner when cloning a project.
This commit is contained in:
parent
8ad9db3f02
commit
f88a3815c6
2 changed files with 46 additions and 36 deletions
|
@ -49,41 +49,48 @@ div(class=lastUpdatedClasses)
|
||||||
|
|
||||||
if settings.overleaf
|
if settings.overleaf
|
||||||
.hidden-xs.col-sm-3.col-md-2.action-btn-row
|
.hidden-xs.col-sm-3.col-md-2.action-btn-row
|
||||||
button.btn.btn-link.action-btn(
|
div(
|
||||||
tooltip=translate('copy'),
|
ng-if="!project.isTableActionInflight"
|
||||||
tooltip-placement="top",
|
|
||||||
tooltip-append-to-body="true",
|
|
||||||
ng-click="clone($event)"
|
|
||||||
)
|
)
|
||||||
i.icon.fa.fa-files-o
|
button.btn.btn-link.action-btn(
|
||||||
button.btn.btn-link.action-btn(
|
tooltip=translate('copy'),
|
||||||
tooltip=translate('download'),
|
tooltip-placement="top",
|
||||||
tooltip-placement="top",
|
tooltip-append-to-body="true",
|
||||||
tooltip-append-to-body="true",
|
ng-click="clone($event)"
|
||||||
ng-click="download($event)"
|
)
|
||||||
|
i.icon.fa.fa-files-o
|
||||||
|
button.btn.btn-link.action-btn(
|
||||||
|
tooltip=translate('download'),
|
||||||
|
tooltip-placement="top",
|
||||||
|
tooltip-append-to-body="true",
|
||||||
|
ng-click="download($event)"
|
||||||
|
)
|
||||||
|
i.icon.fa.fa-cloud-download
|
||||||
|
button.btn.btn-link.action-btn(
|
||||||
|
ng-if="!project.archived && isOwner()"
|
||||||
|
tooltip=translate('archive'),
|
||||||
|
tooltip-placement="top",
|
||||||
|
tooltip-append-to-body="true",
|
||||||
|
ng-click="archiveOrLeave($event)"
|
||||||
|
)
|
||||||
|
i.icon.fa.fa-inbox
|
||||||
|
button.btn.btn-link.action-btn(
|
||||||
|
ng-if="!project.archived && !isOwner()"
|
||||||
|
tooltip=translate('leave'),
|
||||||
|
tooltip-placement="top",
|
||||||
|
tooltip-append-to-body="true",
|
||||||
|
ng-click="archiveOrLeave($event)"
|
||||||
|
)
|
||||||
|
i.icon.fa.fa-sign-out
|
||||||
|
button.btn.btn-link.action-btn(
|
||||||
|
ng-if="project.archived"
|
||||||
|
tooltip=translate('unarchive'),
|
||||||
|
tooltip-placement="top",
|
||||||
|
tooltip-append-to-body="true",
|
||||||
|
ng-click="restore($event)"
|
||||||
|
)
|
||||||
|
i.icon.fa.fa-reply
|
||||||
|
div(
|
||||||
|
ng-if="project.isTableActionInflight"
|
||||||
)
|
)
|
||||||
i.icon.fa.fa-cloud-download
|
i.fa.fa-spinner.fa-spin
|
||||||
button.btn.btn-link.action-btn(
|
|
||||||
ng-if="!project.archived && isOwner()"
|
|
||||||
tooltip=translate('archive'),
|
|
||||||
tooltip-placement="top",
|
|
||||||
tooltip-append-to-body="true",
|
|
||||||
ng-click="archiveOrLeave($event)"
|
|
||||||
)
|
|
||||||
i.icon.fa.fa-inbox
|
|
||||||
button.btn.btn-link.action-btn(
|
|
||||||
ng-if="!project.archived && !isOwner()"
|
|
||||||
tooltip=translate('leave'),
|
|
||||||
tooltip-placement="top",
|
|
||||||
tooltip-append-to-body="true",
|
|
||||||
ng-click="archiveOrLeave($event)"
|
|
||||||
)
|
|
||||||
i.icon.fa.fa-sign-out
|
|
||||||
button.btn.btn-link.action-btn(
|
|
||||||
ng-if="project.archived"
|
|
||||||
tooltip=translate('unarchive'),
|
|
||||||
tooltip-placement="top",
|
|
||||||
tooltip-append-to-body="true",
|
|
||||||
ng-click="restore($event)"
|
|
||||||
)
|
|
||||||
i.icon.fa.fa-reply
|
|
|
@ -502,7 +502,10 @@ define [
|
||||||
|
|
||||||
$scope.clone = (e) ->
|
$scope.clone = (e) ->
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
|
$scope.project.isTableActionInflight = true
|
||||||
$scope.cloneProject($scope.project, "#{$scope.project.name} (Copy)")
|
$scope.cloneProject($scope.project, "#{$scope.project.name} (Copy)")
|
||||||
|
.then () -> $scope.project.isTableActionInflight = false
|
||||||
|
.catch () -> $scope.project.isTableActionInflight = false
|
||||||
|
|
||||||
$scope.download = (e) ->
|
$scope.download = (e) ->
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
|
|
Loading…
Reference in a new issue