getNavigationManager()->setActiveEntry($this->appName); $imppTypes = Properties::getTypesForProperty('IMPP'); $adrTypes = Properties::getTypesForProperty('ADR'); $phoneTypes = Properties::getTypesForProperty('TEL'); $emailTypes = Properties::getTypesForProperty('EMAIL'); $ims = Properties::getIMOptions(); $imProtocols = array(); foreach($ims as $name => $values) { $imProtocols[$name] = $values['displayname']; } $maxUploadFilesize = \OCP\Util::maxUploadFilesize('/'); \OCP\Util::addScript('', 'jquery.multiselect'); \OCP\Util::addScript('', 'tags'); \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('files', 'jquery.fileupload'); \OCP\Util::addScript('3rdparty/Jcrop', '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'); \OCP\Util::addStyle('contacts', 'contacts'); $response = new TemplateResponse($this->appName, 'contacts'); $response->setParams(array( 'uploadMaxFilesize' => $maxUploadFilesize, 'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize), 'phoneTypes' => $phoneTypes, 'emailTypes' => $emailTypes, 'adrTypes' => $adrTypes, 'imppTypes' => $imppTypes, 'imProtocols' => $imProtocols, )); return $response; } }