summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-03-27 12:26:59 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-03-27 12:30:20 +0200
commitfa165498ccfe2becbdaf997b4e36336e794cce50 (patch)
tree2e7dd34e332ce60e3afdcb72403e743b0c4cf5cb
parentff038f8766d49b2a4913ef5ae0a206758f2cdaaa (diff)
downloadnextcloud-server-fa165498ccfe2becbdaf997b4e36336e794cce50.tar.gz
nextcloud-server-fa165498ccfe2becbdaf997b4e36336e794cce50.zip
Improvements in adding/deleting properties.
-rw-r--r--apps/contacts/js/contacts.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index 82aadb54b84..e1827027453 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -613,10 +613,12 @@ Contacts={
this.loadPhoto(true);
$('#file_upload_form').show();
$('#contacts_propertymenu a[data-type="'+type+'"]').parent().hide();
+ $('#file_upload_start').trigger('click');
break;
case 'NOTE':
$('#note').show();
$('#contacts_propertymenu a[data-type="'+type+'"]').parent().hide();
+ $('#note').find('textarea').focus();
break;
case 'EMAIL':
if($('#emaillist>li').length == 1) {
@@ -644,6 +646,7 @@ Contacts={
case 'BDAY':
case 'CATEGORIES':
$('dl dt[data-element="'+type+'"],dd[data-element="'+type+'"]').show();
+ $('dd[data-element="'+type+'"]').find('input').focus();
$('#contacts_propertymenu a[data-type="'+type+'"]').parent().hide();
break;
}
@@ -670,10 +673,13 @@ Contacts={
if(proptype == 'PHOTO') {
console.log('Delete PHOTO');
Contacts.UI.Contacts.refreshThumbnail(Contacts.UI.Card.id);
+ } else if(proptype == 'NOTE') {
+ $('#note').find('textarea').val('');
}
} else {
$('dl dt[data-element="'+proptype+'"],dd[data-element="'+proptype+'"]').hide();
$('dl dd[data-element="'+proptype+'"]').data('checksum', '');
+ $('dl dd[data-element="'+proptype+'"]').find('input').val('');
}
$('#contacts_propertymenu a[data-type="'+proptype+'"]').parent().show();
Contacts.UI.loading(obj, false);