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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
b9489817
Commit
b9489817
authored
Nov 28, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: Integrate jsoneditor into gadget_editor
parent
9c023b23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
...inTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
+6
-2
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
View file @
b9489817
...
...
@@ -17,6 +17,7 @@
* @property {string} password a password to decrypt the content
* @property {boolean} run a hack for jsmd editor
* @property {string} key Key for ERP5 form
* @property {string} schema_url Schema's URL for json editor
*/
(
function
(
window
,
rJS
,
RSVP
,
document
,
FileReader
,
Blob
)
{
...
...
@@ -34,7 +35,8 @@
"
pdf
"
:
{
"
url
"
:
"
pdf_js/pdfjs.gadget.html
"
},
"
notebook_editor
"
:
{
"
url
"
:
"
gadget_notebook.html
"
},
"
jsmd_editor
"
:
{
"
url
"
:
"
gadget_jsmd_viewer.html
"
},
"
jexcel
"
:
{
"
url
"
:
"
jexcel.gadget.html
"
}
"
jexcel
"
:
{
"
url
"
:
"
jexcel.gadget.html
"
},
"
jsoneditor
"
:
{
"
url
"
:
"
json-editor.gadget.html
"
}
};
...
...
@@ -93,6 +95,7 @@
run
:
options
.
run
||
false
,
key
:
options
.
key
,
password
:
options
.
password
,
schema_url
:
options
.
schema_url
,
// Force calling subfield render
// as user may have modified the input value
render_timestamp
:
new
Date
().
getTime
()
...
...
@@ -161,6 +164,7 @@
(
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
)))
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsmd_editor
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
monaco
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsoneditor
'
)
||
(
gadget
.
state
.
editor
===
'
pdf
'
))
{
queue
.
push
(
function
()
{
...
...
@@ -206,6 +210,7 @@
(
gadget
.
state
.
editor
===
'
html_viewer
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsmd_editor
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
monaco
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsoneditor
'
)
||
(
gadget
.
state
.
editor
===
'
pdf
'
))
{
queue
.
push
(
function
()
{
...
...
@@ -214,7 +219,6 @@
.
push
(
function
(
editor_gadget
)
{
return
editor_gadget
.
render
(
gadget
.
state
);
});
if
(
modification_dict
.
maximize
===
"
auto
"
)
{
queue
.
push
(
function
()
{
...
...
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