Changeset 414 for trunk/expressoAdmin1_2/js/jscode
- Timestamp:
- 09/12/08 11:39:24 (16 years ago)
- Location:
- trunk/expressoAdmin1_2/js/jscode
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/js/jscode/expressoadmin.js
r379 r414 8 8 * option) any later version. * 9 9 \************************************************************************************/ 10 11 function load_lang(){ 12 cExecute ('$this/inc/load_lang', handler_load_lang); 13 } 14 15 var global_langs = new Array(); 16 17 function handler_load_lang(data) 18 { 19 global_langs = eval(data); 20 } 21 22 function get_lang(key_raw) 23 { 24 key = key_raw.replace(/ /g,"_"); 25 key = key.replace(/-/g,""); 26 lang = eval("global_langs."+key.toLowerCase()); 27 28 if (typeof(lang)=='undefined') 29 return key_raw + '*'; 30 else 31 return lang; 32 } 10 33 11 34 function emailSuggestion_expressoadmin(use_suggestion_in_logon_script, concatenateDomain) … … 141 164 campo.value = vr.substr( 0, tam - 1 ); 142 165 } 166 load_lang(); -
trunk/expressoAdmin1_2/js/jscode/groups.js
r309 r414 7 7 8 8 if (document.forms[0].cn.value == ''){ 9 alert( 'Campo NOME do grupo está vazio.');9 alert(get_lang('NAME field is empty') + '.'); 10 10 return; 11 11 } 12 12 13 13 if (document.forms[0].description.value == ''){ 14 alert( 'Campo DESCRIÇÃO está vazio.');14 alert(get_lang('DESCRIPTION field is empty') + '.'); 15 15 return; 16 16 } … … 21 21 if ( (cn_tmp.length < 3) || ((cn_tmp[0] != 'grupo') && (cn_tmp[0] != 'smb')) ){ 22 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 get_lang('NAME field is incomplete') + '.\n' + 24 get_lang('the name field must be formed like') + ':\n' + 25 get_lang('group') + '-' + get_lang('organization') + '-' + get_lang('group name') + '.\n' + 26 get_lang('eg') + ': ' + 'grupo-celepar-rh.'); 27 27 return; 28 28 } … … 33 33 34 34 if(!reCn.test(document.forms[0].cn.value)){ 35 alert( 'Campo NOME DO GRUPO comtém caracteres não permitidos.');35 alert(get_lang('NAME field contains characters not allowed') + '.'); 36 36 document.forms[0].cn.focus(); 37 37 return; … … 39 39 40 40 if(!reDesc.test(document.forms[0].description.value)){ 41 alert( 'Campo DESCRIÇÃO comtém caracteres não permitidos.');41 alert(get_lang('DESCRIPTION field contains characters not allowed') + '.'); 42 42 document.forms[0].description.focus(); 43 43 return; … … 47 47 if ( (document.forms[0].email.value != '') && (!reEmail.test(document.forms[0].email.value)) ) 48 48 { 49 alert( "Campo E-mail não é válido.");49 alert(get_lang('EMAIL field is empty') + '.'); 50 50 return false; 51 51 } … … 90 90 alert(data.msg); 91 91 else{ 92 alert( 'Grupo criado com êxito!');92 alert(get_lang('Group sucess created') + '.'); 93 93 location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; 94 94 } … … 107 107 alert(data.msg); 108 108 else{ 109 alert( 'Grupo salvo com êxito!!');109 alert(get_lang('Group sucess saved') + '.'); 110 110 location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; 111 111 } … … 156 156 if ((recursive) && (document.forms[0].ldap_context.value == document.getElementById('ea_combo_org_groups').value)) 157 157 { 158 alert( 'Nao é possível selecionar todos os usuários da organização raiz.')158 alert(get_lang('It is not allow select all users from the root organization') + '.'); 159 159 document.getElementById('ea_check_allUsers').checked = false; 160 160 … … 241 241 clearTimeout(finderTimeout); 242 242 var oWait = document.getElementById("ea_span_searching"); 243 oWait.innerHTML = 'Buscando...';243 oWait.innerHTML = get_lang('Searching') + '...'; 244 244 var finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); 245 245 } … … 270 270 function delete_group(cn, gidnumber) 271 271 { 272 if (confirm( "Realmente deletar Grupo "+ cn + " ??"))272 if (confirm(get_lang('Do you really want delete the group') + ' ' + cn + " ??")) 273 273 { 274 274 var handler_delete_group = function(data) … … 277 277 alert(data.msg); 278 278 else 279 alert( 'Grupo deletado com êxito!!');279 alert(get_lang('Group success deleted') + '.'); 280 280 281 281 location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; -
trunk/expressoAdmin1_2/js/jscode/maillists.js
r317 r414 4 4 document.forms[0].uid.value = document.forms[0].uid.value.toLowerCase(); 5 5 document.forms[0].old_uid.value = document.forms[0].old_uid.value.toLowerCase(); 6 6 7 7 if (document.forms[0].uid.value == ''){ 8 alert( 'Campo LOGIN da lista está vazio.');8 alert(get_lang('LOGIN field is empty') + '.'); 9 9 return; 10 10 } 11 11 12 12 if (document.forms[0].cn.value == ''){ 13 alert( 'Campo NOME da lista está vazio.');13 alert(get_lang('NAME field is empty') + '.'); 14 14 return; 15 15 } … … 20 20 if ((uid_tmp.length < 3) || (uid_tmp[0] != 'lista')){ 21 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 get_lang('LOGIN field is incomplete') + '.\n' + 23 get_lang('the login field must be formed like') + ':\n' + 24 get_lang('list') + '-' + get_lang('organization') + '-' + get_lang('listname') + '.\n' + 25 get_lang('eg') + ': ' + 'lista-celepar-rh.'); 26 26 return; 27 27 } … … 29 29 30 30 if (document.forms[0].uid.value.split(" ").length > 1){ 31 alert( 'Campo LOGIN comtém espaços.');31 alert(get_lang('LOGIN field contains characters not allowed') + '.'); 32 32 document.forms[0].uid.focus(); 33 33 return; … … 35 35 36 36 if (document.forms[0].mail.value == ''){ 37 alert( 'Campo E-MAIL da lista está vazio.');37 alert(get_lang('EMAIL field is empty') + '.'); 38 38 document.forms[0].mail.focus(); 39 39 return; … … 41 41 var reEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 42 42 if(!reEmail.test(document.forms[0].mail.value)){ 43 alert( "Campo E-mail não é válido.");43 alert(get_lang('Email field is not valid') + '.'); 44 44 return false; 45 45 } … … 47 47 select_userInMaillist = document.getElementById('ea_select_usersInMaillist'); 48 48 if (select_userInMaillist.options.length == 0){ 49 alert( 'Nenhum usuário faz parte da lista.');49 alert(get_lang('Any user is in the list') + '.'); 50 50 return; 51 51 } … … 95 95 alert(data.msg); 96 96 else{ 97 alert( 'Lista de emails criada com êxito!');97 alert(get_lang('Email list sucess created') + '.'); 98 98 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 99 99 } … … 112 112 alert(data.msg); 113 113 else{ 114 alert( 'Lista de emails salva com êxito!!');114 alert(get_lang('Email list sucess saved') + '.'); 115 115 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 116 116 } … … 137 137 alert(data.msg); 138 138 else 139 alert( 'Sending Control List salva com êxito!!');139 alert(get_lang('SCL sucess saved') + '.'); 140 140 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 141 141 return; … … 185 185 if ((recursive) && (document.forms[0].ldap_context.value == document.getElementById('ea_combo_org_maillists').value)) 186 186 { 187 alert( 'Nao é possível selecionar todos os usuários da organização raiz.')187 alert(get_lang('It is not allow select all users from the root organization') + '.'); 188 188 document.getElementById('ea_check_allUsers').checked = false; 189 189 … … 325 325 clearTimeout(finderTimeout); 326 326 var oWait = document.getElementById("ea_span_searching"); 327 oWait.innerHTML = 'Buscando...';327 oWait.innerHTML = get_lang('Searching') + '...'; 328 328 finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); 329 329 } … … 358 358 function delete_maillist(uid, uidnumber) 359 359 { 360 if (confirm("Realmente deletar Lista " + uid + " ??")) 360 if (confirm(get_lang('Do you really want delete the email list') + ' ' + uid + " ??")) 361 361 362 { 362 363 var handler_delete_maillist = function(data) … … 365 366 alert(data.msg); 366 367 else 367 alert( 'Lista de email deletada com êxito!!');368 alert(get_lang('Email list success deleted') + '.'); 368 369 369 370 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; -
trunk/expressoAdmin1_2/js/jscode/managers.js
r317 r414 2 2 function copy_manager(manager) 3 3 { 4 if (!(new_manager = prompt( "Digite o login do novo gerente:","")))4 if (!(new_manager = prompt(get_lang('Type new managers login') + ':',""))) 5 5 { 6 6 return; … … 12 12 location.reload(); 13 13 else 14 alert( 'Erro ao copiar gerente.');14 alert(get_lang('Error at copy manager') + '.'); 15 15 } 16 16 cExecute ('$this.db_functions.copy_manager&manager='+manager+'&new_manager='+new_manager, handler_copy_manager); -
trunk/expressoAdmin1_2/js/jscode/users.js
r355 r414 8 8 9 9 if (document.forms[0].uid.value == ''){ 10 alert( 'Campo LOGIN está vazio.');10 alert(get_lang('LOGIN field is empty') + '.'); 11 11 return; 12 12 } 13 13 else if (document.forms[0].uid.value.length < document.forms[0].minimumSizeLogin.value){ 14 alert( 'Campo LOGIN deve ter mais que '+document.forms[0].minimumSizeLogin.value+' caracteres.');14 alert(get_lang('LOGIN field must be bigger than') + ' ' + document.forms[0].minimumSizeLogin.value + ' ' + get_lang('characters') + '.'); 15 15 return; 16 16 } … … 22 22 var reUid = /^([a-zA-Z0-9_\-])+$/; 23 23 if(!reUid.test(document.forms[0].uid.value)){ 24 alert('Campo LOGIN comtém caracteres não permitidos.'); 25 document.forms[0].account_lid.focus(); 24 alert(get_lang('LOGIN field contains characters not allowed') + '.'); 26 25 return; 27 26 } … … 29 28 //PASSWORD's 30 29 if (document.forms[0].password1.value == ''){ 31 alert( 'Campo SENHA está vazio.');30 alert(get_lang('Password field is empty') + '.'); 32 31 return; 33 32 } 34 33 if (document.forms[0].password2.value == ''){ 35 alert( 'Campo RE-SENHA está vazio.');34 alert(get_lang('Re-Password field is empty') + '.'); 36 35 return; 37 36 } … … 39 38 40 39 if (document.forms[0].password1.value != document.forms[0].password2.value){ 41 alert( 'Campo SENHA e RE-SENHA são diferentes.');40 alert(get_lang('Password and Re-Password are different') + '.'); 42 41 return; 43 42 } … … 50 49 if(!re_employeenumber.test(document.forms[0].corporative_information_employeenumber.value)) 51 50 { 52 alert( 'Campo matrícula contém caracteres não permitidos. Somente números são permitidos.');51 alert(get_lang('EmployeeNumber contains characters not allowed') + '. ' + get_lang('Only numbers are allowed') + '.'); 53 52 document.forms[0].corporative_information_employeenumber.focus(); 54 53 return; … … 56 55 } 57 56 58 /* Validation cpf is in php now.59 /*60 if (document.forms[0].corporative_information_cpf.value != "")61 {62 var re_cpf = /^([0-9])+$/;63 64 if(!re_cpf.test(document.forms[0].corporative_information_cpf.value))65 {66 alert('Campo cpf contém caracteres não permitidos. Somente números são permitidos');67 document.forms[0].corporative_information_employeenumber.focus();68 return;69 }70 71 if (! validarCPF(document.forms[0].corporative_information_cpf.value) )72 {73 alert("Campo CPF invalido.");74 document.forms[0].corporative_information_cpf.focus();75 return;76 }77 }*/78 79 57 //MAIL 80 58 document.forms[0].mail.value = document.forms[0].mail.value.toLowerCase(); 81 59 if (document.forms[0].mail.value == ''){ 82 alert( 'Campo E-MAIL está vazio.');60 alert(get_lang('Email field is empty') + '.'); 83 61 return; 84 62 } 85 63 var reEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 86 64 if(!reEmail.test(document.forms[0].mail.value)){ 87 alert( "Campo E-mail não é válido.");65 alert(get_lang('Email field is not valid') + '.'); 88 66 return false; 89 67 } … … 92 70 var reGivenname = /^[a-zA-Z0-9 \-\.]+$/; 93 71 if(!reGivenname.test(document.forms[0].givenname.value)){ 94 alert( 'Primeiro Nome contém caracteres inválidos.');72 alert(get_lang('First name field contains characters not allowed') + '.'); 95 73 return false; 96 74 } 97 75 else if (document.forms[0].givenname.value == ''){ 98 alert( 'Campo PRIMEIRO NOME está vazio.');76 alert(get_lang('First name field is empty') + '.'); 99 77 return; 100 78 } … … 103 81 var reSn = /^[a-zA-Z0-9 \-\.]+$/; 104 82 if(!reSn.test(document.forms[0].sn.value)){ 105 alert( 'Último Nome contém caracteres inválidos.');83 alert(get_lang('Last name field contains characters not allowed') + '.'); 106 84 return false; 107 85 } 108 86 else if (document.forms[0].sn.value == ''){ 109 alert( 'Campo ÚLTIMO NOME está vazio.');87 alert(get_lang('Last name field is empty') + '.'); 110 88 return; 111 89 } … … 117 95 if (!reg_tel.exec(document.forms[0].telephonenumber.value)) 118 96 { 119 alert( 'Campo Telefone incorreto.');97 alert(get_lang('Phone field is incorrect') + '.'); 120 98 return; 121 99 } … … 124 102 //FORWAR ONLY 125 103 if ((document.forms[0].deliverymode.checked) && (document.forms[0].mailforwardingaddress.value == '')){ 126 alert( 'Campo E-MAIL DE ENCAMINHAMENTO está vazio.');104 alert(get_lang('Forward email is empty') + '.'); 127 105 return; 128 106 } … … 130 108 // Email Quota 131 109 if (document.forms[0].mailquota.value == ''){ 132 alert( 'Usuário sem COTA.');110 alert(get_lang('User without email quota') + '.'); 133 111 return; 134 112 } … … 136 114 //GROUPS 137 115 if (document.getElementById('ea_select_user_groups').length < 1){ 138 alert( 'Nenhum GRUPO selecionado.');116 alert(get_lang('User is not in any group') + '.'); 139 117 return; 140 118 } … … 143 121 if (document.getElementById('tabcontent6').style.display != 'none'){ 144 122 if ((document.forms[0].sambalogonscript.value == '') && (!document.forms[0].sambalogonscript.disabled)){ 145 alert( 'Script de logon do usuário está vazio.');123 alert(get_lang('Logon script is empty') + '.'); 146 124 return; 147 125 } 148 126 if ((document.forms[0].sambahomedirectory.value == '') && (!document.forms[0].sambahomedirectory.disabled)){ 149 alert( 'Diretório Home do usuário está vazio.');127 alert(get_lang('Users home directory is empty') + '.'); 150 128 return; 151 129 } … … 187 165 document.getElementById('mailforwardingaddress').disabled = false; 188 166 document.getElementById('mailalternateaddress').disabled = false; 167 document.getElementById('passwd_expired').disabled = false; 189 168 document.getElementById('accountstatus').disabled = false; 190 169 document.getElementById('deliverymode').disabled = false; … … 225 204 alert(data.msg); 226 205 else 227 alert( 'Usuário criado com êxito!');206 alert(get_lang('User sucess created') + '.'); 228 207 229 208 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 244 223 } 245 224 else{ 246 alert( 'Usuário salvo com êxito!!');225 alert(get_lang('User sucess saved') + '.'); 247 226 } 248 227 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 467 446 alert(data.msg); 468 447 else 469 alert( 'Senha default cadastrada com êxito!!');448 alert(get_lang('Default password sucess saved') + '.'); 470 449 return; 471 450 } … … 480 459 alert(data.msg); 481 460 else 482 alert( 'Senha do usuário retornado com êxito!!');461 alert(get_lang('Users password sucess returned') + '.'); 483 462 return; 484 463 } … … 488 467 function delete_user(uid, uidnumber) 489 468 { 490 if (confirm( "Realmente deseja deletar o usuário " + uid + " ??"))469 if (confirm(get_lang("Do you really want delete the user") + " " + uid + "?")) 491 470 { 492 471 var handler_delete_user = function(data) … … 495 474 alert(data.msg); 496 475 else 497 alert( 'Usuário deletado com êxito!!');476 alert(get_lang('User sucess deleted') + '.'); 498 477 499 478 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 511 490 var reUid = /^([a-zA-Z0-9_\-])+$/; 512 491 513 new_uid = prompt( "Alterar login do usuário " + uid + " para: ", uid);492 new_uid = prompt(get_lang('Rename users login from') + ': ' + uid + " " + get_lang("to") + ': ', uid); 514 493 515 494 if(!reUid.test(new_uid)){ 516 alert( 'Campo LOGIN comtém caracteres não permitidos.');495 alert(get_lang('LOGIN field contains characters not allowed') + '.'); 517 496 document.forms[0].account_lid.focus(); 518 497 return; … … 547 526 alert(data.msg); 548 527 else{ 549 alert( "Usuário renomeado com êxito!\n" + data.exec_return);528 alert(get_lang('User login sucess renamed') + "\n" + data.exec_return); 550 529 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; 551 530 } … … 563 542 clearTimeout(finderTimeout_maillist); 564 543 var oWait = document.getElementById("ea_span_searching_maillist"); 565 oWait.innerHTML = 'Buscando...';544 oWait.innerHTML = get_lang('Searching') + '...'; 566 545 finderTimeout_maillist = setTimeout("optionFinder_maillist('"+obj.id+"')",500); 567 546 } … … 597 576 clearTimeout(finderTimeout_group); 598 577 var oWait = document.getElementById("ea_span_searching_group"); 599 oWait.innerHTML = 'Buscando...';578 oWait.innerHTML = get_lang('Searching') + '...'; 600 579 finderTimeout_group = setTimeout("optionFinder_group('"+obj.id+"')",500); 601 580 } … … 655 634 function empty_inbox(uid) 656 635 { 657 var action = "Limpado INBOX do usuario";636 var action = get_lang('Cleanned user mailbox'); 658 637 var handler_write_log = function(){} 659 638 var handler_empty_inbox = function(data) … … 663 642 else{ 664 643 cExecute ('$this.user.write_log_from_ajax&_action='+action+'&userinfo='+uid, handler_write_log); 665 alert( "Esvaziados '" + data.inbox_size + "' MB da caixa postal do usuário");644 alert(get_lang('Emptied ') + data.inbox_size + ' ' + get_lang('MB from user inbox')); 666 645 document.getElementById('mailquota_used').value = data.mailquota_used; 667 646 } … … 702 681 } 703 682 704 /*705 function search_organization(key)706 {707 var organizations = document.getElementById('ea_combo_org_info');708 var RegExp_org = new RegExp("\\b"+key, "i");709 710 for(i = 0; i < organizations.length; i++)711 {712 if (RegExp_org.test(organizations[i].text))713 {714 organizations[i].selected = true;715 return;716 }717 }718 }*/719 720 683 function search_organization(key, element) 721 684 {
Note: See TracChangeset
for help on using the changeset viewer.