diff --git a/tools/config.json b/tools/config.json index 02f0145..26efb3e 100644 --- a/tools/config.json +++ b/tools/config.json @@ -77,7 +77,6 @@ "website/o3dv/js/openurldialog.js", "website/o3dv/js/exportdialog.js", "website/o3dv/js/sharingdialog.js", - "website/o3dv/js/cookiedialog.js", "website/o3dv/js/panelset.js", "website/o3dv/js/navigatoritems.js", "website/o3dv/js/navigatorpanel.js", diff --git a/website/embed.html b/website/embed.html index f489287..6c5b95e 100644 --- a/website/embed.html +++ b/website/embed.html @@ -105,7 +105,6 @@ - diff --git a/website/index.html b/website/index.html index 2519b73..6570473 100644 --- a/website/index.html +++ b/website/index.html @@ -107,7 +107,6 @@ - diff --git a/website/o3dv/css/website.css b/website/o3dv/css/website.css index b811c38..b31cfc8 100644 --- a/website/o3dv/css/website.css +++ b/website/o3dv/css/website.css @@ -247,6 +247,30 @@ div.ov_property_table div.ov_property_table_button cursor: pointer; } +div.ov_bottom_floating_panel +{ + background: var(--ov_background_color); + border-top: 1px solid var(--ov_border_color); + width: 100%; + padding: 30px; + box-sizing: border-box; + position: absolute; + bottom: 0px; +} + +div.ov_bottom_floating_panel div.ov_floating_panel_text +{ + padding: 3px; + margin-bottom: 10px; + float: left; +} + +div.ov_bottom_floating_panel div.ov_floating_panel_button +{ + width: 120px; + float: right; +} + @media (hover) { @@ -293,6 +317,11 @@ div.ov_progress max-width: 80%; } +div.ov_bottom_floating_panel +{ + padding: 10px; +} + } @media only screen and (max-height: 700px) diff --git a/website/o3dv/js/cookiedialog.js b/website/o3dv/js/cookiedialog.js deleted file mode 100644 index 6758301..0000000 --- a/website/o3dv/js/cookiedialog.js +++ /dev/null @@ -1,20 +0,0 @@ -OV.ShowCookieDialog = function (onAccept) -{ - let dialog = new OV.ButtonDialog (); - let contentDiv = dialog.Init ('Cookie Consent', [ - { - name : 'Accept', - onClick () { - dialog.Hide (); - onAccept (); - } - } - ]); - - let text = 'This website uses cookies to offer you better user experience. See the details at the Cookies Policy page.'; - OV.AddDiv (contentDiv, 'ov_dialog_section', text); - dialog.SetCloseable (false); - dialog.Show (); - dialog.MoveToTop (); - return dialog; -}; diff --git a/website/o3dv/js/modal.js b/website/o3dv/js/modal.js index 59df455..231be4c 100644 --- a/website/o3dv/js/modal.js +++ b/website/o3dv/js/modal.js @@ -72,15 +72,6 @@ OV.Modal = class this.isOpen = false; } - MoveToTop () - { - if (!this.isOpen) { - return; - } - this.modalDiv.style.zIndex = '1000'; - this.overlayDiv.style.zIndex = '1000'; - } - IsOpen () { return this.isOpen; @@ -138,11 +129,6 @@ OV.Dialog = class { this.modal.Close (); } - - MoveToTop () - { - this.modal.MoveToTop (); - } }; OV.ProgressDialog = class extends OV.Dialog diff --git a/website/o3dv/js/website.js b/website/o3dv/js/website.js index 66cedfd..e88f770 100644 --- a/website/o3dv/js/website.js +++ b/website/o3dv/js/website.js @@ -685,8 +685,13 @@ OV.Website = class return; } - OV.ShowCookieDialog (() => { + let text = 'This website uses cookies to offer you better user experience. See the details at the Cookies Policy page.'; + let popupDiv = OV.AddDiv (document.body, 'ov_bottom_floating_panel'); + OV.AddDiv (popupDiv, 'ov_floating_panel_text', text); + let acceptButton = OV.AddDiv (popupDiv, 'ov_button ov_floating_panel_button', 'Accept'); + acceptButton.addEventListener ('click', () => { this.cookieHandler.SetBoolVal ('ov_cookie_consent', true); + popupDiv.remove (); }); } };