From 0b7cbd3379a95013b5815e0f0130e04b735090bb Mon Sep 17 00:00:00 2001 From: Renato De Donato Date: Mon, 14 Dec 2015 17:31:15 +0100 Subject: [PATCH] title-desciption --- controllets/data-sevc-controllet/data-sevc-controllet.html | 2 +- controllets/datalet-selection-controllet/datalet-selection-controllet.html | 52 +++++++++++++++++++++++++++++++++++----------------- controllets/dataset-selection-controllet/dataset-selection-controllet.html | 2 +- datalets/base-datalet/base-datalet.html | 55 ++++++++++++++++++++++++++++++------------------------- datalets/base-datalet/static/js/BaseDataletBehavior.js | 9 +++++++-- datalets/base-datalet/static/js/BaseDataletBehaviors.js | 153 --------------------------------------------------------------------------------------------------------------------------------------------------------- datalets/datasetexplorer-datalet/datasetexplorer-datalet.html | 7 ++++--- datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html | 2 ++ datalets/highcharts-datalet/highcharts-datalet.html | 2 ++ 9 files changed, 82 insertions(+), 202 deletions(-) delete mode 100755 datalets/base-datalet/static/js/BaseDataletBehaviors.js diff --git a/controllets/data-sevc-controllet/data-sevc-controllet.html b/controllets/data-sevc-controllet/data-sevc-controllet.html index 202e580..cf2c312 100755 --- a/controllets/data-sevc-controllet/data-sevc-controllet.html +++ b/controllets/data-sevc-controllet/data-sevc-controllet.html @@ -135,7 +135,7 @@ // slider.setTitle("SELECT DATA", "Select the fields from tree-view. The multi-table will show the values related to the selected fields."); if(this.modify){ slider.chevronLeft("invisible"); - slider.setAvatar("2"); +// slider.setAvatar("2"); } else{ slider.chevronLeft(true); diff --git a/controllets/datalet-selection-controllet/datalet-selection-controllet.html b/controllets/datalet-selection-controllet/datalet-selection-controllet.html index 28a9fda..1f6d0f4 100755 --- a/controllets/datalet-selection-controllet/datalet-selection-controllet.html +++ b/controllets/datalet-selection-controllet/datalet-selection-controllet.html @@ -209,7 +209,7 @@ @@ -374,8 +374,10 @@ //this.modify = true;//da eliminare in futuro if(this.preselectedDatalet){ + if(this.modify) + this._preselectDatalet(); + this.modify = true; - this._preselectDatalet(); this.preselectedDatalet = undefined; } }, @@ -425,22 +427,29 @@ }, _preselectDatalet : function() { + this.type = "undefined"; + this.$.selectedDatalet_request.url = this.deepUrl + this.preselectedDatalet + "-datalet"; + this.$.selectedDatalet_request.generateRequest(); + this.selectedDatalet = this.preselectedDatalet; this.selectedFields = this._copy(this.fields); - var inputs = document.getElementsByTagName("paper-dropdown-menu"); - for(var i=0; i < inputs.length; i++) - $(inputs[i]).find("paper-menu")[0].select(i); + this.async(function() { + this.selectedFields = this._copy(this.fields); - //set info labels options - var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); - for (var i = 0; i < labels.length; i++) - labels[i].value = this.dataletPreset[labels[i].label]; + var inputs = document.getElementsByTagName("paper-dropdown-menu"); + for (var i = 0; i < inputs.length; i++) + $(inputs[i]).find("paper-menu")[0].select(i); - var labels = this.$.datalet_selection_labels.querySelectorAll("paper-input"); - for (var i = 0; i < labels.length; i++) - labels[i].value = this.dataletPreset[labels[i].label]; + //set info labels options + var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); + for (var i = 0; i < labels.length; i++) + labels[i].value = this.dataletPreset[labels[i].label]; + var labels = this.$.datalet_selection_labels.querySelectorAll("paper-input"); + for (var i = 0; i < labels.length; i++) + labels[i].value = this.dataletPreset[labels[i].label]; + }, 300); this.loadPreview = true; this._loadDatalet(this.selectedFields); @@ -461,6 +470,7 @@ var selection = inputs.selection; inputs = []; for (var i in this.fields) +// for (var i = 0; i < Math.max(this.fields.length, 8); i++)//error inputs.push({name: name + " " + i, description: description, selection: selection}); } @@ -482,8 +492,12 @@ _addInput : function(e){ var selectedFields = this._copy(this.selectedFields); - var index = $(e.target).parents("paper-dropdown-menu")[0].id; - selectedFields[index] = e.target.innerHTML.trim(); +// var index = $(e.target).parents("paper-dropdown-menu")[0].id; +// selectedFields[index] = e.target.innerHTML.trim(); + + var ddl_index = $(e.target).parents("paper-dropdown-menu")[0].id; + var index = e.target.id; + selectedFields[ddl_index] = this.fields[index]; this.selectedFields = this._copy(selectedFields); @@ -546,8 +560,12 @@ ComponentService.deep_url = this.deepUrl; ComponentService.getComponent(dataletParams); -// this.async(function(){this.$.add_button.removeAttribute("disabled");}, 1000); - this.$.add_button.removeAttribute("disabled"); + //300??? + if(this.$.datalet_selection_datalet_placeholder.children[1]) + this.async(function(){this.$.datalet_selection_datalet_placeholder.children[1].behavior.setParameters(this.params)}, 300); + this.async(function(){this.$.add_button.removeAttribute("disabled");}, 300); + +// this.$.add_button.removeAttribute("disabled"); }, _addDatalet : function(){ @@ -557,7 +575,7 @@ if(this.selectedFields[i]) selectedFields.push(this.selectedFields[i]); - console.log(this.params); +// console.log(this.params); var data = { dataUrl : this.dataUrl, diff --git a/controllets/dataset-selection-controllet/dataset-selection-controllet.html b/controllets/dataset-selection-controllet/dataset-selection-controllet.html index 47387cf..80e7b2a 100755 --- a/controllets/dataset-selection-controllet/dataset-selection-controllet.html +++ b/controllets/dataset-selection-controllet/dataset-selection-controllet.html @@ -281,7 +281,7 @@ var h = $("#material_container").height() - 48; var w = $("#material_container").width(); // /oxwall_x.y.z - this.$.div_datasetexplorer.innerHTML = ""; + this.$.div_datasetexplorer.innerHTML = ""; }, _selectDataUrl_treeMap : function(e) { diff --git a/datalets/base-datalet/base-datalet.html b/datalets/base-datalet/base-datalet.html index cfc277b..030d8e6 100755 --- a/datalets/base-datalet/base-datalet.html +++ b/datalets/base-datalet/base-datalet.html @@ -83,22 +83,26 @@ Example : font-size: small; } #rtpalogo { - height:32px; + height: 32px; width: 32px; } #base_datalet_spin { - height:64px; + height: 64px; width: 100%; + margin-top: 64px; } - /*#base_datalet_info{*/ - /*padding-top: 8px;*/ - /*/!*background-color: green;*!/*/ - /*width: 100%;*/ - /*/!*font-size: small;*!/*/ - /*}*/ + #base_datalet_source_link{ padding-top: 12px; } + + #span_title{ + font-size: small; + } + + #span_description{ + color: #727272; + }
@@ -108,7 +112,7 @@ Example :
- {{title}} - {{description}} + {{title}} {{description}}