Commit 4998f64ae960f8cee8725410bcd64cd0ceacc1e7

Authored by Luigi Serra
2 parents 0e9ad951 4b79b3c8

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

controllets/datalet-selection-controllet/datalet-selection-controllet.html
... ... @@ -224,18 +224,18 @@
224 224 <div class="input_header"><span data-l10n-id="baseInfo"></span></div>
225 225  
226 226 <div class="inputs">
227   - <paper-input maxlength="32" label="title" class="base_input" on-blur="_loadDataletBlur"></paper-input>
  227 + <paper-input maxlength="32" label="title" class="base_input"></paper-input>
228 228 </div>
229 229  
230 230 <div class="inputs">
231   - <paper-textarea maxlength="100" label="description" class="base_input" on-blur="_loadDataletBlur"></paper-textarea>
  231 + <paper-textarea maxlength="100" label="description" class="base_input"></paper-textarea>
232 232 </div>
233 233  
234 234 <div class="input_header"><span data-l10n-id="layouts"></span></div>
235 235  
236 236 <template is="dom-repeat" items="{{labels}}" index-as="index">
237 237 <div class="inputs">
238   - <paper-input label={{item.name}} on-blur="_loadDataletBlur"></paper-input>
  238 + <paper-input label={{item.name}}></paper-input>
239 239 <div class="info_button">
240 240 <paper-icon-button id="info_button" on-click="_showInfo" icon="info-outline" title="{{item.name}} info"></paper-icon-button>
241 241 </div>
... ... @@ -348,10 +348,17 @@
348 348 },
349 349  
350 350 listeners: {
351   - 'items-vslider-controllet_selected-datalet': '_selectDatalet'
  351 + 'items-vslider-controllet_selected-datalet': '_selectDatalet',
352 352 // 'tree-view-controllet_selected-fields': '_updateSelectedFields'
  353 + 'change': '_loadDataletBlur'
353 354 },
354 355  
  356 +// aaaaaaaaaa : function() {
  357 +// console.log("AAAAAAAAAAAAAAAAAAAAAAAA");
  358 +// },
  359 +
  360 +// change in highchart e chart a gruppi
  361 +
355 362 ready : function() {//console.log(this.dataletPreset);
356 363 this._resize();
357 364 $(this.$.datalet_selection_inputs).perfectScrollbar();
... ... @@ -503,7 +510,7 @@
503 510  
504 511 },
505 512  
506   - _loadDataletBlur : function(){//da eliminare
  513 + _loadDataletBlur : function(e){//da eliminare
507 514  
508 515 var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea");
509 516 for (var i = 0; i < labels.length; i++)
... ... @@ -513,7 +520,9 @@
513 520 for (var i = 0; i < labels.length; i++)
514 521 this.params[labels[i].label] = labels[i].value;
515 522  
516   - var dataletParams ={
  523 +// console.log(e.target);
  524 +
  525 + /*var dataletParams ={
517 526 component : this.selectedDatalet+"-datalet",
518 527 params : this.params,
519 528 fields : this.selectedFields,
... ... @@ -521,9 +530,11 @@
521 530 };
522 531  
523 532 ComponentService.deep_url = this.deepUrl;
524   - ComponentService.getComponent(dataletParams);
  533 + ComponentService.getComponent(dataletParams);*/
525 534  
526 535 // this.async(function(){this.$.add_button.removeAttribute("disabled");}, 1111);
  536 + if(this.$.datalet_selection_datalet_placeholder.children[1])
  537 + this.$.datalet_selection_datalet_placeholder.children[1].behavior.setParameters(this.params);
527 538 },
528 539  
529 540 _loadDatalet : function(selectedFields){
... ...
datalets/barchart-datalet/barchart-datalet.html
... ... @@ -2,7 +2,7 @@
2 2 @license
3 3 The MIT License (MIT)
4 4  
5   - Copyright (c) 2015 Dipartimento di Informatica - Università di Salerno - Italy
  5 + Copyright (c) 2015 Dipartimento di Informatica - Universit� di Salerno - Italy
6 6  
7 7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 8 of this software and associated documentation files (the "Software"), to deal
... ... @@ -57,6 +57,22 @@ Example:
57 57 var BarchartBehavior = {
58 58  
59 59  
  60 + setParameters: function(params)
  61 + {
  62 + //"description\":\"d\",\"title\":\"coseeee\",\"x-axis-label\":\"x\",\"y-axis-label\":\"y\",\"suffix\":\"e\"}'
  63 + this._component.chart.setTitle({text: params.title});
  64 + this._component.chart.xAxis[0].setTitle({text: params['x-axis-label']});
  65 + this._component.chart.yAxis[0].setTitle({text: params['y-axis-label']});
  66 +
  67 +
  68 + /*this._component.chart.tooltip.options.formatter = function() {
  69 + $.each(this.points,function(){
  70 + console.log(this.points);
  71 + });
  72 + return 'a';
  73 + }*/
  74 + },
  75 +
60 76 /**
61 77 * Bluid Highchart object
62 78 *
... ... @@ -114,6 +130,8 @@ Example:
114 130 },
115 131 series: this.properties.series.value
116 132 });
  133 +
  134 + this._component.chart = $(this._component.$.charts.$.container).highcharts();
117 135 }
118 136 };
119 137  
... ... @@ -176,6 +194,17 @@ Example:
176 194 behavior : {
177 195 type : Object,
178 196 value : {}
  197 + },
  198 + /**
  199 + * It's the component chart
  200 + *
  201 + * @attribute chart
  202 + * @type Object
  203 + * @default {}
  204 + */
  205 + chart : {
  206 + type : Object,
  207 + value : {}
179 208 }
180 209 },
181 210  
... ...
datalets/base-datalet/base-datalet.html
... ... @@ -120,12 +120,12 @@ Example :
120 120  
121 121 title : {
122 122 type : String,
123   - value : undefined
  123 + value : ""
124 124 },
125 125  
126 126 description : {
127 127 type : String,
128   - value : undefined
  128 + value : ""
129 129 }
130 130  
131 131 },
... ...