From 4916d00721e1361ad634f44ab932678e451ac547 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 27 Jul 2014 12:18:48 +0200 Subject: [PATCH] Preventing image editing for embedded attachments --- .../files/js/3rdParty/redactor/plugins/wmonkeypatch.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js index 5ae8ce6016..b757b8583b 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js @@ -77,6 +77,13 @@ RedactorPlugins.wmonkeypatch = { } this.$toolbar.find('a.re-indent, a.re-outdent').addClass('redactor_button_disabled'); + var $mpImageResizeControls = this.imageResizeControls; + this.imageResizeControls = function($image) { + if (!$image.data('attachmentID')) { + $mpImageResizeControls.call(self, $image); + } + }; + this.setOption('modalOpenedCallback', $.proxy(this.modalOpenedCallback, this)); this.setOption('dropdownShowCallback', $.proxy(this.dropdownShowCallback, this)); -- 2.20.1