overleaf/services/web/public/coffee/main/project-list/notifications-controller.coffee

18 lines
390 B
CoffeeScript
Raw Normal View History

define [
"base"
], (App) ->
2016-01-22 20:08:39 +00:00
App.controller "NotificationsController", ($scope, $http) ->
for notification in $scope.notifications
notification.hide = false
$scope.dismiss = (notification) ->
$http({
url: "/notifications/#{notification._id}"
method: "DELETE"
headers:
"X-Csrf-Token": window.csrfToken
})
.success (data) ->
notification.hide = true