Commit e25da2b5 by NGUYEN HOANG SON

implement lang, action sort index page

parent d5660e07
......@@ -95,6 +95,19 @@
"templateSelection":"Template selection",
"logo":"logo",
"listDisplay":"List display",
"gridDisplay":"Grid display"
"gridDisplay":"Grid display",
"operationListSearchPlacehoder":"Operation Name",
"searchIcon":"Search Icon",
"category":"Category",
"term":"Term",
"searchClear":"Search Clear",
"calendar":"Calendar",
"startDate":"Start Date",
"endDate":"End Date",
"sortBy":"Sort By",
"sortByName":"Name",
"sortByStartDate":"Start Date",
"sortByEndDate":"End Date",
"sortByLastEdit":"Last Edit"
}
\ No newline at end of file
......@@ -93,5 +93,18 @@
"templateSelection":"テンプレート選択",
"logo":"ロゴ",
"listDisplay":"リスト表示",
"gridDisplay":"グリッド表示"
"gridDisplay":"グリッド表示",
"operationListSearchPlacehoder":"作業名",
"searchIcon":"検索アイコン",
"category":"カテゴリー",
"term":"期間",
"searchClear":"検索条件をクリア",
"calendar":"カレンダー",
"startDate":"開始日",
"endDate":"終了日",
"sortBy":"並び替え",
"sortByName":"作業名順",
"sortByStartDate":"新しい順",
"sortByEndDate":"古い順",
"sortByLastEdit":"閲覧日順"
}
\ No newline at end of file
......@@ -92,5 +92,18 @@
"templateSelection":"Template selection",
"logo":"logo",
"listDisplay":"list display",
"gridDisplay":"Grid display"
"gridDisplay":"Grid display",
"operationListSearchPlacehoder":"Operation Name",
"searchIcon":"Search Icon",
"category":"Category",
"term":"Term",
"searchClear":"Search Clear",
"calendar":"Calendar",
"startDate":"Start Date",
"endDate":"End Date",
"sortBy":"Sort By",
"sortByName":"Name",
"sortByStartDate":"Start Date",
"sortByEndDate":"End Date",
"sortByLastEdit":"Last Edit"
}
\ No newline at end of file
......@@ -47,37 +47,37 @@
<nav aria-label="search" class="search search-condition">
<div class="d-flex align-items-center">
<div class="search-form mr-1">
<input type="text" class="form-control" placeholder="作業名" id="searchTaskName">
<input type="text" class="form-control lang" lang="operationListSearchPlacehoder" placeholder="" id="searchTaskName">
<a href="#" class="search-form-btn" >
<img src="../common/img/icon_search.svg" alt="検索アイコン" onclick="OL.search();">
<img src="../common/img/icon_search.svg" type="image" alt="" class="lang" lang="searchIcon" onclick="OL.search();">
</a>
</div>
<a href="#" class="mx-1" data-toggle="modal" data-target="#category-modal">
<img class="serarch-icon" src="../common/img/icon_folder.svg" alt="カテゴリー" data-toggle="tooltip" data-placement="bottom" title="カテゴリー" onclick="OL.openCategory();">
<img class="serarch-icon lang" lang="category" src="../common/img/icon_folder.svg" type="image" alt="" data-toggle="tooltip" data-placement="bottom" title="" onclick="OL.openCategory();">
</a>
<div class="c-dropdown">
<a href="#" class="mx-1">
<img class="serarch-icon c-dropdown-trigger" id="dropdown-term" src="../common/img/icon_calendar.svg" alt="期間" data-toggle="tooltip" data-placement="bottom" title="期間">
<img class="serarch-icon c-dropdown-trigger lang" lang="term" id="dropdown-term" src="../common/img/icon_calendar.svg" type="image" alt="" data-toggle="tooltip" data-placement="bottom" title="">
</a>
<div class="c-dropdown-menu dropdown-menu-right" data-animation="true" data-target="dropdown-term">
<div class="form-group p-2 mb-0">
<label>開始日</label>
<label class="lang" lang="startDate"></label>
<div class="input-group date" id="datetimepicker1" data-target-input="nearest">
<input type="text" name="start" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker1" placeholder="選択" id="searchStartDate">
<div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
<div class="input-group-text py-1 px-2">
<img src="../common/img/icon_calendar.svg" alt="カレンダー" class="calendar-icon">
<img src="../common/img/icon_calendar.svg" type="image" alt="" class="calendar-icon lang" lang="calendar">
</div>
</div>
</div>
</div>
<div class="form-group p-2 mb-0">
<label>終了日</label>
<label class="lang" lang="endDate"></label>
<div class="input-group date" id="datetimepicker2" data-target-input="nearest">
<input type="text" name="end" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker2" placeholder="選択" id="searchEndDate">
<div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker">
<div class="input-group-text py-1 px-2">
<img src="../common/img/icon_calendar.svg" alt="カレンダー" class="calendar-icon">
<img src="../common/img/icon_calendar.svg" type="image" alt="" class="calendar-icon lang" lang="calendar">
</div>
</div>
</div>
......@@ -87,17 +87,17 @@
</div>
<div class="dropdown">
<a href="#" class="mx-1" id="dropdown-term" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-offset="-120, 0">
<img class="serarch-icon" src="../common/img/icon_swap.svg" alt="並び替え" data-toggle="tooltip" data-placement="bottom" title="並び替え">
<img class="serarch-icon lang" lang="sortBy" src="../common/img/icon_swap.svg" type="image" alt="" data-toggle="tooltip" data-placement="bottom" title="">
</a>
<div class="dropdown-menu dropdown-menu-right sort" data-animation="true" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#" data-sort="0" onclick="OL.changeSortType(this);">作業名順</a>
<a class="dropdown-item active" href="#" data-sort="1" id="defaultSort" onclick="OL.changeSortType(this);">新しい順</a>
<a class="dropdown-item" href="#" data-sort="2" onclick="OL.changeSortType(this);">古い順</a>
<a class="dropdown-item" href="#" data-sort="4" onclick="OL.changeSortType(this);">閲覧日順</a>
<a class="dropdown-item sort-type lang" lang="sortByName" href="#" data-sort="0" onclick="OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type lang active" lang="sortByStartDate" href="#" data-sort="1" id="defaultSort" onclick="OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type lang" lang="sortByEndDate" href="#" data-sort="2" onclick="OL.changeSortType(this);"></a>
<a class="dropdown-item sort-type lang" lang="sortByLastEdit" href="#" data-sort="4" onclick="OL.changeSortType(this);"></a>
</div>
</div>
<a href="javascript:OL.resetSearch();" class="mx-1">
<img class="serarch-icon" src="../common/img/icon_close.svg" alt="クリア" data-toggle="tooltip" data-placement="bottom" title="検索条件をクリア">
<img class="serarch-icon lang" lang="searchClear" src="../common/img/icon_close.svg" type="image" alt="" data-toggle="tooltip" data-placement="bottom" title="">
</a>
</div>
</nav>
......@@ -111,13 +111,13 @@
<!-- view menu -->
<nav aria-label="view" class="view-menu mt-2">
<div class="d-flex justify-content-between align-items-center">
<div class="fs-9">3<span>件表示</span></div>
<div class="fs-9"><span id="operationCount">0</span><span class="lang" lang="display"></span></div>
<div class="view">
<a href="javascript:OL.switchToViewList();" class="text-decoration-none view-btn view-list-btn">
<img src="../common/img/icon_view_list.svg" alt="リスト表示" class="list-block-icon mx-1" data-toggle="tooltip" data-placement="bottom" title="リスト表示">
<a href="#" class="text-decoration-none view-btn view-list-btn">
<img src="../common/img/icon_view_list.svg" type="image" alt="" class="list-block-icon mx-1 lang" lang="listDisplay" onclick="OL.switchToViewList();" data-toggle="tooltip" data-placement="bottom" title="">
</a>
<a href="javascript:OL.switchToGridList();" class="text-decoration-none view-btn view-block-btn active">
<img src="../common/img/icon_view_block.svg" alt="グリッド表示" class="list-block-icon mx-1" data-toggle="tooltip" data-placement="bottom" title="グリッド表示">
<a href="#" class="text-decoration-none view-btn view-block-btn active">
<img src="../common/img/icon_view_block.svg" type="image" alt="" class="list-block-icon mx-1 lang" lang="gridDisplay" onclick="OL.switchToGridList();" data-toggle="tooltip" data-placement="bottom" title="">
</a>
</div>
</div>
......
......@@ -142,11 +142,12 @@
//Initialization
OL.initActiveSortIndex();
$('#operationTable').empty();
$('#operationCount').text(0);
if (!operationList) {
return;
}
$('#operationCount').text(operationList.length);
//create & show
for (let i = 0; i < operationList.length; i++) {
let classIcon ;
......@@ -424,6 +425,9 @@
*/
OL.sortOperationList = function (sortNumber) {
if (!OL.operationList) {
return;
}
switch (sortNumber) {
case CONSTANT.SORT_TYPE.NAME:
OL.operationList.sort(function (a, b) {
......
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