diff --git a/apps/contacts/css/contacts.css b/apps/contacts/css/contacts.css
index 0961550c7a..c5308c4d25 100644
--- a/apps/contacts/css/contacts.css
+++ b/apps/contacts/css/contacts.css
@@ -140,4 +140,7 @@ input[type="checkbox"] { width: 20px; height: 20px; vertical-align: bottom; }
.addressbooks-settings .actions * { float: left; }
.addressbooks-settings .actions input.name { width: 5em; }
.addressbooks-settings .actions input.name { width: 7em; }
+.addressbooks-settings a.action { opacity: 0.2; }
+.addressbooks-settings a.action:hover { opacity: 1; }
+.addressbooks-settings td.active, .addressbooks-settings td.action { width: 20px; }
diff --git a/apps/contacts/js/settings.js b/apps/contacts/js/settings.js
index 284f972be8..67aaa5b5f8 100644
--- a/apps/contacts/js/settings.js
+++ b/apps/contacts/js/settings.js
@@ -89,8 +89,7 @@ OC.Contacts.Settings = OC.Contacts.Settings || {
+ '
| '
+ ' | '
+ ' | '
+ + 'href="'+OC.linkTo('contacts', 'export.php')+'?bookid='+jsondata.data.addressbook.id+'">'
+ ' | '
+ ' | '
+ '');
@@ -106,17 +105,27 @@ OC.Contacts.Settings = OC.Contacts.Settings || {
}
});
},
+ showLink:function(id, row, link) {
+ console.log('row:', row.length);
+ row.next('tr.link').remove();
+ var linkrow = $(' | '
+ + ' |
').insertAfter(row);
+ linkrow.find('input').focus().select();
+ linkrow.find('button').click(function() {
+ $(this).parents('tr').first().remove();
+ });
+ },
showCardDAV:function(id) {
console.log('showCardDAV: ', id);
var row = this.adrsettings.find('tr[data-id="'+id+'"]');
- this.adractions.find('.link').val(totalurl+'/'+encodeURIComponent(oc_current_user)+'/');
- this.showActions(['link','cancel']);
+ this.showLink(id, row, totalurl+'/'+encodeURIComponent(oc_current_user));
},
showVCF:function(id) {
console.log('showVCF: ', id);
var row = this.adrsettings.find('tr[data-id="'+id+'"]');
- this.adractions.find('.link').val(totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(row.data('uri'))+'?export');
- this.showActions(['link','cancel']);
+ var link = totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(row.data('uri'))+'?export';
+ console.log(link);
+ this.showLink(id, row, link);
}
}
};
diff --git a/apps/contacts/templates/settings.php b/apps/contacts/templates/settings.php
index 85dbca36fa..3fddc59588 100644
--- a/apps/contacts/templates/settings.php
+++ b/apps/contacts/templates/settings.php
@@ -24,8 +24,7 @@
+ href="?bookid=">
|
">
@@ -41,7 +40,6 @@
-
|