fix button and fix service sync simbg
This commit is contained in:
@@ -591,32 +591,55 @@ document.addEventListener("DOMContentLoaded", async function (e) {
|
||||
await new BigData().init();
|
||||
});
|
||||
|
||||
// function resizeDashboard() {
|
||||
// //Target Width
|
||||
// let targetElement = document.getElementById("dashboard-fixed-wrapper");
|
||||
// let targetWidth = targetElement.offsetWidth;
|
||||
// //console.log("TARGET ",targetWidth);
|
||||
|
||||
// //Real Object Width
|
||||
// let dashboardElement = document.getElementById("dashboard-fixed-container");
|
||||
// let dashboardWidth = 1110; //dashboardElement.offsetWidth;
|
||||
// //console.log("CURRENT ",dashboardWidth);
|
||||
|
||||
// if (targetWidth > dashboardWidth) {
|
||||
// targetWidth = dashboardWidth;
|
||||
// }
|
||||
|
||||
// dashboardElement.style.transformOrigin = "left top";
|
||||
// dashboardElement.style.transition = "transform 0.2s ease-in-out";
|
||||
// dashboardElement.style.transform =
|
||||
// "scale(" + (targetWidth / dashboardWidth).toFixed(2) + ")";
|
||||
// //console.log("SCALE ", (targetWidth/dashboardWidth).toFixed(2));
|
||||
// }
|
||||
|
||||
// window.addEventListener("load", function () {
|
||||
// resizeDashboard();
|
||||
// });
|
||||
|
||||
// window.addEventListener("resize", function () {
|
||||
// resizeDashboard();
|
||||
// });
|
||||
|
||||
function resizeDashboard() {
|
||||
//Target Width
|
||||
let targetElement = document.getElementById("dashboard-fixed-wrapper");
|
||||
let targetWidth = targetElement.offsetWidth;
|
||||
//console.log("TARGET ",targetWidth);
|
||||
|
||||
//Real Object Width
|
||||
let dashboardElement = document.getElementById("dashboard-fixed-container");
|
||||
let dashboardWidth = 1110; //dashboardElement.offsetWidth;
|
||||
//console.log("CURRENT ",dashboardWidth);
|
||||
|
||||
if (targetWidth > dashboardWidth) {
|
||||
targetWidth = dashboardWidth;
|
||||
}
|
||||
let targetWidth = targetElement.offsetWidth;
|
||||
let dashboardWidth = 1110;
|
||||
|
||||
let scaleFactor = (targetWidth / dashboardWidth).toFixed(2);
|
||||
|
||||
// Prevent scaling beyond 1 (100%) to avoid overflow
|
||||
scaleFactor = Math.min(scaleFactor, 1);
|
||||
|
||||
dashboardElement.style.transformOrigin = "left top";
|
||||
dashboardElement.style.transition = "transform 0.2s ease-in-out";
|
||||
dashboardElement.style.transform =
|
||||
"scale(" + (targetWidth / dashboardWidth).toFixed(2) + ")";
|
||||
//console.log("SCALE ", (targetWidth/dashboardWidth).toFixed(2));
|
||||
dashboardElement.style.transform = `scale(${scaleFactor})`;
|
||||
|
||||
// Ensure horizontal scrolling is allowed if necessary
|
||||
document.body.style.overflowX = "auto";
|
||||
}
|
||||
|
||||
window.addEventListener("load", function () {
|
||||
resizeDashboard();
|
||||
});
|
||||
|
||||
window.addEventListener("resize", function () {
|
||||
resizeDashboard();
|
||||
});
|
||||
window.addEventListener("load", resizeDashboard);
|
||||
window.addEventListener("resize", resizeDashboard);
|
||||
|
||||
@@ -52,13 +52,16 @@ class DataSettings {
|
||||
name: "Actions",
|
||||
width: "120px",
|
||||
formatter: function (cell) {
|
||||
console.log("cell data", cell);
|
||||
return gridjs.html(`
|
||||
<div class="d-flex justify-items-end gap-10">
|
||||
<a href="/data-settings/${cell}/edit" class="btn btn-yellow me-2">Update</a>
|
||||
<button class="btn btn-red btn-delete btn-delete-data-settings" data-id="${cell}">Delete</button>
|
||||
</div>
|
||||
`);
|
||||
<div class="d-flex justify-content-center gap-2">
|
||||
<a href="/data-settings/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||
<i class='bx bx-edit'></i>
|
||||
</a>
|
||||
<button class="btn btn-sm btn-red d-inline-flex align-items-center justify-content-centerbtn-delete-data-settings" data-id="${cell}">
|
||||
<i class='bx bxs-trash' ></i>
|
||||
</button>
|
||||
</div>
|
||||
`);
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -22,9 +22,12 @@ class UsersTable {
|
||||
name: "Action",
|
||||
formatter: (cell) =>
|
||||
gridjs.html(`
|
||||
<div class="d-flex justify-content-end gap-x-2">
|
||||
<a href="/master/users/${cell}/edit" class="btn btn-yellow me-2">Update</a>
|
||||
`),
|
||||
<div class="d-flex justify-content-center">
|
||||
<a href="/master/users/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||
<i class='bx bx-edit'></i>
|
||||
</a>
|
||||
</div>
|
||||
`),
|
||||
},
|
||||
],
|
||||
pagination: {
|
||||
|
||||
@@ -56,9 +56,14 @@ class Menus {
|
||||
name: "Action",
|
||||
formatter: (cell) =>
|
||||
gridjs.html(`
|
||||
<div class="d-flex justify-content-end gap-x-2">
|
||||
<a href="/menus/${cell}/edit" class="btn btn-yellow me-2">Update</a>
|
||||
<button class="btn btn-red btn-delete btn-delete-menu" data-id="${cell}">Delete</button>
|
||||
<div class="d-flex justify-content-center align-items-center gap-2">
|
||||
<a href="/menus/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||
<i class='bx bx-edit'></i>
|
||||
</a>
|
||||
<button data-id="${cell}" class="btn btn-red btn-sm btn-delete-menu d-inline-flex align-items-center justify-content-center">
|
||||
<i class='bx bxs-trash' ></i>
|
||||
</button>
|
||||
</div>
|
||||
`),
|
||||
},
|
||||
],
|
||||
|
||||
@@ -25,8 +25,8 @@ class PbgTasks {
|
||||
name: "Action",
|
||||
formatter: function (cell) {
|
||||
return gridjs.html(`
|
||||
<div class="d-flex justify-items-end gap-10">
|
||||
<a href="/pbg-task/${cell}" class="btn btn-yellow">Detail</a
|
||||
<div class="d-flex justify-content-center align-items-center gap-2">
|
||||
<a href="/pbg-task/${cell}" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">Detail</a
|
||||
</div>
|
||||
`);
|
||||
},
|
||||
|
||||
@@ -52,10 +52,16 @@ class Roles {
|
||||
name: "Action",
|
||||
formatter: (cell) =>
|
||||
gridjs.html(`
|
||||
<div class="d-flex justify-content-end gap-x-2">
|
||||
<a href="/roles/${cell}/edit" class="btn btn-yellow me-2">Update</a>
|
||||
<a href="/roles/role-menu/${cell}" class="btn btn-yellow me-2">Role Menu</a>
|
||||
<button class="btn btn-red btn-delete-role" data-id="${cell}">Delete</button>
|
||||
<div class="d-flex justify-content-center gap-2">
|
||||
<a href="/roles/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||
<i class='bx bx-edit'></i>
|
||||
</a>
|
||||
<a href="/roles/role-menu/${cell}" class="btn btn-primary btn-sm d-inline-flex align-items-center justify-content-center">
|
||||
Role Menu
|
||||
</a>
|
||||
<button data-id="${cell}" class="btn btn-sm btn-red btn-delete-role d-inline-flex align-items-center justify-content-center">
|
||||
<i class='bx bxs-trash' ></i>
|
||||
</button>
|
||||
</div>
|
||||
`),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user