fb05b400
Renato De Donato
controllet 2.0, n...
|
1
|
<link rel="import" href="../../bower_components/polymer/polymer.html">
|
a53fbbed
Renato De Donato
select-dataset ne...
|
2
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
3
|
<link rel="import" href="../../bower_components/paper-material/paper-material.html" />
|
a53fbbed
Renato De Donato
select-dataset ne...
|
4
5
|
<link rel="import" href="../../bower_components/paper-tabs/paper-tabs.html">
<link rel="import" href="../../bower_components/paper-tabs/paper-tab.html">
|
a53fbbed
Renato De Donato
select-dataset ne...
|
6
7
8
|
<link rel="import" href="../../bower_components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="../../bower_components/paper-menu/paper-menu.html">
<link rel="import" href="../../bower_components/paper-item/paper-item.html">
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
9
10
|
<link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html">
<link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html">
|
a53fbbed
Renato De Donato
select-dataset ne...
|
11
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
12
|
<link rel="import" href="../datasets-list-controllet/datasets-list-controllet.html">
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
13
|
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
14
|
<dom-module id="select-dataset-controllet">
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
15
|
<template>
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
16
|
<style>
|
a53fbbed
Renato De Donato
select-dataset ne...
|
17
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
18
19
|
#select_dataset_container {
margin-top: 8px;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
20
21
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
22
23
24
25
|
#select_dataset_container * {
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
26
27
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
28
29
30
|
#select_dataset_container #options {
display: flex;
flex-direction: row;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
31
|
|
a53fbbed
Renato De Donato
select-dataset ne...
|
32
|
height: 48px;
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
33
34
35
|
padding: 0;
font-weight: 700;
background: #B6B6B6;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
36
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
37
|
margin-top: 2px;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
38
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
39
|
overflow: hidden;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
40
41
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
42
43
44
45
|
#select_dataset_container #options_header {
width: calc(100% - 96px);
text-align: center;
padding: 12px 0 12px 48px;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
46
47
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
48
49
50
51
|
#select_dataset_container .header_block {
width: calc((100% - 48px) / 2);
max-width: 400px;
margin-left: 12px;
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
52
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
53
|
line-height: 40px;
|
cd9f822e
Renato De Donato
split 1st step
|
54
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
55
|
display: none;
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
56
|
}
|
a53fbbed
Renato De Donato
select-dataset ne...
|
57
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
58
59
60
|
#select_dataset_container #url {
padding: 0 12px 12px 12px;
height: 60px;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
61
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
62
63
|
border: 2px solid #B6B6B6;
border-top: 0;
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
64
|
}
|
a53fbbed
Renato De Donato
select-dataset ne...
|
65
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
66
67
68
|
#select_dataset_container #datasets_list_container {
height: calc(100% - 96px - 2px - 74px);
width: 100%;
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
69
|
}
|
a53fbbed
Renato De Donato
select-dataset ne...
|
70
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
71
72
|
paper-tabs {
background: #B6B6B6;
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
73
|
}
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
74
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
75
76
77
|
paper-tab {
font-weight: 700;
border-right: 2px solid #FFFFFF;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
78
|
}
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
79
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
80
81
|
paper-tab:nth-child(2) {
border-right: 0;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
82
|
}
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
83
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
84
85
86
|
paper-tab.iron-selected {
color: #FFFFFF;
background: #2196F3;;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
87
|
}
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
88
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
89
90
|
paper-tab:not(.iron-selected):hover {
color: #2196F3;
|
cd9f822e
Renato De Donato
split 1st step
|
91
92
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
93
94
|
paper-input {
--paper-input-container-focus-color: #2196F3;
|
cd9f822e
Renato De Donato
split 1st step
|
95
96
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
97
98
99
100
|
paper-icon-button {
height: 48px;
width: 48px;
padding: 8px;
|
cd9f822e
Renato De Donato
split 1st step
|
101
102
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
103
104
105
106
|
paper-icon-button[icon="settings"] {
cursor: pointer;
color: #00BCD4;
--paper-icon-button-ink-color: #00BCD4;
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
107
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
108
109
110
111
|
background: #E0E0E0;
float: right;
position: absolute;
right: 0;
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
112
113
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
114
115
|
paper-icon-button[icon="info-outline"] {
cursor: help;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
116
|
}
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
117
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
118
119
120
121
122
123
124
|
:host {
--paper-dropdown-menu-icon: {
color: #000000;
};
--paper-dropdown-menu-ripple: {
color: #FFFFFF;
};
|
3388b02b
Renato De Donato
shadow x Andrea
|
125
126
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
127
128
129
|
paper-dropdown-menu {
width: 200px;
--paper-input-container-focus-color: #2196F3;
|
3388b02b
Renato De Donato
shadow x Andrea
|
130
131
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
132
133
134
|
paper-item {
min-width: 128px;
white-space: nowrap;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
135
136
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
137
138
139
|
paper-item.iron-selected {
background-color: #2196F3;
color: #FFFFFF;
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
140
|
}
|
a53fbbed
Renato De Donato
select-dataset ne...
|
141
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
142
143
144
|
paper-tooltip {
min-width: 400px;
--paper-tooltip-background: black;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
145
146
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
147
148
149
150
|
#select_dataset_container br {
display: block;
margin-top: 8px;
content: " ";
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
151
152
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
153
154
155
|
#select_dataset_container p {
margin: 0;
padding: 0;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
156
157
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
158
159
160
|
#select_dataset_container p .option {
color: #2196F3;;
font-weight: 700;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
161
162
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
163
|
#select_dataset_container p .description {
|
a53fbbed
Renato De Donato
select-dataset ne...
|
164
|
}
|
c5fa9cdb
Renato De Donato
info style
|
165
|
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
166
167
|
</style>
|
a53fbbed
Renato De Donato
select-dataset ne...
|
168
|
<paper-material id="select_dataset_container" elevation="5">
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
169
170
171
|
<paper-tabs selected={{tabIndex}} no-bar>
<paper-tab noink on-tap="_setProvidersDatasets"><span id="providers_datasets"></span></paper-tab>
<paper-tab noink on-tap="_setLocalDatasets"><span id="spod_users_datasets"></span></paper-tab>
|
a53fbbed
Renato De Donato
select-dataset ne...
|
172
|
</paper-tabs>
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
173
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
174
175
176
177
178
179
|
<div id="options">
<div id="options_header"></div>
<div id="provider_option" class="header_block">
{{_getLocalization('provider')}}:
|
a53fbbed
Renato De Donato
select-dataset ne...
|
180
|
<paper-dropdown-menu id="ddl_provider" label="" no-label-float>
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
181
182
183
184
|
<paper-menu id="menu_provider" class="dropdown-content">
<paper-item id="0" on-tap="_setProvidersDatasets"><span id="all"></span></paper-item>
<template is="dom-repeat" items={{_toArray(providers)}}>
<paper-item id={{item.value.id}} on-tap="_setProvidersDatasets">{{item.value.title}}</paper-item>
|
a53fbbed
Renato De Donato
select-dataset ne...
|
185
186
187
|
</template>
</paper-menu>
</paper-dropdown-menu>
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
188
189
190
191
192
193
194
195
196
|
<paper-icon-button id="info_provider" icon="info-outline" noink></paper-icon-button>
<paper-tooltip id="tooltip_provider" for="info_provider" offset="8">
<p>
<span class="option">{{_getLocalization('all')}}</span><br>
<span class="description">{{_getLocalization('allDescription')}}</span><br>
<span class="option">{{_getLocalization('providerName')}}</span><br>
<span class="description">{{_getLocalization('providerNameDescription')}}</span><br>
</p>
</paper-tooltip>
|
a53fbbed
Renato De Donato
select-dataset ne...
|
197
|
</div>
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
<!--<div id="view_option" class="header_block">-->
<!--{{_getLocalization('view')}}: -->
<!--<paper-dropdown-menu id="ddl_view" label="" no-label-float>-->
<!--<paper-menu id="menu_view" class="dropdown-content">-->
<!--<paper-item id="0" on-tap=""><span id="list"></span></paper-item>-->
<!--<paper-item id="1" on-tap="" disabled><span id="tree"></span></paper-item>-->
<!--</paper-menu>-->
<!--</paper-dropdown-menu>-->
<!--<paper-icon-button id="info_view" icon="info-outline" noink></paper-icon-button>-->
<!--<paper-tooltip id="tooltip_view" for="info_view" offset="8">-->
<!--<p>-->
<!--<span class="option">{{_getLocalization('list')}}</span><br>-->
<!--<span class="description">{{_getLocalization('listDescription')}}</span><br>-->
<!--<span class="option">{{_getLocalization('tree')}}</span><br>-->
<!--<span class="description">{{_getLocalization('treeDescription')}}</span><br>-->
<!--</p>-->
<!--</paper-tooltip>-->
<!--</div>-->
<div id="search_option" class="header_block">
{{_getLocalization('search')}}:
<paper-dropdown-menu id="ddl_search" label="" no-label-float>
<paper-menu id="menu_search" class="dropdown-content">
<paper-item><span id="standard"></span></paper-item>
<paper-item disabled><span id="extended"></span></paper-item>
</paper-menu>
</paper-dropdown-menu>
<paper-icon-button id="info_search" icon="info-outline" noink></paper-icon-button>
<paper-tooltip id="tooltip_search" for="info_search" offset="8">
<p>
<span class="option">{{_getLocalization('standard')}}</span><br>
<span class="description">{{_getLocalization('standardDescription')}}</span><br>
<span class="option">{{_getLocalization('extended')}}</span><br>
<span class="description">{{_getLocalization('extendedDescription')}}</span><br>
</p>
</paper-tooltip>
|
a53fbbed
Renato De Donato
select-dataset ne...
|
235
|
</div>
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
<div id="version_option" class="header_block">
{{_getLocalization('version')}}:
<paper-dropdown-menu id="ddl_version" label="" no-label-float>
<paper-menu id="menu_version" class="dropdown-content">
<paper-item id="0" on-tap="_showLast"><span id="show_last"></span></paper-item>
<paper-item id="1" on-tap="_showAll"><span id="show_all"></span></paper-item>
</paper-menu>
</paper-dropdown-menu>
<paper-icon-button id="tooltip_version" icon="info-outline" noink></paper-icon-button>
<paper-tooltip id="tooltip_version" for="tooltip_version" offset="8">
<p>
<span class="option">{{_getLocalization('showLast')}}</span><br>
<span class="description">{{_getLocalization('showLastDescription')}}</span><br>
<span class="option">{{_getLocalization('showAll')}}</span><br>
<span class="description">{{_getLocalization('showAllDescription')}}</span><br>
</p>
</paper-tooltip>
|
a53fbbed
Renato De Donato
select-dataset ne...
|
254
|
</div>
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
255
256
257
|
<paper-icon-button icon="settings" on-click="_optionsMenu"></paper-icon-button>
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
258
259
|
</div>
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
260
261
|
<div id="datasets_list_container">
<datasets-list-controllet id="datasets_list"></datasets-list-controllet>
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
262
263
|
</div>
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
264
|
<div id="url"><paper-input id="selected_url" label="" value={{dataUrl}} error-message={{errorMessage}}></paper-input></div>
|
a53fbbed
Renato De Donato
select-dataset ne...
|
265
|
</paper-material>
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
266
267
268
269
|
</template>
<script>
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
270
271
272
|
HTMLImports.whenReady(function() {
Polymer({
is: 'select-dataset-controllet',
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
273
|
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
274
|
properties: {
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
275
276
277
278
279
280
|
tabIndex: {
type: Number,
value: 0
},
|
a53fbbed
Renato De Donato
select-dataset ne...
|
281
282
283
284
|
datasets: {
type: Object,
value: undefined
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
285
|
|
a53fbbed
Renato De Donato
select-dataset ne...
|
286
287
288
289
290
|
suggestedDatasets : {
type : Array,
value : undefined
},
|
a53fbbed
Renato De Donato
select-dataset ne...
|
291
292
293
294
|
dataUrl : {
type : String,
value : undefined,
observer : '_fireDataUrl'
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
295
|
}
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
296
|
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
297
|
},
|
a53fbbed
Renato De Donato
select-dataset ne...
|
298
299
|
listeners: {
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
300
|
'datasets-list-controllet_dataset' : '_selectDataUrl'
|
a53fbbed
Renato De Donato
select-dataset ne...
|
301
302
|
},
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
303
|
ready : function() {
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
304
305
|
this._translate();
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
306
|
$(this.$.list_container).perfectScrollbar();
|
cd9f822e
Renato De Donato
split 1st step
|
307
|
$(this.$.info).perfectScrollbar();
|
a53fbbed
Renato De Donato
select-dataset ne...
|
308
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
309
|
this.options = false;
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
310
311
|
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
312
313
314
|
attached : function() {
this._translate();
|
a53fbbed
Renato De Donato
select-dataset ne...
|
315
316
|
this._resize();
var that = this;
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
317
|
window.addEventListener("resize", function() { that._resize() });
|
a53fbbed
Renato De Donato
select-dataset ne...
|
318
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
319
320
321
322
323
|
this.providers = this.datasets["result"]["providers"];
this.providersDatasets = this.datasets["result"]["datasets"];
if(this.suggestedDatasets)
this.providersDatasets = this.suggestedDatasets.concat(this.providersDatasets);
|
a53fbbed
Renato De Donato
select-dataset ne...
|
324
|
|
00210b7a
Renato De Donato
controllet SPOD p...
|
325
326
327
|
$.ajax({
url: "/cocreation/ajax/get-all-dataset",
dataType: "json",
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
328
329
330
331
332
333
334
335
336
337
338
339
340
|
success: function(localDatasets){
that.localDatasets = localDatasets;
that.lastLocalDatasets = [];
var resource_name = "";
for(var i in localDatasets)
if(localDatasets[i].resource_name != resource_name) {
that.lastLocalDatasets.push(localDatasets[i]);
resource_name = localDatasets[i].resource_name;
}
},
error: function(){
that.localDatasets = [];
that.lastLocalDatasets = [];
|
00210b7a
Renato De Donato
controllet SPOD p...
|
341
342
|
}
});
|
a53fbbed
Renato De Donato
select-dataset ne...
|
343
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
344
345
|
this._setProvidersDatasets();
},
|
a53fbbed
Renato De Donato
select-dataset ne...
|
346
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
347
348
349
|
showDatasetInfo : function() {
this.$.datasets_list.showDatasetInfo();
},
|
a53fbbed
Renato De Donato
select-dataset ne...
|
350
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
351
|
_translate : function(){
|
a53fbbed
Renato De Donato
select-dataset ne...
|
352
353
|
this.$.selected_url.setAttribute("label", ln["selectedUrl_" + ln["localization"]]);
this.errorMessage = ln["wrongUrl_" + ln["localization"]];
|
a53fbbed
Renato De Donato
select-dataset ne...
|
354
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
this.$.providers_datasets.innerHTML = ln["providersDatasets_" + ln["localization"]];
this.$.spod_users_datasets.innerHTML = ln["spodUsersDatasets_" + ln["localization"]];
this.$.options_header.innerHTML = ln["datasets_" + ln["localization"]];
this.$.all.innerHTML = ln["all_" + ln["localization"]];
// this.$.list.innerHTML = ln["list_" + ln["localization"]];
// this.$.tree.innerHTML = ln["tree_" + ln["localization"]];
this.$.standard.innerHTML = ln["standard_" + ln["localization"]];
this.$.extended.innerHTML = ln["extended_" + ln["localization"]];
this.$.show_last.innerHTML = ln["showLast_" + ln["localization"]];
this.$.show_all.innerHTML = ln["showAll_" + ln["localization"]];
this.$.menu_provider.select(0);
// this.$.menu_view.select(0);
this.$.menu_search.select(0);
this.$.menu_version.select(0);
|
a53fbbed
Renato De Donato
select-dataset ne...
|
371
372
|
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
373
374
375
|
_setLocalDatasets : function() {
if(this.$.ddl_version.selectedItem.id == 0)
this._showLast();
|
a53fbbed
Renato De Donato
select-dataset ne...
|
376
|
else
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
377
378
|
this._showAll();
this._showOptions()
|
a53fbbed
Renato De Donato
select-dataset ne...
|
379
380
|
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
381
382
383
384
385
386
387
388
|
_setProvidersDatasets : function() {
this.async(function () {
var ddl_provider = $(this.$.ddl_provider).find("paper-menu")[0].selectedItem;
var name = ddl_provider.innerHTML.trim();
var id = this._getIdByProviderName(name);
if (id) {
var providerDatasets = this.providersDatasets.filter(function (el) {
return el.provider_name == "p:" + id;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
389
|
});
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
390
391
392
393
|
this.$.datasets_list.setDatasets(providerDatasets);
}
else
this.$.datasets_list.setDatasets(this.providersDatasets);
|
a53fbbed
Renato De Donato
select-dataset ne...
|
394
|
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
395
396
|
this._showOptions()
}, 0);
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
397
|
},
|
a53fbbed
Renato De Donato
select-dataset ne...
|
398
399
400
401
402
403
404
405
|
_getIdByProviderName : function(name) {
for(var id in this.providers) {
if (this.providers[id].title == name)
return this.providers[id].id;
}
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
406
407
408
|
_optionsMenu : function() {
this.options = !this.options;
this._showOptions();
|
a53fbbed
Renato De Donato
select-dataset ne...
|
409
410
|
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
|
_showOptions : function() {
this.async(function () {
if(!this.options) {
this.$.options_header.style.display = "block";
this.$.provider_option.style.display = "none";
// this.$.view_option.style.display = "none";
this.$.search_option.style.display = "none";
this.$.version_option.style.display = "none";
}
else if(this.tabIndex == 0) {
this.$.options_header.style.display = "none";
this.$.provider_option.style.display = "block";
// this.$.view_option.style.display = "block";
this.$.search_option.style.display = "block";
this.$.version_option.style.display = "none";
}
else if(this.tabIndex == 1) {
this.$.options_header.style.display = "none";
this.$.provider_option.style.display = "none";
// this.$.view_option.style.display = "none";
this.$.search_option.style.display = "none";
this.$.version_option.style.display = "block";
}
}, 0);
|
a53fbbed
Renato De Donato
select-dataset ne...
|
435
436
|
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
437
438
439
|
_showAll : function() {
this.$.datasets_list.showVersion(true);
this.$.datasets_list.setDatasets(this.localDatasets);
|
a53fbbed
Renato De Donato
select-dataset ne...
|
440
441
|
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
442
443
444
|
_showLast : function() {
this.$.datasets_list.showVersion(false);
this.$.datasets_list.setDatasets(this.lastLocalDatasets);
|
a53fbbed
Renato De Donato
select-dataset ne...
|
445
446
|
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
447
448
|
_getLocalization : function(text){
return ln[text + "_" + ln["localization"]];
|
a53fbbed
Renato De Donato
select-dataset ne...
|
449
450
451
452
453
454
455
456
457
458
459
|
},
_toArray: function(obj) {
return Object.keys(obj).map(function(key) {
return {
name: key,
value: obj[key]
};
});
},
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
460
|
_selectDataUrl : function(e){
|
a53fbbed
Renato De Donato
select-dataset ne...
|
461
|
this.async(function () {
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
462
|
this.dataUrl = e.detail.dataset.url;
|
a53fbbed
Renato De Donato
select-dataset ne...
|
463
464
465
|
}, 0);
},
|
a53fbbed
Renato De Donato
select-dataset ne...
|
466
|
_fireDataUrl : function(){
|
34789a0e
Renato De Donato
jsdatachecker ln,...
|
467
|
this.fire('select-dataset-controllet_data-url', {url: this.dataUrl});
|
a53fbbed
Renato De Donato
select-dataset ne...
|
468
469
|
},
|
a53fbbed
Renato De Donato
select-dataset ne...
|
470
471
472
473
|
_resize : function(){
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - 16;
h = h - 64 - 8; //height with page scroller
$("#select_dataset_container").height(h);
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
474
|
}
|
fb05b400
Renato De Donato
controllet 2.0, n...
|
475
|
});
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
476
|
});
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
477
|
</script>
|
a748d9bc
Renato De Donato
ala NUMBER bug
|
478
|
</dom-module>
|