Changeset 2712
- Timestamp:
- 05/05/10 15:52:35 (14 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.functions.inc.php
r1913 r2712 416 416 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 417 417 ldap_bind($ldap_conn,$dn,$passwd); 418 418 419 $sort = array( ); 419 420 if ($type == 'accounts') 420 421 { -
trunk/expressoAdmin1_2/inc/class.group.inc.php
r587 r2712 34 34 function validate_fields($params) 35 35 { 36 return $this->ldap_functions->validate_fields_group($params);36 return serialize( $this->ldap_functions->validate_fields_group($params) ); 37 37 } 38 38 -
trunk/expressoAdmin1_2/inc/class.maillist.inc.php
r585 r2712 35 35 function validate_fields($params) 36 36 { 37 return $this->ldap_functions->validate_fields_maillist($params);37 return serialize( $this->ldap_functions->validate_fields_maillist($params) ); 38 38 } 39 39 -
trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php
r2604 r2712 357 357 $script .= '</script>'; 358 358 359 echo "<style>{$this -> css( )}</style>"; 359 360 echo $script; 360 361 -
trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php
r2459 r2712 41 41 $GLOBALS['phpgw']->js->validate_file('jscode','expressoadmin','expressoAdmin1_2'); 42 42 $GLOBALS['phpgw']->js->validate_file('jscode','maillists','expressoAdmin1_2'); 43 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script_thirst' ] .= "<script>var expressoAdmin_controller = '{$GLOBALS[ 'phpgw' ] -> link( '/expressoAdmin1_2/controller.php' )}?action=';</script>"; 43 44 } 44 45 … … 167 168 function add_maillists() 168 169 { 169 $GLOBALS['phpgw']->js->set_onload('get_available_users(document.forms[0].org_context.value, document.forms[0].ea_check_allUsers.checked);');170 171 170 $manager_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 172 171 $manager_acl = $this->functions->read_acl($manager_lid); … … 210 209 $p->set_var($var); 211 210 $p->set_var($this->functions->make_dinamic_lang($p, 'body')); 211 212 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .= "<script>get_available_users(document.forms[0].org_context.value, document.forms[0].ea_check_allUsers.checked);</script>"; 212 213 $p->pfp('out','create_maillist'); 213 214 } -
trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php
r2707 r2712 126 126 $p->set_var($var); 127 127 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script_thirst' ] .= "<script>var expressoAdmin_controller = '{$GLOBALS[ 'phpgw' ] -> link( '/expressoAdmin1_2/controller.php' )}?action=';</script>"; 128 //echo "<script>var expressoAdmin_controller = '{$GLOBALS[ 'phpgw' ] -> link( '/controller.php' )}?action=';</script>" . $GLOBALS['phpgw']->js->get_script_links( );129 128 $p->pfp('out','body'); 130 129 } … … 152 151 // Seta variaveis javascript necessárias 153 152 $webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url']; 154 $scripts_java = '<script type="text/javascript" src="'.$webserver_url.'/expressoAdmin1_2/js/jscode/expressoadmin.js"></script>';155 153 156 154 // App, create list of available apps … … 206 204 } 207 205 } 208 206 207 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script_thirst' ] .= "<script>var expressoAdmin_controller = '{$GLOBALS[ 'phpgw' ] -> link( '/expressoAdmin1_2/controller.php' )}?action=';</script>"; 209 208 echo $p->fp('out','form'); 210 209 } -
trunk/expressoAdmin1_2/js/jscode/expressoadmin.js
r2707 r2712 9 9 \************************************************************************************/ 10 10 11 function load_lang(){ 12 _controller.cache( ).go( { 13 "access" : "$this/inc/load_lang", 14 "handler" : function( data ) 15 { 16 handler_load_lang( expresso.connector.unserialize( data ) ); 17 } 18 } ); 19 } 11 ExpressoLivre.lang( 'expressoAdmin1_2' ); 20 12 21 13 var global_langs = new Array(); 22 14 var emailSugestion = 1; 23 15 24 function handler_load_lang(data) 25 { 26 global_langs = eval(data); 27 } 28 29 function get_lang(key_raw) 30 { 31 key = key_raw.replace(/ /g,"_"); 32 key = key.replace(/-/g,""); 33 lang = eval("global_langs."+key.toLowerCase()); 34 16 function get_lang( key ) 17 { 18 var lang = array_lang[ key.toLowerCase( ) ]; 19 35 20 if (typeof(lang)=='undefined') 36 return key _raw+ '*';21 return key + '*'; 37 22 else 38 23 return lang; … … 229 214 campo.value = vr.substr( 0, tam - 1 ); 230 215 } 231 load_lang(); -
trunk/expressoAdmin1_2/js/jscode/groups.js
r640 r2712 7 7 8 8 if (document.forms[0].cn.value == ''){ 9 alert( get_lang('NAME field is empty') + '.');9 alert( ExpressoLivre.translate( 'NAME field is empty' ) + '.'); 10 10 return; 11 11 } 12 12 13 13 if (document.forms[0].description.value == ''){ 14 alert( get_lang('DESCRIPTION field is empty') + '.');14 alert( ExpressoLivre.translate( '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 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.');23 ExpressoLivre.translate( 'NAME field is incomplete' ) + '.\n' + 24 ExpressoLivre.translate( 'the name field must be formed like' ) + ':\n' + 25 ExpressoLivre.translate( 'group' ) + '-' + ExpressoLivre.translate( 'organization' ) + '-' + ExpressoLivre.translate( 'group name' ) + '.\n' + 26 ExpressoLivre.translate( 'eg' ) + ': ' + 'grupo-celepar-rh.'); 27 27 return; 28 28 } … … 33 33 34 34 if(!reCn.test(document.forms[0].cn.value)){ 35 alert( get_lang('NAME field contains characters not allowed') + '.');35 alert( ExpressoLivre.translate( '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( get_lang('DESCRIPTION field contains characters not allowed') + '.');41 alert( ExpressoLivre.translate( '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( get_lang('EMAIL field is empty') + '.');49 alert( ExpressoLivre.translate( 'EMAIL field is empty' ) + '.'); 50 50 return false; 51 51 } … … 53 53 var handler_validate_fields = function(data) 54 54 { 55 data = expresso.connector.unserialize( data.trim( ) ); 55 56 if (!data.status) 56 57 alert(data.msg); … … 71 72 // O CN do grupo foi alterado ou é um novo grupo. 72 73 if ((document.forms[0].old_cn.value != document.forms[0].cn.value) || (type == 'create_group')){ 73 cExecute ('$this.group.validate_fields&cn='+document.forms[0].cn.value, handler_validate_fields); 74 ExpressoLivre.go( { 75 "access" : 'expressoAdmin1_2.group.validate_fields&cn='+document.forms[0].cn.value, 76 "handler" : handler_validate_fields 77 } ); 74 78 } 75 79 else if (type == 'edit_group') … … 90 94 alert(data.msg); 91 95 else{ 92 alert( get_lang('Group successful created') + '.');96 alert( ExpressoLivre.translate( 'Group successful created' ) + '.'); 93 97 location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; 94 98 } … … 107 111 alert(data.msg); 108 112 else{ 109 alert( get_lang('Group successful saved') + '.');113 alert( ExpressoLivre.translate( 'Group successful saved' ) + '.'); 110 114 location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; 111 115 } … … 156 160 if ((recursive) && (document.forms[0].ldap_context.value == document.getElementById('ea_combo_org_groups').value)) 157 161 { 158 alert( get_lang('It is not allow select all users from the root organization') + '.');162 alert( ExpressoLivre.translate( 'It is not allow select all users from the root organization' ) + '.'); 159 163 document.getElementById('ea_check_allUsers').checked = false; 160 164 … … 165 169 return; 166 170 } 167 cExecute ('$this.ldap_functions.get_available_users&context='+context+'&recursive='+recursive, handler_get_available_users); 171 ExpressoLivre.go( { 172 "access" : 'expressoAdmin1_2.ldap_functions.get_available_users&context='+escape(context)+'&recursive='+recursive, 173 "handler" : handler_get_available_users 174 } ); 168 175 } 169 176 … … 241 248 clearTimeout(finderTimeout); 242 249 var oWait = document.getElementById("ea_span_searching"); 243 oWait.innerHTML = get_lang('Searching') + '...';250 oWait.innerHTML = ExpressoLivre.translate( 'Searching' ) + '...'; 244 251 var finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); 245 252 } … … 270 277 function delete_group(cn, gidnumber) 271 278 { 272 if (confirm( get_lang('Do you really want delete the group') + ' ' + cn + " ??"))279 if (confirm( ExpressoLivre.translate( 'Do you really want delete the group' ) + ' ' + cn + " ??")) 273 280 { 274 281 var handler_delete_group = function(data) … … 277 284 alert(data.msg); 278 285 else 279 alert( get_lang('Group success deleted') + '.');286 alert( ExpressoLivre.translate( 'Group success deleted' ) + '.'); 280 287 281 288 location.href="./index.php?menuaction=expressoAdmin1_2.uigroups.list_groups"; -
trunk/expressoAdmin1_2/js/jscode/institutional_accounts.js
r2707 r2712 24 24 { 25 25 close_lightbox(); 26 write_msg( get_lang('Institutional account successful created') + '.', 'normal');26 write_msg( ExpressoLivre.translate( 'Institutional account successful created' ) + '.', 'normal'); 27 27 } 28 28 return; … … 101 101 clearTimeout(finderTimeout); 102 102 var oWait = Element("ea_span_searching"); 103 oWait.innerHTML = get_lang('searching') + '...';103 oWait.innerHTML = ExpressoLivre.translate( 'searching' ) + '...'; 104 104 finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); 105 105 } … … 188 188 function get_institutional_accounts_timeOut(input) 189 189 { 190 var head_table = '<table border="0" width="90%"><tr bgcolor="#d3dce3"><td width="30%">'+ get_lang("full name")+'</td><td width="30%">'+get_lang("mail")+'</td><td width="5%" align="center">'+get_lang("remove")+'</td></tr></table>';190 var head_table = '<table border="0" width="90%"><tr bgcolor="#d3dce3"><td width="30%">'+ ExpressoLivre.translate( "full name" )+'</td><td width="30%">'+ ExpressoLivre.translate( "mail" )+'</td><td width="5%" align="center">'+ ExpressoLivre.translate( "remove" )+'</td></tr></table>'; 191 191 192 192 if (input.length > 4) … … 208 208 if (data.status == 'true') 209 209 { 210 var table = '<table border="0" width="90%"><tr bgcolor="#d3dce3"><td width="30%">'+ get_lang("full name")+'</td><td width="30%">'+get_lang("mail")+'</td><td width="5%" align="center">'+get_lang("remove")+'</td></tr>'+data.trs+'</table>';210 var table = '<table border="0" width="90%"><tr bgcolor="#d3dce3"><td width="30%">'+ ExpressoLivre.translate( "full name" )+'</td><td width="30%">'+ ExpressoLivre.translate( "mail" )+'</td><td width="5%" align="center">'+ ExpressoLivre.translate( "remove" )+'</td></tr>'+data.trs+'</table>'; 211 211 Element('institutional_accounts_content').innerHTML = table; 212 212 } … … 293 293 get_institutional_accounts(Element('ea_institutional_account_search').value); 294 294 close_lightbox(); 295 write_msg( get_lang('Institutional account successful saved') + '.', 'normal');295 write_msg( ExpressoLivre.translate( 'Institutional account successful saved' ) + '.', 'normal'); 296 296 } 297 297 return; … … 300 300 function delete_institutional_accounts(uid) 301 301 { 302 if (!confirm( get_lang('Are you sure that you want to delete this institutional account') + "?"))302 if (!confirm( ExpressoLivre.translate( 'Are you sure that you want to delete this institutional account' ) + "?")) 303 303 return; 304 304 … … 311 311 else 312 312 { 313 write_msg( get_lang('Institutional account successful deleted') + '.', 'normal');313 write_msg( ExpressoLivre.translate( 'Institutional account successful deleted' ) + '.', 'normal'); 314 314 get_institutional_accounts(Element('ea_institutional_account_search').value); 315 315 } -
trunk/expressoAdmin1_2/js/jscode/maillists.js
r482 r2712 6 6 7 7 if (document.forms[0].uid.value == ''){ 8 alert( get_lang('login field is empty') + '.');8 alert( ExpressoLivre.translate( 'login field is empty' ) + '.'); 9 9 return; 10 10 } 11 11 12 12 if (document.forms[0].cn.value == ''){ 13 alert( get_lang('name field is empty') + '.');13 alert( ExpressoLivre.translate( 'name field is empty' ) + '.'); 14 14 return; 15 15 } … … 20 20 if ((uid_tmp.length < 3) || (uid_tmp[0] != 'lista')){ 21 21 alert( 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.');22 ExpressoLivre.translate( 'login field is incomplete' ) + '.\n' + 23 ExpressoLivre.translate( 'the login field must be formed like' ) + ':\n' + 24 ExpressoLivre.translate( 'list' ) + '-' + ExpressoLivre.translate( 'organization' ) + '-' + ExpressoLivre.translate( 'listname' ) + '.\n' + 25 ExpressoLivre.translate( 'eg' ) + ': ' + 'lista-celepar-rh.'); 26 26 return; 27 27 } … … 29 29 30 30 if (document.forms[0].uid.value.split(" ").length > 1){ 31 alert( get_lang('LOGIN field contains characters not allowed') + '.');31 alert( ExpressoLivre.translate( '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( get_lang('EMAIL field is empty') + '.');37 alert( ExpressoLivre.translate( '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( get_lang('Email field is not valid') + '.');43 alert( ExpressoLivre.translate( '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( get_lang('Any user is in the list') + '.');49 alert( ExpressoLivre.translate( 'Any user is in the list' ) + '.'); 50 50 return; 51 51 } … … 53 53 var handler_validate_fields = function(data) 54 54 { 55 data = expresso.connector.unserialize( data.trim( ) ); 55 56 if (!data.status) 56 57 alert(data.msg); … … 76 77 // O UID da lista foi alterado ou é uma nova lista. 77 78 if ((document.forms[0].old_uid.value != document.forms[0].uid.value) || (type == 'create_maillist')){ 78 cExecute ('$this.maillist.validate_fields&uid='+document.forms[0].uid.value+'&mail='+document.forms[0].mail.value, handler_validate_fields); 79 ExpressoLivre.go( { 80 "access" : 'expressoAdmin1_2.maillist.validate_fields&uid='+document.forms[0].uid.value+'&mail='+document.forms[0].mail.value, 81 "handler" : handler_validate_fields 82 } ); 79 83 } 80 84 else if (type == 'edit_maillist') … … 95 99 alert(data.msg); 96 100 else{ 97 alert( get_lang('Email list successful created') + '.');101 alert( ExpressoLivre.translate( 'Email list successful created' ) + '.'); 98 102 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 99 103 } … … 109 113 function return_handler_save(data) 110 114 { 115 alert( data ); 111 116 if (!data.status) 112 117 alert(data.msg); 113 118 else{ 114 alert( get_lang('Email list successful saved') + '.');119 alert( ExpressoLivre.translate( 'Email list successful saved' ) + '.'); 115 120 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 116 121 } … … 137 142 alert(data.msg); 138 143 else 139 alert( get_lang('SCL successful saved') + '.');144 alert( ExpressoLivre.translate( 'SCL successful saved' ) + '.'); 140 145 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 141 146 return; … … 181 186 } 182 187 } 183 188 184 189 //Impede chamada recursiva na raiz das organizações 185 190 if ((recursive) && (document.forms[0].ldap_context.value == document.getElementById('ea_combo_org_maillists').value)) 186 191 { 187 alert( get_lang('It is not allow select all users from the root organization') + '.');192 alert( ExpressoLivre.translate( 'It is not allow select all users from the root organization' ) + '.'); 188 193 document.getElementById('ea_check_allUsers').checked = false; 189 194 190 195 // Limpa select 191 196 select_available_users = document.getElementById('ea_select_available_users'); … … 194 199 return; 195 200 } 196 cExecute ('$this.ldap_functions.get_available_users_and_maillist&context='+context+'&recursive='+recursive+'&denied_uidnumber='+document.forms[0].uidnumber.value, handler_get_available_users); 201 ExpressoLivre.go( { 202 "access" : 'expressoAdmin1_2.ldap_functions.get_available_users_and_maillist&context='+escape(context)+'&recursive='+recursive+'&denied_uidnumber='+document.forms[0].uidnumber.value, 203 "handler" : handler_get_available_users 204 } ); 197 205 } 198 206 … … 325 333 clearTimeout(finderTimeout); 326 334 var oWait = document.getElementById("ea_span_searching"); 327 oWait.innerHTML = get_lang('Searching') + '...';335 oWait.innerHTML = ExpressoLivre.translate( 'Searching' ) + '...'; 328 336 finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); 329 337 } … … 358 366 function delete_maillist(uid, uidnumber) 359 367 { 360 if (confirm( get_lang('Do you really want delete the email list') + ' ' + uid + " ??"))368 if (confirm( ExpressoLivre.translate( 'Do you really want delete the email list' ) + ' ' + uid + " ??")) 361 369 362 370 { … … 366 374 alert(data.msg); 367 375 else 368 alert( get_lang('Email list successful deleted') + '.');376 alert( ExpressoLivre.translate( 'Email list successful deleted' ) + '.'); 369 377 370 378 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; … … 414 422 for (x in array_dn) 415 423 { 424 if ( array_dn[ x ].constructor == Function ) 425 continue; 426 416 427 var tmp = array_dn[x].split("="); 417 428 ufn += tmp[1] + '.'; -
trunk/expressoAdmin1_2/js/jscode/managers.js
r2030 r2712 2 2 function copy_manager(manager) 3 3 { 4 if (!(new_manager = prompt( get_lang('Type new managers login') + ':',"")))4 if (!(new_manager = prompt( ExpressoLivre.translate( 'Type new managers login' ) + ':',""))) 5 5 { 6 6 return; … … 12 12 location.reload(); 13 13 else 14 alert( get_lang('Error at copy manager') + '.');14 alert( ExpressoLivre.translate( 'Error at copy manager' ) + '.'); 15 15 } 16 16 cExecute ('$this.db_functions.copy_manager&manager='+manager+'&new_manager='+new_manager, handler_copy_manager); … … 26 26 if (new_context_value.indexOf(children[i].value) != -1) 27 27 { 28 document.getElementById("ea_spam_warn").innerHTML = get_lang('Context already added or redundant') + '.';28 document.getElementById("ea_spam_warn").innerHTML = ExpressoLivre.translate( 'Context already added or redundant' ) + '.'; 29 29 setTimeout("document.getElementById(\"ea_spam_warn\").innerHTML = ' '", 4000); 30 30 return; … … 35 35 children[i].parentNode.parentNode.removeChild(children[i].parentNode); 36 36 --i; 37 document.getElementById("ea_spam_warn").innerHTML = get_lang('Removed context redundant') + '.';37 document.getElementById("ea_spam_warn").innerHTML = ExpressoLivre.translate( 'Removed context redundant' ) + '.'; 38 38 setTimeout("document.getElementById(\"ea_spam_warn\").innerHTML = ' '", 4000); 39 39 } … … 103 103 { 104 104 if (data.type == 'create') 105 alert( get_lang('User successful created') + '.');105 alert( ExpressoLivre.translate( 'User successful created' ) + '.'); 106 106 else 107 alert( get_lang('Manager successful saved') + '.');107 alert( ExpressoLivre.translate( 'Manager successful saved' ) + '.'); 108 108 } 109 109 location.href="./index.php?menuaction=expressoAdmin1_2.uimanagers.list_managers"; … … 118 118 var spam = document.getElementById('ea_span_searching_manager'); 119 119 if (manager_lid.length <= 3) 120 spam.innerHTML = get_lang('Type more') + ' ' + (4 - manager_lid.length) + ' ' + 'letters' + '.';120 spam.innerHTML = ExpressoLivre.translate( 'Type more' ) + ' ' + (4 - manager_lid.length) + ' ' + 'letters' + '.'; 121 121 else 122 122 { 123 spam.innerHTML = get_lang('Searching') + '...';123 spam.innerHTML = ExpressoLivre.translate( 'Searching' ) + '...'; 124 124 searchTimeout = setTimeout("search_user('"+manager_lid+"')",750); 125 125 } -
trunk/expressoAdmin1_2/js/jscode/users.js
r2604 r2712 8 8 9 9 if (document.forms[0].uid.value == ''){ 10 alert( get_lang('LOGIN field is empty')+ '.');10 alert( ExpressoLivre.translate( '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( get_lang('LOGIN field must be bigger than') + ' ' + document.forms[0].minimumSizeLogin.value + ' ' + get_lang('characters')+ '.');14 alert( ExpressoLivre.translate( 'LOGIN field must be bigger than' ) + ' ' + document.forms[0].minimumSizeLogin.value + ' ' + ExpressoLivre.translate( '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( get_lang('LOGIN field contains characters not allowed')+ '.');24 alert( ExpressoLivre.translate( 'LOGIN field contains characters not allowed' ) + '.'); 25 25 return; 26 26 } … … 28 28 //PASSWORD's 29 29 if (document.forms[0].password1.value == ''){ 30 alert( get_lang('Password field is empty')+ '.');30 alert( ExpressoLivre.translate( 'Password field is empty' ) + '.'); 31 31 return; 32 32 } 33 33 if (document.forms[0].password2.value == ''){ 34 alert( get_lang('repassword field is empty')+ '.');34 alert( ExpressoLivre.translate( 'repassword field is empty' ) + '.'); 35 35 return; 36 36 } … … 38 38 39 39 if (document.forms[0].password1.value != document.forms[0].password2.value){ 40 alert( get_lang('password and repassword are different')+ '.');40 alert( ExpressoLivre.translate( 'password and repassword are different' ) + '.'); 41 41 return; 42 42 } … … 49 49 if(!re_employeenumber.test(document.forms[0].corporative_information_employeenumber.value)) 50 50 { 51 alert( get_lang('EmployeeNumber contains characters not allowed') + '. ' + get_lang('Only numbers are allowed')+ '.');51 alert( ExpressoLivre.translate( 'EmployeeNumber contains characters not allowed' ) + '. ' + ExpressoLivre.translate( 'Only numbers are allowed' ) + '.'); 52 52 document.forms[0].corporative_information_employeenumber.focus(); 53 53 return; … … 58 58 document.forms[0].mail.value = document.forms[0].mail.value.toLowerCase(); 59 59 if (document.forms[0].mail.value == ''){ 60 alert( get_lang('Email field is empty')+ '.');60 alert( ExpressoLivre.translate( 'Email field is empty' ) + '.'); 61 61 return; 62 62 } 63 63 var reEmail = /^([a-zA-Z0-9_\-])+(\.[a-zA-Z0-9_\-]+)*\@([a-zA-Z0-9_\-])+(\.[a-zA-Z0-9_\-]+)*$/; 64 64 if(!reEmail.test(document.forms[0].mail.value)){ 65 alert( get_lang('Email field is not valid')+ '.');65 alert( ExpressoLivre.translate( 'Email field is not valid' ) + '.'); 66 66 return false; 67 67 } … … 70 70 var reGivenname = /^[a-zA-Z0-9 \-\.]+$/; 71 71 if(!reGivenname.test(document.forms[0].givenname.value)){ 72 alert( get_lang('First name field contains characters not allowed')+ '.');72 alert( ExpressoLivre.translate( 'First name field contains characters not allowed' ) + '.'); 73 73 return false; 74 74 } 75 75 else if (document.forms[0].givenname.value == ''){ 76 alert( get_lang('First name field is empty')+ '.');76 alert( ExpressoLivre.translate( 'First name field is empty' ) + '.'); 77 77 return; 78 78 } … … 81 81 var reSn = /^[a-zA-Z0-9 \-\.]+$/; 82 82 if(!reSn.test(document.forms[0].sn.value)){ 83 alert( get_lang('Last name field contains characters not allowed')+ '.');83 alert( ExpressoLivre.translate( 'Last name field contains characters not allowed' ) + '.'); 84 84 return false; 85 85 } 86 86 else if (document.forms[0].sn.value == ''){ 87 alert( get_lang('Last name field is empty')+ '.');87 alert( ExpressoLivre.translate( 'Last name field is empty' ) + '.'); 88 88 return; 89 89 } … … 95 95 if (!reg_tel.exec(document.forms[0].telephonenumber.value)) 96 96 { 97 alert( get_lang('Phone field is incorrect')+ '.');97 alert( ExpressoLivre.translate( 'Phone field is incorrect' ) + '.'); 98 98 return; 99 99 } … … 102 102 //FORWAR ONLY 103 103 if ((document.forms[0].deliverymode.checked) && (document.forms[0].mailforwardingaddress.value == '')){ 104 alert( get_lang('Forward email is empty')+ '.');104 alert( ExpressoLivre.translate( 'Forward email is empty' ) + '.'); 105 105 return; 106 106 } … … 108 108 // Email Quota 109 109 if (document.forms[0].mailquota.value == ''){ 110 alert( get_lang('User without email quota')+ '.');110 alert( ExpressoLivre.translate( 'User without email quota' ) + '.'); 111 111 return; 112 112 } … … 114 114 //GROUPS 115 115 if (document.getElementById('ea_select_user_groups').length < 1){ 116 alert( get_lang('User is not in any group')+ '.');116 alert( ExpressoLivre.translate( 'User is not in any group' ) + '.'); 117 117 return; 118 118 } … … 121 121 if (document.getElementById('tabcontent6').style.display != 'none'){ 122 122 if ((document.forms[0].sambalogonscript.value == '') && (!document.forms[0].sambalogonscript.disabled)){ 123 alert( get_lang('Logon script is empty')+ '.');123 alert( ExpressoLivre.translate( 'Logon script is empty' ) + '.'); 124 124 return; 125 125 } 126 126 if ((document.forms[0].sambahomedirectory.value == '') && (!document.forms[0].sambahomedirectory.disabled)){ 127 alert( get_lang('Users home directory is empty')+ '.');127 alert( ExpressoLivre.translate( 'Users home directory is empty' ) + '.'); 128 128 return; 129 129 } … … 197 197 function generate_login(first_name,second_name) { 198 198 if ((first_name=='') || (second_name=='')) { 199 alert( get_lang("You must type the first and the second name before generate the login"));199 alert( ExpressoLivre.translate( "You must type the first and the second name before generate the login" ) ); 200 200 return; 201 201 } … … 229 229 alert(data.msg); 230 230 else 231 alert( get_lang('User successful created')+ '.');231 alert( ExpressoLivre.translate( 'User successful created' ) + '.'); 232 232 233 233 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 248 248 } 249 249 else{ 250 alert( get_lang('User successful saved')+ '.');250 alert( ExpressoLivre.translate( 'User successful saved' ) + '.'); 251 251 } 252 252 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 258 258 var handler_get_available_groups = function(data) 259 259 { 260 data = data.trim( ); 260 261 select_available_groups = document.getElementById('ea_select_available_groups'); 261 262 … … 274 275 select_available_groups.outerHTML = select_available_groups.outerHTML; 275 276 } 276 } 277 278 _controller.go( { 279 "access" : "$this.ldap_functions.get_available_groups&context="+context, 280 "handler" : function( data ) 281 { 282 handler_get_available_groups( expresso.connector.unserialize( data ) ); 283 } 277 } 278 279 ExpressoLivre.go( { 280 "access" : "expressoAdmin1_2.ldap_functions.get_available_groups&context="+escape(context), 281 "handler" : handler_get_available_groups 284 282 } ); 285 283 } … … 377 375 } 378 376 } 379 _controller.go( { 380 "access" : "$this.ldap_functions.get_available_maillists&context=" + context, 381 "handler" : function( data ) 382 { 383 handler_get_available_maillists( expresso.connector.unserialize( data ) ); 384 } 377 ExpressoLivre.go( { 378 "access" : "expressoAdmin1_2.ldap_functions.get_available_maillists&context=" + context, 379 "handler" : handler_get_available_maillists 385 380 } ); 386 381 } … … 483 478 alert(data.msg); 484 479 else 485 alert( get_lang('Default password successful saved')+ '.');480 alert( ExpressoLivre.translate( 'Default password successful saved' ) + '.'); 486 481 return; 487 482 } … … 496 491 alert(data.msg); 497 492 else 498 alert( get_lang('Users password successful returned')+ '.');493 alert( ExpressoLivre.translate( 'Users password successful returned' ) + '.'); 499 494 return; 500 495 } … … 504 499 function delete_user(uid, uidnumber) 505 500 { 506 if (confirm( get_lang("Do you really want delete the user")+ " " + uid + "?"))501 if (confirm( ExpressoLivre.translate( "Do you really want delete the user" ) + " " + uid + "?")) 507 502 { 508 503 var handler_delete_user = function(data) … … 511 506 alert(data.msg); 512 507 else 513 alert( get_lang('User successful deleted')+ '.');508 alert( ExpressoLivre.translate( 'User successful deleted' ) + '.'); 514 509 515 510 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 527 522 var reUid = /^([a-zA-Z0-9_\-])+$/; 528 523 529 new_uid = prompt( get_lang('Rename users login from') + ': ' + uid + " " + get_lang("to")+ ': ', uid);524 new_uid = prompt( ExpressoLivre.translate( 'Rename users login from' ) + ': ' + uid + " " + ExpressoLivre.translate( "to" ) + ': ', uid); 530 525 531 526 if(!reUid.test(new_uid)){ 532 alert( get_lang('LOGIN field contains characters not allowed')+ '.');527 alert( ExpressoLivre.translate( 'LOGIN field contains characters not allowed' ) + '.'); 533 528 document.forms[0].account_lid.focus(); 534 529 return; … … 563 558 alert(data.msg); 564 559 else{ 565 alert( get_lang('User login successful renamed')+ "\n" + data.exec_return);560 alert( ExpressoLivre.translate( 'User login successful renamed' ) + "\n" + data.exec_return); 566 561 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; 567 562 } … … 579 574 clearTimeout(finderTimeout_maillist); 580 575 var oWait = document.getElementById("ea_span_searching_maillist"); 581 oWait.innerHTML = get_lang('Searching')+ '...';576 oWait.innerHTML = ExpressoLivre.translate( 'Searching' ) + '...'; 582 577 finderTimeout_maillist = setTimeout("optionFinder_maillist('"+obj.id+"')",500); 583 578 } … … 613 608 clearTimeout(finderTimeout_group); 614 609 var oWait = document.getElementById("ea_span_searching_group"); 615 oWait.innerHTML = get_lang('Searching')+ '...';610 oWait.innerHTML = ExpressoLivre.translate( 'Searching' ) + '...'; 616 611 finderTimeout_group = setTimeout("optionFinder_group('"+obj.id+"')",500); 617 612 } … … 671 666 function empty_inbox(uid) 672 667 { 673 var action = get_lang('Cleanned user mailbox');668 var action = ExpressoLivre.translate( 'Cleanned user mailbox' ) ; 674 669 var handler_write_log = function(){} 675 670 var handler_empty_inbox = function(data) … … 679 674 else{ 680 675 cExecute ('$this.user.write_log_from_ajax&_action='+action+'&userinfo='+uid, handler_write_log); 681 alert( get_lang('Emptied')+' '+ data.inbox_size + ' ' + get_lang('MB from user inbox'));676 alert( ExpressoLivre.translate( 'Emptied' ) +' '+ data.inbox_size + ' ' + ExpressoLivre.translate( 'MB from user inbox' ) ); 682 677 document.getElementById('mailquota_used').value = data.mailquota_used; 683 678 } … … 765 760 } 766 761 } 767 768 -
trunk/expressoAdmin1_2/js/modal/modal.js
r2459 r2712 85 85 objCaption.setAttribute('id','lightboxFoot'); 86 86 87 var close_button = '<input type=button value="'+ get_lang('close')+'" onClick='+close_action+'>';87 var close_button = '<input type=button value="'+ExpressoLivre.translate( 'close' )+'" onClick='+close_action+'>'; 88 88 if (type == 'create') 89 var create_save_button = '<input type=button value="'+ get_lang('create')+'" onClick='+create_action+'>';89 var create_save_button = '<input type=button value="'+ExpressoLivre.translate( 'create' )+'" onClick='+create_action+'>'; 90 90 else if(type == 'save') 91 var create_save_button = '<input type=button value="'+ get_lang('save')+'" onClick='+save_action+'>';91 var create_save_button = '<input type=button value="'+ExpressoLivre.translate( 'save' )+'" onClick='+save_action+'>'; 92 92 objCaption.innerHTML = '<table width=100% cellspacing="0" cellpadding="0"><tr><td align=left>'+close_button+'</td><td align=right>'+create_save_button+'</td></tr></table>' 93 93 … … 194 194 return; 195 195 } 196 /*197 function load_lang(){198 cExecute ('$this/js/modal/inc/load_lang', handler_load_lang);199 }200 201 var global_langs = new Array();202 function handler_load_lang(data)203 {204 global_langs = eval(data);205 }206 207 function get_lang(key_raw)208 {209 key = key_raw.replace(/ /g,"_");210 211 try{212 lang = eval("global_langs."+key.toLowerCase());213 return lang;214 }215 catch(e){216 return key_raw + '*';217 }218 }*/219 196 220 197 function make_msg(msg, type) … … 294 271 295 272 add_css(); 296 //load_lang(); -
trunk/expressoAdmin1_2/templates/default/accounts.tpl
r477 r2712 7 7 <tr> 8 8 <td align="left" width="25%"> 9 <form name="form" method="POST" action="{add_action}"> 10 <input type="submit" value="{lang_create_user}" "{create_user_disabled}"> 11 <input type="button" value="{lang_back}" onClick="document.location.href='{back_url}'"> 12 </form> 9 <input type="button" value="{lang_create_user}" "{create_user_disabled}" onclick="ExpressoLivre.link( '{add_action}' )" /> 10 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 13 11 </td> 14 12 <td align="center" "left" width="50%"> … … 16 14 </td> 17 15 <td align="right" "left" width="25%"> 18 <form method="POST" action="{accounts_url}" >16 <form method="POST" action="{accounts_url}" onsubmit="ExpressoLivre.link( '{accounts_url}', false, 'query='+this.query.value ); return false;"> 19 17 {lang_search}: 20 18 <input type="text" name="query" autocomplete="off" value="{query}"> … … 37 35 {rows} 38 36 <tr> 39 <td><input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'"></td>37 <td><input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /></td> 40 38 </tr> 41 39 </table> -
trunk/expressoAdmin1_2/templates/default/accounts_form.tpl
r2632 r2712 3 3 <script type="text/javascript"> 4 4 var tab = new Tabs(7,'activetab','inactivetab','tab','tabcontent','','','tabpage'); 5 function initAll() 6 { 7 tab.init(); 8 } 5 tab.init(); 9 6 {alert_warning}; 10 7 </script> … … 27 24 <table width="90%" border="0" cellspacing="0" cellpading="0"> 28 25 <tr> 29 <th id="tab1" class="activetab" onclick="javascript:tab.display(1);"><a href=" #" tabindex="0" accesskey="1" onfocus="tab.display(1);" onclick="tab.display(1); return(false);">{lang_general_information}</a></th>30 <th id="tab2" class="activetab" style="display:{display_corporative_information}"onclick="javascript:tab.display(2);"><a href=" #" tabindex="0" accesskey="2" onfocus="tab.display(2);" onclick="tab.display(2); return(false);">{lang_corporative_information}</a></th>31 <th id="tab3" class="activetab" style="display:{display_emailconfig}" onclick="javascript:tab.display(3);"><a href=" #" tabindex="0" accesskey="3" onfocus="tab.display(3);" onclick="tab.display(3); return(false);">{lang_email_config}</a></th>32 <th id="tab4" class="activetab" style="display:{display_groups}" onclick="javascript:tab.display(4);"><a href=" #" tabindex="0" accesskey="4" onfocus="tab.display(4);" onclick="tab.display(4); return(false);">{lang_groups_permission}</a></th>33 <th id="tab5" class="activetab" style="display:{display_emaillists}" onclick="javascript:tab.display(5);"><a href=" #" tabindex="0" accesskey="5" onfocus="tab.display(5);" onclick="tab.display(5); return(false);">{lang_email_lists}</a></th>34 <th id="tab6" class="activetab" style="display:{display_applications}" onclick="javascript:tab.display(6);"><a href=" #" tabindex="0" accesskey="6" onfocus="tab.display(6);" onclick="tab.display(6); return(false);">{lang_aplication_permission}</a></th>35 <th id="tab7" class="activetab" style="display:{display_samba_suport}" onclick="javascript:tab.display(7);"><a href=" #" tabindex="0" accesskey="7" onfocus="tab.display(7);" onclick="tab.display(7); return(false);">{lang_samba_config}</a></th>26 <th id="tab1" class="activetab" onclick="javascript:tab.display(1);"><a href="javascript:" tabindex="0" accesskey="1" onfocus="tab.display(1);" onclick="tab.display(1); return(false);">{lang_general_information}</a></th> 27 <th id="tab2" class="activetab" style="display:{display_corporative_information}"onclick="javascript:tab.display(2);"><a href="javascript:" tabindex="0" accesskey="2" onfocus="tab.display(2);" onclick="tab.display(2); return(false);">{lang_corporative_information}</a></th> 28 <th id="tab3" class="activetab" style="display:{display_emailconfig}" onclick="javascript:tab.display(3);"><a href="javascript:" tabindex="0" accesskey="3" onfocus="tab.display(3);" onclick="tab.display(3); return(false);">{lang_email_config}</a></th> 29 <th id="tab4" class="activetab" style="display:{display_groups}" onclick="javascript:tab.display(4);"><a href="javascript:" tabindex="0" accesskey="4" onfocus="tab.display(4);" onclick="tab.display(4); return(false);">{lang_groups_permission}</a></th> 30 <th id="tab5" class="activetab" style="display:{display_emaillists}" onclick="javascript:tab.display(5);"><a href="javascript:" tabindex="0" accesskey="5" onfocus="tab.display(5);" onclick="tab.display(5); return(false);">{lang_email_lists}</a></th> 31 <th id="tab6" class="activetab" style="display:{display_applications}" onclick="javascript:tab.display(6);"><a href="javascript:" tabindex="0" accesskey="6" onfocus="tab.display(6);" onclick="tab.display(6); return(false);">{lang_aplication_permission}</a></th> 32 <th id="tab7" class="activetab" style="display:{display_samba_suport}" onclick="javascript:tab.display(7);"><a href="javascript:" tabindex="0" accesskey="7" onfocus="tab.display(7);" onclick="tab.display(7); return(false);">{lang_samba_config}</a></th> 36 33 </tr> 37 34 </table> … … 43 40 <tr bgcolor={row_on}> 44 41 <td>{lang_search_organization}:</td> 45 <td><input type="text" id="organization_search" {disabled} autocomplete="off" size=20 on KeyUp="javascript:search_organization(this.value, 'ea_combo_org_info');" onBlur="javascript:sinc_combos_org(context.value); get_associated_domain(context.value); get_available_groups(context.value); get_available_maillists(context.value); get_available_sambadomains(context.value, '{type}')"></td>42 <td><input type="text" id="organization_search" {disabled} autocomplete="off" size=20 onkeyup="javascript:search_organization(this.value, 'ea_combo_org_info');" onBlur="javascript:sinc_combos_org(context.value); get_associated_domain(context.value); get_available_groups(context.value); get_available_maillists(context.value); get_available_sambadomains(context.value, '{type}')"></td> 46 43 </tr> 47 44 … … 298 295 {lang_search_organization}: 299 296 <br> 300 <input type="text" id="organization_search" autocomplete="off" size=20 on KeyUp="javascript:search_organization(this.value, 'ea_combo_org_maillists');" onblur="javascript:get_available_maillists(ea_combo_org_maillists.value);">297 <input type="text" id="organization_search" autocomplete="off" size=20 onkeyup="javascript:search_organization(this.value, 'ea_combo_org_maillists');" onblur="javascript:get_available_maillists(ea_combo_org_maillists.value);"> 301 298 <br> 302 299 {lang_organizations}: … … 376 373 <tr> 377 374 <td width="90%" align="left" class="td_left" bgcolor="{color_bg1}"> 378 <input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'">375 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 379 376 </td> 380 377 <td width="10%" align="right" class="td_right" bgcolor="{color_bg1}"> -
trunk/expressoAdmin1_2/templates/default/groups.tpl
r309 r2712 5 5 <tr> 6 6 <td align="left" width="25%"> 7 <form name="form" method="POST" action="{add_action}"> 8 <input type="submit" value="{lang_add_groups}" "{add_group_disabled}"> 9 <input type="button" value="{lang_back}" onClick="document.location.href='{back_url}'"> 10 </form> 7 <input type="button" value="{lang_add_groups}" "{add_group_disabled}" onclick="ExpressoLivre.link( '{add_action}' )" /> 8 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 11 9 </td> 12 10 <td align="center" "left" width="50%"> … … 14 12 </td> 15 13 <td align="right" "left" width="25%"> 16 <form method="POST" action="{accounts_url}" >14 <form method="POST" action="{accounts_url}" onsubmit="ExpressoLivre.link( '{accounts_url}', false, 'query='+this.query.value ); return false;"> 17 15 {lang_search}: 18 <input type="text" name="query" autocomplete="off" value="{query}" >16 <input type="text" name="query" autocomplete="off" value="{query}" /> 19 17 </form> 20 18 </td> … … 52 50 </tr> 53 51 <tr> 54 <td><input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'"></td>52 <td><input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /></td> 55 53 </tr> 56 54 <!-- END row_empty --> -
trunk/expressoAdmin1_2/templates/default/groups_form.tpl
r2476 r2712 17 17 <tr> 18 18 <td colspan="3" align="right" bgcolor="{color_bg1}"> 19 <input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'">20 <input type="button" value="{lang_save}" on Click="javascript:validate_fields('{type}','{restrictionsOnGroup}');">19 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 20 <input type="button" value="{lang_save}" onclick="javascript:validate_fields('{type}','{restrictionsOnGroup}');"> 21 21 </td> 22 22 </tr> … … 103 103 <td colspan="3" align="left" bgcolor="{color_bg1}"> 104 104 <input type="button" value="{lang_save}" onClick="javascript:validate_fields('{type}','{restrictionsOnGroup}');"> 105 <input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'">105 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 106 106 </td> 107 107 </tr> -
trunk/expressoAdmin1_2/templates/default/institutional_accounts.tpl
r2459 r2712 7 7 <tr> 8 8 <td align="left" width="25%"> 9 <input type="button" value="{lang_create_institutional_account}" "{create_institutional_account_disabled}" on Click='{onclick_create_institutional_account}'>10 <input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'">9 <input type="button" value="{lang_create_institutional_account}" "{create_institutional_account_disabled}" onclick='{onclick_create_institutional_account}'> 10 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 11 11 </td> 12 12 <td align="center" "left" width="50%"> … … 34 34 <table border="0" width="90%"> 35 35 <tr> 36 <td><input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'"></td>36 <td><input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /></td> 37 37 </tr> 38 38 </table> -
trunk/expressoAdmin1_2/templates/default/logs.tpl
r471 r2712 2 2 <p> 3 3 <div align="center"> 4 <form method="POST" action="{accounts_url}"> 4 <script> 5 function search( inputs ) 6 { 7 var post = [ ]; 8 for ( var i = 0; i < inputs.length; i++ ) 9 if ( inputs[ i ].type == 'text' ) 10 post[ post.length ] = inputs[ i ].name + '=' + inputs[ i ].value 11 12 return post.join( '&' ); 13 } 14 </script> 15 <form method="POST" action="{search_action}" onsubmit="ExpressoLivre.link( '{search_action}', null, search( this.getElementsByTagName( 'input' ) ) ); return false;"> 5 16 <table border="0" width="90%"> 6 17 <tr> 7 <td><input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'"></td>18 <td><input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /></td> 8 19 </tr> 9 20 … … 85 96 </tr> 86 97 <tr> 87 <td><input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'"></td>98 <td><input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /></td> 88 99 </tr> 89 100 <!-- END row_empty --> -
trunk/expressoAdmin1_2/templates/default/maillists.tpl
r493 r2712 6 6 <td align="left" width="25%"> 7 7 <form name="form" method="POST" action="{add_action}"> 8 <input type=" submit" value="{lang_add_email_lists}" "{add_email_lists_disabled}">9 <input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'">8 <input type="button" value="{lang_add_email_lists}" "{add_email_lists_disabled}" onclick="ExpressoLivre.link( '{add_action}' )" /> 9 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 10 10 </form> 11 11 </td> … … 58 58 </tr> 59 59 <tr> 60 <td><input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'"></td>60 <td><input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )"></td> 61 61 </tr> 62 62 <!-- END row_empty --> -
trunk/expressoAdmin1_2/templates/default/maillists_form.tpl
r621 r2712 6 6 </td> 7 7 <td valign="top"> 8 < table border="0" width=100% cellspacing="4">9 < form action="{form_action}" method="POST" name="app_form">8 <form action="{form_action}" method="POST" name="app_form"> 9 <table border="0" width=100% cellspacing="4"> 10 10 <input type="hidden" name="uidnumber" value="{uidnumber}"> 11 11 <input type="hidden" name="old_uid" value="{uid}"> … … 17 17 <tr> 18 18 <td colspan="3" align="right" bgcolor="{color_bg1}"> 19 <input type="button" value="{lang_back}" onClick=" document.location.href='{back_url}'">19 <input type="button" value="{lang_back}" onClick="ExpressoLivre.link( '{back_url}' )" /> 20 20 <input type="button" value="{lang_save}" onClick="javascript:validate_fields('{type}');"> 21 21 </td> … … 80 80 <td colspan="3" align="left" bgcolor="{color_bg1}"> 81 81 <input type="button" value="{lang_save}" onClick="javascript:validate_fields('{type}');"> 82 <input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'">82 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 83 83 </td> 84 84 </tr> 85 </ form>86 </ table>85 </table> 86 </form> 87 87 </td> 88 88 </tr> -
trunk/expressoAdmin1_2/templates/default/sectors.tpl
r1516 r2712 1 1 <!-- BEGIN list --> 2 <form method="POST" action="{action}" >2 <form method="POST" action="{action}" onsubmit="ExpressoLivre.link( '{action}' ); return false;"> 3 3 <p> 4 4 <table border="0" width="55%" align="center"> … … 11 11 <td align="left"> 12 12 {input_add} 13 <input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'">13 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 14 14 </form> 15 15 </td> … … 46 46 </tr> 47 47 <tr> 48 <td><input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'"></td>48 <td><input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /></td> 49 49 </tr> 50 50 <!-- END row_empty --> -
trunk/expressoAdmin1_2/templates/default/sectors_form.tpl
r2459 r2712 61 61 <td align="left" colspan="2"> 62 62 <input type="submit" name="button_submit" value={lang_save}> 63 <input type="button" value="{lang_back}" onClick="document.location.href='{back_url}'">63 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 64 64 <!-- 65 65 <input type="hidden" name="context" value="{context}"> -
trunk/expressoAdmin1_2/templates/default/shared_accounts.tpl
r1913 r2712 8 8 <td align="left" width="25%"> 9 9 <input type="button" value="{lang_create_shared_account}" "{create_share:_account_disabled}" onClick='{onclick_create_shared_account}'> 10 <input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'">10 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )"> 11 11 </td> 12 12 <td align="center" "left" width="50%"> … … 34 34 <table border="0" width="90%"> 35 35 <tr> 36 <td><input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'"></td>36 <td><input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /></td> 37 37 </tr> 38 38 </table> -
trunk/expressoAdmin1_2/templates/default/totalsessions.tpl
r2 r2712 9 9 </Font> 10 10 <br> 11 <input type="button" value="{lang_back}" on Click="document.location.href='{back_url}'">11 <input type="button" value="{lang_back}" onclick="ExpressoLivre.link( '{back_url}' )" /> 12 12 </center> 13 13 <!-- END list --> -
trunk/expressoMail1_2/js/jscode/globals.js
r2645 r2712 12 12 var sort_box_reverse = 1; 13 13 var last_message_selected = ''; 14 //var array_lang = new Array();15 14 var cyrus_delimiter = ''; 16 15 var ccaddress_array = new Array(); -
trunk/expressoMail1_2/js/jscode/load_lang.js
r2630 r2712 1 ( function( ) 2 { 3 var lang = document.getElementsByTagName( 'html' ).item( 0 ).getAttribute( 'xml:lang' ); 4 var _connector = new XConnector; 5 6 var request = _connector.cache( ).go( { 7 'access' : URL_SERVER + 'expressoMail1_2/inc/load_lang.php?lang=' + lang, 8 'handler' : function( data ) 9 { 10 window.array_lang = data.JSON( ); 11 } 12 } ); 13 } )(); 1 ExpressoLivre.lang( 'expressoMail1_2' ); -
trunk/phpgwapi/inc/class.expressolivre.inc.php
r2704 r2712 27 27 ); 28 28 } 29 30 function lang( $param ) 31 { 32 $lang = ( array_key_exists( 'lang', $param ) ) ? $param[ 'lang' ] : false; 33 $module = ( array_key_exists( 'module', $param ) ) ? $param[ 'module' ] : false; 34 35 if ( ! ( $lang && $module ) ) 36 return '{}'; 37 38 $array_keys = array( ); 39 $fn = dirname( __FILE__ ) . "/../../{$module}/setup/phpgw_{$lang}.lang"; 40 $lang = array( ); 41 42 if ( file_exists( $fn ) ) 43 { 44 $fp = fopen( $fn, 'r' ); 45 while ( $data = fgets( $fp, 16000 ) ) 46 { 47 list( $message_id, $app_name, $null, $content ) = explode( "\t", substr( $data, 0, -1 ) ); 48 $lang[ ] = '"' . str_replace( '"', '\"', strtolower( $message_id ) ) . '" : "' . str_replace( '"', '\"', $content ) . '"'; 49 } 50 fclose( $fp ); 51 } 52 53 return '{' . implode( ",\n", $lang ) . '}'; 54 } 29 55 } 30 56 -
trunk/phpgwapi/js/expressolivre/expressolivre.js
r2707 r2712 6 6 var _xlink = null; 7 7 8 window.array_lang = [ ]; 9 10 var _language = [ ] 11 8 12 function _go( ) 9 13 { 10 14 _xconnector.go.apply( _xconnector, arguments ); 15 } 16 17 function _lang( ) 18 { 19 if ( ! ( arguments.length && arguments[ 0 ].constructor == String ) ) 20 return false; 21 22 var module = arguments[ 0 ]; 23 var lang = document.getElementsByTagName( 'html' ).item( 0 ).getAttribute( 'xml:lang' ); 24 25 _xconnector.go( { 26 'access' : 'phpgwapi.expressolivre.lang&lang=' + lang + '&module=' + module, 27 'handler' : function( data ) 28 { 29 data = data.JSON( ); 30 for ( var key in data ) 31 window.array_lang[ key ] = _language[ key ] = data[ key ]; 32 } 33 } ); 11 34 } 12 35 … … 31 54 } 32 55 56 function _translate( ) 57 { 58 if ( ! ( arguments.length && arguments[ 0 ].constructor == String ) ) 59 return false; 60 61 var _phrase = arguments[ 0 ]; 62 63 if ( _language[ _phrase.toLowerCase( ) ] ) 64 return _language[ _phrase.toLowerCase( ) ]; 65 else 66 return _phrase + '*'; 67 } 68 33 69 function _ExpressoLivre( ) 34 70 { … … 36 72 { 37 73 this.go = _go; 74 this.lang = _lang; 38 75 this.link = _link; 39 76 this.path = _path; 40 77 this.theme = _theme; 41 78 this.template = _template; 79 this.translate = _translate; 42 80 } ); 43 81 } -
trunk/phpgwapi/js/tools/xconnector.js
r2685 r2712 218 218 '_ACCESS' : _argv.access, 219 219 '_HANDLER' : { }, 220 '_POST' : ( ( _argv.post ) ? _argv.post : false ), // [GET | POST]220 '_POST' : ( ( _argv.post && _argv.post != null ) ? _argv.post : false ), // [GET | POST] 221 221 '_MODE' : 'TEXT', // [XML | TEXT] 222 222 '_TYPE' : null, // [4 for request | 3 for stream] -
trunk/phpgwapi/js/tools/xlink.js
r2710 r2712 17 17 _action = window.location.protocol + '//' + window.location.host + _action; 18 18 19 if ( _action == _last_request ) 19 var _post = ( arguments.length == 3 && arguments[ 2 ] && arguments[ 2 ].constructor == String ) ? arguments[ 2 ] : null; 20 21 if ( _post == null && _action == _last_request ) 20 22 return false; 21 23 … … 36 38 'access' : _action, 37 39 'cache' : _cache, 38 'handler' : _handler 40 'handler' : _handler, 41 'post' : _post 39 42 } ); 40 43 … … 148 151 _click( arguments[ 0 ], 149 152 ( 150 ( arguments.length > 1 && arguments[ 1 ] .constructor == Boolean ) ?153 ( arguments.length > 1 && arguments[ 1 ] && arguments[ 1 ].constructor == Boolean ) ? 151 154 arguments[ 1 ] : false 155 ), 156 ( 157 ( arguments.length > 2 && arguments[ 2 ] && arguments[ 2 ].constructor == String ) ? 158 arguments[ 2 ] : null 152 159 ) 153 160 ); -
trunk/phpgwapi/js/tools/xobject.js
r2665 r2712 21 21 String.prototype.trim = function( ) 22 22 { 23 return this.replace( /^ +|+$/g, '' );23 return this.replace( /^\s+|\s+$/g, '' ); 24 24 }; 25 25
Note: See TracChangeset
for help on using the changeset viewer.