Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
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
abook_web
check
Commits
4447a725
Commit
4447a725
authored
Nov 15, 2022
by
Takumi Imai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1.0_check_web_dev_son' into 'feature/1.0_check_web_dev'
Feature/1.0 check web dev son See merge request
!59
parents
403b0103
59ed52da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
abweb/js/operationList/operationList.js
+24
-21
No files found.
abweb/js/operationList/operationList.js
View file @
4447a725
...
@@ -301,18 +301,18 @@ OL.createCategoryList = function () {
...
@@ -301,18 +301,18 @@ OL.createCategoryList = function () {
//Create a side menu category structure
//Create a side menu category structure
var
categoryListElement
=
$
(
'#categoryListMenu'
);
var
categoryListElement
=
$
(
'#categoryListMenu'
);
categoryListElement
.
empty
();
categoryListElement
.
empty
();
//sort group master list by level low to hight
OL
.
operationGroupMaster
.
sort
(
function
(
a
,
b
)
{
OL
.
operationGroupMaster
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationGroupMasterLevel
<
b
.
operationGroupMasterLevel
)
return
-
1
;
if
(
a
.
operationGroupMasterLevel
<
b
.
operationGroupMasterLevel
)
return
-
1
;
if
(
a
.
operationGroupMasterLevel
>
b
.
operationGroupMasterLevel
)
return
1
;
if
(
a
.
operationGroupMasterLevel
>
b
.
operationGroupMasterLevel
)
return
1
;
return
1
;
return
1
;
});
});
let
allChecked
=
''
;
let
allChecked
=
''
;
if
(
typeof
OL
.
operationGroupMasterId
===
'undefined'
||
OL
.
operationGroupMasterId
==
0
)
{
if
(
typeof
OL
.
operationGroupMasterId
===
'undefined'
||
OL
.
operationGroupMasterId
==
0
)
{
allChecked
=
' checked'
;
allChecked
=
' checked'
;
}
}
const
allCategory
=
$
(
const
allCategory
=
$
(
'<ul><li><label><input type="radio" name="category" value="0"'
+
allChecked
+
'>
<span class="lang" lang="categoryAll"
>'
+
I18N
.
i18nText
(
'categoryAll'
)
+
'</span></label></li></ul>'
,
'<ul><li><label><input type="radio" name="category" value="0"'
+
allChecked
+
'>
<span
>'
+
I18N
.
i18nText
(
'categoryAll'
)
+
'</span></label></li></ul>'
,
);
);
categoryListElement
.
append
(
allCategory
);
categoryListElement
.
append
(
allCategory
);
//create category(operationGroupMaster) structure
//create category(operationGroupMaster) structure
...
@@ -327,12 +327,22 @@ OL.createCategoryList = function () {
...
@@ -327,12 +327,22 @@ OL.createCategoryList = function () {
}
}
let
groupSpan
=
$
(
'<span>'
+
item
.
operationGroupMasterName
+
'</span>'
);
let
groupSpan
=
$
(
'<span>'
+
item
.
operationGroupMasterName
+
'</span>'
);
inputLabel
.
append
(
inputRadio
);
inputLabel
.
append
(
inputRadio
);
inputLabel
.
append
(
' '
);
inputLabel
.
append
(
groupSpan
);
inputLabel
.
append
(
groupSpan
);
if
(
item
.
operationGroupMasterLevel
==
0
)
{
const
isParent
=
OL
.
operationGroupMaster
.
find
(
function
(
child
)
{
return
item
.
operationGroupMasterId
==
child
.
parentOperationGroupMasterId
;
});
let
parentElement
=
categoryListElement
;
if
(
item
.
parentOperationGroupMasterId
!=
0
)
{
parentElement
=
$
(
'#collapse'
+
item
.
parentOperationGroupMasterId
+
' > ul'
);
}
if
(
isParent
)
{
//accordion
const
accordionId
=
'accordion'
+
item
.
operationGroupMasterId
;
const
accordionId
=
'accordion'
+
item
.
operationGroupMasterId
;
const
headingId
=
'heading'
+
item
.
operationGroupMasterId
;
const
headingId
=
'heading'
+
item
.
operationGroupMasterId
;
const
collapseId
=
'collapse'
+
item
.
operationGroupMasterId
;
const
collapseId
=
'collapse'
+
item
.
operationGroupMasterId
;
let
categoryParentElm
=
$
(
'<li class="accordion" id="'
+
accordionId
+
'" />'
);
let
accordionElm
=
$
(
'<li class="accordion" id="'
+
accordionId
+
'" />'
);
//heading
let
headingDiv
=
$
(
'<div id="'
+
headingId
+
'" />'
);
let
headingDiv
=
$
(
'<div id="'
+
headingId
+
'" />'
);
let
linkA
=
$
(
'<a class="list-menu-link" />'
);
let
linkA
=
$
(
'<a class="list-menu-link" />'
);
let
collapseButton
=
$
(
'<button type="button" class="collapsed" data-toggle="collapse" aria-expanded="true" />'
);
let
collapseButton
=
$
(
'<button type="button" class="collapsed" data-toggle="collapse" aria-expanded="true" />'
);
...
@@ -342,26 +352,19 @@ OL.createCategoryList = function () {
...
@@ -342,26 +352,19 @@ OL.createCategoryList = function () {
linkA
.
append
(
collapseButton
);
linkA
.
append
(
collapseButton
);
linkA
.
append
(
inputLabel
);
linkA
.
append
(
inputLabel
);
headingDiv
.
append
(
linkA
);
headingDiv
.
append
(
linkA
);
categoryParentElm
.
append
(
headingDiv
);
//collapse
categoryListElement
.
append
(
categoryParentElm
);
let
collapseElm
=
$
(
'<div id="'
+
collapseId
+
'" class="collapse">'
);
collapseElm
.
attr
(
'data-parent'
,
'#'
+
accordionId
);
collapseElm
.
attr
(
'aria-labelledby'
,
headingId
);
let
ul
=
$
(
'<ul>'
);
collapseElm
.
append
(
ul
);
accordionElm
.
append
(
headingDiv
);
accordionElm
.
append
(
collapseElm
);
parentElement
.
append
(
accordionElm
);
}
else
{
}
else
{
let
li
=
$
(
'<li>'
);
let
li
=
$
(
'<li>'
);
li
.
append
(
inputLabel
);
li
.
append
(
inputLabel
);
let
parentElm
=
$
(
'#collapse'
+
item
.
parentOperationGroupMasterId
+
' > ul'
);
parentElement
.
append
(
li
);
if
(
typeof
parentElm
===
'undefined'
||
!
parentElm
||
parentElm
.
length
<
1
)
{
const
accordionParentId
=
'accordion'
+
item
.
parentOperationGroupMasterId
;
const
headingParentId
=
'heading'
+
item
.
parentOperationGroupMasterId
;
const
collapseParentId
=
'collapse'
+
item
.
parentOperationGroupMasterId
;
parentElm
=
$
(
'<div id="'
+
collapseParentId
+
'" class="collapse">'
);
parentElm
.
attr
(
'data-parent'
,
'#'
+
accordionParentId
);
parentElm
.
attr
(
'aria-labelledby'
,
headingParentId
);
let
ul
=
$
(
'<ul>'
);
ul
.
append
(
li
);
parentElm
.
append
(
ul
);
$
(
'#'
+
accordionParentId
).
append
(
parentElm
);
}
else
{
parentElm
.
append
(
li
);
}
}
}
}
}
};
};
...
...
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