From 5728c8663b69360635d3603b10758acc1d9c79fd Mon Sep 17 00:00:00 2001 From: Bernhard Reiter Date: Fri, 7 Nov 2014 21:44:48 +0100 Subject: [PATCH 1/2] Load md5 and Jcrop scripts and styles from their new locations. They could not be loaded as they have been replaced by their bower counterparts with owncloud/core@49fbd766c2ad6e5bc7c8401bfab2c20b1f442012 and owncloud/core@73569b29bc3984e1e6df102faccb3c02c20573b3 --- lib/controller/pagecontroller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/controller/pagecontroller.php b/lib/controller/pagecontroller.php index 755c6180..448b1056 100644 --- a/lib/controller/pagecontroller.php +++ b/lib/controller/pagecontroller.php @@ -45,7 +45,7 @@ class PageController extends Controller { \OCP\Util::addScript('', 'jquery.multiselect'); \OCP\Util::addScript('', 'tags'); \OCP\Util::addScript('placeholder'); - \OCP\Util::addScript('3rdparty', 'md5/md5.min'); + \OC_Util::addVendorScript('blueimp-md5/js/md5'); \OCP\Util::addScript('jquery.avatar'); \OCP\Util::addScript('avatar'); \OCP\Util::addScript('contacts', 'jquery.combobox'); @@ -58,11 +58,11 @@ class PageController extends Controller { \OCP\Util::addScript('contacts', 'jquery.ocaddnew'); \OCP\Util::addScript('contacts', 'otherbackendconfig'); \OCP\Util::addScript('files', 'jquery.fileupload'); - \OCP\Util::addScript('3rdparty/Jcrop', 'jquery.Jcrop'); + \OC_Util::addVendorScript('jcrop/js/jquery.Jcrop'); \OCP\Util::addStyle('', 'jquery.multiselect'); \OCP\Util::addStyle('contacts', 'jquery.combobox'); \OCP\Util::addStyle('contacts', 'jquery.ocaddnew'); - \OCP\Util::addStyle('3rdparty/Jcrop', 'jquery.Jcrop'); + \OC_Util::addVendorStyle('jcrop/css/jquery.Jcrop'); \OCP\Util::addStyle('contacts', 'contacts'); $response = new TemplateResponse($this->appName, 'contacts'); From ea7e3b4844ab7f12f52dd3ac7bc9e9ee4a21ee12 Mon Sep 17 00:00:00 2001 From: Bernhard Reiter Date: Sat, 8 Nov 2014 16:34:23 +0100 Subject: [PATCH 2/2] 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 @@