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
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
Show 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 @@
...
@@ -112,9 +112,10 @@
<item>
<item>
<key>
<string>
text_content
</string>
</key>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
CACHE MANIFEST\n
<value>
<string>
CACHE MANIFEST\n
# v1.
0
.0\n
# v1.
1
.0\n
CACHE:\n
CACHE:\n
gadget_field_graph_echarts.html/echarts-all.js\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/renderjs.js\n
gadget_field_graph_echarts.html/rsvp.js\n
gadget_field_graph_echarts.html/rsvp.js\n
gadget_field_graph_echarts.html/unsafe/gadget_field_graph_echarts.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 @@
...
@@ -18,6 +18,7 @@
<script
src=
"echarts-all.js"
type=
"text/javascript"
></script>
<script
src=
"echarts-all.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<!-- custom script -->
<script
src=
"gadget_global.js"
type=
"text/javascript"
></script>
<script
src=
"unsafe/gadget_field_graph_echarts.js"
type=
"text/javascript"
></script>
<script
src=
"unsafe/gadget_field_graph_echarts.js"
type=
"text/javascript"
></script>
</head>
</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 */
/*jslint nomen: true, indent: 2 */
(
function
(
window
,
rJS
,
RSVP
,
echarts
)
{
(
function
(
window
,
rJS
,
RSVP
,
echarts
,
loopEventListener
)
{
"
use strict
"
;
"
use strict
"
;
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
...
@@ -174,13 +174,15 @@
...
@@ -174,13 +174,15 @@
chart
.
setOption
(
graph_data_and_parameter
);
chart
.
setOption
(
graph_data_and_parameter
);
this
.
listenToClickEventOnTheChart
(
chart
);
this
.
listenToClickEventOnTheChart
(
chart
);
// XXX
window
.
addEventListener
(
"
resize
"
,
function
()
{
chart
.
resize
();
},
{
passive
:
true
});
gadget
.
property_dict
.
chart
=
chart
;
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
)
{
.
declareJob
(
'
listenToClickEventOnTheChart
'
,
function
(
chart
)
{
var
gadget
=
this
,
var
gadget
=
this
,
defer
=
RSVP
.
defer
();
defer
=
RSVP
.
defer
();
...
@@ -191,4 +193,4 @@
...
@@ -191,4 +193,4 @@
});
});
return
defer
.
promise
;
return
defer
.
promise
;
});
});
}(
window
,
rJS
,
RSVP
,
echarts
));
}(
window
,
rJS
,
RSVP
,
echarts
,
loopEventListener
));
\ No newline at end of file
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