Add folder icon to treemap
authorChloe Laisne <chloe.laisne@gmail.com>
Mon, 26 Sep 2016 19:01:35 +0200
changeset 294 f3dae62a0d8a
parent 293 eba7dac7f27b
child 295 e1f154f20f96
Add folder icon to treemap
cms/app-client/app/components/visu-langues.js
cms/app-client/app/styles/tabs/langues.scss
--- a/cms/app-client/app/components/visu-langues.js	Sun Sep 25 22:43:38 2016 +0200
+++ b/cms/app-client/app/components/visu-langues.js	Mon Sep 26 19:01:35 2016 +0200
@@ -130,7 +130,9 @@
 
                 node.filter(function(d) { return d._children; })
                     .classed("children", true)
-                    .on("click", transition);
+                    .on("click", transition)
+                    .append("i")
+                    .attr("class", "fa fa-folder-o");
 
                 node.append("span")
                     .html(function(d) { return d.name + ' <span class="count">(' + d.count + ')</span>'; });
--- a/cms/app-client/app/styles/tabs/langues.scss	Sun Sep 25 22:43:38 2016 +0200
+++ b/cms/app-client/app/styles/tabs/langues.scss	Mon Sep 26 19:01:35 2016 +0200
@@ -58,6 +58,15 @@
 	border-right: none;
 }
 
+#tabs-langues .node .fa {
+    margin-right: 5px;
+}
+
+#tabs-langues .node .fa::before {
+	font-size: 14px;
+	line-height: 12px;
+}
+
 #tabs-langues .node .count {
 	font-weight: bold;
 }
\ No newline at end of file