From efdaa080326844570aeb242adfdb1fe785e39ff3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 7 Oct 2014 22:10:03 +0200 Subject: [PATCH] Resolved a few issues --- .../files/js/3rdParty/redactor/plugins/wutil.js | 14 +++++++------- wcfsetup/install/files/js/WCF.ImageViewer.js | 4 ++-- wcfsetup/install/files/js/WCF.Message.js | 8 ++++---- wcfsetup/install/files/js/WCF.js | 2 +- wcfsetup/install/files/style/redactor.less | 4 ++++ 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js index a47cb4f047..4fe2b32b1b 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js @@ -39,12 +39,12 @@ RedactorPlugins.wutil = function() { this.wutil.setOption('autosave', false); // disable autosave on destroy - var $mpDestroy = this.destroy; - var self = this; - this.destroy = function() { - self.autosaveDisable(); - $mpDestroy.call(self); - }; + var $mpDestroy = this.core.destroy; + this.core.destroy = (function() { + this.wutil.autosaveDisable(); + + $mpDestroy.call(this); + }).bind(this); }, /** @@ -239,7 +239,7 @@ RedactorPlugins.wutil = function() { * Disables automatic saving. */ autosaveDisable: function() { - if (!this.getOption('woltlab.autosave').active) { + if (!this.wutil.getOption('woltlab.autosave').active) { return false; } diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js index c2662189b1..2ef5d5e0ea 100644 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ b/wcfsetup/install/files/js/WCF.ImageViewer.js @@ -92,8 +92,8 @@ WCF.ImageViewer = Class.extend({ }); if (!$image.parents('a').length) { - $image.wrap(''); - $image.parent().slimbox(); + $image.wrap(''); + $image.parent().click($.proxy(this._click, this)); } } } diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 46d58b51f1..f6c005e948 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -1527,7 +1527,7 @@ WCF.Message.InlineEditor = Class.extend({ var $message = ''; if ($.browser.redactor) { - $message = $('#' + this._messageEditorIDPrefix + $objectID).redactor('getText'); + $message = $('#' + this._messageEditorIDPrefix + $objectID).redactor('wutil.getText'); } else { $message = $('#' + this._messageEditorIDPrefix + $objectID).val(); @@ -1563,7 +1563,7 @@ WCF.Message.InlineEditor = Class.extend({ var $message = ''; if ($.browser.redactor) { - $message = $('#' + this._messageEditorIDPrefix + $objectID).redactor('getText'); + $message = $('#' + this._messageEditorIDPrefix + $objectID).redactor('wutil.getText'); } else { $message = $('#' + this._messageEditorIDPrefix + $objectID).val(); @@ -1656,8 +1656,8 @@ WCF.Message.InlineEditor = Class.extend({ // destroy editor if ($.browser.redactor) { var $target = $('#' + this._messageEditorIDPrefix + $container.data('objectID')); - $target.redactor('autosavePurge'); - $target.redactor('destroy'); + $target.redactor('wutil.autosavePurge'); + $target.redactor('core.destroy'); } // purge DOM elements diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index db648e6521..910d695dcd 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -3820,7 +3820,7 @@ WCF.String = { */ formatNumeric: function(number, decimalPlaces) { number = String(WCF.Number.round(number, decimalPlaces || 2)); - numberParts = number.split('.'); + var numberParts = number.split('.'); number = this.addThousandsSeparator(numberParts[0]); if (numberParts.length > 1) number += WCF.Language.get('wcf.global.decimalPoint') + numberParts[1]; diff --git a/wcfsetup/install/files/style/redactor.less b/wcfsetup/install/files/style/redactor.less index aea00cd622..bf909d29a4 100644 --- a/wcfsetup/install/files/style/redactor.less +++ b/wcfsetup/install/files/style/redactor.less @@ -99,6 +99,10 @@ list-style-type: decimal; } + img { + max-width: 100%; + } + table { border-collapse: collapse; font-size: 14px; -- 2.20.1