Changeset 1991 for trunk/expressoAdmin1_2/js/jscode/expressoadmin.js
- Timestamp:
- 02/10/10 09:58:44 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/js/jscode/expressoadmin.js
r1916 r1991 33 33 } 34 34 35 function get_associated_domain(context) 36 { 37 var handler_associated_domain = function(data) 38 { 39 if (data != null) 40 { 41 document.forms[0].associated_domain.value = data; 42 } 43 else 44 { 45 document.forms[0].associated_domain.value = ''; 46 } 47 } 48 cExecute ('$this.ldap_functions.get_associated_domain&context='+context, handler_associated_domain); 49 } 50 35 51 function emailSugestion_expressoadmin2(email) { 36 52 if ( email.value.indexOf('@', 0) < 0 ) emailSugestion = 1; … … 39 55 var context = ""; 40 56 41 organization_context = Element('ea_combo_org').value ;57 organization_context = Element('ea_combo_org').value.toLowerCase(); 42 58 // Transformar os DN em User Friendly Naming format 43 59 organization_name = organization_context.split(","); … … 46 62 context += tmp[1]; 47 63 if( i < (organization_name.length - 1) ) context += '.'; 48 } 49 email.value = email.value + context; 50 emailSugestion = 0; 64 } 65 if (document.forms[0].associated_domain.value != '') 66 { 67 associatedDomain_name = document.forms[0].associated_domain.value; 68 email.value = email.value + associatedDomain_name; 69 emailSugestion = 0; 70 } else{ 71 email.value = email.value + context; 72 emailSugestion = 0; 73 } 51 74 } 52 75 } … … 91 114 org_name = org_name_par.split('.'); 92 115 org_name = org_name[org_name.length-1]; 93 116 94 117 if (org_name != '') 95 document.forms[0].mail1.value = document.forms[0].uid.value + '@' + org_name + '.' + domain_name; 118 { 119 if (document.forms[0].associated_domain.value != '') 120 { 121 associatedDomain_name = document.forms[0].associated_domain.value; 122 document.forms[0].mail1.value = document.forms[0].uid.value + '@' + associatedDomain_name; 123 } 124 else 125 { 126 document.forms[0].mail1.value = document.forms[0].uid.value + '@' + org_name + '.' + domain_name; 127 } 128 } 96 129 else 97 130 document.forms[0].mail1.value = document.forms[0].uid.value;
Note: See TracChangeset
for help on using the changeset viewer.