You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
|
|
|
|
$includes = [
|
|
|
|
'Files' => 'files',
|
|
|
|
'Files_Sharing' => 'files',
|
|
|
|
];
|
|
|
|
|
|
|
|
$eventDispatcher = \OC::$server->getEventDispatcher();
|
|
|
|
|
|
|
|
$eventDispatcher->addListener(\OCP\AppFramework\Http\TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN, function() {
|
|
|
|
\OCP\Util::addScript('files_rightclick', 'script');
|
|
|
|
});
|
|
|
|
|
|
|
|
foreach ($includes as $app => $include) {
|
|
|
|
$eventDispatcher->addListener(
|
|
|
|
'OCA\\'.$app.'::loadAdditionalScripts',
|
|
|
|
function () use ($include) {
|
|
|
|
\OCP\Util::addScript('files_rightclick', 'script');
|
|
|
|
\OCP\Util::addScript('files_rightclick', $include);
|
|
|
|
\OCP\Util::addStyle('files_rightclick', 'app');
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|