Commit 8769e70f by Lee Munkyeong

Webviewアンドロイド対応

parent 44603713
......@@ -74,7 +74,7 @@
<div class="form-group">
<label>開始日</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="選択">
<input type="text" name="start" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker1" placeholder="選択" inputmode="none">
<div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
<div class="input-group-text"><i class="far fa-calendar"></i></div>
</div>
......@@ -84,7 +84,7 @@
<div class="form-group">
<label>終了日</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="選択">
<input type="text" name="end" class="form-control form-control-sm datetimepicker-input" data-target="#datetimepicker2" placeholder="選択" inputmode="none">
<div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker">
<div class="input-group-text"><i class="far fa-calendar"></i></div>
</div>
......@@ -134,7 +134,7 @@
<th>VR</th>
</tr>
</thead>
<tbody>
<tbody id="operationTable">
</tbody>
</table>
</section>
......@@ -154,7 +154,7 @@
<i class="fas fa-folder fs-14 p-1"></i>
<div class="fs-7">関連資料</div>
</a>
<a class="d-block w-100 text-center py-2 text-decoration-none text-secondary">
<a class="d-block w-100 text-center py-2 text-decoration-none text-secondary" onclick="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>
</a>
......
......@@ -40,6 +40,83 @@ CHK.operationGroupMaster; //カテゴリーデータ
CHK.operationGroupMasterRelation; //作業・カテゴリー関係データ
CHK.pushMessage; //コミュニケーションデータ
var pageLang; // ページ設定言語
var msgMap = { // velocity?
inputLoginInfo: {ja:"ログイン情報を入力してください", ko:"로그인 정보를 입력해주세요.", en:"Please enter your login information"},
txtLoginAccPath: {ja:"アカウントパス", ko:"사업자경로", en:"Account path"},
txtLoginId: {ja:"ログインID", ko:"아이디", en:"ID"},
txtLoginPwd: {ja:"パスワード", ko:"패스워드", en:"Password"},
txtLoginPwdRbr: {ja:"アカウントパスとログインIDを記憶する", ko:"사업자경로와 아이디를 저장", en:"Remember your account path and login ID"},
dspLogin: {ja:"ログイン・伝送", ko:"로그인·전송", en:"Login·Transmission"},
inputError: {ja:"アカウントパス、ログインID、パスワードは必須です。", ko:"사업자경로, 아이디, 패스워드는 필수입니다.", en:"Account path, login ID, password are mandatory."},
loginError: {ja:"ユーザアカウントをご確認の上、再度ログインしてください。", ko:"로그인 정보를 확인한 후, 다시 로그인 해주세요.", en:"Please check your user account and login again."},
doUpload: {ja:"アップロード中", ko:"업로드합니다.", en:"Upload."},
uploadError: {ja:"アップロードに失敗しました。", ko:"파일업로드가 실패했습니다.", en:"Upload failed."},
completeUpload: {ja:"登録が完了しました。<br/>右上の閉じるボタンをクリックし、画面を閉じてください。", ko:"등록했습니다. <br/>오른쪽 위의 닫기버튼을 클릭해, 화면을 닫아주세요.", en:"Registered. <br/>Please click the close button in the upper right and close the screen."},
Yes: {ja:"はい", ko:"Yes", en:"Yes"},
No: {ja:"いいえ", ko:"No", en:"No"},
overwriteCheck: {ja:"未公開のバージョンの簡易帳票が存在します。<br/>上書きしますか?", ko:"미공개 버전의 간이 서류가 존재합니다. <br/>덮어 쓰시겠습니까?", en:"There is an unpublished version of the quick report. <br/>Do you want to overwrite?"},
};
// 言語取得
function getLang() {
if (!pageLang) {
if (localStorage["lang"]) {
pageLang = localStorage["lang"];
}
else {
pageLang = (window.navigator.languages && window.navigator.languages[0]) ||
window.navigator.language ||
window.navigator.userLanguage ||
window.navigator.browserLanguage;
localStorage["lang"] = pageLang;
}
}
return pageLang;
}
// メッセージを取得
function getMsg(key) {
lang = getLang();
if (lang.split("-")[0] == "ja") {
lang = "ja";
} else if (lang.split("-")[0] == "ko") {
lang = "ko";
} else {
lang = "en";
}
var msg = msgMap[key];
if (!msg) {
return "";
}
return msg[lang];
}
// 言語の変更処理
function changeLang(lang) {
localStorage["lang"] = lang;
pageLang = lang;
if ($("#btnLogin").is(":visible")) {
showMessage(getMsg("inputLoginInfo"));
} else {
showMessage(getMsg("completeUpload"));
}
$(".lang").each(function() {
var key = $(this).attr("lang");
if (key) {
if ($(this).prop("tagName") == "input" && ($(this).attr("type") == "button" || $(this).attr("type") == "submit")) {
$(this).val(getMsg(key));
} else {
$(this).html(getMsg(key));
}
}
});
}
//JSONファイルパス
CHK.jsonPath = {
operationList: "operationList.json", // 作業一覧JSONデータ
......@@ -51,6 +128,7 @@ CHK.jsonPath = {
CHK.apiCmd = {
finishInit: "finishInit", //初期化完了
goRelationContent: "goRelationContent", //関連資料
goCommunication: "goCommunication",
goSetting: "goSetting", //設定
goOperation: "goOperation", //作業開始
goPanoramaEdit: "goPanoramaEdit", //パノラマ作業資料編集
......@@ -392,10 +470,12 @@ CHK.updateReportJsonWeb = function(json, callback) {
* @param callback コールバック
*/
CHK.loadJson = function(fileName, callback) {
//キャッシュ対応
fileName = fileName + "?" + new Date().getTime().toString(16);
if (CHK.isAndroid) {
fileName = android.getCachePath() + "/" + fileName;
} else {
//キャッシュ対応
fileName = fileName + "?" + new Date().getTime().toString(16);
}
$.getJSON(fileName, function(json) {
console.log("load json file", fileName, json);
callback(json);
......@@ -2649,7 +2729,7 @@ CHK.createCategory = function(operationGroupMasterList) {
* 作業一覧描画
*/
CHK.createOperationList = function(operationList) {
for (var i = 0; i < operationList.length; i++) {
for (var i = 0; i < operationList.length; i++) {
var operationTR = $("<tr/>");
//TODO aタグlist.html 転移処理
var operationNameTd = $("<td class='operationId_" + operationList[i].operationId + "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].operationId + "', '" + operationList[i].contentId + "');\" class='d-block text-black text-decoration-none mb-1'>"+ operationList[i].operationName +"</a></td>");
......
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