Prevent fading out flash messages if accessibility mode is enabled

pull/1401/head
Till Breuer 11 years ago
parent 4c811523c6
commit e3f1f85ae2
  1. 11
      app/assets/javascripts/angular/directives/components/flash-message-directive.js
  2. 7
      app/assets/javascripts/angular/openproject-app.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);
}
});
}
};

@ -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());
}]);

Loading…
Cancel
Save