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
Gabriel Monnerat
erp5
Commits
2c94a557
Commit
2c94a557
authored
Sep 28, 2017
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: use loopEventListener on echarts gadget
parent
f2fc4d73
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_field_graph_echarts_appcache.xml
...m/web_page_module/gadget_field_graph_echarts_appcache.xml
+2
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_field_graph_echarts_html.html
...Item/web_page_module/gadget_field_graph_echarts_html.html
+1
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_field_graph_echarts_js.js
...lateItem/web_page_module/gadget_field_graph_echarts_js.js
+9
-7
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_field_graph_echarts_appcache.xml
View file @
2c94a557
...
...
@@ -112,9 +112,10 @@
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
CACHE MANIFEST\n
# v1.
0
.0\n
# v1.
1
.0\n
CACHE:\n
gadget_field_graph_echarts.html/echarts-all.js\n
gadget_field_graph_echarts.html/gadget_global.js\n
gadget_field_graph_echarts.html/renderjs.js\n
gadget_field_graph_echarts.html/rsvp.js\n
gadget_field_graph_echarts.html/unsafe/gadget_field_graph_echarts.js\n
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_field_graph_echarts_html.html
View file @
2c94a557
...
...
@@ -18,6 +18,7 @@
<script
src=
"echarts-all.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_global.js"
type=
"text/javascript"
></script>
<script
src=
"unsafe/gadget_field_graph_echarts.js"
type=
"text/javascript"
></script>
</head>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_field_graph_echarts_js.js
View file @
2c94a557
/*global window, rJS, RSVP, echarts */
/*global window, rJS, RSVP, echarts
, loopEventListener
*/
/*jslint nomen: true, indent: 2 */
(
function
(
window
,
rJS
,
RSVP
,
echarts
)
{
(
function
(
window
,
rJS
,
RSVP
,
echarts
,
loopEventListener
)
{
"
use strict
"
;
/////////////////////////////////////////////////////////////////
...
...
@@ -174,13 +174,15 @@
chart
.
setOption
(
graph_data_and_parameter
);
this
.
listenToClickEventOnTheChart
(
chart
);
// XXX
window
.
addEventListener
(
"
resize
"
,
function
()
{
chart
.
resize
();
},
{
passive
:
true
});
gadget
.
property_dict
.
chart
=
chart
;
})
.
declareService
(
function
()
{
var
gadget
=
this
;
return
loopEventListener
(
window
,
"
resize
"
,
{
passive
:
true
},
function
()
{
gadget
.
property_dict
.
chart
.
resize
();
},
false
);
})
.
declareJob
(
'
listenToClickEventOnTheChart
'
,
function
(
chart
)
{
var
gadget
=
this
,
defer
=
RSVP
.
defer
();
...
...
@@ -191,4 +193,4 @@
});
return
defer
.
promise
;
});
}(
window
,
rJS
,
RSVP
,
echarts
));
\ No newline at end of file
}(
window
,
rJS
,
RSVP
,
echarts
,
loopEventListener
));
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