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;
......
......@@ -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