From fb653705d6a53a391c8319ac672f93894f504708 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Mon, 20 Sep 2010 18:55:10 +0000 Subject: [PATCH] Applied patch by bencurthoys to fix embed api git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1734 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/embedapi.html | 56 ++++++++++++++ editor/extensions/ext-imagelib.js | 26 ++++--- editor/svg-editor.html | 5 +- editor/svg-editor.js | 83 +++++++++++---------- editor/svgicons/jquery.svgicons.js | 113 ++++++++++++----------------- 5 files changed, 160 insertions(+), 123 deletions(-) create mode 100644 editor/embedapi.html diff --git a/editor/embedapi.html b/editor/embedapi.html new file mode 100644 index 00000000..3db03640 --- /dev/null +++ b/editor/embedapi.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + +
+ + + + diff --git a/editor/extensions/ext-imagelib.js b/editor/extensions/ext-imagelib.js index 80f1b5e5..a238a00b 100644 --- a/editor/extensions/ext-imagelib.js +++ b/editor/extensions/ext-imagelib.js @@ -55,11 +55,7 @@ svgEditor.addExtension("imagelib", function() { var response = evt.data; if(!response) { - $.alert('No data was given', function() { - if(mode !== 'm') { - closeBrowser(); - } - }); + // Do nothing return; } @@ -131,13 +127,19 @@ svgEditor.addExtension("imagelib", function() { // Assume it's raw image data // importImage(str); - $.alert('Unexpected data was returned: ' + response, function() { - if(mode !== 'm') { - closeBrowser(); - } else { - pending[id].entry.remove(); - } - }); + // Don't give warning as postMessage may have been used by something else + if(mode !== 'm') { + closeBrowser(); + } else { + pending[id].entry.remove(); + } +// $.alert('Unexpected data was returned: ' + response, function() { +// if(mode !== 'm') { +// closeBrowser(); +// } else { +// pending[id].entry.remove(); +// } +// }); return; } diff --git a/editor/svg-editor.html b/editor/svg-editor.html index 3ac73b58..12346aed 100644 --- a/editor/svg-editor.html +++ b/editor/svg-editor.html @@ -10,7 +10,8 @@ - + + @@ -24,7 +25,7 @@