Changeset 7444 for branches/2.4/expressoMail1_2/js/main.js
- Timestamp:
- 10/18/12 18:14:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4/expressoMail1_2/js/main.js
r7396 r7444 31 31 } 32 32 33 function updateDynamicContact(){ 34 dynamicContacts = new Array(); 33 function updateDynamicContact(userContacts){ 34 35 if(!userContacts) 36 userContacts = REST.get("/usercontacts", false); 37 38 if(userContacts.collection && !userContacts.collection.error){ 39 dynamicData = normalizeContacts(userContacts.collection.itens); 40 }else{ 41 dynamicData = []; 42 } 43 44 if(dynamicData){ 45 var dynamicContactsList = []; 46 $.each(dynamicData, function(index, dynamic){ 47 48 var dataType = userContacts.collection.itens[index].dataType; 49 50 dynamic['value'] = (dynamic.name ? dynamic.name +' - ': '') + dynamic.mail; 51 dynamic['type'] = dataType 52 dynamic['typel'] = (dataType.substring(0,7) == "/shared" ? "/"+dataType.substring(7,dataType.length)+"s" : dataType); 53 54 topContact = dynamic.number_of_messages > topContact ? dynamic.number_of_messages : topContact; 55 56 dynamicContactsList.push(dynamic); 57 }); 58 } 59 60 dynamicData = dynamicContactsList; 61 62 63 /*dynamicContacts = new Array(); 35 64 36 65 var dynamicUsers = REST.get("/dynamiccontacts"); … … 53 82 dynamicContacts.push(dynamic); 54 83 }); 55 } 84 }*/ 56 85 } 57 86 … … 2754 2783 if(!stop){ 2755 2784 var exist = 0; 2756 $.each(dynamic Contacts, function(x, valuex){2785 $.each(dynamicData, function(x, valuex){ 2757 2786 if(valuex.mail == $(value).find("input").val().match(reComplexEmail)[1]){ 2758 2787 exist = valuex.id;
Note: See TracChangeset
for help on using the changeset viewer.