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
Boris Kocherov
erp5
Commits
3559b1c7
Commit
3559b1c7
authored
Jun 20, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: schema_editor: add gadget_erp5_page_ojs_add_json_schema.*
parent
f358497c
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
721 additions
and
1 deletion
+721
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_add_json_schema.html.html
...age_module/gadget_erp5_page_ojs_add_json_schema.html.html
+18
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_add_json_schema.html.xml
...page_module/gadget_erp5_page_ojs_add_json_schema.html.xml
+319
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_add_json_schema.js.js
...eb_page_module/gadget_erp5_page_ojs_add_json_schema.js.js
+62
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_add_json_schema.js.xml
...b_page_module/gadget_erp5_page_ojs_add_json_schema.js.xml
+319
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_schema_document_list.js.js
...ge_module/gadget_erp5_page_ojs_schema_document_list.js.js
+3
-1
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_add_json_schema.html.html
0 → 100644
View file @
3559b1c7
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS Add JSON Schema
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_erp5_page_ojs_add_json_schema.js"
></script>
</head>
<body>
</body>
</html>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_add_json_schema.html.xml
0 → 100644
View file @
3559b1c7
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_add_json_schema.js.js
0 → 100644
View file @
3559b1c7
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
Blob
)
{
"
use strict
"
;
var
content_type
=
{
Spreadsheet
:
'
application/x-asc-spreadsheet
'
,
Presentation
:
'
application/x-asc-presentation
'
,
Text
:
'
application/x-asc-text
'
};
var
file_ext
=
{
Spreadsheet
:
'
xlsy
'
,
Presentation
:
'
ppty
'
,
Text
:
'
docy
'
};
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_post
"
,
"
jio_post
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
RSVP
.
Queue
()
.
push
(
function
()
{
var
portal_type
=
options
.
portal_type
,
ext
=
file_ext
[
portal_type
],
ret
=
{
title
:
"
Untitled Document
"
,
portal_type
:
"
JSON Schema
"
,
parent_relative_url
:
"
schema_module
"
,
content_type
:
content_type
[
portal_type
]
||
undefined
};
if
(
ext
)
{
ret
.
filename
=
"
default.
"
+
ext
;
}
return
gadget
.
jio_post
(
ret
);
})
.
push
(
function
(
id
)
{
return
gadget
.
jio_putAttachment
(
id
,
'
data
'
,
new
Blob
([
'
{"$schema": "http://json-schema.org/draft-04/schema#" }
'
]))
.
push
(
function
()
{
return
gadget
.
redirect
({
command
:
'
display
'
,
options
:
{
jio_key
:
id
,
editable
:
true
}
});
});
});
});
}(
window
,
rJS
,
RSVP
,
Blob
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_add_json_schema.js.xml
0 → 100644
View file @
3559b1c7
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_ojs_schema_document_list.js.js
View file @
3559b1c7
...
...
@@ -137,7 +137,9 @@
];
}
else
{
tasks
=
[
gadget
.
getUrlFor
({
command
:
"
index
"
,
options
:
{
"
page
"
:
"
ojs_multi_upload
"
}}),
gadget
.
getUrlFor
({
command
:
"
index
"
,
options
:
{
page
:
"
ojs_add_json_schema
"
}}),
gadget
.
getSetting
(
'
document_title_plural
'
)
];
}
...
...
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