Commit 51a3d991 by Kim Eunchul

Merge branch 'feature/1.4.0_kim-ec' into 'feature/1.4.0'

カテゴリースクロール追加

See merge request !14
parents d67a57e9 c522e128
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<body onload="CHK_L.init();" style="position: relative; margin-top: 53px;"> <body onload="CHK_L.init();" style="position: relative; margin-top: 53px;">
<header style="position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;"> <header style="position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;">
<nav class="navbar navbar-dark bg-primary"> <nav class="navbar navbar-dark bg-primary">
<a class="navbar-brand category-btn lht-0 d-none" id="operationGroupMasterButton" href="javascript:CHK.setCategoryHeight();"> <a class="navbar-brand category-btn lht-0 d-none" onclick="CHK.openCategory();" id="operationGroupMasterButton" href="javascript:CHK.setCategoryHeight();">
<i class="fa fa-folder fs-12 p-1" id="category-toggle-button"></i> <i class="fa fa-folder fs-12 p-1" id="category-toggle-button"></i>
<span class="d-none d-md-inline fs-10">カテゴリー</span> <span class="d-none d-md-inline fs-10">カテゴリー</span>
</a> </a>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<nav id="category-menu" class="drawer-menu"> <nav id="category-menu" class="drawer-menu">
<div class="d-flex justify-content-between border-bottom"> <div class="d-flex justify-content-between border-bottom">
<h2 class="text-nowrap font-weight-bold fs-13 p-3 mb-0">カテゴリー</h2> <h2 class="text-nowrap font-weight-bold fs-13 p-3 mb-0">カテゴリー</h2>
<a class="category-btn p-3" href="#"><i class="fa fa-times"></i></a> <a class="category-btn p-3" onclick="CHK.openCategory();" href="#"><i class="fa fa-times"></i></a>
</div> </div>
</nav> </nav>
</section> </section>
......
...@@ -427,13 +427,14 @@ CHK.initReportApp = function (callback) { ...@@ -427,13 +427,14 @@ CHK.initReportApp = function (callback) {
CHK.createOperationList(CHK.operation.operationList); CHK.createOperationList(CHK.operation.operationList);
//カテゴリー高さ固定 //カテゴリー高さ固定
if(isSetCategory){ if(isSetCategory){
CATEGORY_HEIGHT = $('main').height(); CATEGORY_HEIGHT = $('footer').offset().top - $('#category-menu').offset().top;
console.log(CATEGORY_HEIGHT); console.log(CATEGORY_HEIGHT);
isSetCategory = false isSetCategory = false
} }
$('#category-menu').height(CATEGORY_HEIGHT); $("#category-menu").css("overflow", "scroll");
$('#category-menu').height(CATEGORY_HEIGHT - 16);
$('#overlayDiv').height(CATEGORY_HEIGHT); $('#overlayDiv').height(CATEGORY_HEIGHT);
}); });
// カテゴリーJSONデータ // カテゴリーJSONデータ
CHK.loadJson(CHK.jsonPath.operationGroupMasterList, function (json) { CHK.loadJson(CHK.jsonPath.operationGroupMasterList, function (json) {
...@@ -3089,6 +3090,7 @@ function acdMenu() { ...@@ -3089,6 +3090,7 @@ function acdMenu() {
CHK.changeOperationGroupMaster = function(operationGroupMasterId) { CHK.changeOperationGroupMaster = function(operationGroupMasterId) {
if ($("#category-menu").hasClass("open")) { if ($("#category-menu").hasClass("open")) {
$('#category-toggle-button').click(); $('#category-toggle-button').click();
$("body").css("overflow", "visible");
} }
CHK.operationGroupMasterId = operationGroupMasterId; CHK.operationGroupMasterId = operationGroupMasterId;
CHK.createCategory(CHK.operationGroupMaster.operationGroupMasterList); CHK.createCategory(CHK.operationGroupMaster.operationGroupMasterList);
...@@ -3207,4 +3209,13 @@ CHK.resetSearch = function() { ...@@ -3207,4 +3209,13 @@ CHK.resetSearch = function() {
$('#searchStartDate').val(''); $('#searchStartDate').val('');
$('#searchEndDate').val(''); $('#searchEndDate').val('');
CHK.changeSortType($('#defaultSort')); CHK.changeSortType($('#defaultSort'));
}
CHK.openCategory = function() {
window.scrollTo(0,0);
if ($("#category-menu").hasClass("open")) {
$("body").css("overflow", "visible");
}else{
$("body").css("overflow", "hidden");
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment