Add cookie consent dialog.

This commit is contained in:
kovacsv 2021-06-18 20:19:04 +02:00
parent 93f0658e40
commit 730e7d96fa
3 changed files with 5 additions and 15 deletions

View File

@ -1,19 +1,12 @@
OV.ShowCookieDialog = function (onOk)
OV.ShowCookieDialog = function (onAccept)
{
let dialog = new OV.ButtonDialog ();
let contentDiv = dialog.Init ('Cookie Consent', [
{
name : 'Cancel',
subClass : 'outline',
name : 'Accept',
onClick () {
dialog.Hide ();
}
},
{
name : 'OK',
onClick () {
dialog.Hide ();
onOk ();
onAccept ();
}
}
]);

View File

@ -382,7 +382,7 @@ div.ov_tree_view div.ov_tree_view_children
div.ov_modal_overlay
{
}
div.ov_dialog

View File

@ -29,8 +29,7 @@ OV.Website = class
this.InitDragAndDrop ();
this.InitModelLoader ();
this.InitNavigator ();
// TODO
// this.InitCookieConsent ();
this.InitCookieConsent ();
this.viewer.SetClickHandler (this.OnModelClicked.bind (this));
this.Resize ();
@ -509,8 +508,6 @@ OV.Website = class
InitCookieConsent ()
{
let cookieConsentKey = 'ov_cookie_consent';
// TODO: remove
this.cookieHandler.ClearVal (cookieConsentKey);
let accepted = this.cookieHandler.GetBoolVal (cookieConsentKey, false);
if (accepted) {
return;