mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2790 from overleaf/ta-sso-notifications-no-dismiss
Don't Display Dismiss Button on SSO Notifications GitOrigin-RevId: f578f57ac348fba4375abee9d842dce34b0c4271
This commit is contained in:
parent
0583f7a667
commit
7658a515ba
2 changed files with 6 additions and 5 deletions
|
@ -97,10 +97,6 @@ include ../../_mixins/saml
|
|||
.notification-action
|
||||
a.btn.btn-sm.btn-info(href="{{samlInitPath}}?university_id={{notification.institutionId}}&auto=/project&email={{notification.email}}")
|
||||
| #{translate('link_account')}
|
||||
.notification-close
|
||||
button(ng-click="dismiss(notification)").close.pull-right
|
||||
span(aria-hidden="true") ×
|
||||
span.sr-only #{translate("close")}
|
||||
|
||||
.alert.alert-info(
|
||||
ng-switch-when="notification_institution_sso_linked"
|
||||
|
|
|
@ -8,7 +8,11 @@ define(['../../base'], function(App) {
|
|||
|
||||
$scope.samlInitPath = ExposedSettings.samlInitPath
|
||||
|
||||
$scope.dismiss = notification =>
|
||||
$scope.dismiss = notification => {
|
||||
if (!notification._id) {
|
||||
notification.hide = true
|
||||
return
|
||||
}
|
||||
$http({
|
||||
url: `/notifications/${notification._id}`,
|
||||
method: 'DELETE',
|
||||
|
@ -16,6 +20,7 @@ define(['../../base'], function(App) {
|
|||
'X-Csrf-Token': window.csrfToken
|
||||
}
|
||||
}).then(() => (notification.hide = true))
|
||||
}
|
||||
})
|
||||
|
||||
App.controller('DismissableNotificationsController', function(
|
||||
|
|
Loading…
Reference in a new issue