diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index fa4bea2a..7acbf637 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -1,6 +1,12 @@ Changelog ========= +20.7 - (2020-10-06) +--------------------------- +* Bug fix: Load charts api from loader.js instead of gsapi in all cases; + Use google.setOnLoadCallback instead of jQuery(document).ready + [szabozo0 120846] + 20.6 - (2020-09-18) --------------------------- * Change: re-enabled resizing of charts when window is resized diff --git a/eea/googlecharts/version.txt b/eea/googlecharts/version.txt index 541b047d..b1b396bc 100644 --- a/eea/googlecharts/version.txt +++ b/eea/googlecharts/version.txt @@ -1 +1 @@ -20.6 +20.7 diff --git a/eea/googlecharts/views/js/view.js b/eea/googlecharts/views/js/view.js index c4f5f6eb..2578a66e 100644 --- a/eea/googlecharts/views/js/view.js +++ b/eea/googlecharts/views/js/view.js @@ -1000,7 +1000,8 @@ var changeDashboardId = function(idx){ } }; -jQuery(document).ready(function($){ +jQuery(function($){ + google.setOnLoadCallback(function(){ // workaround for firefox issue: https://taskman.eionet.europa.eu/issues/9941 // Removed workaround as the issue has been already fixed. Details here: // https://code.google.com/p/google-visualization-api-issues/issues/detail?id=598 @@ -1014,6 +1015,7 @@ jQuery(document).ready(function($){ // } // } // end of workaround + if (typeof(googlechart_config_array) == 'undefined'){ return; } @@ -1111,5 +1113,5 @@ jQuery(document).ready(function($){ })); jQuery(window).trigger("hashchange"); - + }); }); diff --git a/eea/googlecharts/views/zpt/chart-full.pt b/eea/googlecharts/views/zpt/chart-full.pt index 0a92e202..5273b99c 100644 --- a/eea/googlecharts/views/zpt/chart-full.pt +++ b/eea/googlecharts/views/zpt/chart-full.pt @@ -7,7 +7,7 @@ - + @@ -18,7 +18,8 @@ + diff --git a/eea/googlecharts/views/zpt/embed-chart.pt b/eea/googlecharts/views/zpt/embed-chart.pt index d3105472..4be8ed5d 100644 --- a/eea/googlecharts/views/zpt/embed-chart.pt +++ b/eea/googlecharts/views/zpt/embed-chart.pt @@ -198,7 +198,7 @@ } return settings; } - jQuery(function($){ + jQuery(function($){ google.setOnLoadCallback(function(){ var chart_type = chart_json_$vhash.chartType; settings_$vhash.push(GoogleChartsConfig_$vhash[0].id); diff --git a/eea/googlecharts/views/zpt/inline-includes.pt b/eea/googlecharts/views/zpt/inline-includes.pt index be9f727d..b70ce2c1 100644 --- a/eea/googlecharts/views/zpt/inline-includes.pt +++ b/eea/googlecharts/views/zpt/inline-includes.pt @@ -1,7 +1,7 @@ - +