From 730e7d96fa0d2d66c3650f7ffea5bdde616f65b9 Mon Sep 17 00:00:00 2001 From: kovacsv Date: Fri, 18 Jun 2021 20:19:04 +0200 Subject: [PATCH] Add cookie consent dialog. --- website/o3dv/cookiedialog.js | 13 +++---------- website/o3dv/website.css | 2 +- website/o3dv/website.js | 5 +---- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/website/o3dv/cookiedialog.js b/website/o3dv/cookiedialog.js index 444a046..0e3db04 100644 --- a/website/o3dv/cookiedialog.js +++ b/website/o3dv/cookiedialog.js @@ -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 (); } } ]); diff --git a/website/o3dv/website.css b/website/o3dv/website.css index f5ac331..113f9a3 100644 --- a/website/o3dv/website.css +++ b/website/o3dv/website.css @@ -382,7 +382,7 @@ div.ov_tree_view div.ov_tree_view_children div.ov_modal_overlay { - + } div.ov_dialog diff --git a/website/o3dv/website.js b/website/o3dv/website.js index a1995eb..57b8119 100644 --- a/website/o3dv/website.js +++ b/website/o3dv/website.js @@ -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;