Allow hidden notification

This commit is contained in:
Dennis Eichhorn 2019-06-01 20:53:36 +02:00
parent d2c454a215
commit 52f8b4d6e1
4 changed files with 10 additions and 8 deletions

View File

@ -10,5 +10,6 @@ export const NotificationLevel = Object.freeze({
OK: 'ok',
INFO: 'info',
WARNING: 'warning',
ERROR: 'error'
ERROR: 'error',
HIDDEN: 'hidden'
});

View File

@ -1,9 +1,9 @@
import { RequestMethod } from './RequestMethod.js'
import { RequestType } from './RequestType.js'
import { BrowserType } from './BrowserType.js'
import { OSType } from './OSType.js'
import { UriFactory } from '../../Uri/UriFactory.js'
import { Logger } from '../../Log/Logger.js'
import { Logger } from '../../Log/Logger.js';
import { UriFactory } from '../../Uri/UriFactory.js';
import { BrowserType } from './BrowserType.js';
import { OSType } from './OSType.js';
import { RequestMethod } from './RequestMethod.js';
import { RequestType } from './RequestType.js';
/**
* Request class.

View File

@ -303,7 +303,7 @@ export class Form {
// maybe there could be global response actions where injecting them to every form would not make any sense
// however not many if any use cases come to mind right now where this would be necessary
self.app.responseManager.run(response.get('type'), response.get(), request);
} else if (typeof o.status !== 'undefined') {
} else if (typeof o.status !== 'undefined' && o.status !== NotificationLevel.HIDDEN) {
self.app.notifyManager.send(
new NotificationMessage(o.status, o.title, o.message), NotificationType.APP_NOTIFICATION
);

View File

@ -15,6 +15,7 @@ describe('NotificationLevelTest', function ()
expect(jsOMS.Message.Notification.NotificationLevel.INFO).toBe('info');
expect(jsOMS.Message.Notification.NotificationLevel.WARNING).toBe('warning');
expect(jsOMS.Message.Notification.NotificationLevel.ERROR).toBe('error');
expect(jsOMS.Message.Notification.NotificationLevel.HIDDEN).toBe('hidden');
});
});
});