diff --git a/controllets/datalet-selection-controllet/datalet-selection-controllet.html b/controllets/datalet-selection-controllet/datalet-selection-controllet.html index 11b03fa..fe47c36 100755 --- a/controllets/datalet-selection-controllet/datalet-selection-controllet.html +++ b/controllets/datalet-selection-controllet/datalet-selection-controllet.html @@ -14,6 +14,8 @@ + + @@ -169,6 +171,11 @@ paper-button[disabled] { background-color: #B6B6B6; } + + #dialog_info { + border: 2px solid #2196F3; + background-color: #E0E0E0; + } @@ -239,6 +246,11 @@ + +

+

+
+ @@ -301,6 +313,11 @@ value : undefined }, + params:{ + type: Object, + value: undefined + }, + modify : { type : Boolean, value : false @@ -325,6 +342,8 @@ this._preselectDatalet(); this.preselectedDatalet = undefined; } + + this.params = {'data-url' : this.dataUrl}; }, attached : function() { @@ -440,6 +459,14 @@ } if(load){ + var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); + console.log(labels); + for (var i = 0; i < labels.length; i++) { + if (labels[i].innerHTML.trim() != "") { + this.params[labels[i].label] = labels[i].value; + } + } + this._loadDatalet(selectedFields); } @@ -451,11 +478,11 @@ }, _loadDatalet : function(selectedFields){ - var params = {'data-url' : this.dataUrl}; +// var params = {'data-url' : this.dataUrl}; var dataletParams ={ component : this.selectedDatalet+"-datalet", - params : params, + params : this.params, fields : selectedFields, placeHolder : this.$.datalet_selection_datalet_placeholder }; @@ -475,8 +502,8 @@ var data = { dataUrl : this.dataUrl, -// params : this.paramsFields, - params : {'data-url' : this.dataUrl}, + params : this.params, +// params : {'data-url' : this.dataUrl}, fields : selectedFields, datalet : this.selectedDatalet+"-datalet", comment : this.$.comment.value, @@ -487,6 +514,26 @@ }, + _showInfo : function(e){ + var t = e.target; + if(t.tagName.indexOf("IRON-ICON") != -1) + t = $(e.target).parents("paper-icon-button")[0]; + + var name = t.getAttribute("title").replace(" info", ""); + + var dataset = $.grep(this.inputs, function(e){ return e.name == name; })[0]; + if(!dataset) + dataset = $.grep(this.labels, function(e){ return e.name == name; })[0]; + + this.$.dialog_name.innerHTML = dataset.name; + this.$.dialog_description.innerHTML = dataset.description; + this.$.dialog_info.open(); + + var pos = t.getBoundingClientRect(); + $("#dialog_info").css("top", pos.top - 4); + $("#dialog_info").css("left", pos.left - 4); + }, + _copy : function(o) { var out, v, key; out = Array.isArray(o) ? new Array(o.length) : {}; diff --git a/controllets/dataset-selection-controllet/dataset-selection-controllet.html b/controllets/dataset-selection-controllet/dataset-selection-controllet.html index b32a383..7d5fba1 100755 --- a/controllets/dataset-selection-controllet/dataset-selection-controllet.html +++ b/controllets/dataset-selection-controllet/dataset-selection-controllet.html @@ -20,12 +20,9 @@ - - - @@ -63,7 +60,6 @@ } paper-dropdown-menu { - /*display: block;*/ width: 45%; margin-bottom: 32px; --paper-input-container-focus-color: #2196F3; @@ -93,20 +89,11 @@ } .info_button { - /*background-color: red;*/ position: absolute; top: 18px; left: 45%; } - /*paper-menu{*/ - /*/!*visibility: visible ! important;*!/*/ - /*}*/ - - /*paper-item[focused] {*/ - /*background: #FFFFFF;*/ - /*}*/ - paper-textarea { width: 90%; margin-bottom: 32px; @@ -124,27 +111,16 @@ #material_container { margin-top: 8px; - /*height: 55vh;*/ } #div_selection { padding-left: 10%; padding-top: 64px; - /*padding-bottom: 64px;*/ } #dialog_info { border: 2px solid #2196F3; background-color: #E0E0E0; - position: fixed; - top: 232px; - width: 60%; - height: auto; - /*overflow: auto;*/ - } - - #div_datasetexplorer { - /*padding-top: 48px;*/ } @@ -162,11 +138,10 @@
- + @@ -177,12 +152,12 @@