Commit ed1bed7644a0f4fb60f2a4cd6a794700f891d059
1 parent
eae8bcd8
fix bug-modify in private room
Showing
3 changed files
with
72 additions
and
23 deletions
controllets/datalet-selection-controllet/datalet-selection-controllet.html
... | ... | @@ -325,14 +325,14 @@ |
325 | 325 | $(this.$.datalet_selection_labels).perfectScrollbar(); |
326 | 326 | $(this.$.datalet_selection_datalet).perfectScrollbar(); |
327 | 327 | |
328 | - this.modify = true;//da eliminare in futuro | |
328 | + this.params = {'data-url' : this.dataUrl}; | |
329 | + | |
330 | + //this.modify = true;//da eliminare in futuro | |
329 | 331 | if(this.preselectedDatalet){ |
330 | 332 | this.modify = true; |
331 | 333 | this._preselectDatalet(); |
332 | 334 | this.preselectedDatalet = undefined; |
333 | 335 | } |
334 | - | |
335 | - this.params = {'data-url' : this.dataUrl}; | |
336 | 336 | }, |
337 | 337 | |
338 | 338 | attached : function() { |
... | ... | @@ -348,11 +348,12 @@ |
348 | 348 | // console.log($(inputs[i]).children("paper-menu")); |
349 | 349 | |
350 | 350 | this._translate(); |
351 | - | |
352 | 351 | }, |
353 | 352 | |
354 | 353 | _translate : function(){ |
355 | 354 | document.l10n.formatValue('commentLabel').then(s => $("#comment")[0].setAttribute("label", s)); |
355 | + if(this.modify) | |
356 | + document.l10n.formatValue('modifyDatalet').then(s => this.$.add_button.innerText = s); | |
356 | 357 | }, |
357 | 358 | |
358 | 359 | setFields : function(fields) { |
... | ... | @@ -387,10 +388,6 @@ |
387 | 388 | }, |
388 | 389 | |
389 | 390 | _preselectDatalet : function() { |
390 | -// this.$.add_button.innerText = "MODIFY DATALET"; | |
391 | - document.l10n.formatValue('modifyDatalet').then(s => this.$.add_button.innerText = s); | |
392 | - | |
393 | - | |
394 | 391 | this.selectedDatalet = this.preselectedDatalet; |
395 | 392 | this.selectedFields = this._copy(this.fields); |
396 | 393 | |
... | ... | @@ -426,11 +423,6 @@ |
426 | 423 | }, |
427 | 424 | |
428 | 425 | _addInput : function(e){ |
429 | -// console.log(e.target.innerHTML.trim()); | |
430 | -// console.log(e.target.innerText); | |
431 | -// console.log(e.currentTarget.innerHTML.trim()); | |
432 | -// console.log(e.currentTarget.innerText); | |
433 | - | |
434 | 426 | var selectedFields = this._copy(this.selectedFields); |
435 | 427 | |
436 | 428 | var index = $(e.target).parents("paper-dropdown-menu")[0].id; |
... | ... | @@ -456,13 +448,12 @@ |
456 | 448 | } |
457 | 449 | |
458 | 450 | if(load){ |
459 | - var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); | |
460 | -// console.log(labels); | |
461 | - for (var i = 0; i < labels.length; i++) { | |
462 | - if (labels[i].innerHTML.trim() != "") { | |
463 | - this.params[labels[i].label] = labels[i].value; | |
464 | - } | |
465 | - } | |
451 | +// var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); | |
452 | +// for (var i = 0; i < labels.length; i++) { | |
453 | +// if (labels[i].innerHTML.trim() != "") { | |
454 | +// this.params[labels[i].label] = labels[i].value; | |
455 | +// } | |
456 | +// } | |
466 | 457 | |
467 | 458 | this._loadDatalet(selectedFields); |
468 | 459 | } |
... | ... | @@ -472,6 +463,18 @@ |
472 | 463 | _loadDatalet : function(selectedFields){ |
473 | 464 | // var params = {'data-url' : this.dataUrl}; |
474 | 465 | |
466 | + var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); | |
467 | + for (var i = 0; i < labels.length; i++) { | |
468 | + if (labels[i].innerHTML.trim() != "") { | |
469 | + this.params[labels[i].label] = labels[i].value; | |
470 | + } | |
471 | + } | |
472 | + | |
473 | + console.log(this.selectedDatalet); | |
474 | + console.log(this.params); | |
475 | + console.log(selectedFields); | |
476 | + console.log(this.dataUrl); | |
477 | + | |
475 | 478 | var dataletParams ={ |
476 | 479 | component : this.selectedDatalet+"-datalet", |
477 | 480 | params : this.params, |
... | ... | @@ -545,10 +548,10 @@ |
545 | 548 | |
546 | 549 | $("#datalet_selection_inputs").height(h); |
547 | 550 | $("#datalet_selection_labels").height(h); |
548 | - if(this.modify) | |
551 | +// if(this.modify) | |
549 | 552 | $("#datalet_selection_datalet").height(h-128); |
550 | - else | |
551 | - $("#datalet_selection_datalet").height(h); | |
553 | +// else | |
554 | +// $("#datalet_selection_datalet").height(h); | |
552 | 555 | } |
553 | 556 | |
554 | 557 | }); | ... | ... |
locales/fr.l20n
0 → 100644
1 | +<slide1Title "SELECT DATASET"> | |
2 | +<slide1Subtitle "Search or copy and paste the url of dataset."> | |
3 | +<slide2Title "SELECT DATA"> | |
4 | +<slide2Subtitle "Select the fields from tree-view. The multi-table will show the values related to the selected fields."> | |
5 | +<slide3Title "SELECT VISUALIZATION"> | |
6 | +<slide3Subtitle "Select a visualization, fill out inputs and labels (optional)."> | |
7 | + | |
8 | +<listView "LIST VIEW"> | |
9 | +<treeMapView "TREE MAP VIEW"> | |
10 | +<mostPopular "MOST POPULAR"> | |
11 | +<availableDatasets "Available datasets"> | |
12 | +<suggestedDatasets "Suggested datasets"> | |
13 | +<selectedUrl "Selected url"> | |
14 | + | |
15 | +<inputs "INPUTS"> | |
16 | +<labels "LABELS / OPTIONS"> | |
17 | +<comment "COMMENT"> | |
18 | +<commentLabel "comment (max 100 characters)"> | |
19 | +<dataletPreview "DATALET PREVIEW"> | |
20 | +<addDatalet "ADD"> | |
21 | +<modifyDatalet "MODIFY"> | |
22 | + | |
23 | +<googlePiechartDescription "The labels of slices."> | |
0 | 24 | \ No newline at end of file | ... | ... |
locales/nl.l20n
0 → 100644
1 | +<slide1Title "SELECT DATASET"> | |
2 | +<slide1Subtitle "Search or copy and paste the url of dataset."> | |
3 | +<slide2Title "SELECT DATA"> | |
4 | +<slide2Subtitle "Select the fields from tree-view. The multi-table will show the values related to the selected fields."> | |
5 | +<slide3Title "SELECT VISUALIZATION"> | |
6 | +<slide3Subtitle "Select a visualization, fill out inputs and labels (optional)."> | |
7 | + | |
8 | +<listView "LIST VIEW"> | |
9 | +<treeMapView "TREE MAP VIEW"> | |
10 | +<mostPopular "MOST POPULAR"> | |
11 | +<availableDatasets "Available datasets"> | |
12 | +<suggestedDatasets "Suggested datasets"> | |
13 | +<selectedUrl "Selected url"> | |
14 | + | |
15 | +<inputs "INPUTS"> | |
16 | +<labels "LABELS / OPTIONS"> | |
17 | +<comment "COMMENT"> | |
18 | +<commentLabel "comment (max 100 characters)"> | |
19 | +<dataletPreview "DATALET PREVIEW"> | |
20 | +<addDatalet "ADD"> | |
21 | +<modifyDatalet "MODIFY"> | |
22 | + | |
23 | +<googlePiechartDescription "The labels of slices."> | |
0 | 24 | \ No newline at end of file | ... | ... |