From ca155fd5d82dc3a7df496210dabcf3fe39d02af8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julius=20H=C3=A4rtl?= <jus@bitgrid.net>
Date: Tue, 12 Feb 2019 16:52:26 +0100
Subject: [PATCH] Allow attaching plugins to the ShareTabView and trigger event
 on rendering
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Julius Härtl <jus@bitgrid.net>
---
 apps/files_sharing/js/sharetabview.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/apps/files_sharing/js/sharetabview.js b/apps/files_sharing/js/sharetabview.js
index 3944293d5c1..9b1176dbb9a 100644
--- a/apps/files_sharing/js/sharetabview.js
+++ b/apps/files_sharing/js/sharetabview.js
@@ -24,6 +24,11 @@
 		id: 'shareTabView',
 		className: 'tab shareTabView',
 
+		initialize: function(name, options) {
+			OCA.Files.DetailTabView.prototype.initialize.call(this, name, options);
+			OC.Plugins.attach('OCA.Sharing.ShareTabView', this);
+		},
+
 		template: function(params) {
 			return 	TEMPLATE;
 		},
@@ -80,6 +85,7 @@
 				this.$el.empty();
 				// TODO: render placeholder text?
 			}
+			this.trigger('rendered');
 		}
 	});
 
-- 
GitLab