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 @@
<body onload="CHK_L.init();" style="position: relative; margin-top: 53px;">
<header style="position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;">
<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>
<span class="d-none d-md-inline fs-10">カテゴリー</span>
</a>
......@@ -40,7 +40,7 @@
<nav id="category-menu" class="drawer-menu">
<div class="d-flex justify-content-between border-bottom">
<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>
</nav>
</section>
......
......@@ -427,13 +427,14 @@ CHK.initReportApp = function (callback) {
CHK.createOperationList(CHK.operation.operationList);
//カテゴリー高さ固定
if(isSetCategory){
CATEGORY_HEIGHT = $('main').height();
CATEGORY_HEIGHT = $('footer').offset().top - $('#category-menu').offset().top;
console.log(CATEGORY_HEIGHT);
isSetCategory = false
}
$('#category-menu').height(CATEGORY_HEIGHT);
$("#category-menu").css("overflow", "scroll");
$('#category-menu').height(CATEGORY_HEIGHT - 16);
$('#overlayDiv').height(CATEGORY_HEIGHT);
});
});
// カテゴリーJSONデータ
CHK.loadJson(CHK.jsonPath.operationGroupMasterList, function (json) {
......@@ -3089,6 +3090,7 @@ function acdMenu() {
CHK.changeOperationGroupMaster = function(operationGroupMasterId) {
if ($("#category-menu").hasClass("open")) {
$('#category-toggle-button').click();
$("body").css("overflow", "visible");
}
CHK.operationGroupMasterId = operationGroupMasterId;
CHK.createCategory(CHK.operationGroupMaster.operationGroupMasterList);
......@@ -3208,3 +3210,12 @@ CHK.resetSearch = function() {
$('#searchEndDate').val('');
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