Preventing image editing for embedded attachments
authorAlexander Ebert <ebert@woltlab.com>
Sun, 27 Jul 2014 10:18:48 +0000 (12:18 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 27 Jul 2014 10:18:48 +0000 (12:18 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js

index 5ae8ce6016d9803b18154c346704e7091bd11ed2..b757b8583bc9c7d5bd09968d4d72aaa443848ead 100644 (file)
@@ -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));