Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
erp5
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 @@
...
@@ -17,6 +17,9 @@
.
innerHTML
);
.
innerHTML
);
gadget_klass
gadget_klass
.
setState
({
visible
:
false
})
//////////////////////////////////////////////
//////////////////////////////////////////////
// acquired method
// acquired method
//////////////////////////////////////////////
//////////////////////////////////////////////
...
@@ -27,12 +30,14 @@
...
@@ -27,12 +30,14 @@
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
toggle
'
,
function
()
{
.
declareMethod
(
'
toggle
'
,
function
()
{
this
.
element
.
classList
.
toggle
(
'
visible
'
);
return
this
.
changeState
({
visible
:
!
this
.
state
.
visible
});
})
})
.
declareMethod
(
'
close
'
,
function
()
{
.
declareMethod
(
'
close
'
,
function
()
{
if
(
this
.
element
.
classList
.
contains
(
'
visible
'
))
{
return
this
.
changeState
(
{
this
.
element
.
classList
.
remove
(
'
visible
'
);
visible
:
false
}
}
);
})
})
.
declareMethod
(
'
render
'
,
function
()
{
.
declareMethod
(
'
render
'
,
function
()
{
...
@@ -56,7 +61,6 @@
...
@@ -56,7 +61,6 @@
"
module_href
"
:
all_result
[
0
],
"
module_href
"
:
all_result
[
0
],
"
history_href
"
:
all_result
[
1
],
"
history_href
"
:
all_result
[
1
],
"
preference_href
"
:
all_result
[
2
],
"
preference_href
"
:
all_result
[
2
],
// "language_list": language_list,
"
logout_href
"
:
all_result
[
3
],
"
logout_href
"
:
all_result
[
3
],
"
search_href
"
:
all_result
[
4
],
"
search_href
"
:
all_result
[
4
],
"
worklist_href
"
:
all_result
[
5
]
"
worklist_href
"
:
all_result
[
5
]
...
@@ -68,6 +72,18 @@
...
@@ -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
// 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