diff options
Diffstat (limited to 'apps/contacts')
-rw-r--r-- | apps/contacts/appinfo/app.php | 5 | ||||
-rw-r--r-- | apps/contacts/css/contacts.css | 3 | ||||
-rw-r--r-- | apps/contacts/js/loader.js | 4 | ||||
-rw-r--r-- | apps/contacts/lib/addressbook.php | 2 | ||||
-rw-r--r-- | apps/contacts/lib/app.php | 1 |
5 files changed, 10 insertions, 5 deletions
diff --git a/apps/contacts/appinfo/app.php b/apps/contacts/appinfo/app.php index 7e73f315dd0..68163430186 100644 --- a/apps/contacts/appinfo/app.php +++ b/apps/contacts/appinfo/app.php @@ -3,6 +3,8 @@ OC::$CLASSPATH['OC_Contacts_App'] = 'apps/contacts/lib/app.php'; OC::$CLASSPATH['OC_Contacts_Addressbook'] = 'apps/contacts/lib/addressbook.php'; OC::$CLASSPATH['OC_Contacts_VCard'] = 'apps/contacts/lib/vcard.php'; OC::$CLASSPATH['OC_Contacts_Hooks'] = 'apps/contacts/lib/hooks.php'; +OC::$CLASSPATH['OC_Share_Backend_Contact'] = 'apps/contacts/lib/share/contact.php'; +OC::$CLASSPATH['OC_Share_Backend_Addressbook'] = 'apps/contacts/lib/share/addressbook.php'; OC::$CLASSPATH['OC_Connector_Sabre_CardDAV'] = 'apps/contacts/lib/connector_sabre.php'; OC::$CLASSPATH['Sabre_CardDAV_VCFExportPlugin'] = 'apps/contacts/lib/VCFExportPlugin.php'; OC::$CLASSPATH['OC_Search_Provider_Contacts'] = 'apps/contacts/lib/search.php'; @@ -20,3 +22,6 @@ OCP\App::addNavigationEntry( array( OCP\Util::addscript('contacts', 'loader'); OC_Search::registerProvider('OC_Search_Provider_Contacts'); +OCP\Share::registerBackend('contact', 'OC_Share_Backend_Contact'); +OCP\Share::registerBackend('addressbook', 'OC_Share_Backend_Addressbook', 'contact'); + diff --git a/apps/contacts/css/contacts.css b/apps/contacts/css/contacts.css index 0961550c7a6..df9bba2dd3e 100644 --- a/apps/contacts/css/contacts.css +++ b/apps/contacts/css/contacts.css @@ -50,11 +50,12 @@ label:hover, dt:hover { color: #333; } .float { float: left; } .svg { border: inherit; background: inherit; } .listactions { height: 1em; width:60px; float: left; clear: right; } -.add,.edit,.delete,.mail, .globe, .upload, .download, .cloud { cursor: pointer; width: 20px; height: 20px; margin: 0; float: left; position:relative; opacity: 0.1; } +.add,.edit,.delete,.mail, .globe, .upload, .download, .cloud, .share { cursor: pointer; width: 20px; height: 20px; margin: 0; float: left; position:relative; opacity: 0.1; } .add:hover,.edit:hover,.delete:hover,.mail:hover, .globe:hover, .upload:hover, .download:hover .cloud:hover { opacity: 1.0 } .add { background:url('%webroot%/core/img/actions/add.svg') no-repeat center; clear: both; } .delete { background:url('%webroot%/core/img/actions/delete.svg') no-repeat center; } .edit { background:url('%webroot%/core/img/actions/rename.svg') no-repeat center; } +.share { background:url('%webroot%/core/img/actions/share.svg') no-repeat center; } .mail { background:url('%webroot%/core/img/actions/mail.svg') no-repeat center; } .upload { background:url('%webroot%/core/img/actions/upload.svg') no-repeat center; } .download { background:url('%webroot%/core/img/actions/download.svg') no-repeat center; } diff --git a/apps/contacts/js/loader.js b/apps/contacts/js/loader.js index 5bca0ab7237..3b1f4070485 100644 --- a/apps/contacts/js/loader.js +++ b/apps/contacts/js/loader.js @@ -78,9 +78,9 @@ Contacts_Import={ }
$(document).ready(function(){
if(typeof FileActions !== 'undefined'){
- FileActions.register('text/vcard','importaddressbook', '', Contacts_Import.importdialog);
+ FileActions.register('text/vcard','importaddressbook', FileActions.PERMISSION_READ, '', Contacts_Import.importdialog);
FileActions.setDefault('text/vcard','importaddressbook');
- FileActions.register('text/x-vcard','importaddressbook', '', Contacts_Import.importdialog);
+ FileActions.register('text/x-vcard','importaddressbook', FileActions.PERMISSION_READ, '', Contacts_Import.importdialog);
FileActions.setDefault('text/x-vcard','importaddressbook');
};
});
\ No newline at end of file diff --git a/apps/contacts/lib/addressbook.php b/apps/contacts/lib/addressbook.php index eb61b6dbced..a81b1f77985 100644 --- a/apps/contacts/lib/addressbook.php +++ b/apps/contacts/lib/addressbook.php @@ -64,10 +64,10 @@ class OC_Contacts_Addressbook { while( $row = $result->fetchRow()) { $addressbooks[] = $row; } + $addressbooks = array_merge($addressbooks, OCP\Share::getItemsSharedWith('addressbook', OC_Share_Backend_Addressbook::FORMAT_ADDRESSBOOKS)); if(!$active && !count($addressbooks)) { self::addDefault($uid); } - return $addressbooks; } diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php index 3972d0e0a5e..855a9c74160 100644 --- a/apps/contacts/lib/app.php +++ b/apps/contacts/lib/app.php @@ -51,7 +51,6 @@ class OC_Contacts_App { ) ); } - exit(); } return $addressbook; } |