summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-05-11 18:16:52 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-05-11 18:21:55 +0200
commit646a4bd635a41d231e5ee00650a3fa47896fabdc (patch)
tree608f666981a73459da1fa380408aa264273a146e /apps
parent08e0b6cf5e0536853dd69a5a926acbca8b822b16 (diff)
downloadnextcloud-server-646a4bd635a41d231e5ee00650a3fa47896fabdc.tar.gz
nextcloud-server-646a4bd635a41d231e5ee00650a3fa47896fabdc.zip
Contacts: Clone event handlers as well.
Diffstat (limited to 'apps')
-rw-r--r--apps/contacts/js/contacts.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index b37383a12f4..67904e6728d 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -84,7 +84,6 @@ Contacts={
loadListHandlers:function() {
$('.propertylist li a.delete').unbind('click');
$('.propertylist li a.delete').unbind('keydown');
- $('.globe,.mail,.delete,.edit,.tip').tipsy();
var deleteItem = function(obj) {
obj.tipsy('hide');
Contacts.UI.Card.deleteProperty(obj, 'list');
@@ -644,21 +643,18 @@ Contacts={
$('#emails').show();
}
Contacts.UI.Card.addMail();
- Contacts.UI.loadListHandlers();
break;
case 'TEL':
if($('#phonelist>li').length == 1) {
$('#phones').show();
}
Contacts.UI.Card.addPhone();
- Contacts.UI.loadListHandlers();
break;
case 'ADR':
if($('#addressdisplay>dl').length == 1) {
$('#addresses').show();
}
Contacts.UI.Card.editAddress('new', true);
- Contacts.UI.loadListHandlers();
break;
case 'NICKNAME':
case 'ORG':
@@ -848,7 +844,7 @@ Contacts={
var q = q = '?id=' + this.id;
if(obj === 'new') {
isnew = true;
- $('#addressdisplay dl').first().clone().insertAfter($('#addressdisplay dl').last()).show();
+ $('#addressdisplay dl').first().clone(true).insertAfter($('#addressdisplay dl').last()).show();
container = $('#addressdisplay dl').last();
container.removeClass('template').addClass('propertycontainer');
} else {
@@ -1147,7 +1143,7 @@ Contacts={
},
addMail:function() {
//alert('addMail');
- $('#emaillist li.template:first-child').clone().appendTo($('#emaillist')).show();
+ $('#emaillist li.template:first-child').clone(true).appendTo($('#emaillist')).show().find('a .tip').tipsy();
$('#emaillist li.template:last-child').find('select').addClass('contacts_property');
$('#emaillist li.template:last-child').removeClass('template').addClass('propertycontainer');
$('#emaillist li:last-child').find('input[type="email"]').focus();
@@ -1186,7 +1182,7 @@ Contacts={
return false;
},
addPhone:function() {
- $('#phonelist li.template:first-child').clone().appendTo($('#phonelist')); //.show();
+ $('#phonelist li.template:first-child').clone(true).appendTo($('#phonelist')); //.show();
$('#phonelist li.template:last-child').find('select').addClass('contacts_property');
$('#phonelist li.template:last-child').removeClass('template').addClass('propertycontainer');
$('#phonelist li:last-child').find('input[type="text"]').focus();