Develop
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<link rel="stylesheet" href="/css/app.css">
|
||||
@yield('styles')
|
||||
</head>
|
||||
<body class="hold-transition sidebar-mini text-sm">
|
||||
<body class="hold-transition sidebar-mini text-sm layout-fixed layout-navbar-fixed">
|
||||
<div class="wrapper">
|
||||
|
||||
@include('partials.top_menu')
|
||||
@@ -154,8 +154,48 @@
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(document).on("submit",".form-delete",function (e){
|
||||
e.preventDefault();
|
||||
let test = Swal.fire({
|
||||
title: 'Data akan dihapus?',
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: 'Ya',
|
||||
denyButtonText: "Tidak",
|
||||
icon: "warning",
|
||||
}).then((result) => {
|
||||
/* Read more about isConfirmed, isDenied below */
|
||||
if (result.isConfirmed) {
|
||||
e.currentTarget.submit();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var url = window.location;
|
||||
url = url + "";
|
||||
const allLinks = document.querySelectorAll('.nav-item a');
|
||||
// const currentLink = [...allLinks].filter(e => {
|
||||
// return url.indexOf(e.href) > -1) {
|
||||
// return e.href == url;
|
||||
// }
|
||||
// });
|
||||
let currentLink = "";
|
||||
allLinks.forEach((val, idx) => {
|
||||
if (url.indexOf(val.href) > -1){
|
||||
currentLink = val;
|
||||
}
|
||||
})
|
||||
|
||||
$(currentLink).addClass("active")
|
||||
$(".has-treeview").removeClass("menu-open active");
|
||||
$(currentLink).closest(".has-treeview").addClass("menu-open active");
|
||||
$($(currentLink).closest(".has-treeview")).children("a.nav-link").addClass("active");
|
||||
$($(currentLink).closest(".nav-treeview")).closest("li.nav-item").addClass("menu-open");
|
||||
$($(currentLink).closest(".nav-treeview")).parentsUntil(".nav-sidebar > .nav-treeview").addClass('menu-open');
|
||||
});
|
||||
</script>
|
||||
@yield('scripts')
|
||||
@yield('scripts2')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<link rel="stylesheet" href="/css/app.css">
|
||||
@yield('styles')
|
||||
</head>
|
||||
<body class="hold-transition sidebar-mini text-sm">
|
||||
<body class="hold-transition sidebar-mini text-sm layout-fixed layout-navbar-fixed">
|
||||
<div class="wrapper">
|
||||
|
||||
@include('partials.top_menu')
|
||||
@@ -152,5 +152,6 @@
|
||||
});
|
||||
</script>
|
||||
@yield('scripts')
|
||||
@yield('scripts2')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user