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
Titouan Soulard
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
Show 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 @@
...
@@ -17,6 +17,7 @@
* @property {string} password a password to decrypt the content
* @property {string} password a password to decrypt the content
* @property {boolean} run a hack for jsmd editor
* @property {boolean} run a hack for jsmd editor
* @property {string} key Key for ERP5 form
* @property {string} key Key for ERP5 form
* @property {string} schema_url Schema's URL for json editor
*/
*/
(
function
(
window
,
rJS
,
RSVP
,
document
,
FileReader
,
Blob
)
{
(
function
(
window
,
rJS
,
RSVP
,
document
,
FileReader
,
Blob
)
{
...
@@ -34,7 +35,8 @@
...
@@ -34,7 +35,8 @@
"
pdf
"
:
{
"
url
"
:
"
pdf_js/pdfjs.gadget.html
"
},
"
pdf
"
:
{
"
url
"
:
"
pdf_js/pdfjs.gadget.html
"
},
"
notebook_editor
"
:
{
"
url
"
:
"
gadget_notebook.html
"
},
"
notebook_editor
"
:
{
"
url
"
:
"
gadget_notebook.html
"
},
"
jsmd_editor
"
:
{
"
url
"
:
"
gadget_jsmd_viewer.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 @@
...
@@ -93,6 +95,7 @@
run
:
options
.
run
||
false
,
run
:
options
.
run
||
false
,
key
:
options
.
key
,
key
:
options
.
key
,
password
:
options
.
password
,
password
:
options
.
password
,
schema_url
:
options
.
schema_url
,
// Force calling subfield render
// Force calling subfield render
// as user may have modified the input value
// as user may have modified the input value
render_timestamp
:
new
Date
().
getTime
()
render_timestamp
:
new
Date
().
getTime
()
...
@@ -161,6 +164,7 @@
...
@@ -161,6 +164,7 @@
(
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
)))
||
(
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
)))
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsmd_editor
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsmd_editor
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
monaco
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
monaco
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsoneditor
'
)
||
(
gadget
.
state
.
editor
===
'
pdf
'
))
{
(
gadget
.
state
.
editor
===
'
pdf
'
))
{
queue
queue
.
push
(
function
()
{
.
push
(
function
()
{
...
@@ -206,6 +210,7 @@
...
@@ -206,6 +210,7 @@
(
gadget
.
state
.
editor
===
'
html_viewer
'
)
||
(
gadget
.
state
.
editor
===
'
html_viewer
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsmd_editor
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsmd_editor
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
monaco
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
monaco
'
)
||
(
!
gadget
.
state
.
editable
&&
gadget
.
state
.
editor
===
'
jsoneditor
'
)
||
(
gadget
.
state
.
editor
===
'
pdf
'
))
{
(
gadget
.
state
.
editor
===
'
pdf
'
))
{
queue
queue
.
push
(
function
()
{
.
push
(
function
()
{
...
@@ -214,7 +219,6 @@
...
@@ -214,7 +219,6 @@
.
push
(
function
(
editor_gadget
)
{
.
push
(
function
(
editor_gadget
)
{
return
editor_gadget
.
render
(
gadget
.
state
);
return
editor_gadget
.
render
(
gadget
.
state
);
});
});
if
(
modification_dict
.
maximize
===
"
auto
"
)
{
if
(
modification_dict
.
maximize
===
"
auto
"
)
{
queue
queue
.
push
(
function
()
{
.
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