Commit a619e8e431a281c4419adf35a47cfe091b67e864

Authored by Luigi Serra
1 parent 73bcce88

Selection controllet update

controllets/data-sevc-controllet/data-sevc-controllet.html
@@ -515,6 +515,16 @@ @@ -515,6 +515,16 @@
515 this.$.datalet_idm_fields_container.innerHTML += '<draggable-element-controllet is-target="true" id="' + input.name + '" heading="' + input.name + '" description="' + input.description + '" number="' + (i + 1) + '"></draggable-element-controllet><br>'; 515 this.$.datalet_idm_fields_container.innerHTML += '<draggable-element-controllet is-target="true" id="' + input.name + '" heading="' + input.name + '" description="' + input.description + '" number="' + (i + 1) + '"></draggable-element-controllet><br>';
516 } 516 }
517 517
  518 + if(response.idm.inputs.input.constructor == Object) {
  519 + var input = response.idm.inputs.input;
  520 + if(input.selection == "*") {
  521 + var input_selected_fields = Polymer.dom(this.$.selected_fields_container).querySelectorAll('draggable-element-controllet');
  522 + for (var j = 0; j < input_selected_fields.length; j++) {
  523 + this.$.datalet_idm_fields_container.innerHTML += '<draggable-element-controllet is-target="true" heading="Field ' + (j + 1) + '" description="' + input.description + '" number="' + (i + 1) + '"></draggable-element-controllet><br>';
  524 + }
  525 + }
  526 + }
  527 +
518 }, 528 },
519 529
520 assignToolbar : function(){ 530 assignToolbar : function(){
@@ -593,8 +603,8 @@ @@ -593,8 +603,8 @@
593 var input_mapped_fields = Polymer.dom(this.$.datalet_idm_fields_container).querySelectorAll('draggable-element-controllet[is-target=true]'); 603 var input_mapped_fields = Polymer.dom(this.$.datalet_idm_fields_container).querySelectorAll('draggable-element-controllet[is-target=true]');
594 this.selected_fields = Array(); 604 this.selected_fields = Array();
595 605
596 - for(var i=0;i<input_mapped_fields.length;i++) {  
597 - if(input_mapped_fields[i].value != "") { 606 + for (var i = 0; i < input_mapped_fields.length; i++) {
  607 + if (input_mapped_fields[i].value != "") {
598 this.selected_fields.push(input_mapped_fields[i].value); 608 this.selected_fields.push(input_mapped_fields[i].value);
599 } 609 }
600 } 610 }