Commit 025ed52bef98ad70489c217ba1dd5ce79d06558e
1 parent
07d13c9c
fix
Showing
1 changed file
with
8 additions
and
43 deletions
controllets/dataset-selection-controllet/dataset-selection-controllet.html
... | ... | @@ -56,22 +56,12 @@ |
56 | 56 | color: #B6B6B6; |
57 | 57 | } |
58 | 58 | |
59 | - /*paper-dropdown-menu {*/ | |
60 | - /*width: 45%;*/ | |
61 | - /*margin-bottom: 32px;*/ | |
62 | - /*--paper-input-container-focus-color: #2196F3;*/ | |
63 | - /*}*/ | |
64 | - | |
65 | - paper-input-search { | |
59 | + paper-dropdown-menu { | |
66 | 60 | width: 45%; |
67 | 61 | margin-bottom: 32px; |
68 | 62 | --paper-input-container-focus-color: #2196F3; |
69 | 63 | } |
70 | 64 | |
71 | - paper-input-search paper-item { | |
72 | - white-space: nowrap; | |
73 | - } | |
74 | - | |
75 | 65 | paper-item.iron-selected { |
76 | 66 | background-color: #2196F3; |
77 | 67 | color: #FFFFFF; |
... | ... | @@ -130,7 +120,7 @@ |
130 | 120 | |
131 | 121 | <paper-tabs selected="{{selected}}" on-tap="_loadTreeMap"> |
132 | 122 | <paper-tab noink>SELECT DATA SOURCE</paper-tab> |
133 | - <paper-tab noink>TREE MAP VIEW</paper-tab> | |
123 | + <paper-tab noink>TREE MAP SEARCH</paper-tab> | |
134 | 124 | <paper-tab noink disabled>MOST POPULAR</paper-tab> |
135 | 125 | </paper-tabs> |
136 | 126 | |
... | ... | @@ -139,18 +129,16 @@ |
139 | 129 | <neon-animatable> |
140 | 130 | |
141 | 131 | <div id="div_selection"> |
142 | - | |
143 | 132 | <paper-input-search label="Available datasets"> |
144 | 133 | <paper-menu class="dropdown-content"> |
145 | - <template is="dom-repeat" items={{filteredDatasets}} as="dataset"> | |
134 | + <template is="dom-repeat" items={{datasets}} as="dataset"> | |
146 | 135 | <paper-item id={{index}} on-tap="_selectDataUrl">{{dataset.name}}</paper-item> |
147 | - <!--<paper-item id={{index}} on-tap="_selectDataUrl">{{_addHTMLSpace(dataset.name)}}</paper-item>--> | |
148 | 136 | </template> |
149 | 137 | </paper-menu> |
150 | 138 | </paper-input-search> |
151 | 139 | |
152 | 140 | <paper-icon-button id="info_button" disabled on-click="_showInfo" icon="info-outline" title="dataset info"></paper-icon-button> |
153 | - <!--aggiustami anche dialog...--> | |
141 | + | |
154 | 142 | <paper-textarea id="selected_url" label="Selected url" value={{dataUrl}}></paper-textarea> |
155 | 143 | |
156 | 144 | <paper-dialog id="dialog_info"> |
... | ... | @@ -163,7 +151,7 @@ |
163 | 151 | |
164 | 152 | <neon-animatable> |
165 | 153 | <div id="div_datasetexplorer"> |
166 | - <datasetexplorer-datalet class="datasetexplorer" 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> | |
154 | + <datasetexplorer-datalet class="datasetexplorer" data-url="/openwall/api/datasetTree" fields='["result,provider_name","result,organization_name","result,package_name","result,resource_name","result,url","result,w"]'></datasetexplorer-datalet> | |
167 | 155 | </div> |
168 | 156 | </neon-animatable> |
169 | 157 | |
... | ... | @@ -194,11 +182,6 @@ |
194 | 182 | value : undefined |
195 | 183 | }, |
196 | 184 | |
197 | - filteredDatasets : { | |
198 | - type : Array, | |
199 | - value : [] | |
200 | - }, | |
201 | - | |
202 | 185 | dataUrl : { |
203 | 186 | type : String, |
204 | 187 | value : undefined, |
... | ... | @@ -208,8 +191,7 @@ |
208 | 191 | }, |
209 | 192 | |
210 | 193 | listeners: { |
211 | - 'datasetexplorer-datalet_data-url': '_selectDataUrl_treeMap', | |
212 | - 'paper-input-search_input-value' : '_filterDatasets' | |
194 | + 'datasetexplorer-datalet_data-url': '_selectDataUrl_treeMap' | |
213 | 195 | }, |
214 | 196 | |
215 | 197 | ready : function(){ |
... | ... | @@ -220,24 +202,11 @@ |
220 | 202 | this._resize(); |
221 | 203 | var that = this; |
222 | 204 | window.addEventListener("resize", function() { that._resize(); }); |
223 | - | |
224 | - this.filteredDatasets = this.datasets; | |
225 | - }, | |
226 | - | |
227 | - _filterDatasets : function(e){ | |
228 | - var filter = e.detail.inputValue; | |
229 | - var filteredDatasets = []; | |
230 | - for (var i in this.datasets){ | |
231 | - if(this.datasets[i].name.toLowerCase().indexOf(filter.toLowerCase()) != -1) | |
232 | - filteredDatasets.push(this.datasets[i]); | |
233 | - } | |
234 | - | |
235 | - this.filteredDatasets = filteredDatasets; | |
236 | 205 | }, |
237 | 206 | |
238 | 207 | _loadTreeMap : function(){ |
239 | 208 | if(this.selected == 0 && this.$.div_datasetexplorer.innerHTML == "") |
240 | - this.$.div_datasetexplorer.innerHTML = "<datasetexplorer-datalet class=\"datasetexplorer\" 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>"; | |
209 | + this.$.div_datasetexplorer.innerHTML = "<datasetexplorer-datalet class=\"datasetexplorer\" data-url=\"/openwall/api/datasetTree\" fields='[\"result,provider_name\",\"result,organization_name\",\"result,package_name\",\"result,resource_name\",\"result,url\",\"result,w\"]'></datasetexplorer-datalet>"; | |
241 | 210 | }, |
242 | 211 | |
243 | 212 | _selectDataUrl_treeMap : function(e){ |
... | ... | @@ -256,7 +225,7 @@ |
256 | 225 | }, |
257 | 226 | |
258 | 227 | _selectDataUrl : function(e){ |
259 | - var dataset = this.filteredDatasets[parseInt(e.target.id)] | |
228 | + var dataset = this.datasets[parseInt(e.target.id)] | |
260 | 229 | |
261 | 230 | this.dataUrl = dataset.url; |
262 | 231 | |
... | ... | @@ -277,10 +246,6 @@ |
277 | 246 | this.fire('dataset-selection-controllet_data-url', {url: this.dataUrl}); |
278 | 247 | }, |
279 | 248 | |
280 | -// _addHTMLSpace : function(name){ | |
281 | -// return name.replace(/ /g, ' '); | |
282 | -// }, | |
283 | - | |
284 | 249 | _resize : function(){ |
285 | 250 | var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - 16; |
286 | 251 | h = h - 64 - 8; //height with page scroller | ... | ... |