Changeset 309 for trunk/expressoAdmin1_2/js
- Timestamp:
- 06/10/08 16:40:13 (16 years ago)
- Location:
- trunk/expressoAdmin1_2/js/jscode
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/js/jscode/groups.js
r283 r309 7 7 8 8 if (document.forms[0].cn.value == ''){ 9 alert( document.getElementById('group_name_field_is_empty').value);9 alert('Campo NOME do grupo está vazio.'); 10 10 return; 11 11 } 12 12 13 13 if (document.forms[0].description.value == ''){ 14 alert( document.getElementById('description_field_is_empty').value);14 alert('Campo DESCRIÇÃO está vazio.'); 15 15 return; 16 16 } … … 20 20 cn_tmp = document.forms[0].cn.value.split("-"); 21 21 if ( (cn_tmp.length < 3) || ((cn_tmp[0] != 'grupo') && (cn_tmp[0] != 'smb')) ){ 22 alert(document.getElementById('field_name_is_incomplete').value); 22 alert( 23 'O campo NOME do grupo está incompleto.\n' + 24 'O nome do grupo deve ser formado assim:\n' + 25 'grupo-ORGANIZACAO-NOME_DO_GRUPO.\n' + 26 'Ex: grupo-celepar-rh.'); 23 27 return; 24 28 } … … 29 33 30 34 if(!reCn.test(document.forms[0].cn.value)){ 31 alert( document.getElementById('group_name_not_allowed').value);35 alert('Campo NOME DO GRUPO comtém caracteres não permitidos.'); 32 36 document.forms[0].cn.focus(); 33 37 return; … … 35 39 36 40 if(!reDesc.test(document.forms[0].description.value)){ 37 alert( document.getElementGroupById('description_field_not_allowed').value);41 alert('Campo DESCRIÇÃO comtém caracteres não permitidos.'); 38 42 document.forms[0].description.focus(); 39 43 return; … … 41 45 42 46 var reEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 43 if ( (document.forms[0].email.value == '') ||(!reEmail.test(document.forms[0].email.value)) )44 { 45 alert( document.getElementById('field_email_is_invalid').value);47 if ( (document.forms[0].email.value != '') && (!reEmail.test(document.forms[0].email.value)) ) 48 { 49 alert("Campo E-mail não é válido."); 46 50 return false; 47 51 } … … 86 90 alert(data.msg); 87 91 else{ 88 alert( document.getElementById('group_successfully_created').value);92 alert('Grupo criado com êxito!'); 89 93 location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; 90 94 } … … 103 107 alert(data.msg); 104 108 else{ 105 alert( document.getElementById('group_successfully_saved').value);109 alert('Grupo salvo com êxito!!'); 106 110 location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; 107 111 } … … 152 156 if ((recursive) && (document.forms[0].ldap_context.value == document.getElementById('ea_combo_org_groups').value)) 153 157 { 154 alert( document.getElementById('not_possible_select_all_users').value)158 alert('Nao é possível selecionar todos os usuários da organização raiz.') 155 159 document.getElementById('ea_check_allUsers').checked = false; 156 160 … … 266 270 function delete_group(cn, gidnumber) 267 271 { 268 if (confirm( document.getElementById('delete_group').value + " (" + cn + ")"))272 if (confirm("Realmente deletar Grupo " + cn + " ??")) 269 273 { 270 274 var handler_delete_group = function(data) … … 273 277 alert(data.msg); 274 278 else 275 alert( document.getElementById('group_successfully_deleted').value);279 alert('Grupo deletado com êxito!!'); 276 280 277 281 location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; -
trunk/expressoAdmin1_2/js/jscode/maillists.js
r283 r309 1 1 countFiles = 0; 2 function validate_fields(type , restrictionsOnEmailLists)2 function validate_fields(type) 3 3 { 4 4 document.forms[0].uid.value = document.forms[0].uid.value.toLowerCase(); … … 6 6 7 7 if (document.forms[0].uid.value == ''){ 8 alert( document.getElementById('login_field_has_spaces').value);8 alert('Campo LOGIN da lista está vazio.'); 9 9 return; 10 10 } 11 11 12 12 if (document.forms[0].cn.value == ''){ 13 alert( document.getElementById('list_name_field_is_empty').value);14 return; 15 } 16 17 if ( restrictionsOnEmailLists== 'true')13 alert('Campo NOME da lista está vazio.'); 14 return; 15 } 16 17 if (document.forms[0].restrictionsOnEmailLists.value == 'true') 18 18 { 19 19 uid_tmp = document.forms[0].uid.value.split("-"); 20 20 if ((uid_tmp.length < 3) || (uid_tmp[0] != 'lista')){ 21 alert(document.getElementById('login_field_incomplete').value); 21 alert( 22 'O campo LOGIN da lista está incompleto.\n' + 23 'O nome da lista deve ser formado assim:\n' + 24 'lista-ORGANIZACAO-NOME_DA_LISTA.\n' + 25 'Ex: lista-celepar-rh.'); 22 26 return; 23 27 } … … 25 29 26 30 if (document.forms[0].uid.value.split(" ").length > 1){ 27 alert( document.getElementById('login_field_has_spaces').value);31 alert('Campo LOGIN comtém espaços.'); 28 32 document.forms[0].uid.focus(); 29 33 return; … … 31 35 32 36 if (document.forms[0].mail.value == ''){ 33 alert( document.getElementById('list_email_field_is_empty').value);37 alert('Campo E-MAIL da lista está vazio.'); 34 38 document.forms[0].mail.focus(); 35 39 return; … … 37 41 var reEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 38 42 if(!reEmail.test(document.forms[0].mail.value)){ 39 alert( document.getElementById('field_email_is_invalid').value);43 alert("Campo E-mail não é válido."); 40 44 return false; 41 45 } … … 43 47 select_userInMaillist = document.getElementById('ea_select_usersInMaillist'); 44 48 if (select_userInMaillist.options.length == 0){ 45 alert( document.getElementById('no_user_is_part_of_the_list').value);49 alert('Nenhum usuário faz parte da lista.'); 46 50 return; 47 51 } … … 91 95 alert(data.msg); 92 96 else{ 93 alert( document.getElementById('email_list_successfully_created').value);97 alert('Lista de emails criada com êxito!'); 94 98 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 95 99 } … … 108 112 alert(data.msg); 109 113 else{ 110 alert( document.getElementById('email_list_successfully_saved').value);114 alert('Lista de emails salva com êxito!!'); 111 115 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 112 116 } … … 133 137 alert(data.msg); 134 138 else 135 alert( document.getElementById('sending_control_list_successfully_saved').value);139 alert('Sending Control List salva com êxito!!'); 136 140 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 137 141 return; … … 181 185 if ((recursive) && (document.forms[0].ldap_context.value == document.getElementById('ea_combo_org_maillists').value)) 182 186 { 183 alert(document.getElementById('it_is_not_possible_select_users').value);187 alert('Nao é possível selecionar todos os usuários da organização raiz.') 184 188 document.getElementById('ea_check_allUsers').checked = false; 185 189 … … 354 358 function delete_maillist(uid, uidnumber) 355 359 { 356 if (confirm( document.getElementById('delete_list').value + " (" + uid + ")"))360 if (confirm("Realmente deletar Lista " + uid + " ??")) 357 361 { 358 362 var handler_delete_maillist = function(data) … … 361 365 alert(data.msg); 362 366 else 363 alert( document.getElementById('email_list_successfully_deleted').value);367 alert('Lista de email deletada com êxito!!'); 364 368 365 369 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 366 370 return; 367 371 } 368 cExecute ('$this.maillist.delete&uidnumber='+uidnumber, handler_delete_maillist);372 cExecute ('$this.maillist.delete&uidnumber='+uidnumber, handler_delete_maillist); 369 373 } 370 374 } … … 414 418 return ufn.substring(0,(ufn.length-1)); 415 419 } 416 417 function dfg(){418 alert('aaa');419 } -
trunk/expressoAdmin1_2/js/jscode/managers.js
r283 r309 2 2 function copy_manager(manager) 3 3 { 4 var new_manager = prompt( document.getElementById('type_the_new_manager_login').value,"");4 var new_manager = prompt("Digite o login do novo gerente:",""); 5 5 6 6 var handler_copy_manager = function(data) … … 9 9 location.reload(); 10 10 else 11 alert( document.getElementById('error_at_copy_manager').value);11 alert('Erro ao copiar gerente.'); 12 12 } 13 13 cExecute ('$this.db_functions.copy_manager&manager='+manager+'&new_manager='+new_manager, handler_copy_manager); … … 100 100 { 101 101 if (data.type == 'create') 102 alert( document.getElementById('manager_created').value);102 alert('Gerente criado com êxito'); 103 103 else 104 alert( document.getElementById('manager_salved').value);104 alert('Gerente salvo com êxito'); 105 105 } 106 106 location.href="./index.php?menuaction=expressoAdmin1_2.uimanagers.list_managers"; -
trunk/expressoAdmin1_2/js/jscode/tabs.js
r283 r309 83 83 document.getElementById(this.HTMLtabcontentID + tabnr).className = this.activeCSSclass; 84 84 85 85 86 if(document.getElementById(this.HTMLtabselectorID)) 86 87 document.getElementById(this.HTMLtabselectorID).selectedIndex = tabnr-1; -
trunk/expressoAdmin1_2/js/jscode/users.js
r283 r309 6 6 //UID 7 7 document.forms[0].uid.value = document.forms[0].uid.value.toLowerCase(); 8 8 9 if (document.forms[0].uid.value == ''){ 9 alert( document.getElementById('login_field_empty').value);10 alert('Campo LOGIN está vazio.'); 10 11 return; 11 12 } 12 13 else if (document.forms[0].uid.value.length < document.forms[0].minimumSizeLogin.value){ 13 alert( document.getElementById('login_field_must_have').value + " " +document.forms[0].minimumSizeLogin.value + " " +document.getElementById('characters').value);14 alert('Campo LOGIN deve ter mais que '+document.forms[0].minimumSizeLogin.value+' caracteres.'); 14 15 return; 15 16 } … … 21 22 var reUid = /^([a-zA-Z0-9_\-])+$/; 22 23 if(!reUid.test(document.forms[0].uid.value)){ 23 alert( document.getElementById('login_field_contains_not_allowed').value);24 alert('Campo LOGIN comtém caracteres não permitidos.'); 24 25 document.forms[0].account_lid.focus(); 25 26 return; … … 28 29 //PASSWORD's 29 30 if (document.forms[0].password1.value == ''){ 30 alert( document.getElementById('password_field_empty').value);31 alert('Campo SENHA está vazio.'); 31 32 return; 32 33 } 33 34 if (document.forms[0].password2.value == ''){ 34 alert( document.getElementById('re-password_field_empty').value);35 alert('Campo RE-SENHA está vazio.'); 35 36 return; 36 37 } … … 38 39 39 40 if (document.forms[0].password1.value != document.forms[0].password2.value){ 40 alert( document.getElementById('pass_re-pass_diferents').value);41 alert('Campo SENHA e RE-SENHA são diferentes.'); 41 42 return; 42 43 } … … 49 50 if(!re_employeenumber.test(document.forms[0].corporative_information_employeenumber.value)) 50 51 { 51 alert( document.getElementById('register_field_contains_not_allowed').value);52 alert('Campo matrícula contém caracteres não permitidos. Somente números são permitidos.'); 52 53 document.forms[0].corporative_information_employeenumber.focus(); 53 54 return; … … 61 62 if(!re_cpf.test(document.forms[0].corporative_information_cpf.value)) 62 63 { 63 alert( document.getElementById('cpf_field_not_allowed').value);64 alert('Campo cpf contém caracteres não permitidos. Somente números são permitidos'); 64 65 document.forms[0].corporative_information_employeenumber.focus(); 65 66 return; … … 68 69 if (! validarCPF(document.forms[0].corporative_information_cpf.value) ) 69 70 { 70 alert( document.getElementById('cpf_field_invalid').value);71 alert("Campo CPF invalido."); 71 72 document.forms[0].corporative_information_cpf.focus(); 72 73 return; … … 77 78 document.forms[0].mail.value = document.forms[0].mail.value.toLowerCase(); 78 79 if (document.forms[0].mail.value == ''){ 79 alert( document.getElementById('email_field_empty').value);80 alert('Campo E-MAIL está vazio.'); 80 81 return; 81 82 } 82 83 var reEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 83 84 if(!reEmail.test(document.forms[0].mail.value)){ 84 alert( document.getElementById('email_field_not_valid').value);85 alert("Campo E-mail não é válido."); 85 86 return false; 86 87 } 87 88 88 89 //FIRSTNAME 89 if (document.forms[0].givenname.value == ''){90 alert(document.getElementById('first_name_empty').value);91 return;92 }93 var reGivenname = /^[a-zA-Z0-9 \-\.]+$/; 94 if(!reGivenname.test(document.forms[0].givenname.value)){95 alert( document.getElementById('first_name_not_valid').value);96 return false;97 } 90 var reGivenname = /^[a-zA-Z0-9 \-\.]+$/; 91 if(!reGivenname.test(document.forms[0].givenname.value)){ 92 alert('Primeiro Nome contém caracteres inválidos.'); 93 return false; 94 } 95 else if (document.forms[0].givenname.value == ''){ 96 alert('Campo PRIMEIRO NOME está vazio.'); 97 return; 98 } 98 99 99 100 //LASTNAME 100 if (document.forms[0].sn.value == ''){101 alert(document.getElementById('last_name_empty').value);102 return;103 }104 101 var reSn = /^[a-zA-Z0-9 \-\.]+$/; 105 102 if(!reSn.test(document.forms[0].sn.value)){ 106 alert(document.getElementById('last_name_not_valid').value); 107 return false; 103 alert('Último Nome contém caracteres inválidos.'); 104 return false; 105 } 106 else if (document.forms[0].sn.value == ''){ 107 alert('Campo ÚLTIMO NOME está vazio.'); 108 return; 108 109 } 109 110 … … 114 115 if (!reg_tel.exec(document.forms[0].telephonenumber.value)) 115 116 { 116 alert( document.getElementById('incorrect_telephone_field').value);117 alert('Campo Telefone incorreto.'); 117 118 return; 118 119 } … … 121 122 //FORWAR ONLY 122 123 if ((document.forms[0].deliverymode.checked) && (document.forms[0].mailforwardingaddress.value == '')){ 123 alert( document.getElementById('redirect_email_empty').value);124 alert('Campo E-MAIL DE ENCAMINHAMENTO está vazio.'); 124 125 return; 125 126 } … … 127 128 // Email Quota 128 129 if (document.forms[0].mailquota.value == ''){ 129 alert( document.getElementById('without_quota').value);130 alert('Usuário sem COTA.'); 130 131 return; 131 132 } … … 133 134 //GROUPS 134 135 if (document.getElementById('ea_select_user_groups').length < 1){ 135 alert( document.getElementById('no_group_selected').value);136 alert('Nenhum GRUPO selecionado.'); 136 137 return; 137 138 } … … 140 141 if (document.getElementById('tabcontent6').style.display != 'none'){ 141 142 if ((document.forms[0].sambalogonscript.value == '') && (!document.forms[0].sambalogonscript.disabled)){ 142 alert( document.getElementById('user_logon_script_empty').value);143 alert('Script de logon do usuário está vazio.'); 143 144 return; 144 145 } 145 146 if ((document.forms[0].sambahomedirectory.value == '') && (!document.forms[0].sambahomedirectory.disabled)){ 146 alert( document.getElementById('user_home_path_empty').value);147 alert('Diretório Home do usuário está vazio.'); 147 148 return; 148 149 } … … 215 216 alert(data.msg); 216 217 else 217 alert( document.getElementById('user_successfully_created').value);218 alert('Usuário criado com êxito!'); 218 219 219 220 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 234 235 } 235 236 else{ 236 alert( document.getElementById('user_successfully_saved').value);237 alert('Usuário salvo com êxito!!'); 237 238 } 238 239 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 457 458 alert(data.msg); 458 459 else 459 alert( document.getElementById('default_password_successfully_registered_cadastre').value);460 alert('Senha default cadastrada com êxito!!'); 460 461 return; 461 462 } … … 470 471 alert(data.msg); 471 472 else 472 alert( document.getElementById('user_password_returned_with_success').value);473 alert('Senha do usuário retornado com êxito!!'); 473 474 return; 474 475 } … … 478 479 function delete_user(uid, uidnumber) 479 480 { 480 if (confirm( document.getElementById('delete_the_user').value + " (" + uid + ")"))481 if (confirm("Realmente deseja deletar o usuário " + uid + " ??")) 481 482 { 482 483 var handler_delete_user = function(data) … … 485 486 alert(data.msg); 486 487 else 487 alert( document.getElementById('user_deleted_with_success').value);488 alert('Usuário deletado com êxito!!'); 488 489 489 490 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 501 502 var reUid = /^([a-zA-Z0-9_\-])+$/; 502 503 503 new_uid = prompt( document.getElementById('change_user_login').value + " (" + uid + ") " + document.getElementById('to').value, uid);504 new_uid = prompt("Alterar login do usuário " + uid + " para: ", uid); 504 505 505 506 if(!reUid.test(new_uid)){ 506 alert( document.getElementById('login_field_contains_not_allowed').value);507 alert('Campo LOGIN comtém caracteres não permitidos.'); 507 508 document.forms[0].account_lid.focus(); 508 509 return; … … 537 538 alert(data.msg); 538 539 else{ 539 alert( document.getElementById('user_renamed_success').value + "\n" + data.exec_return);540 alert("Usuário renomeado com êxito!\n" + data.exec_return); 540 541 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; 541 542 } … … 553 554 clearTimeout(finderTimeout_maillist); 554 555 var oWait = document.getElementById("ea_span_searching_maillist"); 555 oWait.innerHTML = document.getElementById('searching').value;556 oWait.innerHTML = 'Buscando...'; 556 557 finderTimeout_maillist = setTimeout("optionFinder_maillist('"+obj.id+"')",500); 557 558 } … … 587 588 clearTimeout(finderTimeout_group); 588 589 var oWait = document.getElementById("ea_span_searching_group"); 589 oWait.innerHTML = document.getElementById('searching').value;590 oWait.innerHTML = 'Buscando...'; 590 591 finderTimeout_group = setTimeout("optionFinder_group('"+obj.id+"')",500); 591 592 } … … 653 654 else{ 654 655 cExecute ('$this.user.write_log_from_ajax&_action='+action+'&userinfo='+uid, handler_write_log); 655 alert( document.getElementById('removed').value + data.inbox_size + document.getElementById('mb_from_the_user_mailbox').value);656 alert("Esvaziados '" + data.inbox_size + "' MB da caixa postal do usuário"); 656 657 document.getElementById('mailquota_used').value = data.mailquota_used; 657 658 }
Note: See TracChangeset
for help on using the changeset viewer.