Commit 8424206518812d838f10506e8778ba6d98368f26
1 parent
2c7ac54d
params fix
Showing
1 changed file
with
8 additions
and
7 deletions
controllets/datalet-selection-controllet/datalet-selection-controllet.html
... | ... | @@ -543,16 +543,17 @@ |
543 | 543 | }, |
544 | 544 | |
545 | 545 | _updateParams : function(){ |
546 | + var textarea = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); | |
547 | + this.params["description"] = textarea[0].value; | |
546 | 548 | |
547 | - var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); | |
548 | - this.params[labels[0].label] = labels[0].value; | |
549 | + if(!textarea[0].value) | |
550 | + this.params[textarea[0].label] = ""; | |
549 | 551 | |
550 | - if(!labels[0].value) | |
551 | - this.params[labels[0].label] = ""; | |
552 | + var inputs = this.$.datalet_selection_labels.querySelectorAll("paper-input"); | |
553 | + this.params["title"] = inputs[0].value; | |
552 | 554 | |
553 | - var labels = this.$.datalet_selection_labels.querySelectorAll("paper-input"); | |
554 | - for (var i = 0; i < labels.length; i++) | |
555 | - this.params[labels[i].label] = labels[i].value; | |
555 | + for (var i = 1; i < inputs.length; i++) | |
556 | + this.params[this.labels[i-1].name] = inputs[i].value; | |
556 | 557 | }, |
557 | 558 | |
558 | 559 | _paramsChanged : function(){ | ... | ... |