diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-12-12 13:50:28 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-12-12 14:42:11 +0100 |
commit | 529dcc3f23d5e0ba57e1c4771955e94c1e06ec24 (patch) | |
tree | 326825adffddbd0c002fbda2bc72d07ad4e38361 /apps/comments/src/activitytabviewplugin.js | |
parent | 3c704d49bfed136f97f81be0a359af4352d49fc7 (diff) | |
download | nextcloud-server-529dcc3f23d5e0ba57e1c4771955e94c1e06ec24.tar.gz nextcloud-server-529dcc3f23d5e0ba57e1c4771955e94c1e06ec24.zip |
chore(comments): Drop dead code from comments app
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/comments/src/activitytabviewplugin.js')
-rw-r--r-- | apps/comments/src/activitytabviewplugin.js | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/apps/comments/src/activitytabviewplugin.js b/apps/comments/src/activitytabviewplugin.js deleted file mode 100644 index 6b6e7ccda90..00000000000 --- a/apps/comments/src/activitytabviewplugin.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) 2016 - * - * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ <skjnldsv@protonmail.com> - * - * @license AGPL-3.0-or-later - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ - -/** @typedef {import('jquery')} jQuery */ - -(function() { - OCA.Comments.ActivityTabViewPlugin = { - - /** - * Prepare activity for display - * - * @param {OCA.Activity.ActivityModel} model for this activity - * @param {jQuery} $el jQuery handle for this activity - * @param {string} view The view that displays this activity - */ - prepareModelForDisplay(model, $el, view) { - if (model.get('app') !== 'comments' || model.get('type') !== 'comments') { - return - } - - if (view === 'ActivityTabView') { - $el.addClass('comment') - if (model.get('message') && this._isLong(model.get('message'))) { - $el.addClass('collapsed') - const $overlay = $('<div>').addClass('message-overlay') - $el.find('.activitymessage').after($overlay) - $el.on('click', this._onClickCollapsedComment) - } - } - }, - - /* - * Copy of CommentsTabView._onClickComment() - */ - _onClickCollapsedComment(ev) { - let $row = $(ev.target) - if (!$row.is('.comment')) { - $row = $row.closest('.comment') - } - $row.removeClass('collapsed') - }, - - /* - * Copy of CommentsTabView._isLong() - */ - _isLong(message) { - return message.length > 250 || (message.match(/\n/g) || []).length > 1 - }, - } - -})() - -OC.Plugins.register('OCA.Activity.RenderingPlugins', OCA.Comments.ActivityTabViewPlugin) |