summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/appinfo/app.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-08-24 13:00:03 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:26 +0200
commit018d07b3e55fd7234008c51d0a124b7b681a1a4f (patch)
tree9df1d49f9cb1b3277bfc81cae6319c796df993b0 /apps/files_sharing/appinfo/app.php
parent6af6024e172bc4810691f54ccaa2da6912395962 (diff)
downloadnextcloud-server-018d07b3e55fd7234008c51d0a124b7b681a1a4f.tar.gz
nextcloud-server-018d07b3e55fd7234008c51d0a124b7b681a1a4f.zip
Add share dialog into share tab
Diffstat (limited to 'apps/files_sharing/appinfo/app.php')
-rw-r--r--apps/files_sharing/appinfo/app.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 3049dc6a263..2bb872eaad6 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -54,9 +54,16 @@ $application->setupPropagation();
\OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
\OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
-\OCP\Util::addScript('files_sharing', 'share');
-\OCP\Util::addScript('files_sharing', 'sharetabview');
-\OCP\Util::addScript('files_sharing', 'external');
+$eventDispatcher = \OC::$server->getEventDispatcher();
+$eventDispatcher->addListener(
+ 'OCA\Files::loadAdditionalScripts',
+ function() {
+ \OCP\Util::addScript('files_sharing', 'share');
+ \OCP\Util::addScript('files_sharing', 'sharetabview');
+ \OCP\Util::addScript('files_sharing', 'external');
+ }
+);
+
// \OCP\Util::addStyle('files_sharing', 'sharetabview');
\OC::$server->getActivityManager()->registerExtension(function() {