Skip to content

Commit

Permalink
remove enclosure icon from root node
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Rossi committed Dec 27, 2015
1 parent 71e6509 commit 9064e88
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="configuration_tree_legend_container">
<div class="tree_container" id="example_container">
<span class="example dijitFolderOpened"></span> = Enclosure <span class="example dijitLeaf"></span> = Directive
<span class="example enclosure"></span> = Enclosure <span class="example directive"></span> = Directive
</div>

<div id="right_click_container">
Expand Down
11 changes: 10 additions & 1 deletion src/main/webapp/resources/net/apachegui/ConfigurationTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ define([
* autoExpand - true to auto expand the tree, false other wise, defualts to false
*/
constructor: function(params){
var ROOT_NODE_TYPE = 'rootNode';

this.id = params.id;
this.treeJSON = params.treeJSON || this.treeJSON;
this.autoExpand = params.autoExpand || false;
this.rootType = params.rootType || 'rootNode';
this.rootType = params.rootType || ROOT_NODE_TYPE;
this.loadTreeJSON = params.loadTreeJSON || this.loadTreeJSON;

var store = new ItemFileWriteStore({
Expand Down Expand Up @@ -93,6 +95,13 @@ define([
autoExpand : this.autoExpand,
openOnClick : true,
id : this.id + '_tree',
getIconClass: function(item, opened) {
if(item.type == ROOT_NODE_TYPE) {
return '';
}

return (!!item.children ? 'enclosure' : 'directive');
},
persist : true,
_createTreeNode : function(args) {
return new HostTreeNode(args);
Expand Down
10 changes: 7 additions & 3 deletions src/main/webapp/resources/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,18 @@ h1 {
}

/* Configuration Tree Styling */
.tree_container .dijitFolderOpened,
.tree_container .dijitFolderClosed {
.tree_container .enclosure,
.tree_container .directive {
width: 15px;
height: 15px;
}
.tree_container .enclosure {
background: url('images/enclosure.png') !important;
background-position: center !important;
background-repeat: no-repeat !important;
}

.tree_container .dijitLeaf {
.tree_container .directive {
background: url('images/directive.png') !important;
background-position: center !important;
background-repeat: no-repeat !important;
Expand Down

0 comments on commit 9064e88

Please sign in to comment.