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
349b9a44
Commit
349b9a44
authored
Apr 07, 2017
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph gadget: simplify code by using renderjs recent features
parent
2e3afafb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
24 deletions
+6
-24
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_widget_graph_chart_js.js
.../web_page_module/gadget_officejs_widget_graph_chart_js.js
+3
-12
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_widget_graph_dygraph_js.js
...eb_page_module/gadget_officejs_widget_graph_dygraph_js.js
+3
-12
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_widget_graph_chart_js.js
View file @
349b9a44
...
...
@@ -77,16 +77,7 @@
// ready
/////////////////////////////////////////////////////////////////
.
ready
(
function
(
gadget
)
{
gadget
.
property_dict
=
{
render_deferred
:
RSVP
.
defer
()
};
})
.
ready
(
function
(
gadget
)
{
return
gadget
.
getElement
()
.
push
(
function
(
element
)
{
gadget
.
property_dict
.
element
=
element
;
});
gadget
.
property_dict
=
{};
})
/////////////////////////////////////////////////////////////////
...
...
@@ -108,7 +99,7 @@
graph_data_and_parameter
,
chart
;
container
=
gadget
.
property_dict
.
element
.
querySelector
(
"
.graph-content
"
);
container
=
gadget
.
element
.
querySelector
(
"
.graph-content
"
);
graph_data_and_parameter
=
getGraphDataAndParameterFromConfiguration
(
configuration_dict
);
console
.
log
(
"
graph_data_and_parameter
"
,
graph_data_and_parameter
);
chart
=
new
Chart
(
container
,
graph_data_and_parameter
);
...
...
@@ -125,7 +116,7 @@
*/
var
gadget
=
this
,
graph_data_and_parameter
,
container
=
gadget
.
property_dict
.
element
.
querySelector
(
"
.graph-content
"
),
container
=
gadget
.
element
.
querySelector
(
"
.graph-content
"
),
chart
;
gadget
.
property_dict
.
chart
.
destroy
();
graph_data_and_parameter
=
getGraphDataAndParameterFromConfiguration
(
configuration_dict
);
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_widget_graph_dygraph_js.js
View file @
349b9a44
...
...
@@ -127,16 +127,7 @@
// ready
/////////////////////////////////////////////////////////////////
.
ready
(
function
(
gadget
)
{
gadget
.
property_dict
=
{
render_deferred
:
RSVP
.
defer
()
};
})
.
ready
(
function
(
gadget
)
{
return
gadget
.
getElement
()
.
push
(
function
(
element
)
{
gadget
.
property_dict
.
element
=
element
;
});
gadget
.
property_dict
=
{};
})
/////////////////////////////////////////////////////////////////
...
...
@@ -156,10 +147,10 @@
container
,
graph_data_and_parameter
;
container
=
gadget
.
property_dict
.
element
.
querySelector
(
"
.graph-content
"
);
container
=
gadget
.
element
.
querySelector
(
"
.graph-content
"
);
graph_data_and_parameter
=
getGraphDataAndParameterFromConfiguration
(
configuration_dict
);
gadget
.
property_dict
.
graph
=
new
Dygraph
(
container
,
gadget
.
property_dict
.
graph
=
new
Dygraph
(
container
,
graph_data_and_parameter
.
dygraph_data
,
graph_data_and_parameter
.
dygraph_parameter_dict
);
...
...
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