Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
design
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCheck
design
Commits
715f9a96
Commit
715f9a96
authored
Jul 19, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1.4.0_miura' into 'feature/1.4.0'
Feature/1.4.0 miura See merge request
!2
parents
52f7e3bd
c73738db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
8 deletions
+67
-8
app/script/check-foriOS.js
+16
-0
app/script/check.js
+51
-8
No files found.
app/script/check-foriOS.js
View file @
715f9a96
...
...
@@ -46,4 +46,19 @@ CHK_iOS.getPushMessageListJson = function () {
callNativeApp
(
NATIVE_KEY_IOS
.
getPushMessageListJson
,
{})
);
};
CHK_iOS
.
searchOperationList
=
function
(
searchKeyword
,
searchStartDate
,
searchEndDate
,
operationGroupMasterId
)
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
searchOperationList
,
{
operationName
:
searchKeyword
,
operationStartDate
:
searchStartDate
,
operationEndDate
:
searchEndDate
,
operationGroupMasterId
:
operationGroupMasterId
})
);
};
CHK_iOS
.
getSortType
=
function
()
{
return
parseInt
(
callNativeApp
(
NATIVE_KEY_IOS
.
getSortType
,
{}));
}
\ No newline at end of file
app/script/check.js
View file @
715f9a96
...
...
@@ -174,7 +174,9 @@ const NATIVE_KEY_IOS = {
getOperationListJson
:
"getOperationListJson"
,
getOperationGroupMasterListJson
:
"getOperationGroupMasterListJson"
,
getOperationGroupMasterRelationListJson
:
"getOperationGroupMasterRelationListJson"
,
getPushMessageListJson
:
"getPushMessageListJson"
getPushMessageListJson
:
"getPushMessageListJson"
,
searchOperationList
:
"searchOperationList"
,
getSortType
:
"getSortType"
};
// レポートファイル保存タイプ
CHK
.
REPORT_SAVE_TYPE
=
{
...
...
@@ -2741,8 +2743,8 @@ CHK.showWhiteFrame = function() {
*/
CHK
.
createCategory
=
function
(
operationGroupMasterList
)
{
if
(
CHK
.
isAndroid
)
{
$
(
".group-category-list"
).
remove
();
if
(
CHK
.
isAndroid
||
CHK
.
isIOS
)
{
$
(
'.group-category-list'
).
remove
();
$
(
"#groupMasterPath"
).
empty
();
if
(
typeof
CHK
.
operationGroupMasterId
==
'undefined'
||
CHK
.
operationGroupMasterId
==
0
)
{
$
(
"#groupMasterPath"
).
append
(
'<li class="breadcrumb-item"><a href="#" class="text-decoration-none text-dark">'
+
getMsg
(
"all"
)
+
'</a></li>'
);
...
...
@@ -2794,6 +2796,26 @@ CHK.createCategory = function(operationGroupMasterList) {
};
/**
* 保存したsortTypeから作業一覧を描画
*/
CHK
.
createOperationListBySavedSortType
=
function
()
{
let
sortIndex
=
CHK_CONSTANT
.
SORT_TYPE
.
START_DATE_ASC
;
if
(
CHK
.
isIOS
)
{
sortIndex
=
CHK_iOS
.
getSortType
();
}
else
if
(
CHK
.
isAndroid
)
{
// TODO: 端末に保存したsortTypeを取得
}
let
sortType
=
document
.
getElementsByClassName
(
"sort-type"
)[
sortIndex
];
CHK
.
changeSortType
(
sortType
);
}
CHK
.
changeSortType
=
function
(
sortType
)
{
$
(
".sort-type"
).
removeClass
(
"active"
);
$
(
sortType
).
addClass
(
"active"
);
CHK
.
createOperationList
(
CHK
.
operation
.
operationList
,
true
);
}
/**
* 作業一覧描画
*/
CHK
.
createOperationList
=
function
(
operationList
,
isSearched
=
false
)
{
...
...
@@ -2803,6 +2825,13 @@ 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
)
{
// TODO: sortTypeを端末に保存
}
}
switch
(
sortType
)
{
case
CHK_CONSTANT
.
SORT_TYPE
.
NAME
:
console
.
log
(
sortType
);
...
...
@@ -2881,13 +2910,27 @@ CHK.search = function() {
CHK
.
isSearched
=
true
;
CHK
.
operation
.
searchOperationList
=
searchResult
.
operationList
;
CHK
.
createOperationList
(
searchResult
.
operationList
);
}
// TODO: カテゴリの保存
}
else
if
(
CHK
.
isIOS
)
{
searchResult
=
CHK_iOS
.
searchOperationList
(
searchKeyword
,
searchStartDate
,
searchEndDate
,
CHK
.
operationGroupMasterId
);
CHK
.
isSearched
=
true
;
CHK
.
operation
.
searchOperationList
=
searchResult
.
operationList
;
CHK
.
createOperationList
(
searchResult
.
operationList
);
webkit
.
messageHandlers
.
saveOperationGroupMaster
.
postMessage
(
CHK
.
operationGroupMasterId
);
let
searchButtonTaped
=
searchKeyword
!=
""
||
searchStartDate
!=
""
||
searchEndDate
!=
""
;
if
(
searchButtonTaped
)
{
webkit
.
messageHandlers
.
showSearchResultToast
.
postMessage
(
searchResult
.
operationList
.
length
);
}
}
};
CHK
.
changeSortType
=
function
(
sortType
)
{
$
(
".sort-type"
).
removeClass
(
"active"
);
$
(
sortType
).
addClass
(
"active"
);
CHK
.
createOperationList
(
CHK
.
operation
.
operationList
,
true
);
/**
* 検索条件をセット
*/
CHK
.
setSearchInfo
=
function
(
taskName
,
startDate
,
endDate
)
{
$
(
"#searchTaskName"
).
val
(
taskName
);
$
(
"#searchStartDate"
).
val
(
startDate
);
$
(
"#searchEndDate"
).
val
(
endDate
);
}
// カテゴリーのドロワーメニュー開閉
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment