From e0e4a976d80f2a0c8112e9e5d009c1bbaf86dfb6 Mon Sep 17 00:00:00 2001 From: Renato De Donato Date: Thu, 26 Nov 2015 15:26:56 +0100 Subject: [PATCH] data-sevc-controlled: MODIFY-view + michellaneus --- controllets/data-sevc-controllet/data-sevc-controllet.html | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++------------ controllets/data-sevc-controllet/data-sevc-controllet_ddr.html | 124 ---------------------------------------------------------------------------------------------------------------------------- controllets/data-sevc-controllet/demo/index.html | 3 +++ controllets/datalet-selection-controllet/datalet-selection-controllet.html | 285 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------------- controllets/dataset-selection-controllet/dataset-selection-controllet.html | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------- controllets/dataset-selection-controllet/paper-input-search.html | 4 ++-- controllets/items-vslider-controllet/items-vslider-controllet.html | 22 ++++++++++++++++++++-- controllets/items-vslider-controllet/items-vslider-controllet2.html | 299 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- controllets/items-vslider-controllet/items-vslider-controllet3.html | 458 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- controllets/multi-table-controllet/multi-table-controllet.html | 2 +- controllets/page-slider-controllet/page-slider-controllet.html | 11 +++++++++++ controllets/tree-view-multi-table-controllet/tree-view-multi-table-controllet.html | 4 ++-- datalets/dynamic-datatable-datalet/datatable-datalet.html | 141 --------------------------------------------------------------------------------------------------------------------------------------------- datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 14 files changed, 502 insertions(+), 1175 deletions(-) delete mode 100755 controllets/data-sevc-controllet/data-sevc-controllet_ddr.html delete mode 100755 controllets/items-vslider-controllet/items-vslider-controllet2.html delete mode 100755 controllets/items-vslider-controllet/items-vslider-controllet3.html delete mode 100755 datalets/dynamic-datatable-datalet/datatable-datalet.html create mode 100755 datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html diff --git a/controllets/data-sevc-controllet/data-sevc-controllet.html b/controllets/data-sevc-controllet/data-sevc-controllet.html index 6010de7..8330826 100755 --- a/controllets/data-sevc-controllet/data-sevc-controllet.html +++ b/controllets/data-sevc-controllet/data-sevc-controllet.html @@ -19,20 +19,20 @@ - - - + - + - + @@ -69,6 +69,11 @@ value : undefined }, + suggestedDatasets : { + type : Array, + value : undefined + }, + dataUrl : { type : String, value : undefined @@ -77,11 +82,38 @@ jsonData : { type : Object, value : undefined + }, + + modify : { + type : Boolean, + value : false + }, + + selectedDatalet : { + type : String, + value : undefined + }, + + selectedFields : { + type : Array, + value : [] + }, + + dataletPreset : { + type : Object, + value : [] } }, ready : function(){ + if(this.selectedDatalet){ + this.modify = true; + this.$.slider.selected = 1; +// console.log(this.selectedDatalet); + this.dataUrl = this.dataletPreset["data-url"]; + + } }, _updateSlider : function(e){ @@ -90,18 +122,27 @@ slider.setTitle("SELECT DATASET", "Search or copy and paste the url of dataset."); slider.chevronLeft("invisible"); slider.chevronRight(false); - this.$.dataset_selection._fireDataUrl(); -// http://designpieces.com/palette/google-new-logo-2015-color-palette-hex-and-rgb/ - break; + if(slider.getPrevSelected() == 1) + slider.chevronRight(true); + +// this.$.dataset_selection._fireDataUrl(); +// console.log(this.$.dataset_selection); + break; case 1: - slider.setTitle("SELECT FIELDS", "Select the fields from tree-view. The multi-table will show the values related to the selected fields."); - slider.chevronLeft(true); + 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"); + } + else{ + slider.chevronLeft(true); + } slider.chevronRight(false); this.$.tree_view_multi_table.ready(); - this._allowThirdStep({detail: {fields: tree_view_multi_table.getFlatFields()}}) + this._allowThirdStep({detail: {fields: tree_view_multi_table.getFlatFields()}}); break; case 2: - slider.setTitle("SELECT DATALET", "Select a visualization, fill out inputs and labels (optional)."); + slider.setTitle("SELECT VISUALIZATION", "Select a visualization, fill out inputs and labels (optional)."); slider.chevronLeft(true); slider.chevronRight("invisible"); //reset when? @@ -126,6 +167,8 @@ slider.chevronRight(false); } }); + + this.$.datalet_selection.reset(); }, _allowThirdStep : function(e){ diff --git a/controllets/data-sevc-controllet/data-sevc-controllet_ddr.html b/controllets/data-sevc-controllet/data-sevc-controllet_ddr.html deleted file mode 100755 index 975f416..0000000 --- a/controllets/data-sevc-controllet/data-sevc-controllet_ddr.html +++ /dev/null @@ -1,124 +0,0 @@ -/******************************************************************************************************************************** - - - - -/******************************************************************************************************************************** - - - - - - - - - - - - - - \ No newline at end of file diff --git a/controllets/data-sevc-controllet/demo/index.html b/controllets/data-sevc-controllet/demo/index.html index 38b5160..0335139 100755 --- a/controllets/data-sevc-controllet/demo/index.html +++ b/controllets/data-sevc-controllet/demo/index.html @@ -39,9 +39,12 @@ var dataset2 = {description: "", name: "Klassen", url: "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=dfd27de5-0790-466c-af59-6a82509e7fbb"}; var dataset3 = {description: "descrizione bellissima purissima levissima sbiricuda antani", name: "Derelict Sites", url: "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=fcbee83e-3d3d-4303-a568-24dd33d02adc"}; var datasets = [dataset1, dataset2, dataset3]; + var s_datasets = [dataset1, dataset3]; var dsc = document.getElementById('dsc'); dsc.setAttribute("datasets", JSON.stringify(datasets)); + + dsc.setAttribute("suggested-datasets", JSON.stringify(s_datasets)); diff --git a/controllets/datalet-selection-controllet/datalet-selection-controllet.html b/controllets/datalet-selection-controllet/datalet-selection-controllet.html index 6b3d76d..679a49b 100755 --- a/controllets/datalet-selection-controllet/datalet-selection-controllet.html +++ b/controllets/datalet-selection-controllet/datalet-selection-controllet.html @@ -23,6 +23,11 @@ - - - - \ No newline at end of file diff --git a/controllets/items-vslider-controllet/items-vslider-controllet3.html b/controllets/items-vslider-controllet/items-vslider-controllet3.html deleted file mode 100755 index b0c0ec1..0000000 --- a/controllets/items-vslider-controllet/items-vslider-controllet3.html +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/controllets/multi-table-controllet/multi-table-controllet.html b/controllets/multi-table-controllet/multi-table-controllet.html index 43d501a..6f4d463 100755 --- a/controllets/multi-table-controllet/multi-table-controllet.html +++ b/controllets/multi-table-controllet/multi-table-controllet.html @@ -7,7 +7,7 @@ - + diff --git a/controllets/page-slider-controllet/page-slider-controllet.html b/controllets/page-slider-controllet/page-slider-controllet.html index e69c522..51dea2b 100755 --- a/controllets/page-slider-controllet/page-slider-controllet.html +++ b/controllets/page-slider-controllet/page-slider-controllet.html @@ -123,6 +123,11 @@ value : 0 }, + prevSelected : { + type : Number, + value : 0 + }, + pages : { type : Number, value : document.querySelectorAll('neon-animatable').length @@ -190,6 +195,10 @@ buttons[1].setAttribute("disabled", "true"); }, + getPrevSelected : function() { + return this.prevSelected; + }, + _onPrevClick : function() { var buttons = document.getElementsByTagName("paper-icon-button"); buttons[0].setAttribute("disabled", "true"); @@ -198,6 +207,7 @@ this.entryAnimation = 'slide-from-left-animation'; this.exitAnimation = 'slide-right-animation'; + this.prevSelected = this.selected; this.selected = this.selected === 0 ? (this.pages-1) : (this.selected - 1); }, @@ -209,6 +219,7 @@ this.entryAnimation = 'slide-from-right-animation'; this.exitAnimation = 'slide-left-animation'; + this.prevSelected = this.selected; this.selected = this.selected === (this.pages-1) ? 0 : (this.selected + 1); }, diff --git a/controllets/tree-view-multi-table-controllet/tree-view-multi-table-controllet.html b/controllets/tree-view-multi-table-controllet/tree-view-multi-table-controllet.html index 0cf2d52..265f953 100755 --- a/controllets/tree-view-multi-table-controllet/tree-view-multi-table-controllet.html +++ b/controllets/tree-view-multi-table-controllet/tree-view-multi-table-controllet.html @@ -117,8 +117,8 @@ }, _filterJson : function(data){ - console.log(data); - console.log(this.dataUrl); +// console.log(data); +// console.log(this.dataUrl); if(data.result != undefined && data.result.resource_id != undefined) { this.rootName = "result,records" return data.result.records; diff --git a/datalets/dynamic-datatable-datalet/datatable-datalet.html b/datalets/dynamic-datatable-datalet/datatable-datalet.html deleted file mode 100755 index 7c1e925..0000000 --- a/datalets/dynamic-datatable-datalet/datatable-datalet.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html b/datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html new file mode 100755 index 0000000..7c1e925 --- /dev/null +++ b/datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + -- libgit2 0.21.4