summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/Application_controller.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-05-20 12:57:28 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-06-11 13:50:12 +0200
commit4b2d20a1f95edd2982fbb1901287f2bb2194c9db (patch)
treea5c619177d5d4913d65d32022b093bd074272ea1 /install/ui/src/freeipa/Application_controller.js
parentb6258d08d6c5605b32151654c6259f7c77f1a32b (diff)
downloadfreeipa-4b2d20a1f95edd2982fbb1901287f2bb2194c9db.tar.gz
freeipa-4b2d20a1f95edd2982fbb1901287f2bb2194c9db.tar.xz
freeipa-4b2d20a1f95edd2982fbb1901287f2bb2194c9db.zip
webui: display only dialogs which belong to current facet
Dialog instances no longer directly call IPA.opened_dialog methods. It's handled through events (decoupled from dialog's POV). IPA.open_dialogs with assistance of ApplicationController makes sure that there is only one dialog opened at the same time. It also makes sure to hide all dialogs, which are not global dialogs and did not originate from current facet, when switching facets. https://fedorahosted.org/freeipa/ticket/4348 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/Application_controller.js')
-rw-r--r--install/ui/src/freeipa/Application_controller.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/install/ui/src/freeipa/Application_controller.js b/install/ui/src/freeipa/Application_controller.js
index c166e36ee..f38a60dc3 100644
--- a/install/ui/src/freeipa/Application_controller.js
+++ b/install/ui/src/freeipa/Application_controller.js
@@ -116,6 +116,7 @@ define([
simple_container.hide();
var load_facet = reg.facet.get('load');
this.show_facet(load_facet);
+ IPA.opened_dialogs.start_handling(this);
},
/**
@@ -320,9 +321,14 @@ define([
on(facet, 'facet-state-change', lang.hitch(this, this.on_facet_state_changed));
}
+ if (this.current_facet !== facet) {
+ IPA.opened_dialogs.hide();
+ }
+
this.hide_facet();
this.current_facet = facet;
facet.show();
+ IPA.opened_dialogs.focus_top();
},
hide_facet: function() {
@@ -455,7 +461,6 @@ define([
}
topic.publish('auth-successful');
});
-
this.show_facet(login_facet);
}
}