Commit 9e3e3457 by Lee Munkyeong

スマホの場合作業リスト適用

parent 8769e70f
......@@ -372,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);
......@@ -379,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);
......@@ -2708,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){
......@@ -2732,14 +2738,33 @@ CHK.createOperationList = function(operationList) {
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
if (CHK.isAndroid) {
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'><i class='far fa-clock fa-blue' style='color:blue;margin-right:10px'></i>"
+ setOperationDate(operationList[i].operationStartDate) + " ~ "
+ setOperationDate(operationList[i].operationEndDate) +"</div></td>");
} else {
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 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);
if (!CHK.isAndroid) {
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