|
@@ -1,6 +1,56 @@
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
|
<%@ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %>
|
|
<%@ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %>
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
|
|
+
|
|
|
|
+<style>
|
|
|
|
+ .sidebar-dropdown .sidebar-link {
|
|
|
|
+ background: none;
|
|
|
|
+ }
|
|
|
|
+ #dashboards i.fas{
|
|
|
|
+ transition: 0.2s;
|
|
|
|
+ }
|
|
|
|
+ #dashboards i.fas.fa-chevron-right {
|
|
|
|
+ float: right;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ margin:0;
|
|
|
|
+ margin-top: 4px;
|
|
|
|
+ }
|
|
|
|
+ #dashboards > li.sidebar-item.open a > i.fas.fa-chevron-right {
|
|
|
|
+ -ms-transform: rotate(90deg); /* IE 9 */
|
|
|
|
+ -webkit-transform: rotate(90deg); /* Chrome, Safari, Opera */
|
|
|
|
+ transform: rotate(90deg);
|
|
|
|
+ transition: 0.5s;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #dashboards > li.sidebar-item > a.sidebar-link{
|
|
|
|
+ padding-left:20px;font-size:14px;color:#a8aaad;
|
|
|
|
+ background: #252e3c;
|
|
|
|
+ border-radius: 5px;margin: 8px;
|
|
|
|
+ padding: 8px 14px;
|
|
|
|
+ transition: 0.2s;
|
|
|
|
+ }
|
|
|
|
+ #dashboards > li.sidebar-item.on > a{
|
|
|
|
+ color:#ffffff;
|
|
|
|
+ }
|
|
|
|
+ #dashboards > li.sidebar-item.on > a i {
|
|
|
|
+ color:#ffffff;
|
|
|
|
+ opacity:1;
|
|
|
|
+ }
|
|
|
|
+ .sidebar-dropdown .sidebar-item.active {
|
|
|
|
+ border-left:0;
|
|
|
|
+ }
|
|
|
|
+ .sidebar-item.active .sidebar-link:hover, .sidebar-item.active>.sidebar-link {
|
|
|
|
+ color:#ffffff;
|
|
|
|
+ background: none;
|
|
|
|
+ }
|
|
|
|
+ #dashboards > li.sidebar-item div.sidebar-item{
|
|
|
|
+ display: none;
|
|
|
|
+ }
|
|
|
|
+ #dashboards > li.sidebar-item.open div.sidebar-item {
|
|
|
|
+ display: block;
|
|
|
|
+ }
|
|
|
|
+</style>
|
|
|
|
+
|
|
<nav id="sidebar" class="sidebar">
|
|
<nav id="sidebar" class="sidebar">
|
|
<div class="sidebar-content ">
|
|
<div class="sidebar-content ">
|
|
<a class="sidebar-brand" href="/">
|
|
<a class="sidebar-brand" href="/">
|
|
@@ -92,55 +142,6 @@
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
|
|
|
|
- <style>
|
|
|
|
- .sidebar-dropdown .sidebar-link {
|
|
|
|
- background: none;
|
|
|
|
- }
|
|
|
|
- #dashboards i.fas{
|
|
|
|
- transition: 0.2s;
|
|
|
|
- }
|
|
|
|
- #dashboards i.fas.fa-chevron-right {
|
|
|
|
- float: right;
|
|
|
|
- vertical-align: middle;
|
|
|
|
- margin:0;
|
|
|
|
- margin-top: 4px;
|
|
|
|
- }
|
|
|
|
- #dashboards > li.sidebar-item.open a > i.fas.fa-chevron-right {
|
|
|
|
- -ms-transform: rotate(90deg); /* IE 9 */
|
|
|
|
- -webkit-transform: rotate(90deg); /* Chrome, Safari, Opera */
|
|
|
|
- transform: rotate(90deg);
|
|
|
|
- transition: 0.5s;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #dashboards > li.sidebar-item > a.sidebar-link{
|
|
|
|
- padding-left:20px;font-size:14px;color:#a8aaad;
|
|
|
|
- background: #252e3c;
|
|
|
|
- border-radius: 5px;margin: 8px;
|
|
|
|
- padding: 8px 14px;
|
|
|
|
- transition: 0.2s;
|
|
|
|
- }
|
|
|
|
- #dashboards > li.sidebar-item.on > a{
|
|
|
|
- color:#ffffff;
|
|
|
|
- }
|
|
|
|
- #dashboards > li.sidebar-item.on > a i {
|
|
|
|
- color:#ffffff;
|
|
|
|
- opacity:1;
|
|
|
|
- }
|
|
|
|
- .sidebar-dropdown .sidebar-item.active {
|
|
|
|
- border-left:0;
|
|
|
|
- }
|
|
|
|
- .sidebar-item.active .sidebar-link:hover, .sidebar-item.active>.sidebar-link {
|
|
|
|
- color:#ffffff;
|
|
|
|
- background: none;
|
|
|
|
- }
|
|
|
|
- #dashboards > li.sidebar-item div.sidebar-item{
|
|
|
|
- display: none;
|
|
|
|
- }
|
|
|
|
- #dashboards > li.sidebar-item.open div.sidebar-item {
|
|
|
|
- display: block;
|
|
|
|
- }
|
|
|
|
- </style>
|
|
|
|
-
|
|
|
|
<script>
|
|
<script>
|
|
$( "#menu-list" ).find( "div.sidebar-item" ).each( function(){
|
|
$( "#menu-list" ).find( "div.sidebar-item" ).each( function(){
|
|
var target = $( this ).data( "target" );
|
|
var target = $( this ).data( "target" );
|
|
@@ -148,20 +149,27 @@
|
|
});
|
|
});
|
|
|
|
|
|
$("#dashboards > li").each( function() {
|
|
$("#dashboards > li").each( function() {
|
|
- console.log( $( this ).find( "div.sidebar-item" ).length );
|
|
|
|
if( $(this).find("div.sidebar-item").length == 0 ) {
|
|
if( $(this).find("div.sidebar-item").length == 0 ) {
|
|
$( this ).remove();
|
|
$( this ).remove();
|
|
} else if( $(this).find("div.sidebar-item").length == 1 ) {
|
|
} else if( $(this).find("div.sidebar-item").length == 1 ) {
|
|
|
|
+ $( this ).find( ".fas.fa-chevron-right" ).remove();
|
|
// $( this ).children( "a" ).remove();
|
|
// $( this ).children( "a" ).remove();
|
|
// $( this ).find("div.sidebar-item").show();
|
|
// $( this ).find("div.sidebar-item").show();
|
|
}
|
|
}
|
|
|
|
|
|
});
|
|
});
|
|
$( "#dashboards > li > a" ).on( "click", function(){
|
|
$( "#dashboards > li > a" ).on( "click", function(){
|
|
- console.log( $( this ) );
|
|
|
|
- $( this ).parent( "li" ).toggleClass( "open" );
|
|
|
|
- $( this ).parent( "li" ).siblings( "li" ).toggleClass( "open", false );
|
|
|
|
|
|
+ if( $(this).siblings("div.sidebar-item").length == 1 ) {
|
|
|
|
+ location.href = $( this ).siblings("div.sidebar-item").find( "a.sidebar-link" ).attr( "href" );
|
|
|
|
+ $( this ).find( "div.spinner-border" ).remove()
|
|
|
|
+ $( this ).append( '<div class="spinner-border spinner-border-sm" style="float:right;margin-top:3px;" role="status"><span class="sr-only">Loading...</span></div>' );
|
|
|
|
+ } else {
|
|
|
|
+ $( this ).parent( "li" ).toggleClass( "open" );
|
|
|
|
+ $( this ).parent( "li" ).siblings( "li" ).toggleClass( "open", false );
|
|
|
|
+ }
|
|
|
|
+
|
|
// $( this ).siblings( "div.sidebar-item" ).toggle();
|
|
// $( this ).siblings( "div.sidebar-item" ).toggle();
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
|
|
// $( "div.sidebar-item.active" ).siblings( "a.sidebar-link" ).find( "i.fas" ).removeClass( "fa-chevron-right" ).addClass( "fa-chevron-down" );
|
|
// $( "div.sidebar-item.active" ).siblings( "a.sidebar-link" ).find( "i.fas" ).removeClass( "fa-chevron-right" ).addClass( "fa-chevron-down" );
|