]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge JS for template prepend 4043/head
authorLukas Reschke <lukas@statuscode.ch>
Fri, 24 Mar 2017 19:36:19 +0000 (20:36 +0100)
committerLukas Reschke <lukas@statuscode.ch>
Fri, 24 Mar 2017 19:37:13 +0000 (20:37 +0100)
Shaves off 14 requests.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
core/js/merged-template-prepend.json [new file with mode: 0644]
lib/private/legacy/template.php

diff --git a/core/js/merged-template-prepend.json b/core/js/merged-template-prepend.json
new file mode 100644 (file)
index 0000000..12b7ca8
--- /dev/null
@@ -0,0 +1,17 @@
+[
+  "jquery.ocdialog.js",
+  "oc-dialogs.js",
+  "js.js",
+  "l10n.js",
+  "octemplate.js",
+  "eventsource.js",
+  "public/appconfig.js",
+  "config.js",
+  "oc-requesttoken.js",
+  "apps.js",
+  "mimetype.js",
+  "mimetypelist.js",
+  "oc-backbone.js",
+  "placeholder.js",
+  "jquery.avatar.js"
+]
index 3f6bfe586db96be3a51608926f808635fce7fda3..969f517427880d74cf0ef99c3786551330416320 100644 (file)
@@ -109,31 +109,12 @@ class OC_Template extends \OC\Template\Base {
                        OC_Util::addStyle('jquery-ui-fixes',null,true);
                        OC_Util::addVendorStyle('jquery-ui/themes/base/jquery-ui',null,true);
                        OC_Util::addStyle('server', null, true);
-
-                       // avatars
-                       \OC_Util::addScript('jquery.avatar', null, true);
-                       \OC_Util::addScript('placeholder', null, true);
-
                        OC_Util::addVendorStyle('select2/select2', null, true);
-                       OC_Util::addScript('select2-toggleselect');
-
-                       OC_Util::addScript('oc-backbone', null, true);
-                       OC_Util::addScript('mimetypelist', null, true);
-                       OC_Util::addScript('mimetype', null, true);
-                       OC_Util::addScript("apps", null, true);
-                       OC_Util::addScript("oc-requesttoken", null, true);
-                       OC_Util::addScript('search', 'search', true);
-                       OC_Util::addScript("config", null, true);
-                       OC_Util::addScript("public/appconfig", null, true);
-                       OC_Util::addScript("eventsource", null, true);
-                       OC_Util::addScript("octemplate", null, true);
+                       OC_Util::addStyle('jquery.ocdialog');
                        OC_Util::addTranslations("core", null, true);
-                       OC_Util::addScript("l10n", null, true);
-                       OC_Util::addScript("js", null, true);
-                       OC_Util::addScript("oc-dialogs", null, true);
-                       OC_Util::addScript("jquery.ocdialog", null, true);
-                       OC_Util::addScript("jquery-ui-fixes");
-                       OC_Util::addStyle("jquery.ocdialog");
+                       OC_Util::addScript('search', 'search', true);
+                       OC_Util::addScript('merged-template-prepend', null, true);
+                       OC_Util::addScript('jquery-ui-fixes');
                        OC_Util::addScript('files/fileinfo');
                        OC_Util::addScript('files/client');