webui: support global notifications in all containers

Global notifications were limited to "main" container. Now they have their
own container which is displayed over other ones. It makes them usable
everywhere.

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
Petr Vobornik 2014-06-04 17:05:42 +02:00
parent 72a107c9d7
commit d9a7fcb5e1
3 changed files with 11 additions and 2 deletions

View File

@ -89,6 +89,12 @@ define([
var simple_container = new FacetContainer();
simple_container.container_node = body_node;
var notification_container = new FacetContainer({
container_node: body_node,
id: "notification",
'class': ''
});
this.containers = {
// Default view
main: {
@ -117,6 +123,7 @@ define([
this.app_widget.hide();
simple_container.render();
simple_container.hide();
notification_container.render();
var load_facet = reg.facet.get('load');
this.show_facet(load_facet);
IPA.opened_dialogs.start_handling(this);

View File

@ -1177,7 +1177,7 @@ IPA.notify = function(message, type, timeout) {
}
});
notification_area.appendTo('#container');
notification_area.appendTo('#notification');
}
notification_area.empty();

View File

@ -41,6 +41,8 @@ define(['dojo/_base/declare',
id: 'simple-container',
'class': 'app-container',
//nodes:
dom_node: null,
@ -52,7 +54,7 @@ define(['dojo/_base/declare',
this.dom_node = construct.create('div', {
id: this.id,
'class': 'app-container'
'class': this['class']
});
if (this.container_node) {