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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
23347739
Commit
23347739
authored
Feb 01, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_run_my_doc: fixup erp5 image url using embedded image
parent
6c013429
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/slideeditor.gadget.js.js
...tem/portal_skins/erp5_run_my_doc/slideeditor.gadget.js.js
+15
-1
No files found.
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/slideeditor.gadget.js.js
View file @
23347739
...
@@ -31,6 +31,16 @@
...
@@ -31,6 +31,16 @@
'
Image Caption
'
'
Image Caption
'
];
];
function
fixupERP5UrlCompatibility
(
jio_key
,
url
)
{
if
(
!
jio_key
)
{
return
url
;
}
return
new
URL
(
url
,
new
URL
(
jio_key
+
'
/
'
,
window
.
location
.
href
).
href
).
href
;
}
///////////////////////////////////////////////////
///////////////////////////////////////////////////
// translation
// translation
///////////////////////////////////////////////////
///////////////////////////////////////////////////
...
@@ -465,7 +475,10 @@
...
@@ -465,7 +475,10 @@
edit_element
,
edit_element
,
delete_element
,
delete_element
,
domsugar
(
'
img
'
,
{
domsugar
(
'
img
'
,
{
src
:
getSlideDictFromSlideElement
(
section_list
[
i
]).
image_url
,
src
:
fixupERP5UrlCompatibility
(
gadget
.
state
.
jio_key
,
getSlideDictFromSlideElement
(
section_list
[
i
]).
image_url
),
draggable
:
false
draggable
:
false
})
})
];
];
...
@@ -597,6 +610,7 @@
...
@@ -597,6 +610,7 @@
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
(
options
)
{
return
this
.
changeState
({
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
key
:
options
.
key
,
key
:
options
.
key
,
value
:
options
.
value
||
""
,
value
:
options
.
value
||
""
,
editable
:
options
.
editable
===
undefined
?
true
:
options
.
editable
editable
:
options
.
editable
===
undefined
?
true
:
options
.
editable
...
...
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