<li class="box48 jsCommentAdd jsOnly">
{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(48)}
- <div class="commentListAddComment">
- <textarea id="text" name="text" class="wysiwygTextarea"
- data-disable-attachments="true"
- data-support-mention="true"
- ></textarea>
- {include file='wysiwyg' userProfileCommentList=$commentListContainerID}
-
- <div class="formSubmit">
- <button class="buttonPrimary" data-type="save" accesskey="s">{lang}wcf.global.button.submit{/lang}</button>
+ <div class="commentListAddComment collapsed" data-placeholder="{lang}wcf.comment.add{/lang}">
+ <div class="commentListAddCommentEditorContainer">
+ <textarea id="text" name="text" class="wysiwygTextarea"
+ data-disable-attachments="true"
+ data-disable-media="true"
+ data-support-mention="true"
+ ></textarea>
+ {include file='wysiwyg' userProfileCommentList=$commentListContainerID}
- {include file='messageFormPreviewButton' previewMessageObjectType='com.woltlab.wcf.comment' previewMessageObjectID=0}
+ <div class="formSubmit">
+ <button class="buttonPrimary" data-type="save" accesskey="s">{lang}wcf.global.button.submit{/lang}</button>
+
+ {include file='messageFormPreviewButton' previewMessageObjectType='com.woltlab.wcf.comment' previewMessageObjectID=0}
+ </div>
</div>
</div>
</li>
this._editor = null;
this._loadingOverlay = null;
+ this._content.addEventListener(WCF_CLICK_EVENT, (function (event) {
+ if (this._content.classList.contains('collapsed')) {
+ event.preventDefault();
+
+ this._content.classList.remove('collapsed');
+
+ UiScroll.element(this._container, (function() {
+ window.jQuery(this._textarea).redactor('WoltLabCaret.endOfEditor');
+ }).bind(this));
+ }
+ }).bind(this));
+
// handle submit button
var submitButton = elBySel('button[data-type="save"]', this._container);
submitButton.addEventListener(WCF_CLICK_EVENT, this._submit.bind(this));
this._reset();
this._hideLoadingOverlay();
+
+ window.setTimeout((function () {
+ UiScroll.element(this._container.nextElementSibling);
+ }).bind(this), 100);
}
},
opacity: 0;
}
}
+
+ &.jsCommentAdd {
+ padding-right: 0;
+ }
}
.commentContent {
margin-top: 2px;
}
}
+
+.commentListAddComment {
+ &.collapsed {
+ background-color: $wcfSidebarBackground;
+ cursor: pointer;
+ overflow: hidden;
+ padding: 10px 20px;
+ position: relative;
+
+ &::before {
+ color: $wcfSidebarText;
+ content: $fa-var-reply;
+ font-family: FontAwesome;
+ font-size: 28px;
+ height: 32px;
+ line-height: 32px;
+ margin-right: 10px;
+ width: 32px;
+ vertical-align: -5px;
+ }
+
+ &::after {
+ color: $wcfSidebarText;
+ content: attr(data-placeholder);
+ position: relative;
+ top: 2px;
+
+ @include screen-sm-up {
+ @include wcfFontSection;
+ }
+ }
+
+ > .commentListAddCommentEditorContainer {
+ left: 200%;
+ position: absolute;
+ top: -100%;
+ }
+ }
+
+ &.loading {
+ height: 150px;
+ position: relative;
+
+ > .commentListAddCommentEditorContainer {
+ display: none;
+ }
+
+ > .commentLoadingOverlay {
+ left: 50%;
+ position: absolute;
+ top: 50%;
+ transform: translateX(-50%) translateY(-50%);
+ }
+ }
+}