diff --git a/src/main/java/com/dbnt/kcgfilemanager/service/BoardCategoryService.java b/src/main/java/com/dbnt/kcgfilemanager/service/BoardCategoryService.java index 0db5aff..709742d 100644 --- a/src/main/java/com/dbnt/kcgfilemanager/service/BoardCategoryService.java +++ b/src/main/java/com/dbnt/kcgfilemanager/service/BoardCategoryService.java @@ -13,6 +13,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; import java.util.Objects; @@ -41,7 +42,9 @@ public class BoardCategoryService { } public List selectBoardCategoryListToFindAll(){ - return boardCategoryRepository.findAll(); + List categoryList = boardCategoryRepository.findAll(); + categoryList.sort(Comparator.comparing(BoardCategory::getSortCnt).reversed()); + return categoryList; } @Transactional diff --git a/src/main/resources/static/js/common.js b/src/main/resources/static/js/common.js index 6c52137..a59e2ed 100644 --- a/src/main/resources/static/js/common.js +++ b/src/main/resources/static/js/common.js @@ -6,7 +6,7 @@ $(document).on('click', '#moveRightBtn', function (){ $(document).on('click', '#moveLeftBtn', function (){ moveCategorySelectBody(-1); }) -$(document).on('click', '#contentWriteBtn', function (){ +$(document).on('click', '.contentWriteBtn', function (){ location.href="/board/contentWrite"+(categorySeq!==undefined?("?categorySeq="+categorySeq):""); }) function moveCategorySelectBody(direction){ diff --git a/src/main/resources/templates/board/contentList.html b/src/main/resources/templates/board/contentList.html index 65c76fb..ab6b613 100644 --- a/src/main/resources/templates/board/contentList.html +++ b/src/main/resources/templates/board/contentList.html @@ -106,7 +106,8 @@ -
+
+
+
diff --git a/src/main/resources/templates/fragments/leftMenu.html b/src/main/resources/templates/fragments/leftMenu.html index 6efdb94..91364f0 100644 --- a/src/main/resources/templates/fragments/leftMenu.html +++ b/src/main/resources/templates/fragments/leftMenu.html @@ -17,7 +17,7 @@ 통합 검색