diff --git a/app/assets/javascripts/angular/directives/components/flash-message-directive.js b/app/assets/javascripts/angular/directives/components/flash-message-directive.js index 4d27938e67..01381aa974 100644 --- a/app/assets/javascripts/angular/directives/components/flash-message-directive.js +++ b/app/assets/javascripts/angular/directives/components/flash-message-directive.js @@ -32,7 +32,8 @@ angular.module('openproject.uiComponents') .directive('flashMessage', [ '$rootScope', '$timeout', - function($rootScope, $timeout) { + 'ConfigurationService', + function($rootScope, $timeout, ConfigurationService) { return { restrict: 'E', @@ -53,9 +54,11 @@ angular.module('openproject.uiComponents') } // fade out after time out - $timeout(function() { - scope.message = undefined; - }, fadeOutTime); + if (!ConfigurationService.accessibilityModeEnabled()) { + $timeout(function() { + scope.message = undefined; + }, fadeOutTime); + } }); } }; diff --git a/app/assets/javascripts/angular/openproject-app.js b/app/assets/javascripts/angular/openproject-app.js index 73c198b3e6..7560e9d3ca 100644 --- a/app/assets/javascripts/angular/openproject-app.js +++ b/app/assets/javascripts/angular/openproject-app.js @@ -136,6 +136,11 @@ openprojectApp }; }); }]) - .run(['$http', function($http){ + .run([ + '$http', + 'ConfigurationService', + function($http, ConfigurationService){ $http.defaults.headers.common.Accept = 'application/json'; + + ConfigurationService.addConfiguration('accessibilityMode', OpenProject.Helpers.accessibilityModeEnabled()); }]);