mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #3539 from overleaf/em-jel-error-dialog
Fix dismiss button in general error dialog GitOrigin-RevId: b06f4fa3f6a8dc05065ffd1b09b18f5bb77c880c
This commit is contained in:
parent
3afaa258f1
commit
c4b9cc1e25
4 changed files with 5 additions and 50 deletions
|
@ -62,16 +62,14 @@ td.project-list-table-lastupdated-cell
|
||||||
|
|
||||||
|
|
||||||
td.project-list-table-actions-cell
|
td.project-list-table-actions-cell
|
||||||
div(
|
div
|
||||||
ng-if="!project.isTableActionInflight"
|
|
||||||
)
|
|
||||||
button.btn.btn-link.action-btn(
|
button.btn.btn-link.action-btn(
|
||||||
ng-if="!(project.archived || project.trashed)"
|
ng-if="!(project.archived || project.trashed)"
|
||||||
aria-label=translate('copy'),
|
aria-label=translate('copy'),
|
||||||
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)"
|
ng-click="openCloneProjectModal(project)"
|
||||||
)
|
)
|
||||||
i.icon.fa.fa-files-o(aria-hidden="true")
|
i.icon.fa.fa-files-o(aria-hidden="true")
|
||||||
button.btn.btn-link.action-btn(
|
button.btn.btn-link.action-btn(
|
||||||
|
@ -136,8 +134,3 @@ td.project-list-table-actions-cell
|
||||||
ng-click="delete($event)"
|
ng-click="delete($event)"
|
||||||
)
|
)
|
||||||
i.icon.fa.fa-ban(aria-hidden="true")
|
i.icon.fa.fa-ban(aria-hidden="true")
|
||||||
div(
|
|
||||||
ng-if="project.isTableActionInflight"
|
|
||||||
aria-label=translate('processing')
|
|
||||||
)
|
|
||||||
i.fa.fa-spinner.fa-spin(aria-hidden="true")
|
|
||||||
|
|
|
@ -293,23 +293,3 @@ script(type="text/ng-template", id="uploadProjectModalTemplate")
|
||||||
)
|
)
|
||||||
.modal-footer
|
.modal-footer
|
||||||
button.btn.btn-default(ng-click="cancel()") #{translate("cancel")}
|
button.btn.btn-default(ng-click="cancel()") #{translate("cancel")}
|
||||||
|
|
||||||
script(type="text/ng-template", id="showErrorModalTemplate")
|
|
||||||
.modal-header
|
|
||||||
button.close(
|
|
||||||
type="button"
|
|
||||||
data-dismiss="modal"
|
|
||||||
ng-click="cancel()"
|
|
||||||
aria-label="Close"
|
|
||||||
)
|
|
||||||
span(aria-hidden="true") ×
|
|
||||||
h3 #{translate("generic_something_went_wrong")}
|
|
||||||
.modal-body
|
|
||||||
.alert.alert-danger(ng-show="error.message") {{error.message === "invalid element name" ? "#{translate("invalid_element_name")}" : error.message}}
|
|
||||||
.alert.alert-danger(ng-show="error && !error.message") #{translate("generic_something_went_wrong")}
|
|
||||||
.modal-footer
|
|
||||||
button.btn.btn-default(ng-click="cancel()") #{translate("cancel")}
|
|
||||||
|
|
||||||
.modal-footer
|
|
||||||
button.btn.btn-info(ng-click="done()") #{translate("done")}
|
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
li
|
li
|
||||||
a(
|
a(
|
||||||
href,
|
href,
|
||||||
ng-click="openCloneProjectModal()"
|
ng-click="openCloneProjectModal(getFirstSelectedProject())"
|
||||||
) #{translate("make_copy")}
|
) #{translate("make_copy")}
|
||||||
|
|
||||||
.btn-group(ng-show="filter === 'archived' && selectedProjects.length > 0")
|
.btn-group(ng-show="filter === 'archived' && selectedProjects.length > 0")
|
||||||
|
|
|
@ -530,8 +530,7 @@ App.controller('ProjectPageController', function(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.openCloneProjectModal = function() {
|
$scope.openCloneProjectModal = function(project) {
|
||||||
let project = $scope.getFirstSelectedProject()
|
|
||||||
if (!project) {
|
if (!project) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -877,24 +876,7 @@ App.controller('ProjectListItemController', function(
|
||||||
|
|
||||||
$scope.clone = function(e) {
|
$scope.clone = function(e) {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
$scope.project.isTableActionInflight = true
|
$scope.openCloneProjectModal($scope.project)
|
||||||
return $scope
|
|
||||||
.cloneProject($scope.project, `${$scope.project.name} (Copy)`)
|
|
||||||
.then(() => ($scope.project.isTableActionInflight = false))
|
|
||||||
.catch(function(response) {
|
|
||||||
const { data, status } = response
|
|
||||||
const error = status === 400 ? { message: data } : true
|
|
||||||
$modal.open({
|
|
||||||
templateUrl: 'showErrorModalTemplate',
|
|
||||||
controller: 'ShowErrorModalController',
|
|
||||||
resolve: {
|
|
||||||
error() {
|
|
||||||
return error
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
$scope.project.isTableActionInflight = false
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.download = function(e) {
|
$scope.download = function(e) {
|
||||||
|
|
Loading…
Reference in a new issue