diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-02-15 13:50:12 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-02-26 09:10:23 +0100 |
commit | 41ef3d860cd1a565882cfd84dda72f2d9ad9cef2 (patch) | |
tree | 6b88427b1b64274a6d57bb7269f717d27cdbf1a9 /apps/comments/js/activitytabviewplugin.js | |
parent | fc105d3bb006c94cc0d88864451252111ce33b16 (diff) | |
download | nextcloud-server-41ef3d860cd1a565882cfd84dda72f2d9ad9cef2.tar.gz nextcloud-server-41ef3d860cd1a565882cfd84dda72f2d9ad9cef2.zip |
Move comments to webpack
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/comments/js/activitytabviewplugin.js')
-rw-r--r-- | apps/comments/js/activitytabviewplugin.js | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/apps/comments/js/activitytabviewplugin.js b/apps/comments/js/activitytabviewplugin.js deleted file mode 100644 index b6195b80c45..00000000000 --- a/apps/comments/js/activitytabviewplugin.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * @author Joas Schilling <coding@schilljs.com> - * Copyright (c) 2016 - * - * This file is licensed under the Affero General Public License version 3 - * or later. - * - * See the COPYING-README file. - */ - -(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 displayes this activity - */ - prepareModelForDisplay: function (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'); - var $overlay = $('<div>').addClass('message-overlay'); - $el.find('.activitymessage').after($overlay); - $el.on('click', this._onClickCollapsedComment); - } - } - }, - - /* - * Copy of CommentsTabView._onClickComment() - */ - _onClickCollapsedComment: function(ev) { - var $row = $(ev.target); - if (!$row.is('.comment')) { - $row = $row.closest('.comment'); - } - $row.removeClass('collapsed'); - }, - - /* - * Copy of CommentsTabView._isLong() - */ - _isLong: function(message) { - return message.length > 250 || (message.match(/\n/g) || []).length > 1; - } - }; - - -})(); - -OC.Plugins.register('OCA.Activity.RenderingPlugins', OCA.Comments.ActivityTabViewPlugin); |