From 5c96a7bc81c8f93b016024c6234f29b30151f690 Mon Sep 17 00:00:00 2001 From: renato Date: Tue, 2 Feb 2016 14:42:53 +0100 Subject: [PATCH] controllet invalid url --- controllets/data-sevc-controllet/data-sevc-controllet.html | 6 ++---- controllets/dataset-selection-controllet/dataset-selection-controllet.html | 9 ++++++++- datalets/datasetexplorer-datalet/js/buildtreemap2.js | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/controllets/data-sevc-controllet/data-sevc-controllet.html b/controllets/data-sevc-controllet/data-sevc-controllet.html index 161992d..6b776d8 100755 --- a/controllets/data-sevc-controllet/data-sevc-controllet.html +++ b/controllets/data-sevc-controllet/data-sevc-controllet.html @@ -158,9 +158,6 @@ _allowSecondStep : function(e){ this.dataUrl = e.detail.url; - var wrongUrl = ln["wrongUrl_" + this.localization]; - console.log(ln["wrongUrl_en"]); - $.ajax({ url: e.detail.url, dataType: "json", @@ -168,11 +165,12 @@ // this.dataUrl = e.detail.url // this.jsonData = JSON.stringify(data); slider.chevronRight(true); + dataset_selection.$.selected_url.invalid = false; }, error: function(){ // this.jsonData = undefined; slider.chevronRight(false); - dataset_selection.dataUrl = wrongUrl; + dataset_selection.$.selected_url.invalid = true; } }); diff --git a/controllets/dataset-selection-controllet/dataset-selection-controllet.html b/controllets/dataset-selection-controllet/dataset-selection-controllet.html index 39c9318..c2dc676 100755 --- a/controllets/dataset-selection-controllet/dataset-selection-controllet.html +++ b/controllets/dataset-selection-controllet/dataset-selection-controllet.html @@ -169,7 +169,7 @@ - +

@@ -230,6 +230,11 @@ type : String, value : undefined, observer : '_fireDataUrl' + }, + + errorMessage : { + type : String, + value : "", } }, @@ -242,6 +247,8 @@ ready : function(){ $(this.$.material_container).perfectScrollbar(); $(this.$.dialog_info).perfectScrollbar(); + + this.errorMessage = ln["wrongUrl_" + ln["localization"]]; }, attached : function(){ diff --git a/datalets/datasetexplorer-datalet/js/buildtreemap2.js b/datalets/datasetexplorer-datalet/js/buildtreemap2.js index f0de53f..620d019 100755 --- a/datalets/datasetexplorer-datalet/js/buildtreemap2.js +++ b/datalets/datasetexplorer-datalet/js/buildtreemap2.js @@ -211,7 +211,8 @@ function build2(root, meta, place_holder, select_listener, width, height) { if (!d._children[0]._children) { if (select_listener) { var url = d._children[0].name; - var ret = "Data provider not supported yet." + //var ret = "Data provider not supported yet." + var ret = url; // Check if CKAN var strDatasetPos = url.indexOf('/dataset/'); -- libgit2 0.21.4