Merge some CSS files using our SCSS compiler

This saves around 4 requests on the average page load.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2017-03-21 16:35:31 +01:00
parent 7e95837097
commit 5c7ad6d3ec
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
15 changed files with 13 additions and 13 deletions

View File

@ -6,7 +6,7 @@
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman, Vincent Petry</author> <author>Robin Appelman, Vincent Petry</author>
<default_enable/> <default_enable/>
<version>1.7.0</version> <version>1.7.1</version>
<types> <types>
<filesystem/> <filesystem/>
</types> </types>

View File

@ -0,0 +1,4 @@
@import 'files.scss';
@import 'upload.scss';
@import 'mobile.scss';
@import 'detailsView.scss';

View File

@ -152,9 +152,6 @@ class ViewController extends Controller {
$nav = new \OCP\Template('files', 'appnavigation', ''); $nav = new \OCP\Template('files', 'appnavigation', '');
// Load the files we need // Load the files we need
\OCP\Util::addStyle('files', 'files');
\OCP\Util::addStyle('files', 'upload');
\OCP\Util::addStyle('files', 'mobile');
\OCP\Util::addScript('files', 'app'); \OCP\Util::addScript('files', 'app');
\OCP\Util::addScript('files', 'file-upload'); \OCP\Util::addScript('files', 'file-upload');
\OCP\Util::addScript('files', 'newfilemenu'); \OCP\Util::addScript('files', 'newfilemenu');
@ -179,7 +176,7 @@ class ViewController extends Controller {
\OCP\Util::addScript('files', 'detailtabview'); \OCP\Util::addScript('files', 'detailtabview');
\OCP\Util::addScript('files', 'mainfileinfodetailview'); \OCP\Util::addScript('files', 'mainfileinfodetailview');
\OCP\Util::addScript('files', 'detailsview'); \OCP\Util::addScript('files', 'detailsview');
\OCP\Util::addStyle('files', 'detailsView'); \OCP\Util::addStyle('files', 'merged');
\OC_Util::addVendorScript('core', 'handlebars/handlebars'); \OC_Util::addVendorScript('core', 'handlebars/handlebars');

View File

@ -41,13 +41,10 @@ $eventDispatcher->addListener(
\OCP\Util::addScript('files_sharing', 'share'); \OCP\Util::addScript('files_sharing', 'share');
\OCP\Util::addScript('files_sharing', 'sharetabview'); \OCP\Util::addScript('files_sharing', 'sharetabview');
\OCP\Util::addScript('files_sharing', 'sharebreadcrumbview'); \OCP\Util::addScript('files_sharing', 'sharebreadcrumbview');
\OCP\Util::addStyle('files_sharing', 'sharetabview'); \OCP\Util::addStyle('files_sharing', 'mergedAdditionalScripts');
\OCP\Util::addStyle('files_sharing', 'sharebreadcrumb');
} }
); );
// \OCP\Util::addStyle('files_sharing', 'sharetabview');
$config = \OC::$server->getConfig(); $config = \OC::$server->getConfig();
if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') { if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
\OCA\Files\App::getNavigationManager()->add(function () { \OCA\Files\App::getNavigationManager()->add(function () {

View File

@ -0,0 +1,2 @@
@import 'sharetabview.scss';
@import 'sharebreadcrumb.scss';

View File

@ -0,0 +1,2 @@
@import 'public.scss';
@import 'mobile.scss';

View File

@ -379,8 +379,7 @@ class ShareController extends Controller {
// Load files we need // Load files we need
\OCP\Util::addScript('files', 'file-upload'); \OCP\Util::addScript('files', 'file-upload');
\OCP\Util::addStyle('files_sharing', 'public'); \OCP\Util::addStyle('files_sharing', 'publicView');
\OCP\Util::addStyle('files_sharing', 'mobile');
\OCP\Util::addScript('files_sharing', 'public'); \OCP\Util::addScript('files_sharing', 'public');
\OCP\Util::addScript('files', 'fileactions'); \OCP\Util::addScript('files', 'fileactions');
\OCP\Util::addScript('files', 'fileactionsmenu'); \OCP\Util::addScript('files', 'fileactionsmenu');
@ -389,8 +388,7 @@ class ShareController extends Controller {
if (isset($shareTmpl['folder'])) { if (isset($shareTmpl['folder'])) {
// JS required for folders // JS required for folders
\OCP\Util::addStyle('files', 'files'); \OCP\Util::addStyle('files', 'merged');
\OCP\Util::addStyle('files', 'upload');
\OCP\Util::addScript('files', 'filesummary'); \OCP\Util::addScript('files', 'filesummary');
\OCP\Util::addScript('files', 'breadcrumb'); \OCP\Util::addScript('files', 'breadcrumb');
\OCP\Util::addScript('files', 'fileinfomodel'); \OCP\Util::addScript('files', 'fileinfomodel');