- unites domNode and dom_node usage to dom_node
--
Petr Vobornik
From da7c558e3e8a3086b57b844062421b71b657adf0 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <[email protected]>
Date: Fri, 22 Nov 2013 10:22:15 +0100
Subject: [PATCH] webui: rename domNode to dom_node

- unites domNode and dom_node usage to dom_node
---
 install/ui/src/freeipa/facet.js                  | 44 ++++++++++++------------
 install/ui/src/freeipa/widgets/App.js            |  8 ++---
 install/ui/src/freeipa/widgets/DropdownWidget.js |  2 +-
 install/ui/src/freeipa/widgets/Menu.js           | 18 +++++-----
 4 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js
index 4d1787145865773fac41d2f3f64b95a3d107a984..68f93fcefad27b891388876f5f0959d2ee399753 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 f44ecaf568659458316c7305579f71bc9ec8cb20..bead6399636a8a16771761e9d5d30de0dc0595ef 100644
--- a/install/ui/src/freeipa/widgets/App.js
+++ b/install/ui/src/freeipa/widgets/App.js
@@ -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 9f740e614f1381b7f08b7c3f5fe801face86664b..e45ea89454fe537f57bc4a96dc83c79ac63481c0 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 e8ffcf0f1c1e589cfb8cf72e382f1c3d50a05468..1a7a3f005fd5942bb70a60faa0373855bd94e027 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'
-- 
1.8.5.3

_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to