page randering clear

dev_tymeleaf
jangwonseokicom 1 year ago
parent 12880e8b5f
commit b0ef466826

@ -4,7 +4,7 @@
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$/main_vm" /> <file type="web" url="file://$PROJECT_DIR$/main_vm" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="corretto-17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

Binary file not shown.

@ -6,7 +6,6 @@
<GradleProjectSettings> <GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#JAVA_HOME" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />

@ -6,6 +6,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -19,8 +20,9 @@ public class DashboardController {
private final StatisticsDashboardService statisticsDashboardService; private final StatisticsDashboardService statisticsDashboardService;
@GetMapping("/manage.do") @GetMapping("/manage.do")
public String DashboardView(){ public ModelAndView DashboardView(){
return "/adm/common/dashboard"; // return "/adm/common/dashboard";
return new ModelAndView("/layout/adm/common/dashboard");
} }
@RequestMapping(value = "/callinfolist.do", method = {RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "/callinfolist.do", method = {RequestMethod.GET, RequestMethod.POST})

@ -43,7 +43,7 @@ public class LoginController {
public ModelAndView loginUsrView() { public ModelAndView loginUsrView() {
// loginService.Logout(); // loginService.Logout();
log.info("loginpage"); log.info("loginpage");
return new ModelAndView("/layout/signin"); return new ModelAndView("layout/signin");
} }
@GetMapping(value = "/adm/main/changePwd") @GetMapping(value = "/adm/main/changePwd")
@ -67,7 +67,9 @@ public class LoginController {
public ModelAndView actionSecurityLogin(@Valid LoginReq loginReq, ModelMap model) { public ModelAndView actionSecurityLogin(@Valid LoginReq loginReq, ModelMap model) {
log.info("actionlogin"); log.info("actionlogin");
// return loginService.LoginValidService(loginReq, model); // return loginService.LoginValidService(loginReq, model);
return new ModelAndView(loginService.LoginValidService(loginReq, model)); String url = loginService.LoginValidService(loginReq, model);
log.info("redi url? - -{}", url);
return new ModelAndView(url);
} }
@RequestMapping(value = "/adm/main/actionMain.do") @RequestMapping(value = "/adm/main/actionMain.do")

@ -75,7 +75,7 @@ public class LoginService {
public String LoginValidService(LoginReq dto, ModelMap model) { public String LoginValidService(LoginReq dto, ModelMap model) {
//기본 리턴은 로그인페이지 //기본 리턴은 로그인페이지
// String result = "adm/signin/signin"; // String result = "adm/signin/signin";
String result = "/layout/signin"; String result = "layout/signin";
TbBotUser userSelect = null; TbBotUser userSelect = null;
TbBotUser user = tbBotUserRepo.findByUserIdAndUseYn(dto.getUserId(), "Y") TbBotUser user = tbBotUserRepo.findByUserIdAndUseYn(dto.getUserId(), "Y")
@ -98,7 +98,8 @@ public class LoginService {
LoginVO userResult = user.toLoginVO(); LoginVO userResult = user.toLoginVO();
// return "forward:/adm/main/actionMain.do"; // return "forward:/adm/main/actionMain.do";
return "/layout/adm/common/dashboard";
return "layout/adm/common/dashboard";
} else { } else {
log.info("Fail!"); log.info("Fail!");
} }

@ -26,7 +26,7 @@ public class ConfigThymeleafViewResolver {
public SpringResourceTemplateResolver templateResolver() { public SpringResourceTemplateResolver templateResolver() {
SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver(); SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver();
// templateResolver.setPrefix("classpath:webapp/WEB-INF/templates/"); // templateResolver.setPrefix("classpath:webapp/WEB-INF/templates/");
templateResolver.setPrefix("classpath:templates"); templateResolver.setPrefix("classpath:/templates/");
templateResolver.setCharacterEncoding("UTF-8"); templateResolver.setCharacterEncoding("UTF-8");
templateResolver.setSuffix(".html"); templateResolver.setSuffix(".html");
templateResolver.setTemplateMode(mode); templateResolver.setTemplateMode(mode);

@ -1,5 +1,8 @@
<html xmlns:th="http://www.thymeleaf.org"> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="content">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>대시보드</title> <title>대시보드</title>
@ -19,9 +22,9 @@
</ul> </ul>
</div> </div>
<header id="header"> <!-- <header id="header">-->
</header> <!-- </header>-->
<script type="text/javascript" src="<c:url value='/aajs/statisticsDashboard.js' />"></script> <script type="text/javascript" src="/aajs/statisticsDashboard.js"></script>
<style> <style>
.dashboard .component-billboard .billboard-grid { .dashboard .component-billboard .billboard-grid {
@ -137,4 +140,5 @@
</section> </section>
</body> </body>
</th:block>
</html> </html>

@ -1,141 +1,110 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lagn="ko" xmlns:th="http://www.thymeleaf.org"> <html lagn="ko" xmlns:th="http://www.thymeleaf.org">
<!-- Head --> <!-- Head -->
<th:block th:fragment="headFragment"> <th:block th:fragment="headFragment">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > <meta charset="UTF-8" http-equiv="Content-Type">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=3.0">
<meta name="description" content=""> <meta name="mobile-web-app-capable" content="yes">
<meta name="author" content=""> <meta name="format-detection" content="telephone=no"/>
<link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/lib/jquery-ui.css}">
<!-- Bootstrap Core CSS --> <link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/lib/bootstrap.min.css}">
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"> <link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/lib/bootstrap-datetimepicker.min.css}">
<link th:href="@{/css/animate.css}" rel="stylesheet"> <link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/lib/bootstrap-tagsinput.css}">
<link th:href="@{/css/style.css}" rel="stylesheet"> <link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/lib/datepicker3.css}">
<link th:href="@{/css/manager.css}" rel="stylesheet"> <link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/lib/jstree.css}">
<link th:href="@{/css/plugins/dataTables/datatables.min.css}" rel="stylesheet"> <link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/lib/datatables.css}">
<link th:href="@{/css/plugins/iCheck/custom.css}" rel="stylesheet"> <link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/lib/select.dataTables.css}">
<link th:href="@{/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css}" rel="stylesheet"> <link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/lib/nice-select.css}">
<link th:href="@{/css/plugins/select2/select2.min.css}" rel="stylesheet"> <link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/style.css}">
<link rel="stylesheet" type="text/css" th:href="@{/lib/assets/css/xeicon.css}">
<link th:href="@{/css/plugins/jasny/jasny-bootstrap.min.css}" rel="stylesheet"> <!-- 추가 20220509-->
<link th:href="@{/css/plugins/chosen/bootstrap-chosen.css}" rel="stylesheet"> <link rel="stylesheet" th:href="@{/lib/new/assets/css/lib/billboard.css}">
<!--<link th:href="@{/css/newstyle.css}" rel="stylesheet">--> <link rel="stylesheet" th:href="@{/lib/assets/css/lib/select2.css}">
<link th:href="@{/css/popupManage.css}" rel="stylesheet"> <script th:src="@{/lib/assets/js/lib/jquery-2.2.1.min.js}"></script>
<link th:href="@{/css/adminstyle.css}" rel="stylesheet"> <script th:src="@{/lib/assets/js/lib/moment.js}"></script>
<script th:src="@{/lib/assets/js/lib/jquery-ui.js}"></script>
<script th:src="@{/lib/assets/js/lib/bootstrap.min.js}"></script>
<!-- favicon --> <script th:src="@{/lib/assets/js/lib/bootstrap-datepicker.js}"></script>
<link rel="shortcut icon" th:href="@{/img/favicon.ico}"> <script th:src="@{/lib/assets/js/lib/jquery.MultiFile.js}"></script>
<script th:src="@{/lib/assets/js/lib/jstree.js}"></script>
<!-- Mainly scripts --> <script th:src="@{/lib/assets/js/lib/select.dataTables.js}"></script>
<script th:src="@{/js/jquery-3.1.1.min.js}"></script> <script th:src="@{/lib/assets/js/lib/sweetalert.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script> <script th:src="@{/lib/assets/js/lib/bootstrap-datetimepicker.js}"></script>
<script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script> <script th:src="@{/lib/assets/js/lib/datatables.js}"></script>
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script> <script th:src="@{/lib/assets/js/lib/bootstrap-tagsinput.js}"></script>
<script th:src="@{/js/jquery_cookie.js}"></script> <script th:src="@{/lib/assets/js/lib/jquery.nice-select.js}"></script>
<script th:src="@{/lib/assets/js/lib/jquery.serialize-object.min.js}"></script>
<script th:src="@{/js/plugins/dataTables/datatables.min.js}"></script> <script th:src="@{/lib/assets/js/scripts.js}"></script>
<!-- 추가 20220509-->
<!-- Custom and plugin javascript --> <script th:src="@{/lib/assets/js/lib/d3.js}"></script>
<script th:src="@{/js/inspinia.js}"></script> <script th:src="@{/lib/new/assets/js/lib/billboard.pkgd.min.js}"></script>
<script th:src="@{/js/plugins/pace/pace.min.js}"></script> <script th:src="@{/js/utils.js}"></script>
<script th:src="@{/js/manage.comn.js}"></script>
<!-- iCheck -->
<script th:src="@{/js/plugins/iCheck/icheck.min.js}"></script>
<!-- Select2 -->
<script th:src="@{/js/plugins/select2/select2.full.min.js}"></script>
<!-- Jasny -->
<script th:src="@{/js/plugins/jasny/jasny-bootstrap.min.js}"></script>
<!-- Chosen -->
<script th:src="@{/js/plugins/chosen/chosen.jquery.js}"></script>
<!-- jquery.serialize-object -->
<script th:src="@{/js/jquery.serialize-object.js}"></script>
<script th:src="@{/js/plugins/fullcalendar/moment.min.js}"></script>
<!-- datepicker -->
<link th:href="@{/css/plugins/daterangepicker/daterangepicker-bs3.css}" rel="stylesheet">
<script th:src="@{/js/plugins/daterangepicker/daterangepicker.js}"></script>
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<!-- fontAwesome -->
<link th:href="@{/font-awesome/css/font-awesome.css}" rel="stylesheet">
<link th:href="@{/font-awesome/css/all.css}" rel="stylesheet">
<!--<link th:href="@{/fontawesome-free-6.1.1-web/css/all.min.css}" rel="stylesheet" >-->
<script th:src="@{/font-awesome/js/all.js}"></script>
<link rel="stylesheet" th:href="@{/css/reportManage.css}">
<script type="text/javascript"> <script type="text/javascript">
$.ajaxPrefilter(function(options, originalOptions, jqXHR ) {
options.url = "/admin" + "/" + options.url;
jqXHR.setRequestHeader("AJAX", "true");
});
$(document).ajaxError(function(event, jqxhr, settings, thrownError) {
if (jqxhr.status == '401') {
alert("권한이 없습니다.");
window.location.href = '/admin/user/info/listView';
} else if (jqxhr.status == '500') {
alert("서버와의 연결이 끊어졌습니다. 서버가 켜져 있고 IP 주소에 도달 할 수 있는지 확인하십시오.");
} else {
// alert("서버 오류가 발생하였습니다. 관리자에게 문의하세요.");
}
console.log("status : " + jqxhr.status + ", statusText : " + jqxhr.statusText);
console.log("responseText : " + jqxhr.responseText);
console.log("url : " + settings.url);
console.log(event);
console.log(jqxhr);
console.log(settings);
console.log(thrownError);
});
function fnDoLogout() {
var cfm = confirm("로그아웃 하시겠습니까?");
if (cfm) {
document.logoutForm.submit();
/* $.ajax({
url: "login/logout",
type:'POST',
cache: false,
dataType: "json",
async: false,
success: function(data) {
location.href = "${ctx}/";
},
error: function(e) {
console.log(e);
}
}); */
}
}
// $(document).ready(function(){
// $('.menu1').click(function(){
// $(this).children('.menu2').slideToggle(200);
// $(this).siblings('li').children('.menu2').slideUp(200);
// });
//
// $('.menu2').click(function(){
// $(this).show();
// });
// })
</script> </script>
</head> </head>
<style th:inline="text">
/*#pdfdown{*/
/* background-image: url("/lib/assets/images/ico-menual-download.png");*/
/* background-repeat: no-repeat;*/
/*}*/
header .login_info .user_info ul li a.user_info_btn.menual:after {
top: 12px;
left: 7px;
width: 22px;
height: 20px;
/*background: url("/lib/assets/images/ico-menual-download.png") center center / contain no-repeat;*/
/*background: url("@{}") center center / contain no-repeat;*/
background-position: center center;
}
</style>
<header id="header">
<div class="header_wrap">
<div class="logo">
<!-- <a href="<c:url value='/admin/common/dashboard/manage.do'/>">-->
<img th:src='@{/lib/assets/images/logo.png}'>
</a>
</div>
<div class="global-select-ai sel_box">
<div class="global-store-logo"><img class="ai-store-logo"
th:src="@{/lib/assets/images/img-bot.png}"
alt=""></div>
<div class="global-store-slt">
<select class="wide" id="mainOpr">
</select>
</div>
</div>
<div class="login_info">
<div class="user_name">
<input type="hidden" id="naviseq">
<a class="user_name_btn" href="#">
<!-- <em class="user_name_btn">${LoginVO.userName}</em> 님 반갑습니다.-->
<em class="user_name_btn">이름!!</em> 님 반갑습니다.
</a>
</div>
<div class="user_info">
<ul class="logininfotitle">
<li>
<a href="#" class="user_info_btn" id="pwdChange">비밀번호변경</a>
</li>
<li>
<a th:href="@{/adm/main/pdfdownload?name=Ourstore_Ai_Manager_User_Manual_v1.pdf}"
target="_blank"
class="user_info_btn menual" id="pdfdown">메뉴얼다운로드</a>
</li>
<li>
<a href="#" class="user_info_btn" id="logout">로그아웃</a>
</li>
</ul>
</div>
</div>
</div>
</header>
</th:block> </th:block>
</html> </html>

@ -3,12 +3,82 @@
<th:block th:fragment="sidebarFragment"> <th:block th:fragment="sidebarFragment">
<script type=text/javascript> <script type=text/javascript>
</script> </script>
<style>
header + article {
z-index: 0;
}
</style>
<article>
<div class="lnb_menu_btn_area open">
<a href="#" class="lnb_menu_menu">
<p>메뉴닫기</p>
<span></span>
<span></span>
<span></span>
<span></span>
</a>
</div>
<nav>
<ul class="lnb">
<!-- <c:choose>-->
<!-- <c:when test="${empty list_menulist }">-->
<!-- <li>Refresh</li>-->
<!-- </ul>-->
<!-- </c:when>-->
<!-- <c:otherwise>-->
<!-- <c:forEach var="result" items="${list_menulist}" varStatus="status">-->
<!-- <c:choose>-->
<!-- <c:when test="${result.level eq '2'}">-->
<!-- <li>-->
<!-- <a href="#"><c:out value="${result.menuName}"/></a>-->
<!-- <ul class="depth<c:out value="${result.level}"/>">-->
<!-- </c:when>-->
<!-- <c:when test="${result.level eq '3'}">-->
<!-- <c:choose>-->
<!-- <c:when test="${result.level >= result.nextLevel}">-->
<!-- <li>-->
<!-- <a href="${pageContext.request.contextPath}<c:out value="${result.url}" />"><span><c:out-->
<!-- value="${result.menuName}"/></span></a>-->
<!-- </li>-->
<!-- </c:when>-->
<!-- <c:when test="${result.nextLevel eq '4'}">-->
<!-- <li>-->
<!-- <a href="#"><c:out value="${result.menuName}"/></a>-->
<!-- <ul class="depth<c:out value="${result.level}"/>">-->
<!-- </c:when>-->
<!-- </c:choose>-->
<!-- <c:if test="${result.nextLevel eq '2'}">-->
<!-- </ul>-->
<!-- </li>-->
<!-- </c:if>-->
<!-- </c:when>-->
<!-- <c:when test="${result.level eq '4'}">-->
<!-- <li>-->
<!-- <a href="${pageContext.request.contextPath}<c:out value="${result.url}" />"><span><c:out-->
<!-- value="${result.menuName}"/></span></a>-->
<!-- </li>-->
<!-- <c:if test="${empty result.nextLevel or result.nextLevel eq '2'}">-->
<!-- </ul>-->
<!-- </li>-->
<!-- </ul>-->
<!-- </li>-->
<!-- </c:if>-->
<!-- <c:if test="${result.nextLevel eq '3'}">-->
<!-- </ul>-->
<!-- </li>-->
<!-- </c:if>-->
<!-- </c:when>-->
<!-- </c:choose>-->
<!-- </c:forEach>-->
<!-- </c:otherwise>-->
<!-- </c:choose>-->
</ul>
</nav>
</article>
<body>
사이드바
</body>
</th:block> </th:block>

@ -5,9 +5,9 @@
<script type="text/javascript" th:inline="javascript"> <script type="text/javascript" th:inline="javascript">
</script> </script>
<!-- Topbar -->
TOPBAR
탑빠
</th:block> </th:block>
</html> </html>

@ -2,16 +2,18 @@
<html lang="ko" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> <html lang="ko" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<th:block th:replace="layout/fragments/head :: headFragment"></th:block> <th:block th:replace="layout/fragments/head :: headFragment"></th:block>
<body id="page-top"> <body>
<div id="wrapper"> <section id="Content" class="bot_common">
<th:block th:replace="layout/fragments/top :: topbarFragment"></th:block> <div>
<!-- <th:block th:replace="layout/fragments/top :: topbarFragment"></th:block>-->
<th:block th:replace="layout/fragments/sidebar :: sidebarFragment"></th:block> <th:block th:replace="layout/fragments/sidebar :: sidebarFragment"></th:block>
<div id="page-wrapper" class="gray-bg"> <div>
<div class="wrapper wrapper-content animated fadeInRight" id="bodyContentDiv"> <div>
<th:block layout:fragment="content"></th:block> <th:block layout:fragment="content"></th:block>
</div> </div>
<th:block th:replace="layout/fragments/footer :: footerFragment"></th:block> <!-- <th:block th:replace="layout/fragments/footer :: footerFragment"></th:block>-->
</div> </div>
</div> </div>
</section>
</body> </body>
</html> </html>
Loading…
Cancel
Save