Merge pull request #2599 from FinnStutzenstein/Issue2118

check for cookies (closes #2118)
This commit is contained in:
Norman Jäckel 2016-11-08 22:39:40 +01:00 committed by GitHub
commit 7aa110aca6

View File

@ -1295,7 +1295,8 @@ angular.module('OpenSlidesApp.users.site', [
'$http',
'$stateParams',
'operator',
function ($rootScope, $scope, $http, $stateParams, operator ) {
'gettext',
function ($rootScope, $scope, $http, $stateParams, operator, gettext) {
$scope.alerts = [];
// get login info-text from server
@ -1307,6 +1308,14 @@ angular.module('OpenSlidesApp.users.site', [
});
}
});
// check if cookies are enabled
if (!navigator.cookieEnabled) {
$scope.alerts.push({
type: 'danger',
msg: gettext('You have to enable cookies to use OpenSlides.'),
});
}
// close alert function
$scope.closeAlert = function(index) {
$scope.alerts.splice(index, 1);