Merge pull request #3818 from nextcloud/enh/collaboration-event

Move to OCP\Collaboration\Resources\LoadAdditionalScriptsEvent
This commit is contained in:
Julius Härtl
2022-07-07 08:41:51 +02:00
committed by GitHub
3 changed files with 6 additions and 7 deletions

8
composer.lock generated
View File

@@ -305,12 +305,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/ChristophWurst/nextcloud_composer.git", "url": "https://github.com/ChristophWurst/nextcloud_composer.git",
"reference": "309ccfab8b7e842df9f17d6389f190411158bd36" "reference": "6a6fe9467e4427f17b1fade97d6252793fc7a9e8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/309ccfab8b7e842df9f17d6389f190411158bd36", "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/6a6fe9467e4427f17b1fade97d6252793fc7a9e8",
"reference": "309ccfab8b7e842df9f17d6389f190411158bd36", "reference": "6a6fe9467e4427f17b1fade97d6252793fc7a9e8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -341,7 +341,7 @@
"issues": "https://github.com/ChristophWurst/nextcloud_composer/issues", "issues": "https://github.com/ChristophWurst/nextcloud_composer/issues",
"source": "https://github.com/ChristophWurst/nextcloud_composer/tree/master" "source": "https://github.com/ChristophWurst/nextcloud_composer/tree/master"
}, },
"time": "2022-07-02T02:10:17+00:00" "time": "2022-07-06T02:28:38+00:00"
}, },
{ {
"name": "composer/package-versions-deprecated", "name": "composer/package-versions-deprecated",

View File

@@ -29,6 +29,7 @@ use OCA\Deck\Service\PermissionService;
use OCA\Files\Event\LoadSidebar; use OCA\Files\Event\LoadSidebar;
use OCA\Viewer\Event\LoadViewer; use OCA\Viewer\Event\LoadViewer;
use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as CollaborationResourcesEvent;
use OCP\EventDispatcher\IEventDispatcher; use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig; use OCP\IConfig;
use OCP\IInitialStateService; use OCP\IInitialStateService;
@@ -88,6 +89,7 @@ class PageController extends Controller {
$this->initialState->provideInitialState(Application::APP_ID, 'config', $this->configService->getAll()); $this->initialState->provideInitialState(Application::APP_ID, 'config', $this->configService->getAll());
$this->eventDispatcher->dispatchTyped(new LoadSidebar()); $this->eventDispatcher->dispatchTyped(new LoadSidebar());
$this->eventDispatcher->dispatchTyped(new CollaborationResourcesEvent());
if (class_exists(LoadViewer::class)) { if (class_exists(LoadViewer::class)) {
$this->eventDispatcher->dispatchTyped(new LoadViewer()); $this->eventDispatcher->dispatchTyped(new LoadViewer());
} }

View File

@@ -24,6 +24,3 @@
OCP\Util::addStyle('deck', 'globalstyles'); OCP\Util::addStyle('deck', 'globalstyles');
OCP\Util::addScript('deck', 'deck-main'); OCP\Util::addScript('deck', 'deck-main');
\OCP\Server::get(\OC\EventDispatcher\SymfonyAdapter::class)
->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts');