Skip to content

Commit

Permalink
Merge pull request #379 from regniets/gdpr-fixes
Browse files Browse the repository at this point in the history
GDPR fixes
  • Loading branch information
kdambekalns committed Apr 28, 2021
2 parents 3571f0a + b2b3b8f commit 5add764
Show file tree
Hide file tree
Showing 53 changed files with 346 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import { component } from '@reduct/component';
import propTypes from '@reduct/nitpick';
import lighten from 'lightness';
import { loadJs } from '../Utilities';
import amCharts from "amcharts3/amcharts/amcharts";
import amChartsSerial from "amcharts3/amcharts/serial";
import amChartsLight from "amcharts3/amcharts/themes/light";
import amChartGantt from "amcharts3/amcharts/gantt";

const dependencies = [
'https://www.amcharts.com/lib/3/amcharts.js',
'https://www.amcharts.com/lib/3/serial.js',
'https://www.amcharts.com/lib/3/themes/light.js',
'https://www.amcharts.com/lib/3/gantt.js'
];
const themeColor = '#26224C';

const config = {
type: 'gantt',
theme: 'light',
pathToImages: '/_Resources/Static/Packages/Neos.NeosIo/Images/AmCharts/',
period: 'YYYY',
dataDateFormat: 'YYYY-MM-DD',
columnWidth: 0.65,
Expand Down Expand Up @@ -58,8 +58,7 @@ export default class AmChart {
// Hence AmCharts relies on element id's, we generate a random one.
this.el.setAttribute('id', `amChart__${Math.random() * 1000}`);

this.loadDependencies()
.then(() => this.initializeGlobals())
this.initializeGlobals()
.then(() => this.render());
}

Expand All @@ -69,22 +68,6 @@ export default class AmChart {
};
}

loadDependencies() {
return new Promise(resolve => {
dependencies.reduce((prev, cur) => {
const isLast = cur === dependencies[dependencies.length - 1];

return prev
.then(() => loadJs(cur))
.then(() => {
if (isLast) {
resolve();
}
});
}, Promise.resolve());
});
}

initializeGlobals() {
// AmCharts isn't published on npm, thus we load it via their CDN and setup the global - Yeah...
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<f:if condition="{video}">
<f:then>
<figure class="flexibleEmbed">
<iframe class="flexibleEmbed__content" src="//www.youtube.com/embed/{video}?wmode=transparent" allowfullscreen="" frameborder="0"></iframe>
<iframe class="flexibleEmbed__content" src="//www.youtube-nocookie.com/embed/{video}?wmode=transparent" allowfullscreen="" frameborder="0"></iframe>
<div class="flexibleEmbed__ratio flexibleEmbed__ratio--16/9"></div>
</figure>
</f:then>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5add764

Please sign in to comment.