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
1
Merge Requests
1
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
Cédric Le Ninivin
erp5
Commits
fe105274
Commit
fe105274
authored
Jun 09, 2016
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_svg_editor: Improve Method Draw compatibility with officejs
parent
55c7df0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/method-draw/method-draw.gadget.html.zpt
...s/erp5_svg_editor/method-draw/method-draw.gadget.html.zpt
+2
-2
bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/method-draw/method-draw.gadget.js.js
...kins/erp5_svg_editor/method-draw/method-draw.gadget.js.js
+7
-7
No files found.
bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/method-draw/method-draw.gadget.html.zpt
View file @
fe105274
...
@@ -57,8 +57,8 @@
...
@@ -57,8 +57,8 @@
<!-- renderjs -->
<!-- renderjs -->
<script
src=
"rsvp.js"
></script>
<script
src=
"
../
rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"
../
renderjs.js"
></script>
<!-- custom script -->
<!-- custom script -->
<script
src=
"method-draw.gadget.js"
></script>
<script
src=
"method-draw.gadget.js"
></script>
<title>
Method Draw
</title>
<title>
Method Draw
</title>
...
...
bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/method-draw/method-draw.gadget.js.js
View file @
fe105274
...
@@ -8,13 +8,6 @@
...
@@ -8,13 +8,6 @@
rJS
(
window
)
rJS
(
window
)
.
ready
(
function
(
g
)
{
.
ready
(
function
(
g
)
{
g
.
props
=
{};
g
.
props
=
{};
[].
forEach
.
call
(
window
.
document
.
head
.
querySelectorAll
(
"
base
"
),
function
(
el
)
{
// XXX GadgetField adds <base> tag to fit to the parent page location, it's BAD to remove them.
// In the case of method-draw, all component are loaded dynamicaly through ajax requests in
// method-draw "folder". By setting a <base> tag, we change the url resolution behavior, and
// we break all dynamic links. So, deleting <base> is required.
window
.
document
.
head
.
removeChild
(
el
);
});
var
deferred
=
RSVP
.
defer
();
var
deferred
=
RSVP
.
defer
();
svgCanvas
.
ready
(
function
()
{
svgCanvas
.
ready
(
function
()
{
deferred
.
resolve
();
deferred
.
resolve
();
...
@@ -22,6 +15,13 @@
...
@@ -22,6 +15,13 @@
return
deferred
.
promise
;
return
deferred
.
promise
;
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
(
options
)
{
[].
forEach
.
call
(
window
.
document
.
head
.
querySelectorAll
(
"
base
"
),
function
(
el
)
{
// XXX GadgetField adds <base> tag to fit to the parent page location, it's BAD to remove them.
// In the case of method-draw, all component are loaded dynamicaly through ajax requests in
// method-draw "folder". By setting a <base> tag, we change the url resolution behavior, and
// we break all dynamic links. So, deleting <base> is required.
window
.
document
.
head
.
removeChild
(
el
);
});
this
.
props
.
key
=
options
.
key
;
this
.
props
.
key
=
options
.
key
;
svgCanvas
.
setSvgString
(
options
.
value
);
svgCanvas
.
setSvgString
(
options
.
value
);
})
})
...
...
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