Commit 8afca675f63f12e5879e1ac6fb148190c99ec0f6
1 parent
1c44cfb8
title-description
Showing
17 changed files
with
36 additions
and
63 deletions
controllets/datalet-selection-controllet/datalet-selection-controllet.html
| @@ -560,18 +560,17 @@ | @@ -560,18 +560,17 @@ | ||
| 560 | ComponentService.deep_url = this.deepUrl; | 560 | ComponentService.deep_url = this.deepUrl; |
| 561 | ComponentService.getComponent(dataletParams); | 561 | ComponentService.getComponent(dataletParams); |
| 562 | 562 | ||
| 563 | - console.log(this.params); | 563 | +// console.log(this.params); |
| 564 | 564 | ||
| 565 | - //300??? | ||
| 566 | 565 | ||
| 567 | - this.async(function(){ | ||
| 568 | - if(this.$.datalet_selection_datalet_placeholder.children[1]) | ||
| 569 | - this.$.datalet_selection_datalet_placeholder.children[1].behavior.setParameters(this.params); | ||
| 570 | - this.$.add_button.removeAttribute("disabled"); | ||
| 571 | - }, 300); | 566 | +// this.async(function(){ |
| 567 | +// if(this.$.datalet_selection_datalet_placeholder.children[1]) | ||
| 568 | +// this.$.datalet_selection_datalet_placeholder.children[1].behavior.setParameters(this.params); | ||
| 569 | +// this.$.add_button.removeAttribute("disabled"); | ||
| 570 | +// }, 300); | ||
| 572 | 571 | ||
| 573 | // this.async(function(){this.$.add_button.removeAttribute("disabled");}, 300); | 572 | // this.async(function(){this.$.add_button.removeAttribute("disabled");}, 300); |
| 574 | -// this.$.add_button.removeAttribute("disabled"); | 573 | + this.$.add_button.removeAttribute("disabled"); |
| 575 | }, | 574 | }, |
| 576 | 575 | ||
| 577 | _addDatalet : function(){ | 576 | _addDatalet : function(){ |
controllets/dataset-selection-controllet/dataset-selection-controllet.html
| @@ -281,7 +281,7 @@ | @@ -281,7 +281,7 @@ | ||
| 281 | var h = $("#material_container").height() - 48; | 281 | var h = $("#material_container").height() - 48; |
| 282 | var w = $("#material_container").width(); | 282 | var w = $("#material_container").width(); |
| 283 | // /oxwall_x.y.z | 283 | // /oxwall_x.y.z |
| 284 | - this.$.div_datasetexplorer.innerHTML = "<datasetexplorer-datalet width=\""+w+"\" height=\""+h+"\" data-url=\"/oxwall_x.y.z/openwall/api/datasetTree\" fields='[\"result,provider_name\",\"result,organization_name\",\"result,package_name\",\"result,resource_name\",\"result,url\",\"result,w\"]'></datasetexplorer-datalet>"; | 284 | + 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>"; |
| 285 | }, | 285 | }, |
| 286 | 286 | ||
| 287 | _selectDataUrl_treeMap : function(e) { | 287 | _selectDataUrl_treeMap : function(e) { |
datalets/areachart-datalet/areachart-datalet.html
| @@ -50,7 +50,7 @@ Example: | @@ -50,7 +50,7 @@ Example: | ||
| 50 | 50 | ||
| 51 | <dom-module id="areachart-datalet"> | 51 | <dom-module id="areachart-datalet"> |
| 52 | <template> | 52 | <template> |
| 53 | - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}"></highcharts-datalet> | 53 | + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}"></highcharts-datalet> |
| 54 | </template> | 54 | </template> |
| 55 | <script> | 55 | <script> |
| 56 | 56 |
datalets/barchart-datalet/barchart-datalet.html
| @@ -50,7 +50,7 @@ Example: | @@ -50,7 +50,7 @@ Example: | ||
| 50 | 50 | ||
| 51 | <dom-module name="barchart-datalet"> | 51 | <dom-module name="barchart-datalet"> |
| 52 | <template> | 52 | <template> |
| 53 | - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></highcharts-datalet> | 53 | + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet> |
| 54 | </template> | 54 | </template> |
| 55 | <script> | 55 | <script> |
| 56 | 56 | ||
| @@ -117,7 +117,6 @@ Example: | @@ -117,7 +117,6 @@ Example: | ||
| 117 | } | 117 | } |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
| 120 | - | ||
| 121 | BarchartDatalet = Polymer({ | 120 | BarchartDatalet = Polymer({ |
| 122 | is: 'barchart-datalet', | 121 | is: 'barchart-datalet', |
| 123 | 122 | ||
| @@ -176,7 +175,6 @@ Example: | @@ -176,7 +175,6 @@ Example: | ||
| 176 | * @method ready | 175 | * @method ready |
| 177 | */ | 176 | */ |
| 178 | ready: function(){ | 177 | ready: function(){ |
| 179 | - | ||
| 180 | this.behavior = $.extend(true, {}, HighchartsComponentBehavior, BarchartBehavior); | 178 | this.behavior = $.extend(true, {}, HighchartsComponentBehavior, BarchartBehavior); |
| 181 | this.async(function(){this.behavior.init(this)},0); | 179 | this.async(function(){this.behavior.init(this)},0); |
| 182 | } | 180 | } |
datalets/base-ajax-json-jsonpath-datalet/base-ajax-json-jsonpath-datalet.html
| @@ -52,7 +52,7 @@ Example : | @@ -52,7 +52,7 @@ Example : | ||
| 52 | 52 | ||
| 53 | <dom-module id="base-ajax-json-jsonpath-datalet"> | 53 | <dom-module id="base-ajax-json-jsonpath-datalet"> |
| 54 | <template> | 54 | <template> |
| 55 | - <base-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></base-datalet> | 55 | + <base-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-datalet> |
| 56 | </template> | 56 | </template> |
| 57 | 57 | ||
| 58 | <script src="static/js/vendor/jsonpath-0.8.5.js"></script> | 58 | <script src="static/js/vendor/jsonpath-0.8.5.js"></script> |
datalets/base-datalet/base-datalet.html
| @@ -64,20 +64,15 @@ Example : | @@ -64,20 +64,15 @@ Example : | ||
| 64 | text-decoration: underline; | 64 | text-decoration: underline; |
| 65 | } | 65 | } |
| 66 | #base_datalet_container { | 66 | #base_datalet_container { |
| 67 | - /*display: flex;*/ | ||
| 68 | font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | 67 | font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; |
| 69 | - /*color: #212121;*/ | ||
| 70 | padding-top: 2px; | 68 | padding-top: 2px; |
| 71 | - /*padding: 16px;*/ | ||
| 72 | border-top: 2px solid #B6B6B6; | 69 | border-top: 2px solid #B6B6B6; |
| 73 | } | 70 | } |
| 74 | #base_datalet_rtp { | 71 | #base_datalet_rtp { |
| 75 | - /*background-color: red;*/ | ||
| 76 | display: flex; | 72 | display: flex; |
| 77 | padding-top: 4px; | 73 | padding-top: 4px; |
| 78 | } | 74 | } |
| 79 | #rtp { | 75 | #rtp { |
| 80 | - /*width: 152px;*/ | ||
| 81 | padding-top: 8px; | 76 | padding-top: 8px; |
| 82 | padding-right: 8px; | 77 | padding-right: 8px; |
| 83 | font-size: small; | 78 | font-size: small; |
| @@ -135,20 +130,6 @@ Example : | @@ -135,20 +130,6 @@ Example : | ||
| 135 | BaseDatalet = Polymer({ | 130 | BaseDatalet = Polymer({ |
| 136 | is: 'base-datalet', | 131 | is: 'base-datalet', |
| 137 | 132 | ||
| 138 | - properties: { | ||
| 139 | - | ||
| 140 | - title : { | ||
| 141 | - type : String, | ||
| 142 | - value : "" | ||
| 143 | - }, | ||
| 144 | - | ||
| 145 | - description : { | ||
| 146 | - type : String, | ||
| 147 | - value : "" | ||
| 148 | - } | ||
| 149 | - | ||
| 150 | - }, | ||
| 151 | - | ||
| 152 | objectDatalet: { | 133 | objectDatalet: { |
| 153 | /** | 134 | /** |
| 154 | * It contains the json data from async xhr call returned from core-ajax core component | 135 | * It contains the json data from async xhr call returned from core-ajax core component |
| @@ -166,22 +147,6 @@ Example : | @@ -166,22 +147,6 @@ Example : | ||
| 166 | hideFooter: function() { | 147 | hideFooter: function() { |
| 167 | this.$.base_datalet_container.innerHTML = ""; | 148 | this.$.base_datalet_container.innerHTML = ""; |
| 168 | this.$.base_datalet_container.style.border = 0; | 149 | this.$.base_datalet_container.style.border = 0; |
| 169 | - | ||
| 170 | -// this.$.base_datalet_source_link.innerHTML = ""; | ||
| 171 | -// this.$.base_datalet_rtp.innerHTML = ""; | ||
| 172 | - }, | ||
| 173 | - | ||
| 174 | - setFooter: function(title, description) { | ||
| 175 | - this.title = title; | ||
| 176 | - if(title != "" && description != "") | ||
| 177 | - this.description = "- " + description; | ||
| 178 | - else | ||
| 179 | - this.description = description; | ||
| 180 | - | ||
| 181 | - if (this.title == "" && this.description == "") | ||
| 182 | - this.$.base_datalet_title_description.style.display = "none"; | ||
| 183 | - else | ||
| 184 | - this.$.base_datalet_title_description.style.display = "block"; | ||
| 185 | }, | 150 | }, |
| 186 | 151 | ||
| 187 | /** | 152 | /** |
| @@ -195,7 +160,14 @@ Example : | @@ -195,7 +160,14 @@ Example : | ||
| 195 | * from the entire URL and set the text content of the datalet footer. | 160 | * from the entire URL and set the text content of the datalet footer. |
| 196 | * @method ready | 161 | * @method ready |
| 197 | */ | 162 | */ |
| 163 | + | ||
| 164 | + attached: function(){ | ||
| 165 | + if(this.title != "" && this.description != "") | ||
| 166 | + this.description = "- " + this.description; | ||
| 167 | + }, | ||
| 168 | + | ||
| 198 | ready: function(){ | 169 | ready: function(){ |
| 170 | + | ||
| 199 | if(this.dataUrl != undefined) { | 171 | if(this.dataUrl != undefined) { |
| 200 | 172 | ||
| 201 | //cKan organized with or not catalog | 173 | //cKan organized with or not catalog |
datalets/base-datalet/static/js/BaseDataletBehavior.js
| @@ -78,7 +78,8 @@ var BaseDataletBehavior ={ | @@ -78,7 +78,8 @@ var BaseDataletBehavior ={ | ||
| 78 | 78 | ||
| 79 | setParameters: function(params) | 79 | setParameters: function(params) |
| 80 | { | 80 | { |
| 81 | - $(this._component).find("base-datalet")[0].setFooter(params['title'], params['description']); | ||
| 82 | - }, | 81 | + this.title = params['title']; |
| 82 | + this.description = params['description']; | ||
| 83 | + } | ||
| 83 | 84 | ||
| 84 | }; | 85 | }; |
| 85 | \ No newline at end of file | 86 | \ No newline at end of file |
datalets/bubble3d-datalet/bubble3d-datalet.html
| @@ -59,7 +59,7 @@ Examples: | @@ -59,7 +59,7 @@ Examples: | ||
| 59 | 59 | ||
| 60 | <dom-module name="bubble3d-datalet"> | 60 | <dom-module name="bubble3d-datalet"> |
| 61 | <template> | 61 | <template> |
| 62 | - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></highcharts-datalet> | 62 | + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet> |
| 63 | </template> | 63 | </template> |
| 64 | <script> | 64 | <script> |
| 65 | 65 |
datalets/column3Dchart-datalet/column3Dchart-datalet.html
| @@ -59,7 +59,7 @@ Example: | @@ -59,7 +59,7 @@ Example: | ||
| 59 | <tr><td>Alpha Angle</td><td><input id="R0" type="range" min="0" max="45" value="15"/> <span id="R0-value" class="value"></span></td></tr> | 59 | <tr><td>Alpha Angle</td><td><input id="R0" type="range" min="0" max="45" value="15"/> <span id="R0-value" class="value"></span></td></tr> |
| 60 | <tr><td>Beta Angle</td><td><input id="R1" type="range" min="0" max="45" value="15"/> <span id="R1-value" class="value"></span></td></tr> | 60 | <tr><td>Beta Angle</td><td><input id="R1" type="range" min="0" max="45" value="15"/> <span id="R1-value" class="value"></span></td></tr> |
| 61 | </table> | 61 | </table> |
| 62 | - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></highcharts-datalet> | 62 | + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet> |
| 63 | </template> | 63 | </template> |
| 64 | 64 | ||
| 65 | <script> | 65 | <script> |
datalets/columnchart-datalet/columnchart-datalet.html
| @@ -50,7 +50,7 @@ Example: | @@ -50,7 +50,7 @@ Example: | ||
| 50 | 50 | ||
| 51 | <dom-module id="columnchart-datalet"> | 51 | <dom-module id="columnchart-datalet"> |
| 52 | <template> | 52 | <template> |
| 53 | - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></highcharts-datalet> | 53 | + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet> |
| 54 | </template> | 54 | </template> |
| 55 | <script> | 55 | <script> |
| 56 | 56 |
datalets/datatable-datalet/datatable-datalet.html
| @@ -54,7 +54,7 @@ Example: | @@ -54,7 +54,7 @@ Example: | ||
| 54 | 54 | ||
| 55 | <table id="datatable" class="stripe row-border" cellspacing="0" style="height: auto; width: auto;"> | 55 | <table id="datatable" class="stripe row-border" cellspacing="0" style="height: auto; width: auto;"> |
| 56 | </table> | 56 | </table> |
| 57 | - <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></base-ajax-json-jsonpath-datalet> | 57 | + <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-ajax-json-jsonpath-datalet> |
| 58 | </template> | 58 | </template> |
| 59 | 59 | ||
| 60 | <script type="text/javascript" src="js/DataTables/datatables.js"></script> | 60 | <script type="text/javascript" src="js/DataTables/datatables.js"></script> |
datalets/donutpie3dchart-datalet/donutpie3dchart-datalet.html
| @@ -49,7 +49,7 @@ Example: | @@ -49,7 +49,7 @@ Example: | ||
| 49 | --> | 49 | --> |
| 50 | <dom-module id="donutpie3dchart-datalet"> | 50 | <dom-module id="donutpie3dchart-datalet"> |
| 51 | <template> | 51 | <template> |
| 52 | - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></highcharts-datalet> | 52 | + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet> |
| 53 | </template> | 53 | </template> |
| 54 | <script> | 54 | <script> |
| 55 | 55 |
datalets/highcharts-datalet/highcharts-datalet.html
| @@ -57,7 +57,7 @@ Example : | @@ -57,7 +57,7 @@ Example : | ||
| 57 | 57 | ||
| 58 | <template> | 58 | <template> |
| 59 | <div id="container" style="width:auto; height:auto;"></div> | 59 | <div id="container" style="width:auto; height:auto;"></div> |
| 60 | - <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></base-ajax-json-jsonpath-datalet> | 60 | + <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-ajax-json-jsonpath-datalet> |
| 61 | </template> | 61 | </template> |
| 62 | 62 | ||
| 63 | <script src="static/js/highcharts.js"></script> | 63 | <script src="static/js/highcharts.js"></script> |
| @@ -82,6 +82,7 @@ Example : | @@ -82,6 +82,7 @@ Example : | ||
| 82 | type: String, | 82 | type: String, |
| 83 | value: "line"//spline,time | 83 | value: "line"//spline,time |
| 84 | } | 84 | } |
| 85 | + | ||
| 85 | }, | 86 | }, |
| 86 | /** | 87 | /** |
| 87 | * Normalizes a number in agreement with javascript's conventions. Delete all NaN characters. Exception: number representing lat & long remain unchanged. | 88 | * Normalizes a number in agreement with javascript's conventions. Delete all NaN characters. Exception: number representing lat & long remain unchanged. |
| @@ -137,7 +138,8 @@ Example : | @@ -137,7 +138,8 @@ Example : | ||
| 137 | 138 | ||
| 138 | setParameters: function(params) | 139 | setParameters: function(params) |
| 139 | { | 140 | { |
| 140 | - $(this._component).find("base-datalet")[0].setFooter(params['title'], params['description']); | 141 | + this._component.title = params['title']; |
| 142 | + this._component.description = params['description']; | ||
| 141 | 143 | ||
| 142 | var chart = $(this._component.$.charts.$.container).highcharts(); | 144 | var chart = $(this._component.$.charts.$.container).highcharts(); |
| 143 | 145 | ||
| @@ -149,7 +151,8 @@ Example : | @@ -149,7 +151,8 @@ Example : | ||
| 149 | return this.x + '<br/><br/><span style="fill:#7cb5ec" x="8" dy="15">●</span> ' + this.series.name + ': <b>' + this.y + ' ' + params['suffix'] + '</b>'; | 151 | return this.x + '<br/><br/><span style="fill:#7cb5ec" x="8" dy="15">●</span> ' + this.series.name + ': <b>' + this.y + ' ' + params['suffix'] + '</b>'; |
| 150 | } | 152 | } |
| 151 | 153 | ||
| 152 | - }, | 154 | + } |
| 155 | + | ||
| 153 | }; | 156 | }; |
| 154 | 157 | ||
| 155 | var HighchartsComponentBehavior = $.extend(true, {}, BaseDataletBehavior, WorkcycleBehavior, AjaxJsonJsonPathBehavior, HighchartsBehavior); | 158 | var HighchartsComponentBehavior = $.extend(true, {}, BaseDataletBehavior, WorkcycleBehavior, AjaxJsonJsonPathBehavior, HighchartsBehavior); |
datalets/leafletjs-datalet/leafletjs-datalet.html
| @@ -56,7 +56,7 @@ Example: | @@ -56,7 +56,7 @@ Example: | ||
| 56 | </style> | 56 | </style> |
| 57 | 57 | ||
| 58 | <div id="leafletjs"></div> | 58 | <div id="leafletjs"></div> |
| 59 | - <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></base-ajax-json-jsonpath-datalet> | 59 | + <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-ajax-json-jsonpath-datalet> |
| 60 | 60 | ||
| 61 | </template> | 61 | </template> |
| 62 | 62 |
datalets/linechart-datalet/linechart-datalet.html
| @@ -50,7 +50,7 @@ Example: | @@ -50,7 +50,7 @@ Example: | ||
| 50 | 50 | ||
| 51 | <dom-module id="linechart-datalet"> | 51 | <dom-module id="linechart-datalet"> |
| 52 | <template> | 52 | <template> |
| 53 | - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></highcharts-datalet> | 53 | + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet> |
| 54 | </template> | 54 | </template> |
| 55 | <script> | 55 | <script> |
| 56 | 56 |
datalets/piechart-datalet/piechart-datalet.html
| @@ -49,7 +49,7 @@ Example: | @@ -49,7 +49,7 @@ Example: | ||
| 49 | --> | 49 | --> |
| 50 | <dom-module id="piechart-datalet"> | 50 | <dom-module id="piechart-datalet"> |
| 51 | <template> | 51 | <template> |
| 52 | - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></highcharts-datalet> | 52 | + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet> |
| 53 | </template> | 53 | </template> |
| 54 | <script> | 54 | <script> |
| 55 | 55 |
datalets/treemap-datalet/treemap-datalet.html
| @@ -105,7 +105,7 @@ Example: | @@ -105,7 +105,7 @@ Example: | ||
| 105 | } | 105 | } |
| 106 | </style> | 106 | </style> |
| 107 | <div id="treemap_placeholder"></div> | 107 | <div id="treemap_placeholder"></div> |
| 108 | - <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></base-ajax-json-jsonpath-datalet> | 108 | + <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-ajax-json-jsonpath-datalet> |
| 109 | </template> | 109 | </template> |
| 110 | 110 | ||
| 111 | <script src="../shared_js/d3.js"></script> | 111 | <script src="../shared_js/d3.js"></script> |