deleteContactListActual
1 function deleteContactListActual() {
2
3 if (connectionObj.forcedLogout) {
4 isDisconnectedForcedLogout();
5 return false;
6 }
7
8 var fullAddresses = "";
9 var contactListFullAddress = getContactListID(curContactList);
10 var uniqueRef="";
11 var curContactListLoc = curContactList;
12
13 var paramDeleteContactList = 'deleteContactList='+'&userContactListID='+contactListFullAddress;
14
15 new Ajax.Request(contactListDeleteUrl, {
16
17 method : 'post',
18 onLoading: function() {
19 if (!$('splashCommonPage')) {
20 showSplashCommon();
21 }
22
23 },
24 onSuccess : function(xh) {
25
26 hideSplashCommon();
27
28 var output = JSON.parse(xh.responseText);
29
30 if (!connectionObj.forcedLogout) {
31 if (isDisconnectedForcedLogout(output)) {
32 return false;
33 }
34 } else {
35 isDisconnectedForcedLogout(output);
36 return false;
37 }
38
39 if (xh.responseText.toLowerCase().indexOf('error') == -1){
40
41 uniqueRefContactListGroup = curContactListLoc + '_group';
42 uniqueRefContactListGroupTop = curContactListLoc + '_groupTop';
43
44 uniqueRefContactListGroup = uniqueRefContactListGroup.replace(/\s/, '_');
45 uniqueRefContactListGroupTop = uniqueRefContactListGroupTop.replace(/\s/, '_');
46
47 // removal of all ul tags or all contactLists
48 if ($(uniqueRefContactListGroup)) {
49 $(uniqueRefContactListGroup).parentNode.removeChild($(uniqueRefContactListGroup));
50 }
51 if ($(uniqueRefContactListGroupTop)) {
52 $(uniqueRefContactListGroupTop).parentNode.removeChild($(uniqueRefContactListGroupTop));
53 }
54
55 deleteContactListID(contactListFullAddress);
56 }
57
58
59 },
60 onFailure : function(xh) {
61 alert("Oops, there's been an error.");
62 },
63 parameters : paramDeleteContactList
64
65 });
66
67 }
deleteContactListActual
1 function deleteContactListActual() {
2 var fullAddresses = "";
3 var contactListFullAddress = getContactListID(curContactList);
4 var uniqueRef="";
5 var curContactListLoc = curContactList;
6
7 var paramDeleteContactList = 'deleteContactList='+'&userContactListID='+contactListFullAddress;
8
9 new Ajax.Request(contactListDeleteUrl, {
10
11 method : 'post',
12 onLoading: function() {
13 if (!$('splashCommonPage')) {
14 showSplashCommon();
15 }
16
17 },
18 onSuccess : function(xh) {
19
20 hideSplashCommon();
21 if (xh.responseText.toLowerCase().indexOf('error') == -1){
22
23 uniqueRefContactListGroup = curContactListLoc + '_group';
24 uniqueRefContactListGroupTop = curContactListLoc + '_groupTop';
25
26 uniqueRefContactListGroup = uniqueRefContactListGroup.replace(/\s/, '_');
27 uniqueRefContactListGroupTop = uniqueRefContactListGroupTop.replace(/\s/, '_');
28
29 // removal of all ul tags or all contactLists
30 if ($(uniqueRefContactListGroup)) {
31 $(uniqueRefContactListGroup).parentNode.removeChild($(uniqueRefContactListGroup));
32 }
33 if ($(uniqueRefContactListGroupTop)) {
34 $(uniqueRefContactListGroupTop).parentNode.removeChild($(uniqueRefContactListGroupTop));
35 }
36
37 deleteContactListID(contactListFullAddress);
38 }
39
40
41 },
42 onFailure : function(xh) {
43 alert("Oops, there's been an error.");
44 },
45 parameters : paramDeleteContactList
46
47 });
48
49 }
Pages : 1