From 09ec4f11afcaafe5369682089c02dffeec4939dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Pin?= Date: Fri, 19 Aug 2011 12:00:33 +0200 Subject: [PATCH 1/1] =?utf8?q?Suppression=20des=20images=20attach=C3=A9es?= =?utf8?q?=20fonctionnelle.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../dialog/embedded_images.html.pt | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/skins/ckeditor/plugins/plinn_image/dialog/embedded_images.html.pt b/skins/ckeditor/plugins/plinn_image/dialog/embedded_images.html.pt index 0034dd1..4a438b9 100644 --- a/skins/ckeditor/plugins/plinn_image/dialog/embedded_images.html.pt +++ b/skins/ckeditor/plugins/plinn_image/dialog/embedded_images.html.pt @@ -139,21 +139,21 @@ var a = target.parentNode; window.parent.updateOrInsertImage(a.getAttribute('href', 2), true); break; -// case 'A' : -// if (target.name == 'suppr') -// var a = target.parentNode.parentNode.getElementsByTagName('a')[0]; -// var href = a.getAttribute('href', 2); -// var imgPath = window.parent.editor.FCKConfig.EditorPath + href; -// -// var req = new XMLHttpRequest(); -// req.open("POST", connUrl, false); // synchrone -// req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); -// req.send("command=rm&path="+escape(imgPath)); -// var doc = req.responseXML.documentElement; -// if (doc.tagName == 'done') { -// var slide = target.parentNode.parentNode; -// slide.parentNode.removeChild(slide); -// } + case 'A' : + if (target.name == 'suppr') + var a = target.parentNode.parentNode.getElementsByTagName('a')[0]; + var href = a.getAttribute('href', 2); + var imgPath = contentPath + '/' + href; + + var req = new XMLHttpRequest(); + req.open("POST", connUrl, false); // synchrone + req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); + req.send("command=rm&path="+escape(imgPath)); + var doc = req.responseXML.documentElement; + if (doc.tagName == 'done') { + var slide = target.parentNode.parentNode; + slide.parentNode.removeChild(slide); + } } } -- 2.20.1