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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mukul
erp5
Commits
19823cd3
Commit
19823cd3
authored
Jan 12, 2018
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_core] Add all editors use by officejs in gadget editor
parent
71e8f118
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
30 deletions
+14
-30
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
...inTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
+14
-30
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
View file @
19823cd3
...
...
@@ -5,6 +5,16 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
lockGadgetInQueue
,
unlockGadgetInQueue
,
unlockGadgetInFailedQueue
)
{
"
use strict
"
;
var
editor_dict
=
{
"
codemirror
"
:
{
"
url
"
:
"
codemirror.gadget.html
"
},
"
onlyoffice
"
:
{
"
url
"
:
"
onlyoffice.gadget.html
"
},
"
fck_editor
"
:
{
"
url
"
:
"
ckeditor.gadget.html
"
},
"
svg_editor
"
:
{
"
url
"
:
"
method-draw/method-draw.gadget.html
"
},
"
minipaint
"
:
{
"
url
"
:
"
minipaint.gadget.html
"
},
"
jquery-sheets
"
:
{
"
url
"
:
"
jquery-sheets.gadget.html
"
},
"
pdf
"
:
{
"
url
"
:
"
pdf_js/pdfjs.gadget.html
"
}
};
/*
function readBlobAsDataURL(blob) {
var fr = new FileReader();
...
...
@@ -90,37 +100,11 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
element
.
appendChild
(
div
);
if
(
gadget
.
state
.
editable
&&
(
gadget
.
state
.
editor
===
'
codemirror
'
))
{
queue
.
push
(
function
()
{
return
gadget
.
declareGadget
(
"
codemirror.gadget.html
"
,
{
scope
:
'
editor
'
,
sandbox
:
'
iframe
'
,
element
:
div
}
);
});
}
else
if
(
gadget
.
state
.
editable
&&
(
gadget
.
state
.
editor
===
'
onlyoffice
'
))
{
queue
.
push
(
function
()
{
return
gadget
.
declareGadget
(
"
onlyoffice.gadget.html
"
,
{
scope
:
'
editor
'
,
sandbox
:
'
iframe
'
,
element
:
div
}
);
});
}
else
if
(
gadget
.
state
.
editable
&&
(
gadget
.
state
.
editor
===
'
fck_editor
'
))
{
(
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
)))
{
queue
.
push
(
function
()
{
return
gadget
.
declareGadget
(
"
ckeditor.gadget.html
"
,
editor_dict
[
gadget
.
state
.
editor
].
url
,
{
scope
:
'
editor
'
,
sandbox
:
'
iframe
'
,
...
...
@@ -137,7 +121,7 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
}
if
(
gadget
.
state
.
editable
&&
([
'
codemirror
'
,
'
fck_editor
'
,
'
onlyoffice
'
].
indexOf
(
gadget
.
state
.
editor
)
>=
0
))
{
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
))
{
queue
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
editor
'
);
...
...
@@ -163,7 +147,7 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
gadget
=
this
,
result
;
if
(
this
.
state
.
editable
&&
([
'
codemirror
'
,
'
fck_editor
'
,
'
onlyoffice
'
].
indexOf
(
this
.
state
.
editor
)
>=
0
))
{
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
))
{
return
lockGadgetInQueue
(
gadget
)()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
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