Commit 58e6e236 by Takatoshi Miura

Merge commit '49cc7d88' into feature/1.4.0_miura

parents 58a385ea 49cc7d88
......@@ -6092,8 +6092,8 @@
font-style: normal;
font-weight: 900;
font-display: block;
src: url(/fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.eot?6606667d9800a27eb8b5f61ccb66d510);
src: url(/fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.eot?6606667d9800a27eb8b5f61ccb66d510?#iefix) format("embedded-opentype"),url(/fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.woff2?3eb06c702e27fb110194f5a16c45cb8e) format("woff2"),url(/fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.woff?f4f93856730733912b1e06ad64c0baf7) format("woff"),url(/fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.ttf?915a0b79c22a1c1f64da9e0a90a12f02) format("truetype"),url(/fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.svg?0454203f26b33fc02e2b686b317aab3d#fontawesome) format("svg")
src: url(./fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.eot?6606667d9800a27eb8b5f61ccb66d510);
src: url(./fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.eot?6606667d9800a27eb8b5f61ccb66d510?#iefix) format("embedded-opentype"),url(./fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.woff2?3eb06c702e27fb110194f5a16c45cb8e) format("woff2"),url(./fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.woff?f4f93856730733912b1e06ad64c0baf7) format("woff"),url(./fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.ttf?915a0b79c22a1c1f64da9e0a90a12f02) format("truetype"),url(./fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.svg?0454203f26b33fc02e2b686b317aab3d#fontawesome) format("svg")
}
.fa,.far,.fas {
......@@ -12894,6 +12894,16 @@ a.bg-white:focus,a.bg-white:hover,button.bg-white:focus,button.bg-white:hover {
display: inline-flex!important
}
@media (max-width: 500px) {
.operationStartDate {
display: none!important
}
.operationEndDate {
display: none!important
}
}
@media (min-width: 576px) {
.d-sm-none {
display:none!important
......@@ -12968,6 +12978,10 @@ a.bg-white:focus,a.bg-white:hover,button.bg-white:focus,button.bg-white:hover {
.d-md-inline-flex {
display: inline-flex!important
}
.mobile_operation_date {
display: none!important
}
}
@media (min-width: 992px) {
......
......@@ -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>
......
......@@ -4,6 +4,7 @@ var CHK = {};
CHK.operationType; //プロジェクトタイプ 0:リストコンテンツ 1:図面コンテンツ 2:360コンテンツ 3:PDFコンテンツ
CHK.isCms = false; //true:CMSモード
CHK.isWeb = false; //true:Web表示モード
CHK.isAndroid = false;
CHK.reportMode = "1"; //報告モード default1で、定期点検で変更される
CHK.debug; //1:デバッグモード
CHK.isMobile; //1:モバイル対応で表示
......@@ -39,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データ
......@@ -50,6 +128,7 @@ CHK.jsonPath = {
CHK.apiCmd = {
finishInit: "finishInit", //初期化完了
goRelationContent: "goRelationContent", //関連資料
goCommunication: "goCommunication",
goSetting: "goSetting", //設定
goOperation: "goOperation", //作業開始
goPanoramaEdit: "goPanoramaEdit", //パノラマ作業資料編集
......@@ -178,6 +257,7 @@ CHK.initCommon = function() {
CHK.isCms = urlParam.is_cms;
CHK.isWeb = urlParam.is_web;
CHK.isWindows = urlParam.app && urlParam.app == "windows"; // windowsアプリの対応追加 v1.1.0
CHK.isAndroid = urlParam.app && urlParam.app == "android";
// ウェブの場合、作業一覧の表示広さを変更
if (CHK.isWeb) {
$("#checkList").addClass("web");
......@@ -292,6 +372,9 @@ CHK.initReport = function(callback) {
CHK.initReportApp = function (callback) {
// 作業一覧JSONデータ
CHK.loadJson(CHK.jsonPath.operationList, function (json) {
if (CHK.isAndroid) {
$('#operationTable').empty();
}
CHK.operation = json;
//作業一覧描画
CHK.createOperationList(CHK.operation.operationList);
......@@ -299,6 +382,9 @@ CHK.initReportApp = function (callback) {
// カテゴリーJSONデータ
CHK.loadJson(CHK.jsonPath.operationGroupMasterList, function (json) {
if (CHK.isAndroid) {
$('.group-category-list').remove();
}
CHK.operationGroupMaster = json;
//カテゴリー設定
CHK.createCategory(CHK.operationGroupMaster.operationGroupMasterList);
......@@ -390,10 +476,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);
......@@ -880,6 +968,8 @@ CHK.sendABookCheckApi = function(param, callback) {
} else if (CHK.isWindows) {
// windowsアプリの場合の対応
window.external.notify(JSON.stringify(param));
} else if(CHK.isAndroid){
android.sendParam(JSON.stringify(param));
} else {
var query = "";
for (var key in param) {
......@@ -2624,7 +2714,7 @@ CHK.createCategory = function(operationGroupMasterList) {
//TODO operationGroupMasterId順番と深さの仕様確認要
for (var i = 0; i < operationGroupMasterList.length; i++) {
if (operationGroupMasterList[i].operationGroupMasterLevel == 0 ){ //0 : カテゴリー全体
var categoryParent = $("<dl id=groupMasterId_"+ operationGroupMasterList[i].operationGroupMasterId +"><dt class='menu-ttl'><a href=''>"+ operationGroupMasterList[i].operationGroupMasterName +"</a></dt></dl>");
var categoryParent = $("<dl id=groupMasterId_"+ operationGroupMasterList[i].operationGroupMasterId +" class='group-category-list'><dt class='menu-ttl'><a href=''>"+ operationGroupMasterList[i].operationGroupMasterName +"</a></dt></dl>");
$('#category-menu').append(categoryParent);
} else {
if($('#groupMasterId_'+operationGroupMasterList[i].parentOperationGroupMasterId).length > 0){
......@@ -2645,17 +2735,25 @@ 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>");
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><div class='fa-sm mobile_operation_date'><i class='far fa-clock fa-blue' style='color:blue;margin-right:10px'></i>"
+ setOperationDate(operationList[i].operationStartDate) + " ~ "
+ setOperationDate(operationList[i].operationEndDate) +"</div></td>");
var operationStartDateTd = $("<td/>", {class: "operationStartDate"}).text(setOperationDate(operationList[i].operationStartDate));
var operationEndDateTd = $("<td/>", {class: "operationEndDate"}).text(setOperationDate(operationList[i].operationEndDate));
var iconTd = operationList[i].operationType == CHK.OPERATION_TYPE.VTOUR ? $("<td class='p-2'> <button class='btn btn-outline-primary fs-8 py-2' onclick=\"javascript:CHK_L.sendAppCommand('goPanoramaEdit', '" + operationList[i].operationId + "', '" + operationList[i].contentId + "');\">VR</button> </td>") : "";
var iconTd = operationList[i].operationType == CHK.OPERATION_TYPE.VTOUR ? $("<td class='p-2'> <button class='btn btn-outline-primary fs-8 py-2' onclick=\"javascript:CHK_L.sendAppCommand('goPanoramaEdit', '" + operationList[i].operationId + "', '" + operationList[i].contentId + "');\">VR</button> </td>") : $("<td class='p-2' />");
operationTR.append(operationNameTd);
operationTR.append(operationStartDateTd);
operationTR.append(operationEndDateTd);
operationTR.append(operationStartDateTd);
operationTR.append(operationEndDateTd);
operationTR.append(iconTd);
$(".table tbody").append(operationTR);
......
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