Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
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
Show 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*/
...
@@ -5,6 +5,16 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
lockGadgetInQueue
,
unlockGadgetInQueue
,
unlockGadgetInFailedQueue
)
{
lockGadgetInQueue
,
unlockGadgetInQueue
,
unlockGadgetInFailedQueue
)
{
"
use strict
"
;
"
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) {
function readBlobAsDataURL(blob) {
var fr = new FileReader();
var fr = new FileReader();
...
@@ -90,37 +100,11 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
...
@@ -90,37 +100,11 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
element
.
appendChild
(
div
);
element
.
appendChild
(
div
);
if
(
gadget
.
state
.
editable
&&
if
(
gadget
.
state
.
editable
&&
(
gadget
.
state
.
editor
===
'
codemirror
'
))
{
(
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
)))
{
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
'
))
{
queue
queue
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
declareGadget
(
return
gadget
.
declareGadget
(
"
ckeditor.gadget.html
"
,
editor_dict
[
gadget
.
state
.
editor
].
url
,
{
{
scope
:
'
editor
'
,
scope
:
'
editor
'
,
sandbox
:
'
iframe
'
,
sandbox
:
'
iframe
'
,
...
@@ -137,7 +121,7 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
...
@@ -137,7 +121,7 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
}
}
if
(
gadget
.
state
.
editable
&&
if
(
gadget
.
state
.
editable
&&
([
'
codemirror
'
,
'
fck_editor
'
,
'
onlyoffice
'
].
indexOf
(
gadget
.
state
.
editor
)
>=
0
))
{
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
))
{
queue
queue
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
editor
'
);
return
gadget
.
getDeclaredGadget
(
'
editor
'
);
...
@@ -163,7 +147,7 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
...
@@ -163,7 +147,7 @@ lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
gadget
=
this
,
gadget
=
this
,
result
;
result
;
if
(
this
.
state
.
editable
&&
if
(
this
.
state
.
editable
&&
([
'
codemirror
'
,
'
fck_editor
'
,
'
onlyoffice
'
].
indexOf
(
this
.
state
.
editor
)
>=
0
))
{
editor_dict
.
hasOwnProperty
(
gadget
.
state
.
editor
))
{
return
lockGadgetInQueue
(
gadget
)()
return
lockGadgetInQueue
(
gadget
)()
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
editor
'
);
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