Commit 5c96a7bc81c8f93b016024c6234f29b30151f690
1 parent
1b4d04a6
controllet invalid url
Showing
3 changed files
with
12 additions
and
6 deletions
controllets/data-sevc-controllet/data-sevc-controllet.html
@@ -158,9 +158,6 @@ | @@ -158,9 +158,6 @@ | ||
158 | _allowSecondStep : function(e){ | 158 | _allowSecondStep : function(e){ |
159 | this.dataUrl = e.detail.url; | 159 | this.dataUrl = e.detail.url; |
160 | 160 | ||
161 | - var wrongUrl = ln["wrongUrl_" + this.localization]; | ||
162 | - console.log(ln["wrongUrl_en"]); | ||
163 | - | ||
164 | $.ajax({ | 161 | $.ajax({ |
165 | url: e.detail.url, | 162 | url: e.detail.url, |
166 | dataType: "json", | 163 | dataType: "json", |
@@ -168,11 +165,12 @@ | @@ -168,11 +165,12 @@ | ||
168 | // this.dataUrl = e.detail.url | 165 | // this.dataUrl = e.detail.url |
169 | // this.jsonData = JSON.stringify(data); | 166 | // this.jsonData = JSON.stringify(data); |
170 | slider.chevronRight(true); | 167 | slider.chevronRight(true); |
168 | + dataset_selection.$.selected_url.invalid = false; | ||
171 | }, | 169 | }, |
172 | error: function(){ | 170 | error: function(){ |
173 | // this.jsonData = undefined; | 171 | // this.jsonData = undefined; |
174 | slider.chevronRight(false); | 172 | slider.chevronRight(false); |
175 | - dataset_selection.dataUrl = wrongUrl; | 173 | + dataset_selection.$.selected_url.invalid = true; |
176 | } | 174 | } |
177 | }); | 175 | }); |
178 | 176 |
controllets/dataset-selection-controllet/dataset-selection-controllet.html
@@ -169,7 +169,7 @@ | @@ -169,7 +169,7 @@ | ||
169 | 169 | ||
170 | </template> | 170 | </template> |
171 | 171 | ||
172 | - <paper-textarea id="selected_url" label="Selected url" value={{dataUrl}}></paper-textarea> | 172 | + <paper-textarea id="selected_url" label="Selected url" value={{dataUrl}} error-message={{errorMessage}}></paper-textarea> |
173 | 173 | ||
174 | <paper-dialog id="dialog_info"> | 174 | <paper-dialog id="dialog_info"> |
175 | <h2 id="dialog_name"></h2> | 175 | <h2 id="dialog_name"></h2> |
@@ -230,6 +230,11 @@ | @@ -230,6 +230,11 @@ | ||
230 | type : String, | 230 | type : String, |
231 | value : undefined, | 231 | value : undefined, |
232 | observer : '_fireDataUrl' | 232 | observer : '_fireDataUrl' |
233 | + }, | ||
234 | + | ||
235 | + errorMessage : { | ||
236 | + type : String, | ||
237 | + value : "", | ||
233 | } | 238 | } |
234 | 239 | ||
235 | }, | 240 | }, |
@@ -242,6 +247,8 @@ | @@ -242,6 +247,8 @@ | ||
242 | ready : function(){ | 247 | ready : function(){ |
243 | $(this.$.material_container).perfectScrollbar(); | 248 | $(this.$.material_container).perfectScrollbar(); |
244 | $(this.$.dialog_info).perfectScrollbar(); | 249 | $(this.$.dialog_info).perfectScrollbar(); |
250 | + | ||
251 | + this.errorMessage = ln["wrongUrl_" + ln["localization"]]; | ||
245 | }, | 252 | }, |
246 | 253 | ||
247 | attached : function(){ | 254 | attached : function(){ |
datalets/datasetexplorer-datalet/js/buildtreemap2.js
@@ -211,7 +211,8 @@ function build2(root, meta, place_holder, select_listener, width, height) { | @@ -211,7 +211,8 @@ function build2(root, meta, place_holder, select_listener, width, height) { | ||
211 | if (!d._children[0]._children) { | 211 | if (!d._children[0]._children) { |
212 | if (select_listener) { | 212 | if (select_listener) { |
213 | var url = d._children[0].name; | 213 | var url = d._children[0].name; |
214 | - var ret = "Data provider not supported yet." | 214 | + //var ret = "Data provider not supported yet." |
215 | + var ret = url; | ||
215 | 216 | ||
216 | // Check if CKAN | 217 | // Check if CKAN |
217 | var strDatasetPos = url.indexOf('/dataset/'); | 218 | var strDatasetPos = url.indexOf('/dataset/'); |