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:
parent
7e95837097
commit
5c7ad6d3ec
|
@ -6,7 +6,7 @@
|
|||
<licence>AGPL</licence>
|
||||
<author>Robin Appelman, Vincent Petry</author>
|
||||
<default_enable/>
|
||||
<version>1.7.0</version>
|
||||
<version>1.7.1</version>
|
||||
<types>
|
||||
<filesystem/>
|
||||
</types>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
@import 'files.scss';
|
||||
@import 'upload.scss';
|
||||
@import 'mobile.scss';
|
||||
@import 'detailsView.scss';
|
|
@ -152,9 +152,6 @@ class ViewController extends Controller {
|
|||
$nav = new \OCP\Template('files', 'appnavigation', '');
|
||||
|
||||
// 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', 'file-upload');
|
||||
\OCP\Util::addScript('files', 'newfilemenu');
|
||||
|
@ -179,7 +176,7 @@ class ViewController extends Controller {
|
|||
\OCP\Util::addScript('files', 'detailtabview');
|
||||
\OCP\Util::addScript('files', 'mainfileinfodetailview');
|
||||
\OCP\Util::addScript('files', 'detailsview');
|
||||
\OCP\Util::addStyle('files', 'detailsView');
|
||||
\OCP\Util::addStyle('files', 'merged');
|
||||
|
||||
\OC_Util::addVendorScript('core', 'handlebars/handlebars');
|
||||
|
||||
|
|
|
@ -41,13 +41,10 @@ $eventDispatcher->addListener(
|
|||
\OCP\Util::addScript('files_sharing', 'share');
|
||||
\OCP\Util::addScript('files_sharing', 'sharetabview');
|
||||
\OCP\Util::addScript('files_sharing', 'sharebreadcrumbview');
|
||||
\OCP\Util::addStyle('files_sharing', 'sharetabview');
|
||||
\OCP\Util::addStyle('files_sharing', 'sharebreadcrumb');
|
||||
\OCP\Util::addStyle('files_sharing', 'mergedAdditionalScripts');
|
||||
}
|
||||
);
|
||||
|
||||
// \OCP\Util::addStyle('files_sharing', 'sharetabview');
|
||||
|
||||
$config = \OC::$server->getConfig();
|
||||
if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
|
||||
\OCA\Files\App::getNavigationManager()->add(function () {
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
@import 'sharetabview.scss';
|
||||
@import 'sharebreadcrumb.scss';
|
|
@ -0,0 +1,2 @@
|
|||
@import 'public.scss';
|
||||
@import 'mobile.scss';
|
|
@ -379,8 +379,7 @@ class ShareController extends Controller {
|
|||
|
||||
// Load files we need
|
||||
\OCP\Util::addScript('files', 'file-upload');
|
||||
\OCP\Util::addStyle('files_sharing', 'public');
|
||||
\OCP\Util::addStyle('files_sharing', 'mobile');
|
||||
\OCP\Util::addStyle('files_sharing', 'publicView');
|
||||
\OCP\Util::addScript('files_sharing', 'public');
|
||||
\OCP\Util::addScript('files', 'fileactions');
|
||||
\OCP\Util::addScript('files', 'fileactionsmenu');
|
||||
|
@ -389,8 +388,7 @@ class ShareController extends Controller {
|
|||
|
||||
if (isset($shareTmpl['folder'])) {
|
||||
// JS required for folders
|
||||
\OCP\Util::addStyle('files', 'files');
|
||||
\OCP\Util::addStyle('files', 'upload');
|
||||
\OCP\Util::addStyle('files', 'merged');
|
||||
\OCP\Util::addScript('files', 'filesummary');
|
||||
\OCP\Util::addScript('files', 'breadcrumb');
|
||||
\OCP\Util::addScript('files', 'fileinfomodel');
|
||||
|
|
Loading…
Reference in New Issue