1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00

Load resources from template using script() and style() functions.

This commit is contained in:
Bernhard Reiter 2014-11-08 16:34:23 +01:00
parent 5728c8663b
commit ea7e3b4844
2 changed files with 38 additions and 23 deletions

View File

@ -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,

View File

@ -1,5 +1,43 @@
<?php
use OCA\Contacts\ImportManager;
script('', [
'jquery.multiselect',
'tags',
'placeholder',
'jquery.avatar',
'avatar',
]);
vendor_script('', [
'blueimp-md5/js/md5',
'jcrop/js/jquery.Jcrop',
]);
script('files', 'jquery.fileupload');
script('contacts', [
'jquery.combobox',
'modernizr.custom',
'app',
'addressbooks',
'contacts',
'storage',
'groups',
'jquery.ocaddnew',
'otherbackendconfig',
]);
style('', 'jquery.multiselect');
vendor_style('jcrop/css/jquery.Jcrop');
style('contacts', [
'jquery.combobox',
'jquery.ocaddnew',
'contacts',
]);
?>
<div id="app">
<div id="app-navigation" class="loading">