mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: rename domNode to dom_node
- unites domNode and dom_node usage to dom_node Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
This commit is contained in:
parent
0497d163d9
commit
7fc8d241b2
@ -249,19 +249,19 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
that.dialogs = $.ordered_map();
|
||||
|
||||
/**
|
||||
* domNode of container
|
||||
* Suppose to contain domNode of this and other facets.
|
||||
* dom_node of container
|
||||
* Suppose to contain dom_node of this and other facets.
|
||||
* @property {jQuery}
|
||||
*/
|
||||
that.container_node = spec.container_node;
|
||||
|
||||
/**
|
||||
* domNode which contains all content of a facet.
|
||||
* dom_node which contains all content of a facet.
|
||||
* Should contain error content and content. When error is moved to
|
||||
* standalone facet it will replace functionality of content.
|
||||
* @property {jQuery}
|
||||
*/
|
||||
that.domNode = null;
|
||||
that.dom_node = null;
|
||||
|
||||
/**
|
||||
* Facet group name
|
||||
@ -468,7 +468,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
that.old_state = state;
|
||||
|
||||
// we don't have to reflect any changes if facet dom is not yet created
|
||||
if (!that.domNode) {
|
||||
if (!that.dom_node) {
|
||||
if (needs_update) that.set_expired_flag();
|
||||
return;
|
||||
}
|
||||
@ -526,11 +526,11 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
|
||||
var entity_name = !!that.entity ? that.entity.name : '';
|
||||
|
||||
if (that.domNode) {
|
||||
that.domNode.empty();
|
||||
that.domNode.detach();
|
||||
if (that.dom_node) {
|
||||
that.dom_node.empty();
|
||||
that.dom_node.detach();
|
||||
} else {
|
||||
that.domNode = $('<div/>', {
|
||||
that.dom_node = $('<div/>', {
|
||||
'class': 'facet active-facet',
|
||||
name: that.name,
|
||||
'data-name': that.name,
|
||||
@ -538,34 +538,34 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
});
|
||||
}
|
||||
|
||||
var domNode = that.domNode;
|
||||
that.container = domNode;
|
||||
var dom_node = that.dom_node;
|
||||
that.container = dom_node;
|
||||
|
||||
if (!that.container_node) throw {
|
||||
error: 'Can\'t create facet. No container node defined.'
|
||||
};
|
||||
var node = domNode[0];
|
||||
var node = dom_node[0];
|
||||
construct.place(node,that.container_node);
|
||||
|
||||
|
||||
if (that.disable_facet_tabs) domNode.addClass('no-facet-tabs');
|
||||
domNode.addClass(that.display_class);
|
||||
if (that.disable_facet_tabs) dom_node.addClass('no-facet-tabs');
|
||||
dom_node.addClass(that.display_class);
|
||||
|
||||
that.header_container = $('<div/>', {
|
||||
'class': 'facet-header'
|
||||
}).appendTo(domNode);
|
||||
}).appendTo(dom_node);
|
||||
that.create_header(that.header_container);
|
||||
|
||||
that.content = $('<div/>', {
|
||||
'class': 'facet-content'
|
||||
}).appendTo(domNode);
|
||||
}).appendTo(dom_node);
|
||||
|
||||
that.error_container = $('<div/>', {
|
||||
'class': 'facet-content facet-error'
|
||||
}).appendTo(domNode);
|
||||
}).appendTo(dom_node);
|
||||
|
||||
that.create_content(that.content);
|
||||
domNode.removeClass('active-facet');
|
||||
dom_node.removeClass('active-facet');
|
||||
};
|
||||
|
||||
/**
|
||||
@ -626,7 +626,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
|
||||
that.entity.facet = that; // FIXME: remove
|
||||
|
||||
if (!that.domNode) {
|
||||
if (!that.dom_node) {
|
||||
that.create();
|
||||
|
||||
var state = that.state.clone();
|
||||
@ -637,7 +637,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
that.clear();
|
||||
}
|
||||
|
||||
that.domNode.addClass('active-facet');
|
||||
that.dom_node.addClass('active-facet');
|
||||
that.show_content();
|
||||
that.header.select_tab();
|
||||
|
||||
@ -645,7 +645,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
that.refresh();
|
||||
}
|
||||
} else {
|
||||
that.domNode.addClass('active-facet');
|
||||
that.dom_node.addClass('active-facet');
|
||||
that.show_content();
|
||||
that.header.select_tab();
|
||||
}
|
||||
@ -687,7 +687,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
* Un-mark itself as active facet
|
||||
*/
|
||||
that.hide = function() {
|
||||
that.domNode.removeClass('active-facet');
|
||||
that.dom_node.removeClass('active-facet');
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ define(['dojo/_base/declare',
|
||||
|
||||
//nodes:
|
||||
|
||||
domNode: null,
|
||||
dom_node: null,
|
||||
|
||||
container_node: null,
|
||||
|
||||
@ -86,20 +86,20 @@ define(['dojo/_base/declare',
|
||||
|
||||
render: function() {
|
||||
|
||||
this.domNode = construct.create('div', {
|
||||
this.dom_node = construct.create('div', {
|
||||
id: this.app_id,
|
||||
'class': 'app-container'
|
||||
});
|
||||
|
||||
if (this.container_node) {
|
||||
construct.place(this.domNode, this.container_node);
|
||||
construct.place(this.dom_node, this.container_node);
|
||||
}
|
||||
|
||||
this._render_header();
|
||||
|
||||
this.content_node = construct.create('div', {
|
||||
'class': 'content'
|
||||
}, this.domNode);
|
||||
}, this.dom_node);
|
||||
},
|
||||
|
||||
_render_header: function() {
|
||||
@ -113,7 +113,7 @@ define(['dojo/_base/declare',
|
||||
this.menu_node = this.menu_widget.render();
|
||||
construct.place(this.menu_node, this.header_node);
|
||||
|
||||
construct.place(this.header_node, this.domNode);
|
||||
construct.place(this.header_node, this.dom_node);
|
||||
},
|
||||
|
||||
_render_nav_util: function() {
|
||||
|
@ -91,7 +91,7 @@ define(['dojo/_base/declare',
|
||||
items: [],
|
||||
|
||||
/**
|
||||
* domNode of this widget
|
||||
* dom_node of this widget
|
||||
* @property {HTMLElement}
|
||||
*/
|
||||
dom_node: null,
|
||||
|
@ -55,10 +55,10 @@ define(['dojo/_base/declare',
|
||||
menu: null,
|
||||
|
||||
/**
|
||||
* domNode of this widget. FIXME: move to superclass (none yet)
|
||||
* dom_node of this widget. FIXME: move to superclass (none yet)
|
||||
* @property {HTMLElement}
|
||||
*/
|
||||
domNode: null,
|
||||
dom_node: null,
|
||||
|
||||
/**
|
||||
* Turns off update on data change
|
||||
@ -76,20 +76,20 @@ define(['dojo/_base/declare',
|
||||
* Renders widget's elements
|
||||
*/
|
||||
render: function() {
|
||||
if (this.domNode) {
|
||||
construct.empty(this.domNode);
|
||||
if (this.dom_node) {
|
||||
construct.empty(this.dom_node);
|
||||
} else {
|
||||
this.domNode = construct.create('div', {
|
||||
this.dom_node = construct.create('div', {
|
||||
'class': 'navbar primary persistent-secondary'
|
||||
});
|
||||
}
|
||||
this.innerNode = construct.create('div', {
|
||||
'class': 'navbar-inner'
|
||||
}, this.domNode);
|
||||
}, this.dom_node);
|
||||
if (this.menu) {
|
||||
this._render_children(null, null, this.innerNode, 1);
|
||||
}
|
||||
return this.domNode;
|
||||
return this.dom_node;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -228,7 +228,7 @@ define(['dojo/_base/declare',
|
||||
|
||||
// hide all except top level
|
||||
var exception = this._get_lvl_class(1);
|
||||
query('div.submenu', this.domNode).forEach(function(submenu_node) {
|
||||
query('div.submenu', this.dom_node).forEach(function(submenu_node) {
|
||||
|
||||
if (dom_class.contains(submenu_node, exception)) return;
|
||||
|
||||
@ -242,7 +242,7 @@ define(['dojo/_base/declare',
|
||||
this._update_item(item);
|
||||
|
||||
// show submenu
|
||||
var item_div = query('div[data-item=\''+item.name+'\']', this.domNode)[0];
|
||||
var item_div = query('div[data-item=\''+item.name+'\']', this.dom_node)[0];
|
||||
if (item_div) {
|
||||
dom_style.set(item_div, {
|
||||
display: 'block'
|
||||
|
@ -233,13 +233,13 @@ test("Testing details lifecycle: create, load.", function(){
|
||||
|
||||
facet.load(data);
|
||||
|
||||
var contact = $('.details-section[name=contact]', facet.domNode);
|
||||
var contact = $('.details-section[name=contact]', facet.dom_node);
|
||||
|
||||
ok(
|
||||
contact.length,
|
||||
'Verifying section for contact is created');
|
||||
|
||||
var identity = $('.details-section[name=identity]', facet.domNode);
|
||||
var identity = $('.details-section[name=identity]', facet.dom_node);
|
||||
|
||||
ok(
|
||||
identity.length,
|
||||
|
Loading…
Reference in New Issue
Block a user