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

Contacts: Start on js AddressBook object

This commit is contained in:
Thomas Tanghus 2013-05-01 03:19:18 +02:00
parent c635fd7fdd
commit 9c6b655c63
2 changed files with 11 additions and 5 deletions

View File

@ -13,10 +13,6 @@ namespace OCA\Contacts;
\OCP\User::checkLoggedIn();
\OCP\App::checkAppEnabled('contacts');
// Get active address books. This creates a default one if none exists.
//$ids = OCA\Contacts\Addressbook::activeIds(OCP\USER::getUser());
// Load the files we need
\OCP\App::setActiveNavigationEntry('contacts_index');
$impp_types = Utils\Properties::getTypesForProperty('IMPP');
@ -37,6 +33,7 @@ $maxUploadFilesize = \OCP\Util::maxUploadFilesize('/');
\OCP\Util::addscript('', 'octemplate');
\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');
@ -58,7 +55,6 @@ $tmpl = new \OCP\Template( "contacts", "contacts", "user" );
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
$tmpl->assign('uploadMaxHumanFilesize',
\OCP\Util::humanFileSize($maxUploadFilesize), false);
//$tmpl->assign('addressbooks', OCA\Contacts\Addressbook::all(OCP\USER::getUser()));
$tmpl->assign('phone_types', $phone_types);
$tmpl->assign('email_types', $email_types);
$tmpl->assign('adr_types', $adr_types);

10
js/addressbooks.js Normal file
View File

@ -0,0 +1,10 @@
OC.Contacts = OC.Contacts || {};
(function(window, $, OC) {
'use strict';
OC.Contacts.AddressBookList = AddressBookList;
})(window, jQuery, OC);