diff --git a/django_files/observatory/views.py b/django_files/observatory/views.py index 1c5d87ed..8a46784b 100644 --- a/django_files/observatory/views.py +++ b/django_files/observatory/views.py @@ -459,12 +459,6 @@ def explore(request, app_name, trade_flow, country1, country2, product, year="20 # Return page without visualization data - # Making sure we return the product list every time - if prod_class == "sitc4": - product_list = Sitc4.objects.get_all(lang) - else: - product_list = Hs4.objects.get_all(lang) - # Record views in redis for "newest viewed pages" visualization if settings.REDIS: views_image_path = settings.STATIC_URL + "data/" + request_hash_string + ".png" @@ -506,6 +500,7 @@ def explore(request, app_name, trade_flow, country1, country2, product, year="20 "country1_3char": countries[0].name_3char if countries[0] else "", "country2_3char": countries[1].name_3char if countries[1] else "", "product": product, + "product_code": product.code if not isinstance(product, basestring) else product, "years_available": years_available, "year": year, "year_start": year_start, @@ -514,7 +509,6 @@ def explore(request, app_name, trade_flow, country1, country2, product, year="20 "year2_list": year2_list, "year_interval_list": year_interval_list, "trade_flow_list": trade_flow_list, - "product_list": product_list, "api_uri": api_uri, "app_type": app_type, "redesign_api_uri": redesign_api_uri, diff --git a/html/explore/index.html b/html/explore/index.html index c725e048..84bce2df 100644 --- a/html/explore/index.html +++ b/html/explore/index.html @@ -40,15 +40,13 @@ - + - - @@ -142,7 +140,7 @@

{% if title %}{{titl - @@ -184,7 +182,7 @@

{% if title %}{{titl - @@ -197,7 +195,7 @@

{% if title %}{{titl - @@ -274,8 +272,7 @@

{% if title %}{{titl -
- {% for y in year1_list %} {% if y == year or y == year_start %} @@ -284,10 +281,8 @@

{% if title %}{{titl {% endif %} {% endfor %} -

-
- {% for y in year1_list %} {% if y == year_end %} @@ -297,7 +292,6 @@

{% if title %}{{titl {% endif %} {% endfor %} -

@@ -580,17 +574,9 @@

Click Here To Refresh The Visualization

Highlight: - - {% if app_type = "casy" or app_type = "ccsy" %} - - {% elif app_type = "csay" or app_type = "cspy" or app_type = "sapy" %} - - {% endif %} + -
@@ -790,9 +776,9 @@

Click Here To Refresh The Visualization

function highlight(value) { + var v = value ? value : $("#highlight_select").select2("val").trim(); {% if app_name == "product_space" or app_name == "rings" or app_type = "cspy" %} - var v = value ? value : $("#highlight").find(":selected").val().trim(); d3.select("#viz").call(chart.highlight([])); d3.select("#viz").call(chart.highlight(v)); @@ -804,8 +790,6 @@

Click Here To Refresh The Visualization

{% if app_name == "pie_scatter" or app_name == "tree_map" or app_name == "stacked" %} - var v = value ? value : $("#highlight").find(":selected").val().trim(); - {% if app_type = "casy" %} if(v.length>0) @@ -835,8 +819,7 @@

Click Here To Refresh The Visualization

function reset_highlight() { - $("#highlight").find(":selected").prop("selected", false); - $("#highlight_select").trigger("chosen:updated"); + $("#highlight_select").select2("val", ""); queryParameters["highlight"] = ""; if(queryActivated) updateURLQueryParameters(); @@ -849,15 +832,7 @@

Click Here To Refresh The Visualization

Highlight: - {% if app_type = "casy" or app_type = "ccsy" %} - - {% elif app_type = "csay" or app_type = "cspy" or app_type = "sapy" %} - - {% endif %} + @@ -904,7 +879,6 @@

Click Here To Refresh The Visualization

Center for International Development Logo
-
Language:
@@ -1044,7 +1018,7 @@

- + @@ -1182,13 +1156,8 @@

+ - - +