Commit 2470d54b21d0ba7ca9626d69b2d6f5d847d73e15

Authored by Andrea Petta
2 parents ca51b6dc e6930b3e

Merge branch 'master' of http://service.routetopa.eu:7480/WebCompDev/COMPONENTS

controllets/dataset-selection-controllet/dataset-selection-controllet.html
... ... @@ -284,7 +284,7 @@
284 284 var h = $("#material_container").height() - 48;
285 285 var w = $("#material_container").width();
286 286 // /oxwall_x.y.z
287   - this.$.div_datasetexplorer.innerHTML = "<datasetexplorer-datalet width=\""+w+"\" height=\""+h+"\" data-url=\"/openwall/api/datasetTree\" fields='[\"result,provider_name\",\"result,organization_name\",\"result,package_name\",\"result,resource_name\",\"result,url\",\"result,w\"]'></datasetexplorer-datalet>";
  287 + this.$.div_datasetexplorer.innerHTML = "<datasetexplorer-datalet width=\""+w+"\" height=\""+h+"\" data-url=\"/openwall/api/datasetTree\" fields='[\"result,datasets,provider_name\",\"result,datasets,organization_name\",\"result,datasets,package_name\",\"result,datasets,resource_name\",\"result,datasets,url\",\"result,datasets,w\"]'></datasetexplorer-datalet>";
288 288 },
289 289  
290 290 _selectDataUrl_treeMap : function(e) {
... ... @@ -366,4 +366,4 @@
366 366  
367 367 </script>
368 368  
369   -</dom-module>
370 369 \ No newline at end of file
  370 +</dom-module>
... ...
datalets/datasetexplorer-datalet/js/buildtreemap.js
... ... @@ -131,30 +131,28 @@ function build(root, meta, place_holder, select_listener, width, height) {
131 131 .call(rect)
132 132 .attr("onmousemove", function(d) {
133 133 //var data = ["lvl", "name", "color", "description", "logoUrl", "datasets", "datasetUrl"];
134   - var data = ["", d.name, d.color, "", "", "0", ""];
135   - //d.name.split(':')[1]???
  134 + var data = ["", d.name, d.color, "", "", d.value, ""];
  135 + data[2] = ["#000000"];
  136 + var id = d.name.split(':')[1];
136 137 if (d.depth == 1) {
137 138 // FIRST LVL
138 139 data[0] = "first";
139   - data[3] = "description";//???
140   - data[4] = "http://essi-lab.eu/twiki/pub/GIcat/CKANProfilerGuide/logo-ckan.png";//id???
141   - data[5] = "2222";//meta???
  140 + data[1] = meta[id]['title'];
  141 + //data[3] = OW.getLanguageText('openwall', 'provider_'+id);//???
  142 + data[3] = (typeof OW == 'undefined') ? "" : OW.getLanguageText('openwall', 'provider_'+id);
  143 + data[4] = ((typeof ODE == 'undefined') ? parent.ODE.THEME_IMAGES_URL : ODE.THEME_IMAGES_URL) + "/logos/"+id+".png";//meta[id]['logo_url'];
  144 + //data[5] = d.value;
142 145 } else if (d._children && !d._children[0]._children) {
143 146 // LAST LVL
144 147 data[0] = "last";
145   - data[6] = "datasert url";//???
  148 + //data[6] = "datasert url";
146 149 } else {
147 150 // MIDDLE LVL
148 151 data[0] = "middle";
149   - data[5] = "1111";//meta???
150 152 }
151   - //console.log(data);
152   - //console.log(data.toString());
153 153 return "showTooltip(event, '" + data + "')";
154 154 })
155 155 .attr("onmouseout", function() {return "hideTooltip()";})
156   - //.append("title")
157   - //.text(function(d) { return d.name; /*formatNumber(d.value);*/ });
158 156  
159 157 g.append("text")
160 158 .attr("dy", ".75em")
... ...
datalets/datasetexplorer-datalet/treemap_tooltip.html
... ... @@ -36,15 +36,29 @@
36 36 .tooltip {
37 37 font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
38 38 padding: 16px;
39   - min-width: 200px;
40   - max-width: 400px;
41 39 position: absolute;
42 40  
  41 + /*min-width: 200px;*/
  42 + /*max-width: 400px;*/
  43 +
43 44 /*position: relative*/
44 45 /*top: 20px;*/
45 46 /*left: 20px;*/
46 47 }
47 48  
  49 + .tooltip#first_info {
  50 + width: 400px;
  51 + }
  52 +
  53 + .tooltip#middle_info {
  54 + min-width: 200px;
  55 + }
  56 +
  57 + .tooltip#last_info {
  58 + min-width: 200px;
  59 + max-width: 800px;
  60 + }
  61 +
48 62 .tooltip_top {
49 63 display: flex;
50 64 margin: 0px;
... ... @@ -65,7 +79,7 @@
65 79 margin: 0px;
66 80 padding: 0px;
67 81 height: 64px;
68   - width: 64px;
  82 + /*width: 64px;*/
69 83 }
70 84  
71 85 p {
... ... @@ -83,9 +97,9 @@
83 97 <iron-icon icon="communication:call-made" class="this" style$="color: {{color}};"></iron-icon>
84 98 <div class="tooltip_top">
85 99 <div class="tooltip_logo"><img class="tooltip_img" src$={{logoUrl}}></div>
86   - <div class="tooltip_name" style$="color: {{color}};">{{name}}</div>
  100 + <!--<div class="tooltip_name" style$="color: {{color}};">{{name}}</div>-->
87 101 </div>
88   - <p><i>{{description}}</i></p>
  102 + <p><b style$="color: {{color}};">{{name}}</b>: <i>{{description}}</i></p>
89 103 <p>There are <b>{{datasets}}</b> datasets.</p>
90 104 </paper-dialog>
91 105  
... ...