From: Alexander Ebert Date: Tue, 18 Jun 2013 14:57:36 +0000 (+0200) Subject: Improved inline editor to support non-editable posts X-Git-Tag: 2.0.0_Beta_4~20^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef79e7f77e1ea1fac696dfb29cb6115865d4999e;p=GitHub%2FWoltLab%2FWCF.git Improved inline editor to support non-editable posts --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 85d8f05d8a..f95e26ceae 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -1107,7 +1107,8 @@ WCF.Message.InlineEditor = Class.extend({ this._container[$containerID] = $container; if ($container.data('canEditInline')) { - $container.find('.jsMessageEditButton:eq(0)').data('containerID', $containerID).click($.proxy(this._clickInline, this)).dblclick($.proxy(this._click, this)); + var $button = $container.find('.jsMessageEditButton:eq(0)').data('containerID', $containerID).click($.proxy(this._clickInline, this)); + if ($container.data('canEdit')) $button.dblclick($.proxy(this._click, this)); } else if ($container.data('canEdit')) { $container.find('.jsMessageEditButton:eq(0)').data('containerID', $containerID).click($.proxy(this._click, this));