2
0
forked from Wavyzz/dolibarr

Update lib_head.js.php

This commit is contained in:
Laurent Destailleur
2022-03-15 19:23:17 +01:00
committed by GitHub
parent 22706b70e9
commit 0899caf74d

View File

@@ -1138,7 +1138,7 @@ $(document).ready(function() {
// Force to hide menus when page is inside an iFrame
$(document).ready(function() {
if (window.location.pathname.indexOf("externalsite/frametop.php") == -1 && window.location !== window.parent.location ) {
if (window.location && window.location.pathname.indexOf("externalsite/frametop.php") == -1 && window.location !== window.parent.location ) {
console.log("Page is detected to be into an iframe, we hide by CSS the menus");
// The page is in an iframe
jQuery(".side-nav-vert, .side-nav, .websitebar").hide();