From ea7e3b4844ab7f12f52dd3ac7bc9e9ee4a21ee12 Mon Sep 17 00:00:00 2001 From: Bernhard Reiter Date: Sat, 8 Nov 2014 16:34:23 +0100 Subject: [PATCH] Load resources from template using script() and style() functions. --- lib/controller/pagecontroller.php | 23 ------------------- templates/contacts.php | 38 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/lib/controller/pagecontroller.php b/lib/controller/pagecontroller.php index 448b1056..0d7216a4 100644 --- a/lib/controller/pagecontroller.php +++ b/lib/controller/pagecontroller.php @@ -42,29 +42,6 @@ class PageController extends Controller { $maxUploadFilesize = \OCP\Util::maxUploadFilesize('/'); - \OCP\Util::addScript('', 'jquery.multiselect'); - \OCP\Util::addScript('', 'tags'); - \OCP\Util::addScript('placeholder'); - \OC_Util::addVendorScript('blueimp-md5/js/md5'); - \OCP\Util::addScript('jquery.avatar'); - \OCP\Util::addScript('avatar'); - \OCP\Util::addScript('contacts', 'jquery.combobox'); - \OCP\Util::addScript('contacts', 'modernizr.custom'); - \OCP\Util::addScript('contacts', 'app'); - \OCP\Util::addScript('contacts', 'addressbooks'); - \OCP\Util::addScript('contacts', 'contacts'); - \OCP\Util::addScript('contacts', 'storage'); - \OCP\Util::addScript('contacts', 'groups'); - \OCP\Util::addScript('contacts', 'jquery.ocaddnew'); - \OCP\Util::addScript('contacts', 'otherbackendconfig'); - \OCP\Util::addScript('files', 'jquery.fileupload'); - \OC_Util::addVendorScript('jcrop/js/jquery.Jcrop'); - \OCP\Util::addStyle('', 'jquery.multiselect'); - \OCP\Util::addStyle('contacts', 'jquery.combobox'); - \OCP\Util::addStyle('contacts', 'jquery.ocaddnew'); - \OC_Util::addVendorStyle('jcrop/css/jquery.Jcrop'); - \OCP\Util::addStyle('contacts', 'contacts'); - $response = new TemplateResponse($this->appName, 'contacts'); $response->setParams(array( 'uploadMaxFilesize' => $maxUploadFilesize, diff --git a/templates/contacts.php b/templates/contacts.php index 715a94f8..7f5ea7c4 100644 --- a/templates/contacts.php +++ b/templates/contacts.php @@ -1,5 +1,43 @@