From 53e22ab93f2e74cdb9bec37ac9bf199821d11211 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 1 Mar 2017 16:15:51 +0100 Subject: [PATCH] Draft implementation for comments See #2222 --- com.woltlab.wcf/objectType.xml | 4 ++++ .../templates/commentListAddComment.tpl | 17 +++++++++++++++++ .../templates/userProfileCommentList.tpl | 1 + wcfsetup/install/files/js/WCF.Comment.js | 9 ++------- .../files/lib/data/comment/Comment.class.php | 1 + wcfsetup/setup/db/install.sql | 1 + 6 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 com.woltlab.wcf/templates/commentListAddComment.tpl 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 = $('