summaryrefslogtreecommitdiffstats
path: root/apps/comments/src/activitytabviewplugin.js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-25 18:19:42 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-10-01 17:16:09 +0200
commitb9bc2417e7a8dc81feb0abe20359bedaf864f790 (patch)
tree61b47fbf37c1d168da8625224debde9e6a985348 /apps/comments/src/activitytabviewplugin.js
parent7fb651235128dcbca8a6683b5cdafdf835f46300 (diff)
downloadnextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.tar.gz
nextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.zip
Comply to eslint
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/comments/src/activitytabviewplugin.js')
-rw-r--r--apps/comments/src/activitytabviewplugin.js31
1 files changed, 15 insertions, 16 deletions
diff --git a/apps/comments/src/activitytabviewplugin.js b/apps/comments/src/activitytabviewplugin.js
index b6195b80c45..2afee4c2be5 100644
--- a/apps/comments/src/activitytabviewplugin.js
+++ b/apps/comments/src/activitytabviewplugin.js
@@ -1,4 +1,4 @@
-/*
+/**
* @author Joas Schilling <coding@schilljs.com>
* Copyright (c) 2016
*
@@ -18,18 +18,18 @@
* @param {jQuery} $el jQuery handle for this activity
* @param {string} view The view that displayes this activity
*/
- prepareModelForDisplay: function (model, $el, view) {
+ prepareModelForDisplay: function(model, $el, view) {
if (model.get('app') !== 'comments' || model.get('type') !== 'comments') {
- return;
+ return
}
if (view === 'ActivityTabView') {
- $el.addClass('comment');
+ $el.addClass('comment')
if (model.get('message') && this._isLong(model.get('message'))) {
- $el.addClass('collapsed');
- var $overlay = $('<div>').addClass('message-overlay');
- $el.find('.activitymessage').after($overlay);
- $el.on('click', this._onClickCollapsedComment);
+ $el.addClass('collapsed')
+ var $overlay = $('<div>').addClass('message-overlay')
+ $el.find('.activitymessage').after($overlay)
+ $el.on('click', this._onClickCollapsedComment)
}
}
},
@@ -38,22 +38,21 @@
* Copy of CommentsTabView._onClickComment()
*/
_onClickCollapsedComment: function(ev) {
- var $row = $(ev.target);
+ var $row = $(ev.target)
if (!$row.is('.comment')) {
- $row = $row.closest('.comment');
+ $row = $row.closest('.comment')
}
- $row.removeClass('collapsed');
+ $row.removeClass('collapsed')
},
/*
* Copy of CommentsTabView._isLong()
*/
_isLong: function(message) {
- return message.length > 250 || (message.match(/\n/g) || []).length > 1;
+ return message.length > 250 || (message.match(/\n/g) || []).length > 1
}
- };
+ }
+})()
-})();
-
-OC.Plugins.register('OCA.Activity.RenderingPlugins', OCA.Comments.ActivityTabViewPlugin);
+OC.Plugins.register('OCA.Activity.RenderingPlugins', OCA.Comments.ActivityTabViewPlugin)