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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
69d1026d
Commit
69d1026d
authored
Aug 06, 2019
by
Joshua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated appcache file with proper filename of bundled react chart editor component
parent
b618b81d
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
113 additions
and
16 deletions
+113
-16
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/WebChart_getData.py
...teItem/portal_skins/erp5_chart_editor/WebChart_getData.py
+36
-0
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/WebChart_getData.xml
...eItem/portal_skins/erp5_chart_editor/WebChart_getData.xml
+62
-0
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/WebChart_viewPreview/simple_plotly_graph_gadget.xml
...ditor/WebChart_viewPreview/simple_plotly_graph_gadget.xml
+1
-1
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/gadget_chart_editor.appcache.appcache
...s/erp5_chart_editor/gadget_chart_editor.appcache.appcache
+1
-1
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/gadget_chart_editor.html.html
...tal_skins/erp5_chart_editor/gadget_chart_editor.html.html
+3
-3
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/gadget_chart_editor.js.js
.../portal_skins/erp5_chart_editor/gadget_chart_editor.js.js
+3
-6
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.8b730bc1.js.js
...tal_skins/erp5_chart_editor/static/js/main.8b730bc1.js.js
+2
-0
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.8b730bc1.js.map.bin
...kins/erp5_chart_editor/static/js/main.8b730bc1.js.map.bin
+1
-1
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.8b730bc1.js.map.xml
...kins/erp5_chart_editor/static/js/main.8b730bc1.js.map.xml
+2
-2
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.8b730bc1.js.xml
...al_skins/erp5_chart_editor/static/js/main.8b730bc1.js.xml
+2
-2
No files found.
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/WebChart_getData.py
0 → 100644
View file @
69d1026d
import
json
doc
=
json
.
loads
(
context
.
getData
())
AT_KEY_TO_CHANGE
=
2
KEY_TO_CHANGE
=
0
NEW_KEY_VAL
=
1
LIST_OF_NESTED_KEYS
=
[
[
"layout"
,
"title"
,
"text"
],
[
"layout"
,
"xaxis"
,
"title"
,
"text"
],
[
"layout"
,
"yaxis"
,
"title"
,
"text"
]
]
def
nestedKeyExists
(
key_list
,
dictionary
):
keyExists
=
False
currKey
=
key_list
[
0
]
if
type
(
dictionary
)
==
dict
:
if
currKey
in
dictionary
:
smaller_list
=
key_list
[
1
:]
if
len
(
smaller_list
)
==
0
:
keyExists
=
True
else
:
return
nestedKeyExists
(
smaller_list
,
dictionary
[
currKey
])
return
keyExists
def
changeKeysInDict
(
key_list
,
dictionary
):
if
len
(
key_list
)
==
AT_KEY_TO_CHANGE
:
dictionary
[
key_list
[
KEY_TO_CHANGE
]]
=
dictionary
[
key_list
[
KEY_TO_CHANGE
]][
key_list
[
NEW_KEY_VAL
]]
else
:
return
changeKeysInDict
(
key_list
[
1
:],
dictionary
[
key_list
[
0
]])
for
i
in
LIST_OF_NESTED_KEYS
:
if
nestedKeyExists
(
i
,
doc
):
changeKeysInDict
(
i
,
doc
)
doc
[
'isPlotlyGraph'
]
=
True
;
return
json
.
dumps
(
doc
)
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/WebChart_getData.xml
0 → 100644
View file @
69d1026d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebChart_getData
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/WebChart_viewPreview/simple_plotly_graph_gadget.xml
View file @
69d1026d
...
...
@@ -115,7 +115,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.getData()
</string>
</value>
<value>
<string>
python: here.
WebChart_
getData()
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/gadget_chart_editor.appcache.appcache
View file @
69d1026d
...
...
@@ -5,7 +5,7 @@ renderjs.js
rsvp.js
gadget_chart_editor.js
static/css/main.88fa11bf.css
static/js/main.
99e62089
.js
static/js/main.
8b730bc1
.js
NETWORK:
*
\ No newline at end of file
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/gadget_chart_editor.html.html
View file @
69d1026d
...
...
@@ -12,9 +12,9 @@
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"https://unpkg.com/react@16/umd/react.development.js"
crossorigin
></script>
<script
src=
"https://unpkg.com/react-dom@16/umd/react-dom.development.js"
crossorigin
></script>
<script
type=
"text/javascript"
src=
"static/js/main.
99e62089
.js"
></script>
<script
src=
"https://unpkg.com/react@16
.8.6
/umd/react.development.js"
crossorigin
></script>
<script
src=
"https://unpkg.com/react-dom@16
.8.6
/umd/react-dom.development.js"
crossorigin
></script>
<script
type=
"text/javascript"
src=
"static/js/main.
8b730bc1
.js"
></script>
<script
src=
"gadget_chart_editor.js"
type=
"text/javascript"
></script>
...
...
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/gadget_chart_editor.js.js
View file @
69d1026d
...
...
@@ -22,10 +22,10 @@
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
return
this
.
changeState
({
key
:
options
.
key
,
value
:
options
.
value
.
value
||
""
,
url
:
options
.
value
.
url
||
""
,
value
:
options
.
value
||
""
,
editable
:
options
.
editable
===
undefined
?
true
:
options
.
editable
,
configuration
:
options
.
configuration
,
configuration_mobile
:
options
.
configuration_mobile
,
...
...
@@ -60,14 +60,11 @@
modification_dict
.
hasOwnProperty
(
'
is_responsive
'
)
||
modification_dict
.
hasOwnProperty
(
'
is_mobile
'
)
||
modification_dict
.
hasOwnProperty
(
'
editable
'
)
||
modification_dict
.
hasOwnProperty
(
'
url
'
))
{
modification_dict
.
hasOwnProperty
(
'
value
'
))
{
// Expected configuration changed.
if
(
"
value
"
in
modification_dict
&&
modification_dict
.
value
!=
""
){
props
=
{...
props
,
...
JSON
.
parse
(
modification_dict
.
value
)};
}
if
(
"
url
"
in
modification_dict
){
props
=
{...
props
,
...{
url
:
modification_dict
.
url
}};
}
ReactDOM
.
unmountComponentAtNode
(
container
);
gadget
.
state
.
component
=
ReactDOM
.
render
(
React
.
createElement
(
EntryPoint
.
default
.
App
,
props
,
null
),
container
);
}
...
...
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.
99e62089
.js.js
→
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.
8b730bc1
.js.js
View file @
69d1026d
This diff is collapsed.
Click to expand it.
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.
99e62089
.js.map.bin
→
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.
8b730bc1
.js.map.bin
View file @
69d1026d
This diff is collapsed.
Click to expand it.
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.
99e62089
.js.map.xml
→
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.
8b730bc1
.js.map.xml
View file @
69d1026d
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
main.
99e62089
.js.map
</string>
</value>
<value>
<string>
main.
8b730bc1
.js.map
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
...
...
@@ -20,7 +20,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
main.
99e62089
.js.map
</string>
</value>
<value>
<string>
main.
8b730bc1
.js.map
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.
99e62089
.js.xml
→
bt5/erp5_chart_editor/SkinTemplateItem/portal_skins/erp5_chart_editor/static/js/main.
8b730bc1
.js.xml
View file @
69d1026d
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
main.
99e62089
.js
</string>
</value>
<value>
<string>
main.
8b730bc1
.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
...
...
@@ -20,7 +20,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
main.
99e62089
.js
</string>
</value>
<value>
<string>
main.
8b730bc1
.js
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
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