summaryrefslogtreecommitdiffstats
path: root/apps/comments/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-01 11:27:04 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-01 11:44:01 +0100
commit2b4b3b1986e58305c08941f77a693a80cc3d5b85 (patch)
tree7e59c4897e3e64c6afbe2f52053d3da2d6ef562f /apps/comments/js
parent25aad121e621f0a6975cd6982c11578e372abec2 (diff)
downloadnextcloud-server-2b4b3b1986e58305c08941f77a693a80cc3d5b85.tar.gz
nextcloud-server-2b4b3b1986e58305c08941f77a693a80cc3d5b85.zip
adjust jsunit tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/comments/js')
-rw-r--r--apps/comments/js/commentstabview.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index 4ffa76112a1..7398a709421 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -177,9 +177,13 @@
_initAutoComplete: function($target) {
var s = this;
+ var limit = 10;
+ if(!_.isUndefined(OC.appConfig.comments)) {
+ limit = OC.appConfig.comments.maxAutoCompleteResults;
+ }
$target.atwho({
at: '@',
- limit: OC.appConfig.comments.maxAutoCompleteResults,
+ limit: limit,
callbacks: {
remoteFilter: s._onAutoComplete,
highlighter: function (li) {
@@ -347,7 +351,7 @@
return;
}
- var $form = $('.comment[data-id="' + model.id + '"] form');
+ var $form = this.$container.find('.comment[data-id="' + model.id + '"] form');
var $row = $form.closest('.comment');
var $target = $row.data('commentEl');
if(_.isUndefined($target)) {