diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-10-11 16:17:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-11 16:17:51 +0200 |
commit | 675230f86d74325d41cec4df59578919241934ce (patch) | |
tree | 7f9e1f12fa45c94f8d748c5cb30abc6a21240908 /apps/comments/js | |
parent | 9785343d6ac879b5e150b128f97b82e788a2df09 (diff) | |
parent | dcddd4b9d5f2298ccfe302cf7041c2220ac79bee (diff) | |
download | nextcloud-server-675230f86d74325d41cec4df59578919241934ce.tar.gz nextcloud-server-675230f86d74325d41cec4df59578919241934ce.zip |
Merge pull request #1407 from nextcloud/multiline_comments
Bring back multiline comments
Diffstat (limited to 'apps/comments/js')
-rw-r--r-- | apps/comments/js/commentstabview.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index 82244d61e9a..fe3695569bf 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -32,7 +32,7 @@ '{{/if}}' + ' </div>' + ' <form class="newCommentForm">' + - ' <input type="text" class="message" placeholder="{{newMessagePlaceholder}}" value="{{message}}" />' + + ' <textarea rows="1" class="message" placeholder="{{newMessagePlaceholder}}">{{message}}</textarea>' + ' <input class="submit icon-confirm" type="submit" value="" />' + '{{#if isEditMode}}' + ' <input class="cancel pull-right" type="button" value="{{cancelText}}" />' + @@ -174,6 +174,8 @@ } this.delegateEvents(); this.$el.find('.message').on('keydown input change', this._onTypeComment); + + autosize(this.$el.find('.newCommentRow textarea')) }, _formatItem: function(commentModel) { @@ -281,6 +283,9 @@ $formRow.find('.avatar').replaceWith($comment.find('.avatar').clone()); $formRow.find('.has-tooltip').tooltip(); + // Enable autosize + autosize($formRow.find('textarea')); + return false; }, @@ -346,7 +351,6 @@ } }); - return false; }, |