Cookie consent popup instead of dialog.
This commit is contained in:
parent
9c803562f3
commit
9986664a31
@ -77,7 +77,6 @@
|
|||||||
"website/o3dv/js/openurldialog.js",
|
"website/o3dv/js/openurldialog.js",
|
||||||
"website/o3dv/js/exportdialog.js",
|
"website/o3dv/js/exportdialog.js",
|
||||||
"website/o3dv/js/sharingdialog.js",
|
"website/o3dv/js/sharingdialog.js",
|
||||||
"website/o3dv/js/cookiedialog.js",
|
|
||||||
"website/o3dv/js/panelset.js",
|
"website/o3dv/js/panelset.js",
|
||||||
"website/o3dv/js/navigatoritems.js",
|
"website/o3dv/js/navigatoritems.js",
|
||||||
"website/o3dv/js/navigatorpanel.js",
|
"website/o3dv/js/navigatorpanel.js",
|
||||||
|
|||||||
@ -105,7 +105,6 @@
|
|||||||
<script type="text/javascript" src="o3dv/js/openurldialog.js"></script>
|
<script type="text/javascript" src="o3dv/js/openurldialog.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/exportdialog.js"></script>
|
<script type="text/javascript" src="o3dv/js/exportdialog.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/sharingdialog.js"></script>
|
<script type="text/javascript" src="o3dv/js/sharingdialog.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/cookiedialog.js"></script>
|
|
||||||
<script type="text/javascript" src="o3dv/js/panelset.js"></script>
|
<script type="text/javascript" src="o3dv/js/panelset.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/navigatoritems.js"></script>
|
<script type="text/javascript" src="o3dv/js/navigatoritems.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/navigatorpanel.js"></script>
|
<script type="text/javascript" src="o3dv/js/navigatorpanel.js"></script>
|
||||||
|
|||||||
@ -107,7 +107,6 @@
|
|||||||
<script type="text/javascript" src="o3dv/js/openurldialog.js"></script>
|
<script type="text/javascript" src="o3dv/js/openurldialog.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/exportdialog.js"></script>
|
<script type="text/javascript" src="o3dv/js/exportdialog.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/sharingdialog.js"></script>
|
<script type="text/javascript" src="o3dv/js/sharingdialog.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/cookiedialog.js"></script>
|
|
||||||
<script type="text/javascript" src="o3dv/js/panelset.js"></script>
|
<script type="text/javascript" src="o3dv/js/panelset.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/navigatoritems.js"></script>
|
<script type="text/javascript" src="o3dv/js/navigatoritems.js"></script>
|
||||||
<script type="text/javascript" src="o3dv/js/navigatorpanel.js"></script>
|
<script type="text/javascript" src="o3dv/js/navigatorpanel.js"></script>
|
||||||
|
|||||||
@ -247,6 +247,30 @@ div.ov_property_table div.ov_property_table_button
|
|||||||
cursor: pointer;
|
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)
|
@media (hover)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -293,6 +317,11 @@ div.ov_progress
|
|||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.ov_bottom_floating_panel
|
||||||
|
{
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-height: 700px)
|
@media only screen and (max-height: 700px)
|
||||||
|
|||||||
@ -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 <a target="_blank" href="info/cookies.html">Cookies Policy</a> page.';
|
|
||||||
OV.AddDiv (contentDiv, 'ov_dialog_section', text);
|
|
||||||
dialog.SetCloseable (false);
|
|
||||||
dialog.Show ();
|
|
||||||
dialog.MoveToTop ();
|
|
||||||
return dialog;
|
|
||||||
};
|
|
||||||
@ -72,15 +72,6 @@ OV.Modal = class
|
|||||||
this.isOpen = false;
|
this.isOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MoveToTop ()
|
|
||||||
{
|
|
||||||
if (!this.isOpen) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.modalDiv.style.zIndex = '1000';
|
|
||||||
this.overlayDiv.style.zIndex = '1000';
|
|
||||||
}
|
|
||||||
|
|
||||||
IsOpen ()
|
IsOpen ()
|
||||||
{
|
{
|
||||||
return this.isOpen;
|
return this.isOpen;
|
||||||
@ -138,11 +129,6 @@ OV.Dialog = class
|
|||||||
{
|
{
|
||||||
this.modal.Close ();
|
this.modal.Close ();
|
||||||
}
|
}
|
||||||
|
|
||||||
MoveToTop ()
|
|
||||||
{
|
|
||||||
this.modal.MoveToTop ();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
OV.ProgressDialog = class extends OV.Dialog
|
OV.ProgressDialog = class extends OV.Dialog
|
||||||
|
|||||||
@ -685,8 +685,13 @@ OV.Website = class
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
OV.ShowCookieDialog (() => {
|
let text = 'This website uses cookies to offer you better user experience. See the details at the <a target="_blank" href="info/cookies.html">Cookies Policy</a> 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);
|
this.cookieHandler.SetBoolVal ('ov_cookie_consent', true);
|
||||||
|
popupDiv.remove ();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user