diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-11-22 10:22:15 +0100 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2014-03-26 09:01:05 +0100 |
commit | 7fc8d241b2df352adbc51616ae3eb5dc4199a75e (patch) | |
tree | 854826f0287f8ebeb8f603e0489d67e676efee4e | |
parent | 0497d163d9665ed429615952eb12f17fa9ea0fe9 (diff) | |
download | freeipa-7fc8d241b2df352adbc51616ae3eb5dc4199a75e.tar.gz freeipa-7fc8d241b2df352adbc51616ae3eb5dc4199a75e.tar.xz freeipa-7fc8d241b2df352adbc51616ae3eb5dc4199a75e.zip |
webui: rename domNode to dom_node
- unites domNode and dom_node usage to dom_node
Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
-rw-r--r-- | install/ui/src/freeipa/facet.js | 44 | ||||
-rw-r--r-- | install/ui/src/freeipa/widgets/App.js | 10 | ||||
-rw-r--r-- | install/ui/src/freeipa/widgets/DropdownWidget.js | 2 | ||||
-rw-r--r-- | install/ui/src/freeipa/widgets/Menu.js | 18 | ||||
-rw-r--r-- | install/ui/test/details_tests.js | 4 |
5 files changed, 39 insertions, 39 deletions
diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js index 4d1787145..68f93fcef 100644 --- a/install/ui/src/freeipa/facet.js +++ b/install/ui/src/freeipa/facet.js @@ -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'); }; /** diff --git a/install/ui/src/freeipa/widgets/App.js b/install/ui/src/freeipa/widgets/App.js index f44ecaf56..4ce6efa75 100644 --- a/install/ui/src/freeipa/widgets/App.js +++ b/install/ui/src/freeipa/widgets/App.js @@ -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() { diff --git a/install/ui/src/freeipa/widgets/DropdownWidget.js b/install/ui/src/freeipa/widgets/DropdownWidget.js index 9f740e614..e45ea8945 100644 --- a/install/ui/src/freeipa/widgets/DropdownWidget.js +++ b/install/ui/src/freeipa/widgets/DropdownWidget.js @@ -91,7 +91,7 @@ define(['dojo/_base/declare', items: [], /** - * domNode of this widget + * dom_node of this widget * @property {HTMLElement} */ dom_node: null, diff --git a/install/ui/src/freeipa/widgets/Menu.js b/install/ui/src/freeipa/widgets/Menu.js index e8ffcf0f1..1a7a3f005 100644 --- a/install/ui/src/freeipa/widgets/Menu.js +++ b/install/ui/src/freeipa/widgets/Menu.js @@ -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' diff --git a/install/ui/test/details_tests.js b/install/ui/test/details_tests.js index 87315b5a8..c911d1b61 100644 --- a/install/ui/test/details_tests.js +++ b/install/ui/test/details_tests.js @@ -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, |