Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
89cc018b
Commit
89cc018b
authored
Nov 22, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Panel: use onStateChange
parent
c3d27c57
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
...hTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
+21
-5
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.js
View file @
89cc018b
...
...
@@ -17,6 +17,9 @@
.
innerHTML
);
gadget_klass
.
setState
({
visible
:
false
})
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
...
...
@@ -27,12 +30,14 @@
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
toggle
'
,
function
()
{
this
.
element
.
classList
.
toggle
(
'
visible
'
);
return
this
.
changeState
({
visible
:
!
this
.
state
.
visible
});
})
.
declareMethod
(
'
close
'
,
function
()
{
if
(
this
.
element
.
classList
.
contains
(
'
visible
'
))
{
this
.
element
.
classList
.
remove
(
'
visible
'
);
}
return
this
.
changeState
(
{
visible
:
false
}
);
})
.
declareMethod
(
'
render
'
,
function
()
{
...
...
@@ -56,7 +61,6 @@
"
module_href
"
:
all_result
[
0
],
"
history_href
"
:
all_result
[
1
],
"
preference_href
"
:
all_result
[
2
],
// "language_list": language_list,
"
logout_href
"
:
all_result
[
3
],
"
search_href
"
:
all_result
[
4
],
"
worklist_href
"
:
all_result
[
5
]
...
...
@@ -68,6 +72,18 @@
});
})
.
onStateChange
(
function
()
{
if
(
this
.
state
.
visible
)
{
if
(
!
this
.
element
.
classList
.
contains
(
'
visible
'
))
{
this
.
element
.
classList
.
toggle
(
'
visible
'
);
}
}
else
{
if
(
this
.
element
.
classList
.
contains
(
'
visible
'
))
{
this
.
element
.
classList
.
remove
(
'
visible
'
);
}
}
})
/////////////////////////////////////////////////////////////////
// declared services
/////////////////////////////////////////////////////////////////
...
...
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