From b70b138bdb6c59df8c94cb973155d7ab4a41113b Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 24 Mar 2017 19:41:49 +0100 Subject: [PATCH] Merge file view JS files Removes 26 requests on the file list loading Signed-off-by: Lukas Reschke --- apps/files/js/merged-index.json | 29 ++++++++++++++++++ apps/files/lib/Controller/ViewController.php | 31 +------------------- 2 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 apps/files/js/merged-index.json diff --git a/apps/files/js/merged-index.json b/apps/files/js/merged-index.json new file mode 100644 index 00000000000..127bbb46b29 --- /dev/null +++ b/apps/files/js/merged-index.json @@ -0,0 +1,29 @@ +[ + "app.js", + "file-upload.js", + "newfilemenu.js", + "jquery.fileupload.js", + "jquery-visibility.js", + "fileinfomodel.js", + "filesummary.js", + "breadcrumb.js", + "filelist.js", + "search.js", + "favoritesfilelist.js", + "recentfilelist.js", + "tagsplugin.js", + "gotoplugin.js", + "favoritesplugin.js", + "recentplugin.js", + "detailfileinfoview.js", + "sidebarpreviewmanager.js", + "sidebarpreviewtext.js", + "detailtabview.js", + "mainfileinfodetailview.js", + "detailsview.js", + "fileactions.js", + "fileactionsmenu.js", + "files.js", + "keyboardshortcuts.js", + "navigation.js" +] diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index cfe66eb028b..499961ca2dc 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -152,37 +152,8 @@ class ViewController extends Controller { $nav = new \OCP\Template('files', 'appnavigation', ''); // Load the files we need - \OCP\Util::addScript('files', 'app'); - \OCP\Util::addScript('files', 'file-upload'); - \OCP\Util::addScript('files', 'newfilemenu'); - \OCP\Util::addScript('files', 'jquery.fileupload'); - \OCP\Util::addScript('files', 'jquery-visibility'); - \OCP\Util::addScript('files', 'fileinfomodel'); - \OCP\Util::addScript('files', 'filesummary'); - \OCP\Util::addScript('files', 'breadcrumb'); - \OCP\Util::addScript('files', 'filelist'); - \OCP\Util::addScript('files', 'search'); - - \OCP\Util::addScript('files', 'favoritesfilelist'); - \OCP\Util::addScript('files', 'recentfilelist'); - \OCP\Util::addScript('files', 'tagsplugin'); - \OCP\Util::addScript('files', 'gotoplugin'); - \OCP\Util::addScript('files', 'favoritesplugin'); - \OCP\Util::addScript('files', 'recentplugin'); - - \OCP\Util::addScript('files', 'detailfileinfoview'); - \OCP\Util::addScript('files', 'sidebarpreviewmanager'); - \OCP\Util::addScript('files', 'sidebarpreviewtext'); - \OCP\Util::addScript('files', 'detailtabview'); - \OCP\Util::addScript('files', 'mainfileinfodetailview'); - \OCP\Util::addScript('files', 'detailsview'); \OCP\Util::addStyle('files', 'merged'); - - \OCP\Util::addScript('files', 'fileactions'); - \OCP\Util::addScript('files', 'fileactionsmenu'); - \OCP\Util::addScript('files', 'files'); - \OCP\Util::addScript('files', 'keyboardshortcuts'); - \OCP\Util::addScript('files', 'navigation'); + \OCP\Util::addScript('files', 'merged-index'); // mostly for the home storage's free space // FIXME: Make non static -- 2.39.5