Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
e1ae0703
Commit
e1ae0703
authored
Nov 10, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Check if the path is already checked while creating HTML tree
parent
fa9df18a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
product/ERP5/bootstrap/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/business_manager_select_action_gadget.js.js
...iness_package/business_manager_select_action_gadget.js.js
+11
-2
No files found.
product/ERP5/bootstrap/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/business_manager_select_action_gadget.js.js
View file @
e1ae0703
...
...
@@ -52,7 +52,7 @@
return
tree
;
}
function
buildTreeHTML
(
id
,
tree
)
{
function
buildTreeHTML
(
id
,
tree
,
checked_list
)
{
var
html
=
''
,
key
,
node_list
=
[],
...
...
@@ -68,6 +68,11 @@
// class is a reserved keyword
node
[
'
class
'
]
=
tree
.
sub
[
key
].
value
;
node
[
'
data-path
'
]
=
tree
.
sub
[
key
].
path
;
// If the path is in checked_list, put checked to True so that we
// can update it in HTML directly
if
(
id
in
checked_list
)
{
node
[
'
data-checked
'
]
=
true
;
}
}
else
{
node
[
'
class
'
]
=
'
Unchanged
'
;
...
...
@@ -87,7 +92,11 @@
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
item_path_list
=
JSON
.
parse
(
options
.
couscous
),
html_tree
=
buildTreeHTML
(
'
tree
'
,
convertPathListToTree
(
item_path_list
)),
checked_list
=
JSON
.
parse
(
options
.
value
).
map
(
function
(
element
)
{
return
element
[
0
];}
),
html_tree
=
buildTreeHTML
(
'
tree
'
,
convertPathListToTree
(
item_path_list
,
checked_list
)),
state_dict
=
{
key
:
options
.
key
,
value
:
options
.
value
,
...
...
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