From 0505c4516414cc49fbb6b2532b8bcf7590ff0e4b Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 15 Oct 2015 12:08:54 +0200 Subject: [PATCH] [FIX] web_editor: don't display the summernote black picture overlay Issue: the overlay is confusing for user because summernote the size change is not active (to have a responsive design) --- .../static/src/js/rte.summernote.js | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/addons/web_editor/static/src/js/rte.summernote.js b/addons/web_editor/static/src/js/rte.summernote.js index 264520b4745..c696468adb4 100644 --- a/addons/web_editor/static/src/js/rte.summernote.js +++ b/addons/web_editor/static/src/js/rte.summernote.js @@ -290,29 +290,13 @@ eventHandler.modules.popover.update = function ($popover, oStyle, isAirMode) { } }; -/* TODO: remove (original method seems enough now (only border-top,left is not done) */ -/* +var fn_handle_update = eventHandler.modules.handle.update; eventHandler.modules.handle.update = function ($handle, oStyle, isAirMode) { - - $handle.toggle(!!oStyle.image); + fn_handle_update.call(this, $handle, oStyle, isAirMode); if (oStyle.image) { - var $selection = $handle.find('.note-control-selection'); - var $image = $(oStyle.image); - var szImage = { - w: parseInt($image.outerWidth(true), 10), - h: parseInt($image.outerHeight(true), 10) - }; - $selection.data('target', oStyle.image); // save current image element. - var sSizing = szImage.w + 'x' + szImage.h; - $selection.find('.note-control-selection-info').text(szImage.h > 50 ? sSizing : ""); - - $selection.find('.note-control-sizing').toggleClass('note-control-sizing note-control-holder').css({ - 'border-top': 0, - 'border-left': 0 - }); + $handle.find('.note-control-selection').hide(); } }; -*/ ////////////////////////////////////////////////////////////////////////////////////////////////////////// /* hack for image and link editor */