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