diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index 049559b98..d89af3a4b 100644 Binary files a/netbox/project-static/dist/netbox.js and b/netbox/project-static/dist/netbox.js differ diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map index 061af7870..eb536fb0b 100644 Binary files a/netbox/project-static/dist/netbox.js.map and b/netbox/project-static/dist/netbox.js.map differ diff --git a/netbox/project-static/src/dashboard.ts b/netbox/project-static/src/dashboard.ts index 80680b264..e392249df 100644 --- a/netbox/project-static/src/dashboard.ts +++ b/netbox/project-static/src/dashboard.ts @@ -6,8 +6,13 @@ function lockDashboard(): void { const dashboard = document.getElementById('dashboard') as any; const gridUnlockButton = document.getElementById('unlock_dashboard') as HTMLButtonElement; const gridLockButton = document.getElementById('lock_dashboard') as HTMLButtonElement; + if (dashboard) { dashboard.gridstack.disable(); + // Hide the grid stack items buttons + Array.from(document.getElementsByClassName("grid-stack-item-button")).forEach(function (element) { + element.classList.add('invisible'); + }); } if (gridUnlockButton && gridLockButton) { gridUnlockButton.classList.remove('invisible'); @@ -21,6 +26,10 @@ function unlockDashboard(): void { const gridLockButton = document.getElementById('lock_dashboard') as HTMLButtonElement; if (dashboard) { dashboard.gridstack.enable(); + // Show the grid stack items buttons + Array.from(document.getElementsByClassName("grid-stack-item-button")).forEach(function (element) { + element.classList.remove('invisible'); + }); } if (gridUnlockButton && gridLockButton) { gridUnlockButton.classList.add('invisible'); diff --git a/netbox/templates/extras/dashboard/widget.html b/netbox/templates/extras/dashboard/widget.html index d0026ac57..6f9565aad 100644 --- a/netbox/templates/extras/dashboard/widget.html +++ b/netbox/templates/extras/dashboard/widget.html @@ -10,7 +10,7 @@ >