diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-08-12 15:52:13 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2015-08-21 22:06:52 +0200 |
| commit | 41e730cbfa8321308a088f30b78a5b4673f87125 (patch) | |
| tree | 791aceb526b273a6991f3f427be586a4e2166590 /addons/web_editor/static/src/js/rte.summernote.js | |
| parent | 00adbd36ff1fc9a6eaa86d206d0f340285f21aac (diff) | |
[IMP] web_editor: add document into the media editor
User can upload documents and add the link in the page to download it.
Diffstat (limited to 'addons/web_editor/static/src/js/rte.summernote.js')
| -rw-r--r-- | addons/web_editor/static/src/js/rte.summernote.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/rte.summernote.js b/addons/web_editor/static/src/js/rte.summernote.js index 467f0042090..dbce1a3757c 100644 --- a/addons/web_editor/static/src/js/rte.summernote.js +++ b/addons/web_editor/static/src/js/rte.summernote.js @@ -398,7 +398,7 @@ dom.isVoid = function (node) { return node && /^BR|^IMG|^HR/.test(node.nodeName.toUpperCase()) || dom.isImg(node); }; dom.isImg = function (node) { - return dom.isImgFont(node) || (node && (node.nodeName === "IMG" || (node.className && node.className.match(/(^|\s)media_iframe_video(\s|$)/i)) )); + return dom.isImgFont(node) || (node && (node.nodeName === "IMG" || (node.className && node.className.match(/(^|\s)(media_iframe_video|o_image)(\s|$)/i)) )); }; dom.isForbiddenNode = function (node) { return $(node).is(".media_iframe_video, .fa, img"); @@ -609,7 +609,7 @@ eventHandler.attach = function (oLayoutInfo, options) { $(document).on('mousedown', summernote_mousedown); $(document).on('mouseup', summernote_mouseup); oLayoutInfo.editor.off('click').on('click', function (e) {e.preventDefault();}); // if the content editable is a link - oLayoutInfo.editor.on('dblclick', 'img, .media_iframe_video, span.fa, i.fa, span.fa', function (event) { + oLayoutInfo.editor.on('dblclick', 'img, .media_iframe_video, span.fa, i.fa, span.fa, a.o_image', function (event) { if (!$(event.target).closest(".note-toolbar").length) { // prevent icon edition of top bar for default summernote new widgets.MediaDialog(oLayoutInfo.editor, event.target).appendTo(document.body); } |
