Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
74157942
Commit
74157942
authored
Apr 28, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: document the render options of editor gadget
parent
bb7edb27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
...inTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
+26
-2
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
View file @
74157942
/*jslint nomen: true, indent: 2 */
/*jslint nomen: true, indent: 2 */
/*global window, rJS, RSVP, document, FileReader, Blob*/
/*global window, rJS, RSVP, document, FileReader, Blob*/
/**
* Render options for editor gadget.
*
* @typedef {object} RenderOptions
* @property {string} value the data to edit
* @property {string} editor the selected editor
* @property {string} content_type the mime type
* @property {boolean} maximize start in maximized state
* @property {string} portal_type the portal type
* @property {boolean} editable set to true to have an editor when user
* can modify the content, false for a "read only" editor
* @property {boolean} run a hack for jsmd editor
* @property {string} key Key for ERP5 form
*/
(
function
(
window
,
rJS
,
RSVP
,
document
,
FileReader
,
Blob
)
{
(
function
(
window
,
rJS
,
RSVP
,
document
,
FileReader
,
Blob
)
{
"
use strict
"
;
"
use strict
"
;
...
@@ -45,11 +61,19 @@
...
@@ -45,11 +61,19 @@
});
});
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
/**
* @param {RenderOptions} options
*/
function
(
options
)
{
return
this
.
renderAsynchronously
(
options
);
return
this
.
renderAsynchronously
(
options
);
})
})
.
declareJob
(
'
renderAsynchronously
'
,
function
(
options
)
{
.
declareJob
(
'
renderAsynchronously
'
,
/**
* @param {RenderOptions} options
*/
function
(
options
)
{
var
state_dict
=
{
var
state_dict
=
{
value
:
options
.
value
||
""
,
value
:
options
.
value
||
""
,
editor
:
options
.
editor
,
editor
:
options
.
editor
,
...
...
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