From ef79e7f77e1ea1fac696dfb29cb6115865d4999e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 18 Jun 2013 16:57:36 +0200 Subject: [PATCH] Improved inline editor to support non-editable posts --- wcfsetup/install/files/js/WCF.Message.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); -- 2.20.1