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

Also show correct links for addressbooks.

This commit is contained in:
Thomas Tanghus 2012-10-03 18:47:02 +02:00
parent a2c7488354
commit d253b77a49

View File

@ -127,12 +127,16 @@ OC.Contacts.Settings = OC.Contacts.Settings || {
showCardDAV:function(id) {
console.log('showCardDAV: ', id);
var row = this.adrsettings.find('tr[data-id="'+id+'"]');
this.showLink(id, row, totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(row.data('uri')));
var owner = row.data('owner');
var uri = (owner === oc_current_user ) ? row.data('uri') : row.data('uri') + '_shared_by_' + owner;
this.showLink(id, row, totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(uri));
},
showVCF:function(id) {
console.log('showVCF: ', id);
var row = this.adrsettings.find('tr[data-id="'+id+'"]');
var link = totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(row.data('uri'))+'?export';
var owner = row.data('owner');
var uri = (owner === oc_current_user ) ? row.data('uri') : row.data('uri') + '_shared_by_' + owner;
var link = totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(uri)+'?export';
console.log(link);
this.showLink(id, row, link);
}