Commit 85f3ac36404467811d9e86fccfa54e3d58bf20d3

Authored by Luigi Serra
2 parents 736f8317 75918d56

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

controllets/dataset-selection-controllet/dataset-selection-controllet.html
@@ -305,7 +305,7 @@ @@ -305,7 +305,7 @@
305 $("#info_s_dataset")[0].setAttribute("disabled", "true"); 305 $("#info_s_dataset")[0].setAttribute("disabled", "true");
306 } 306 }
307 307
308 - this.dataUrl = e.detail.url; 308 + this.dataUrl = this._addlimitUrl(e.detail.url);
309 this.selected=0; 309 this.selected=0;
310 }, 310 },
311 311
@@ -318,7 +318,7 @@ @@ -318,7 +318,7 @@
318 318
319 var dataset = this.filteredDatasets[parseInt(e.target.id)] 319 var dataset = this.filteredDatasets[parseInt(e.target.id)]
320 320
321 - this.dataUrl = dataset.url; 321 + this.dataUrl = this._addlimitUrl(dataset.url);
322 322
323 if(dataset.description != ""){ 323 if(dataset.description != ""){
324 $("#info_dataset")[0].removeAttribute("disabled"); 324 $("#info_dataset")[0].removeAttribute("disabled");
@@ -336,7 +336,7 @@ @@ -336,7 +336,7 @@
336 336
337 var dataset = this.suggestedDatasets[parseInt(e.target.id)] 337 var dataset = this.suggestedDatasets[parseInt(e.target.id)]
338 338
339 - this.dataUrl = dataset.url; 339 + this.dataUrl = this._addlimitUrl(dataset.url);
340 340
341 if(dataset.description != ""){ 341 if(dataset.description != ""){
342 $("#info_s_dataset")[0].removeAttribute("disabled"); 342 $("#info_s_dataset")[0].removeAttribute("disabled");
@@ -363,6 +363,19 @@ @@ -363,6 +363,19 @@
363 this.fire('dataset-selection-controllet_data-url', {url: this.dataUrl}); 363 this.fire('dataset-selection-controllet_data-url', {url: this.dataUrl});
364 }, 364 },
365 365
  366 + _addlimitUrl : function(url){
  367 + //CKAN --> action no limit
  368 + if((url.indexOf("api/action") > -1) && !(url.indexOf("limit") > -1))
  369 + {
  370 + url += "&limit=99999";
  371 + }
  372 + //OpenDataSoft --> action no limit
  373 + if((url.indexOf("api/records") > -1) && !(url.indexOf("rows") > -1)){
  374 + url += "&rows=10000";
  375 + }
  376 + return url;
  377 + },
  378 +
366 _resize : function(){ 379 _resize : function(){
367 var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - 16; 380 var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - 16;
368 h = h - 64 - 8; //height with page scroller 381 h = h - 64 - 8; //height with page scroller
datalets/datasetexplorer-datalet/js/buildtreemap2.js
@@ -50,7 +50,6 @@ function build2(root, meta, place_holder, select_listener, width, height) { @@ -50,7 +50,6 @@ function build2(root, meta, place_holder, select_listener, width, height) {
50 var data = ["top", "", "#000000", "", "", "", ""]; 50 var data = ["top", "", "#000000", "", "", "", ""];
51 //data[3] = OW.getLanguageText('ode', 'back'); 51 //data[3] = OW.getLanguageText('ode', 'back');
52 data[3] = datasetexplorer_ln["ode+back_"+datasetexplorer_ln["ln"]]; 52 data[3] = datasetexplorer_ln["ode+back_"+datasetexplorer_ln["ln"]];
53 - console.log(data[3]);  
54 53
55 return "showTooltip(evt, '" + data + "')"; 54 return "showTooltip(evt, '" + data + "')";
56 }) 55 })
@@ -80,7 +79,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { @@ -80,7 +79,7 @@ function build2(root, meta, place_holder, select_listener, width, height) {
80 // the children being overwritten when when layout is computed. 79 // the children being overwritten when when layout is computed.
81 function accumulate(d) { 80 function accumulate(d) {
82 return (d._children = d.children) 81 return (d._children = d.children)
83 - ? d.value = d.children.reduce(function(p, v) { return p + accumulate(v); }, 5) 82 + ? d.value = d.children.reduce(function(p, v) { return p + accumulate(v); }, 0)
84 : d.value; 83 : d.value;
85 } 84 }
86 85
@@ -141,6 +140,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { @@ -141,6 +140,7 @@ function build2(root, meta, place_holder, select_listener, width, height) {
141 .attr("onmousemove", function(d) { 140 .attr("onmousemove", function(d) {
142 //var data = ["lvl", "name", "color", "description", "logoUrl", "datasets", "datasetUrl"]; 141 //var data = ["lvl", "name", "color", "description", "logoUrl", "datasets", "datasetUrl"];
143 var data = ["", d.name, d.color, "", "", d.value, ""]; 142 var data = ["", d.name, d.color, "", "", d.value, ""];
  143 + console.log(d);
144 data[2] = ["#000000"]; 144 data[2] = ["#000000"];
145 var id = d.name.split(':')[1]; 145 var id = d.name.split(':')[1];
146 if (d.depth == 1) { 146 if (d.depth == 1) {