Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
f5e12409
Commit
f5e12409
authored
Jan 15, 2016
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_svg_editor: lint svg-editor.erp5.js + enable async ajax
parent
2c5c9be5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
18 deletions
+25
-18
bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml
...eItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml
+25
-18
No files found.
bt5/erp5_svg_editor/SkinTemplateItem/portal_skins/erp5_svg_editor/svg-editor.erp5.js.xml
View file @
f5e12409
...
...
@@ -38,30 +38,37 @@
</item>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<unicode>
window.onload = function() {\n
var svg_canvas = window.frames["svgframe"].svgCanvas;\n
var text_content = $.ajax({\n
url: "Base_getSVGTextContent",\n
async: false\n
}).responseText;\n
text_content != "" ? svg_canvas.setSvgString(text_content) : null;\n
}\n
<value>
<unicode>
window.onload = function () {\n
$.ajax({\n
url: "Base_getSVGTextContent",\n
async: true,\n
success: function (text_content) {\n
var svg_canvas, frame = window.frames.svgframe;\n
if (text_content !== "") {\n
svg_canvas = frame.svgCanvas;\n
svg_canvas.ready(function () {\n
svg_canvas.setSvgString(text_content);\n
});\n
}\n
}\n
});\n
};\n
\n
$(document).ready(function
()
{\n
$("button.save").click(function
(event)
{\n
$(document).ready(function
()
{\n
$("button.save").click(function
(event)
{\n
event.preventDefault();\n
var svg_canvas = window.frames
["svgframe"]
.svgCanvas;\n
var svg_canvas = window.frames
.svgframe
.svgCanvas;\n
$.ajax({\n
type: "POST",\n
url: "Base_setSVGTextContent",\n
data: "text=" + encodeURIComponent(svg_canvas.getSvgString()),\n
success: function()
{\n
window.location.reload();\n
}\n
type: "POST",\n
url: "Base_setSVGTextContent",\n
data: "text=" + encodeURIComponent(svg_canvas.getSvgString()),\n
success: function ()
{\n
window.location.reload();\n
}\n
});\n
});\n
$("iframe#svgframe").css("border", "0px");\n
})
</unicode>
</value>
})
;
</unicode>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
...
...
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