[26761] Consistent size for notifications close icon (#6073)

Also removes global flash notices when a new success notification is
added.

https://community.openproject.com/wp/26761

[ci skip]
pull/6072/merge
Oliver Günther 7 years ago committed by GitHub
parent 675f0dab16
commit 823c2c4db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/assets/javascripts/flash_messages.js
  2. 1
      app/assets/stylesheets/content/_notifications.sass
  3. 7
      frontend/app/components/common/notifications/notifications.service.ts

@ -41,4 +41,4 @@ function autoHideFlashMessage() {
setTimeout(function() {
jQuery('.flash.autohide-notification').remove();
}, 5000);
}
}

@ -129,7 +129,6 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
width: 1rem
height: 1rem
text-align: center
font-size: 1rem
line-height: rem-calc(20px)
&:hover
text-decoration: none

@ -28,6 +28,10 @@
import {opServicesModule} from '../../../angular-modules';
export function removeSuccessFlashMessages() {
jQuery('.flash.notice').remove();
}
function NotificationsService($rootScope:ng.IRootScopeService, $timeout:ng.ITimeoutService, ConfigurationService:any) {
var createNotification = function (message:any) {
if (typeof message === 'string') {
@ -94,6 +98,9 @@ function NotificationsService($rootScope:ng.IRootScopeService, $timeout:ng.ITime
// public
var add = function (message:any, timeoutAfter = 5000) {
// Remove flash messages
removeSuccessFlashMessages();
var notification = createNotification(message);
broadcast('notification.add', notification);
notificationAdded(notification);

Loading…
Cancel
Save