mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
fb975bba20
commit
9aed114d82
@ -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');
|
||||
};
|
||||
|
||||
|
@ -285,6 +285,8 @@ define(['dojo/_base/declare',
|
||||
if (!this.dom_node) {
|
||||
this.create();
|
||||
this.render_children();
|
||||
} else if (!this.dom_node.parentElement) {
|
||||
construct.place(this.dom_node, this.container_node);
|
||||
}
|
||||
|
||||
dom_class.add(this.dom_node, 'active-facet');
|
||||
@ -295,6 +297,9 @@ define(['dojo/_base/declare',
|
||||
* Un-mark itself as active facet
|
||||
*/
|
||||
hide: function() {
|
||||
if (this.dom_node.parentElement) {
|
||||
this.container_node.removeChild(this.dom_node);
|
||||
}
|
||||
dom_class.remove(this.dom_node, 'active-facet');
|
||||
this.emit('hide', { source: this });
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user