Commit 5722f6e8 by Kim Eunchul

Merge remote-tracking branch 'origin/feature/1.4.0' into feature/1.4.0_kim-ec

# Conflicts:
#	app/index.html
parents f0cd9c43 edcdda20
......@@ -20167,6 +20167,7 @@ button {
width: 100%;
top: 0;
height: calc(100%);
min-height: 100vh;
display: block;
position: absolute;
background: #000;
......
......@@ -22,15 +22,15 @@
<nav class="navbar navbar-dark bg-primary">
<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>
<span class="d-none d-md-inline fs-10 multi-lang" data-msg="buttonCategory">カテゴリー</span>
</a>
<a class="navbar-brand lht-0" href="javascript:CHK_L.sendAppCommand('refreshContent');" style="margin: 0 10px 0 10px;float: right;">
<i class="fa fa-redo fs-12 p-1" id="updateButton"></i>
<span class="d-none d-md-inline fs-10">更新</span>
<span class="d-none d-md-inline fs-10 multi-lang" data-msg="buttonRefresh">更新</span>
</a>
<a class="navbar-brand lht-0 d-none" id="rfidScanButton" href="javascript:CHK.startScan();" style="margin: 0 10px 0 10px;float: right;">
<i class="fa fa-wifi fs-12 p-1"></i>
<span class="d-none d-md-inline fs-10">スキャン</span>
<span class="d-none d-md-inline fs-10 multi-lang" data-msg="buttonScan">スキャン</span>
</a>
</nav>
</header>
......@@ -39,7 +39,7 @@
<div id="overlayDiv" class="overlay"></div>
<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>
<h2 class="text-nowrap font-weight-bold fs-13 p-3 mb-0 multi-lang" data-msg="buttonCategory">カテゴリー</h2>
<a class="category-btn p-3" onclick="CHK.openCategory();" href="#"><i class="fa fa-times"></i></a>
</div>
</nav>
......@@ -58,7 +58,7 @@
<div class="row">
<div class="col-7 col-md-5 col-lg-4">
<div class="form-group has-search input-group">
<input type="text" class="form-control" placeholder="作業名" id="searchTaskName">
<input type="text" class="form-control multi-lang" data-msg="placeholderOperationName" placeholder="作業名" id="searchTaskName">
<div class="input-group-append">
<i class="fas fa-search input-group-text" onclick="CHK.search();"></i>
</div>
......@@ -66,9 +66,9 @@
</div>
<div class="col-1 col-md-2 duration-area">
<a href="#" class="d-inline-block text-decoration-none py-2 lht-0" data-toggle="modal" data-target="#exampleModal">
<a href="#" class="d-inline-block text-decoration-none py-2 lht-0" data-toggle="modal" data-target="#exampleModal">
<i class="far fa-calendar text-dark"></i>
<span class="d-none d-md-inline text-black fs-10">
<span class="d-none d-md-inline text-black fs-10 multi-lang" data-msg="labelPeriod">
期間
</span>
</a>
......@@ -77,18 +77,18 @@
<div class="modal-content">
<div class="modal-body">
<div class="form-group">
<label>開始日</label>
<label class="multi-lang" data-msg="labelStartDate">開始日</label>
<div class="input-group date" id="datetimepicker1" data-target-input="nearest">
<input type="search" name="start" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker1" placeholder="選択" inputmode="none" id="searchStartDate">
<input type="search" name="start" class="form-control form-control-sm datetimepicker-input multi-lang" data-msg="placeholderSelect" data-target="#datetimepicker1" placeholder="選択" inputmode="none" id="searchStartDate">
<div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
<div class="input-group-text"><i class="far fa-calendar"></i></div>
</div>
</div>
</div>
<div class="form-group">
<label>終了日</label>
<label class="multi-lang" data-msg="labelEndDate">終了日</label>
<div class="input-group date" id="datetimepicker2" data-target-input="nearest">
<input type="search" name="end" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker2" placeholder="選択" inputmode="none" id="searchEndDate">
<input type="search" name="end" class="form-control form-control-sm datetimepicker-input multi-lang" data-msg="placeholderSelect" data-target="#datetimepicker2" placeholder="選択" inputmode="none" id="searchEndDate">
<div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker">
<div class="input-group-text"><i class="far fa-calendar"></i></div>
</div>
......@@ -102,20 +102,20 @@
<div class="col-4 col-md-5 col-lg-6 text-right">
<a href="#" class="text-decoration-none py-2 lht-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-offset="-120, 0">
<i class="fa fa-sort text-dark"></i>
<span class="d-none d-md-inline text-dark fs-10">
<span class="d-none d-md-inline text-dark fs-10 multi-lang" data-msg="labelSort">
並び替え
</span>
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item sort-type" data-sort="0" onclick="CHK.changeSortType(this);">作業名順</a>
<a class="dropdown-item sort-type active" data-sort="1" id="defaultSort" onclick="CHK.changeSortType(this);">作業期間が新しい順</a>
<a class="dropdown-item sort-type" data-sort="2" onclick="CHK.changeSortType(this);">作業期間が古い順</a>
<a class="dropdown-item sort-type" data-sort="3" onclick="CHK.changeSortType(this);">報告タイプ順</a>
<a class="dropdown-item sort-type" data-sort="4" onclick="CHK.changeSortType(this);">閲覧日が新しい順</a>
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortName" data-sort="0" onclick="CHK.changeSortType(this);">作業名順</a>
<a class="dropdown-item sort-type active multi-lang" data-msg="labelSortNew" data-sort="1" id="defaultSort" onclick="CHK.changeSortType(this);">作業期間が新しい順</a>
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortOld" data-sort="2" onclick="CHK.changeSortType(this);">作業期間が古い順</a>
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortType" data-sort="3" onclick="CHK.changeSortType(this);">報告タイプ順</a>
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortOpen" data-sort="4" onclick="CHK.changeSortType(this);">閲覧日が新しい順</a>
</div>
<a href="javascript:CHK.resetSearch();" class="text-decoration-none py-2 lht-0 d-inline-block ml-3">
<i class="fa fa-times text-dark"></i>
<span class="d-none d-md-inline text-dark fs-10">
<span class="d-none d-md-inline text-dark fs-10 multi-lang" data-msg="labelReset">
リセット
</span>
</a>
......@@ -128,9 +128,9 @@
<table class="table">
<thead>
<tr>
<th>作業</th>
<th class="d-none d-md-table-cell">開始日</th>
<th class="d-none d-md-table-cell">終了日</th>
<th class="multi-lang" data-msg="headerItemName">項目</th>
<th class="d-none d-md-table-cell multi-lang" data-msg="headerStartDate">開始日</th>
<th class="d-none d-md-table-cell multi-lang" data-msg="headerEndDate">終了日</th>
<th>VR</th>
</tr>
</thead>
......@@ -148,15 +148,15 @@
<nav class="d-flex justify-content-around">
<a class="d-block w-100 text-center py-2 text-decoration-none text-primary">
<i class="fas fa-home fs-14 p-1"></i>
<div class="fs-7">ホーム</div>
<div class="fs-7 multi-lang" data-msg="buttonHome">ホーム</div>
</a>
<a class="d-block w-100 text-center py-2 text-decoration-none text-secondary" href="javascript:CHK_L.sendAppCommand('goRelationContent');">
<i class="fas fa-folder fs-14 p-1"></i>
<div class="fs-7">関連資料</div>
<div class="fs-7 multi-lang" data-msg="buttonRelatedContent">関連資料</div>
</a>
<a class="d-block w-100 text-center py-2 text-decoration-none text-secondary" href="javascript:CHK_L.sendAppCommand('goCommunication');">
<i class="fas fa-comment-dots fs-14 p-1"></i>
<div class="fs-7">コミュ<span class="d-none d-sm-inline">ニケーション</span></div>
<div class="fs-7 multi-lang" data-msg="buttonCommunication">コミュニケーション</div>
</a>
<!--<a class="d-block w-100 text-center py-2 text-decoration-none text-secondary">
<i class="fas fa-clipboard-list fs-14 p-1"></i>
......@@ -164,7 +164,7 @@
</a>-->
<a class="d-block w-100 text-center py-2 text-decoration-none text-secondary" href="javascript:CHK_L.sendAppCommand('goSetting');">
<i class="fas fa-cog fs-14 p-1"></i>
<div class="fs-7">設定</div>
<div class="fs-7 multi-lang" data-msg="buttonSetting">設定</div>
</a>
</nav>
......@@ -174,7 +174,7 @@
<div class="scan-area d-none">
<i class="text-right fas fa-times fa-2x loading-close" onclick="CHK.scanClose();"></i>
<i class="fas fa-spinner fa-5x fa-spin loading-spinner"></i>
<div class="fs-13 mt-4 text-center">読み込み中</div>
<div class="fs-13 mt-4 text-center multi-lang" data-msg="labelLoading">読み込み中</div>
</div>
<div class="alert-area d-none">
<i class="text-right fas fa-times fa-2x loading-close" onclick="CHK.alertClose();"></i>
......
......@@ -42,7 +42,8 @@ CHK.operationGroupMaster; //カテゴリーデータ
CHK.operationGroupMasterRelation; //作業・カテゴリー関係データ
CHK.pushMessage; //コミュニケーションデータ
var scanResultCode; //スキャンしたRFID,バーコード
CHK.scanResultCode; //スキャンしたRFID,バーコード
CHK.scanType; //スキャン種別(0:バーコード、1:RFID)
var pageLang; // ページ設定言語
var CATEGORY_HEIGHT; //カテゴリー描画用固定値(高さ)
......@@ -63,7 +64,31 @@ var msgMap = { // velocity?
No: {ja:"いいえ", ko:"No", en:"No"},
onlyRfid:{ja:"RFID又はバーコードが設定されています。\n該当コードを読み込んでください。", ko:"RFID또는 바코드가 설정되어있습니다.\n해당코드를 스캔해주십시오.", en:"RFID or barcode is set.\nPlease scan the code."},
overwriteCheck: {ja:"未公開のバージョンの簡易帳票が存在します。<br/>上書きしますか?", ko:"미공개 버전의 간이 서류가 존재합니다. <br/>덮어 쓰시겠습니까?", en:"There is an unpublished version of the quick report. <br/>Do you want to overwrite?"},
dateError: {ja:"開始日は終了日の前に設定してください。", ko:"잘못된 검색일입니다.", en:"Please enter correct search date."},
dateError: { ja: "開始日は終了日の前に設定してください。", ko: "잘못된 검색일입니다.", en: "Please enter correct search date." },
buttonCategory: { ja: "カテゴリー", ko: "카테고리", en: "Category" },
buttonRefresh: { ja: "更新", ko: "갱신", en: "Refresh" },
buttonScan: { ja: "スキャン", ko: "스캔", en: "Scan" },
placeholderOperationName: { ja: "作業名", ko: "작업명", en: "Working Name" },
labelPeriod: { ja: "期間", ko: "기간", en: "Period" },
labelStartDate: { ja: "開始日", ko: "시작일", en: "Start date" },
labelEndDate: { ja: "終了日", ko: "종료일", en: "End date" },
placeholderSelect: { ja: "選択", ko: "선택", en: "Choice" },
labelSort: { ja: "並び替え", ko: "정렬", en: "Sort" },
labelSortName: { ja: "作業名順", ko: "작업명순", en: "By working name" },
labelSortNew: { ja: "作業期間が新しい順", ko: "작업기간이 최신순", en: "By newest period" },
labelSortOld: { ja: "作業期間が古い順", ko: "작업기간이 오래된순", en: "By oldest period" },
labelSortType: { ja: "報告タイプ順", ko: "보고타입순", en: "By report type" },
labelSortOpen: { ja: "閲覧日が新しい順", ko: "열람순", en: "By newest viewing date" },
labelReset: { ja: "リセット", ko: "초기화", en: "Reset" },
headerItemName: { ja: "項目名", ko: "항목명", en: "Item Name" },
headerStartDate: { ja: "開始日", ko: "시작일", en: "Start date" },
headerEndDate: { ja: "終了日", ko: "종료일", en: "End date" },
buttonHome: { ja: "ホーム", ko: "홈", en: "Home" },
buttonRelatedContent: { ja: "関連資料", ko: "관련자료", en: "Related Content" },
buttonCommunication: { ja: "コミュニケーション", ko: "커뮤니케이션", en: "Communication" },
buttonSetting: { ja: "設定", ko: "설정", en: "Setting" },
labelLoading: { ja: "読み込み中", ko: "로딩중", en: "Loading" }
};
// 言語取得
......@@ -98,14 +123,12 @@ function setLangCode() {
// メッセージを取得
function getMsg(key) {
setLangCode();
var msg = msgMap[key];
if (!msg) {
return "";
}
return msg[lang];
return msg[CHK.lang];
}
// 言語の変更処理
......@@ -289,6 +312,8 @@ CHK.initCommon = function() {
CHK.isRFIDBarcodeScan = urlParam.isRFIDBarcodeScan && urlParam.isRFIDBarcodeScan == "1";
CHK.isOperationGroupMaster = urlParam.isOperationGroupMaster && urlParam.isOperationGroupMaster == "1";
CHK.sortIndex = urlParam.sortIndex;
CHK.lang = urlParam.lang;
// ウェブの場合、作業一覧の表示広さを変更
if (CHK.isWeb) {
$("#checkList").addClass("web");
......@@ -2993,10 +3018,11 @@ CHK.createOperationList = function(operationList, isSearched = false) {
operationTR.append(iconTd);
$(".table tbody").append(operationTR);
if(CHK.isAndroid) {
android.hideLoading();
}
}
if(CHK.isAndroid) {
android.hideLoading();
}
};
/**Oper
......@@ -3134,7 +3160,8 @@ document.addEventListener('visibilitychange', () => {
});
CHK.scanResult = function(scannedCode, scanType) {
scanResultCode = scannedCode;
CHK.scanResultCode = scannedCode;
CHK.scanType = scanType;
if (scannedCode == null || !(scannedCode.length)) {
return;
}
......@@ -3144,7 +3171,7 @@ CHK.scanResult = function(scannedCode, scanType) {
var resultCode = scannedCode;
if (scanType == 1) {
resultCode = scannedCode.substring(4);
scanResultCode = resultCode;
CHK.scanResultCode = resultCode;
}
return operation.permitCode == resultCode;
})[0];
......@@ -3176,9 +3203,12 @@ CHK.displayAlert = function(msgCode) {
if (msgCode == "notExistCode") {
// scanResultCodeを代入するため別で処理
setLangCode();
var notExistCodeMessage = {ja:"読み込んだコードと一致しません。\n\n読み込んだコード:" + scanResultCode + "\n\nコードを確認してもう一度お願いします。", ko:"스캔된코드와 일치하는 작업이 존재하지않습니다.\n\n스캔 한 코드: " + scanResultCode + "\n\n코드를 확인하고 한번도 시도해주세요.", en:"No action exists that matches the scanned code.\n\nScanned code: " + scanResultCode + "\n\nPlease check the code and try it once."};
var msg = notExistCodeMessage[lang];
alert(msg);
var notExistCodeMessage = {ja:"読み込んだコードと一致しません。\n\n読み込んだコード: " + CHK.scanResultCode + "\n\nコードを確認してもう一度お願いします。", ko:"스캔된코드와 일치하는 작업이 존재하지않습니다.\n\n스캔 한 코드: " + CHK.scanResultCode + "\n\n코드를 확인하고 한번도 시도해주세요.", en:"No action exists that matches the scanned code.\n\nScanned code: " + CHK.scanResultCode + "\n\nPlease check the code and try it once."};
if (CHK.scanType == 1) {
// RFIDは24桁で1行に表示しきれないため改行を追加
notExistCodeMessage = {ja:"読み込んだコードと一致しません。\n\n読み込んだコード:\n" + CHK.scanResultCode + "\n\nコードを確認してもう一度お願いします。", ko:"스캔된코드와 일치하는 작업이 존재하지않습니다.\n\n스캔 한 코드:\n" + CHK.scanResultCode + "\n\n코드를 확인하고 한번도 시도해주세요.", en:"No action exists that matches the scanned code.\n\nScanned code:\n" + CHK.scanResultCode + "\n\nPlease check the code and try it once."};
}
alert(notExistCodeMessage[lang]);
} else if (msgCode == "onlyRfid") {
alert(getMsg(msgCode));
} else {
......@@ -3202,6 +3232,7 @@ CHK.resetSearch = function() {
CHK.changeSortType($('#defaultSort'));
}
CHK.openCategory = function() {
window.scrollTo(0,0);
if ($("#category-menu").hasClass("open")) {
......@@ -3209,4 +3240,26 @@ CHK.openCategory = function() {
}else{
$("body").css("overflow", "hidden");
}
}
\ No newline at end of file
}
$(document).ready(function () {
var urlParam = CHK.getUrlParameter();
CHK.lang = urlParam.lang;
console.log("CHK.lang:" + CHK.lang);
$(".multi-lang").each(function () {
var key = $(this).attr("data-msg");
if (key) {
if ($(this).prop("tagName").toLowerCase() == "input" && ($(this).attr("type") == "text" || $(this).attr("type") == "search")) {
var attr = $(this).attr('placeholder');
if (typeof attr !== 'undefined' && attr !== false) {
$(this).attr("placeholder", getMsg(key));
} else {
$(this).val(getMsg(key));
}
} else {
$(this).html(getMsg(key));
}
}
});
});
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