summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/facet.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-07-22 14:15:30 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-07-28 10:21:37 +0200
commit9aed114d822efb0eaa01d93624bc0ea6612c4169 (patch)
tree15ac85ed0f16a64e4f5bd3d85631fff4156a29df /install/ui/src/freeipa/facet.js
parentfb975bba2076758f0615dae042aed2cde705a1b0 (diff)
downloadfreeipa-9aed114d822efb0eaa01d93624bc0ea6612c4169.tar.gz
freeipa-9aed114d822efb0eaa01d93624bc0ea6612c4169.tar.xz
freeipa-9aed114d822efb0eaa01d93624bc0ea6612c4169.zip
webui: detach facet nodes
Detach/attach facet nodes when switching facets instead of hiding/showing. Keeps dom-tree more simple. Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/facet.js')
-rw-r--r--install/ui/src/freeipa/facet.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js
index 0bb697be0..50c12d49c 100644
--- a/install/ui/src/freeipa/facet.js
+++ b/install/ui/src/freeipa/facet.js
@@ -672,6 +672,8 @@ exp.facet = IPA.facet = function(spec, no_init) {
if (!that.dom_node) {
that.create();
+ } else if (!that.dom_node.parentElement) {
+ construct.place(that.dom_node[0], that.container_node);
}
var state = that.state.clone();
@@ -728,6 +730,9 @@ exp.facet = IPA.facet = function(spec, no_init) {
*/
that.hide = function() {
that.is_shown = false;
+ if (that.dom_node[0].parentElement) {
+ that.container_node.removeChild(that.dom_node[0]);
+ }
that.dom_node.removeClass('active-facet');
};