From: Alexander Ebert Date: Wed, 1 Mar 2017 15:15:51 +0000 (+0100) Subject: Draft implementation for comments X-Git-Tag: 3.1.0_Alpha_1~629 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=53e22ab93f2e74cdb9bec37ac9bf199821d11211;p=GitHub%2FWoltLab%2FWCF.git Draft implementation for comments See #2222 --- diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index dc6d9dc70c..45d5888da3 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -82,6 +82,10 @@ com.woltlab.wcf.user.signature com.woltlab.wcf.message + + com.woltlab.wcf.comment + com.woltlab.wcf.message + com.woltlab.wcf.bbcode.smiley diff --git a/com.woltlab.wcf/templates/commentListAddComment.tpl b/com.woltlab.wcf/templates/commentListAddComment.tpl new file mode 100644 index 0000000000..fb8d280903 --- /dev/null +++ b/com.woltlab.wcf/templates/commentListAddComment.tpl @@ -0,0 +1,17 @@ +
  • + {@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(48)} +
    + + {include file='wysiwyg' userProfileCommentList=$commentListContainerID} + +
    + + + {include file='messageFormPreviewButton' previewMessageObjectType='com.woltlab.wcf.comment' previewMessageObjectID=0} +
    +
    +
  • + diff --git a/com.woltlab.wcf/templates/userProfileCommentList.tpl b/com.woltlab.wcf/templates/userProfileCommentList.tpl index 7e3c3c574c..3c89728b99 100644 --- a/com.woltlab.wcf/templates/userProfileCommentList.tpl +++ b/com.woltlab.wcf/templates/userProfileCommentList.tpl @@ -2,6 +2,7 @@ {if $commentCanAdd} {else} diff --git a/wcfsetup/install/files/js/WCF.Comment.js b/wcfsetup/install/files/js/WCF.Comment.js index 634bf95dbb..5ca29ca3f4 100644 --- a/wcfsetup/install/files/js/WCF.Comment.js +++ b/wcfsetup/install/files/js/WCF.Comment.js @@ -332,13 +332,8 @@ WCF.Comment.Handler = Class.extend({ * Initializes the UI components to add a comment. */ _initAddComment: function() { - // create UI - this._commentAdd = $('
  • ' + this._userAvatar + '
  • ').prependTo(this._container); - var $inputContainer = this._commentAdd.children('div'); - var $input = $('