Commit e703212b by Yujin Seo

#42180 作業一覧対応

parent ef965418
......@@ -120,6 +120,7 @@ CHK_L.init = function() {
}
});
CHK.createOperationListBySavedSortType();
CHK_L.sendAppCommand("finishInit");
}
......
......@@ -138,6 +138,7 @@ CHK.apiCmd = {
goPanoramaEdit: "goPanoramaEdit", //パノラマ作業資料編集
refreshContent: "refreshContent", //新着更新
resetSearch: "resetSearch", //検索条件初期化
saveSortType: "saveSortType", //並び替え保存
editAttached: "editAttached", //添付ファイル編集
saveAttached: "saveAttached", //添付ファイル保存
insertReport: "insertTaskReport", //作業報告保存
......@@ -274,11 +275,16 @@ CHK.initCommon = function() {
CHK.isWeb = urlParam.is_web;
CHK.isWindows = urlParam.app && urlParam.app == "windows"; // windowsアプリの対応追加 v1.1.0
CHK.isAndroid = urlParam.app && urlParam.app == "android";
CHK.isIOS = urlParam.app && urlParam.app == "ios";
CHK.isIOS = urlParam.app && urlParam.app == "ios";
CHK.sortIndex = urlParam.sortIndex;
// ウェブの場合、作業一覧の表示広さを変更
if (CHK.isWeb) {
$("#checkList").addClass("web");
}
}
// Windowsの場合、RFID未使用
if (CHK.isWindows) {
$("#rfidScanButton").parent().hide();
}
CHK.debug = urlParam.debug;
CHK.isMobile = urlParam.mobile_flg && urlParam.mobile_flg == "1";
if (CHK.isCms) {
......@@ -2801,8 +2807,13 @@ CHK.createCategory = function(operationGroupMasterList) {
if (CHK.isIOS) {
sortIndex = CHK_iOS.getSortType();
} else if (CHK.isAndroid) {
sortIndex = android.getSortType();
}
sortIndex = android.getSortType();
} else if (CHK.isWindows) {
if (CHK.sortIndex !== undefined) {
console.log("CHK.sortIndex:" + CHK.sortIndex);
sortIndex = CHK.sortIndex;
}
}
let sortType = document.getElementsByClassName("sort-type")[sortIndex];
CHK.changeSortType(sortType);
}
......@@ -2824,10 +2835,15 @@ CHK.createOperationList = function(operationList, isSearched = false) {
if (operationList.length > 1) {
var sortType = $(".sort-type.active").data("sort");
if (isSearched) {
if (CHK.isIOS) {
webkit.messageHandlers.saveSortType.postMessage(sortType);
} else if (CHK.isAndroid) {
android.setSortType(sortType);
if (CHK.isIOS) {
webkit.messageHandlers.saveSortType.postMessage(sortType);
} else if (CHK.isAndroid) {
android.setSortType(sortType);
} else {
var param = {};
param.cmd = CHK.getCommand("saveSortType");
param.sortType = sortType;
CHK.sendABookCheckApi(param);
}
}
switch(sortType) {
......
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