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
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
Joshua
erp5
Commits
5ff48db6
Commit
5ff48db6
authored
Aug 12, 2019
by
Joshua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated web chart view to be compatible with plotly graphs.
parent
a7f86b0e
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1607 additions
and
0 deletions
+1607
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_chart_editor_json.json
...em/web_page_module/gadget_officejs_chart_editor_json.json
+12
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_chart_editor_json.xml
...tem/web_page_module/gadget_officejs_chart_editor_json.xml
+326
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_chart_editor_router_html.html
...page_module/gadget_officejs_chart_editor_router_html.html
+25
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_chart_editor_router_html.xml
..._page_module/gadget_officejs_chart_editor_router_html.xml
+367
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_chart_view._s.js
.../web_page_module/gadget_officejs_jio_web_chart_view._s.js
+195
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_chart_view._s.xml
...web_page_module/gadget_officejs_jio_web_chart_view._s.xml
+326
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_chart_view_html.html
..._page_module/gadget_officejs_jio_web_chart_view_html.html
+26
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_chart_view_html.xml
...b_page_module/gadget_officejs_jio_web_chart_view_html.xml
+330
-0
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_chart_editor_json.json
0 → 100644
View file @
5ff48db6
{
"short_name"
:
"Chart Editor"
,
"name"
:
"OfficeJS Chart Editor"
,
"description"
:
"Simple Chart Editor"
,
"icons"
:
[{
"src"
:
"officejs_logo_chart_editor.png"
,
"sizes"
:
"any"
,
"type"
:
"image/png"
}],
"start_url"
:
"../../"
,
"display"
:
"standalone"
}
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_chart_editor_json.xml
0 → 100644
View file @
5ff48db6
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_chart_editor_router_html.html
0 → 100644
View file @
5ff48db6
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
OfficeJS Router Gadget
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_officejs_router.js"
type=
"text/javascript"
></script>
</head>
<body>
<script
data-renderjs-configuration=
"portal_type"
type=
"text/x-renderjs-configuration"
>
Web
Chart
</script>
<script
data-renderjs-configuration=
"document_title"
type=
"text/x-renderjs-configuration"
>
Chart
</script>
<script
data-renderjs-configuration=
"document_title_plural"
type=
"text/x-renderjs-configuration"
>
Charts
</script>
<script
data-renderjs-configuration=
"parent_relative_url"
type=
"text/x-renderjs-configuration"
>
web_page_module
</script>
<script
data-renderjs-configuration=
"erp5_attachment_synchro"
type=
"text/x-renderjs-configuration"
></script>
<script
data-renderjs-configuration=
"dropbox_app_key"
type=
"text/x-renderjs-configuration"
>
n692ixxhyg9zhqs
</script>
<div
data-gadget-url=
"gadget_erp5_router.html"
data-gadget-scope=
"erp5_router"
></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_chart_editor_router_html.xml
0 → 100644
View file @
5ff48db6
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_chart_view._s.js
0 → 100644
View file @
5ff48db6
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
updateDocument
"
,
"
updateDocument
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
updated_url_string
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
})
.
push
(
function
(
content
)
{
updated_url_string
=
content
.
url_string
;
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
'
Data Updated
'
,
status
:
'
success
'
});
})
.
push
(
function
()
{
if
(
updated_url_string
!==
gadget
.
state
.
doc
.
url_string
)
{
gadget
.
state
.
doc
.
url_string
=
updated_url_string
;
return
gadget
.
changeState
({
update
:
true
});
}
return
;
});
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
return
this
.
element
.
querySelector
(
'
button[type="submit"]
'
).
click
();
})
.
onStateChange
(
function
()
{
var
gadget
=
this
,
text_content
;
if
(
gadget
.
state
.
doc
.
text_content
)
{
text_content
=
JSON
.
parse
(
gadget
.
state
.
doc
.
text_content
);
text_content
.
url
=
gadget
.
state
.
doc
.
url_string
?
gadget
.
state
.
doc
.
url_string
:
undefined
;
gadget
.
state
.
doc
.
text_content
=
JSON
.
stringify
(
text_content
);
}
else
{
gadget
.
state
.
doc
.
text_content
=
gadget
.
state
.
doc
.
url_string
?
JSON
.
stringify
({
url
:
gadget
.
state
.
doc
.
url_string
})
:
undefined
;
}
gadget
.
state
.
update
=
false
;
return
gadget
.
getDeclaredGadget
(
'
form_view
'
)
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_title
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Title
"
,
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Reference
"
,
"
default
"
:
gadget
.
state
.
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_version
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Version
"
,
"
default
"
:
gadget
.
state
.
doc
.
version
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
,
"
key
"
:
"
version
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_url_string
"
:
{
"
description
"
:
""
,
"
title
"
:
"
URL
"
,
"
default
"
:
gadget
.
state
.
doc
.
url_string
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
,
"
key
"
:
"
url_string
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_language
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Language
"
,
"
default
"
:
gadget
.
state
.
doc
.
language
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
,
"
key
"
:
"
language
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_description
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Description
"
,
"
default
"
:
gadget
.
state
.
doc
.
description
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
,
"
key
"
:
"
description
"
,
"
hidden
"
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_content
"
:
{
"
default
"
:
gadget
.
state
.
doc
.
text_content
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
renderjs_extra
"
:
'
{"editor": "chart_editor",
'
+
'
"maximize": true}
'
,
"
type
"
:
"
GadgetField
"
,
"
url
"
:
"
gadget_editor.html
"
,
"
sandbox
"
:
"
public
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
my_title
"
],
[
"
my_reference
"
]]
],
[
"
right
"
,
[[
"
my_version
"
],
[
"
my_language
"
],
[
"
my_url_string
"
]]
],
[
"
center
"
,
[[
"
my_description
"
]]
],
[
"
bottom
"
,
[[
"
my_content
"
]]
]]
}
});
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
return
gadget
.
updateHeader
({
page_title
:
gadget
.
state
.
doc
.
title
,
save_action
:
true
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_chart_view._s.xml
0 → 100644
View file @
5ff48db6
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_chart_view_html.html
0 → 100644
View file @
5ff48db6
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS Jio Web Page View
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"handlebars.js"
></script>
<script
src=
"gadget_officejs_jio_web_chart_view.js"
></script>
</head>
<body>
<form
class=
"save_form ui-body-c"
novalidate
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"form_view"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_chart_view_html.xml
0 → 100644
View file @
5ff48db6
This diff is collapsed.
Click to expand it.
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