- Timestamp:
- 05/27/09 17:45:59 (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.uicalendar.inc.php
r924 r925 813 813 unset($GLOBALS['phpgw_info']['flags']['nonavbar']); 814 814 $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('View'); 815 $GLOBALS['phpgw_info']['flags']['noappheader'] = True; 815 816 $GLOBALS['phpgw']->common->phpgw_header(); 816 817 … … 4679 4680 $footer_ext_participantes = lang("Tip: To search in the <b>Global Catalog</b>, type the <b>F9</b> key, like the ExpressoMail."); 4680 4681 4681 if ($param['plain'] != "True"){4682 /*if ($param['plain'] != "True"){ 4682 4683 4683 4684 // Begin load array lang … … 4687 4688 ob_end_clean(); 4688 4689 // End load array_lang 4689 } 4690 }*/ 4690 4691 4691 4692 $var['participants'] = array … … 4707 4708 '</td>'. 4708 4709 '<td valign="bottom">'. 4709 ' '.lang("Organization").': '.4710 ' <select name="org_context" id="combo_org" onchange="javascript:get_available_users(\''.$module_name.'\',this.value,\''.($recursive ? "" : "search").'\');">'.$combo_org.'</select>'.4710 // ' '.lang("Organization").': '. 4711 // ' <select name="org_context" id="combo_org" onchange="javascript:get_available_users(\''.$module_name.'\',this.value,\''.($recursive ? "" : "search").'\');">'.$combo_org.'</select>'. 4711 4712 ' <br>'. 4712 4713 ' <font color="red"><span id="cal_span_searching"> </span></font>'. … … 4725 4726 "<script type='text/javascript'>var DEFAULT_URL = '".$module_name."/controller.php?action=';</script> ". 4726 4727 "<script type='text/javascript'>" . 4727 "var timeout_get_available_users = setTimeout('get_available_users(\"".$module_name."\",\'".$user_context."\',\'".($recursive ? "" : "search")."\')',1000);".4728 // "var timeout_get_available_users = setTimeout('get_available_users(\"".$module_name."\",\'".$user_context."\',\'".($recursive ? "" : "search")."\')',1000);". 4728 4729 "</script> " 4729 4730 ); -
trunk/calendar/templates/celepar/js/edit_exmail.js
r638 r925 20 20 var is_firefox_0 = agt.indexOf('firefox/1.0') != -1 && agt.indexOf('firefox/0.') ? true : false; 21 21 22 function optionFinderTimeout(obj) 23 { 24 clearTimeout(finderTimeout); 25 var oWait = document.getElementById("cal_span_searching"); 26 oWait.innerHTML = document.getElementById("txt_searching").value + '...'; 27 var finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); 28 } 29 function optionFinder(id) { 30 var oWait = document.getElementById("cal_span_searching"); 31 var oText = document.getElementById(id); 32 var select_available_users_tmp = document.getElementById('user_list_in') 33 for(var i = 0;i < select_available_users_tmp.options.length; i++) 34 select_available_users_tmp.options[i--] = null; 35 36 var RegExp_name = new RegExp("\\b"+oText.value, "i"); 37 38 for(i = 0; i < select_available_users_clone.length; i++){ 39 if (RegExp_name.test(select_available_users_clone[i].text) || select_available_users_clone[i].value =="-1") 40 { 41 sel = select_available_users_tmp.options; 42 option = new Option(select_available_users_clone[i].text,select_available_users_clone[i].value); 43 if( select_available_users_clone[i].value == "-1") option.disabled = true; 44 sel[sel.length] = option; 45 } 46 } 47 oWait.innerHTML = ' '; 48 } 49 50 function get_available_users(path,context,type) 22 function get_available_users(filter) 51 23 { 52 24 var handler_get_available_users = function(data) … … 78 50 select_available_users.disabled = false; 79 51 select_available_users_clone = document.getElementById('user_list_in').cloneNode(true); 80 document.getElementById('cal_input_searchUser').value = '';52 //document.getElementById('cal_input_searchUser').value = ''; 81 53 } 82 54 } 83 55 84 document.getElementById('combo_org').value = context; 85 cExecute (path+'.ldap_functions.get_available_users&context='+context+'&type='+type, handler_get_available_users); 86 } 56 //document.getElementById('combo_org').value = context; 57 cExecute ('expressoMail1_2'+'.ldap_functions.search_users&filter='+filter+'&type=search', handler_get_available_users); 58 } 59 60 function optionFinderTimeout(obj){ 61 if (obj.value.length >= 4){ 62 clearTimeout(finderTimeout); 63 var oWait = document.getElementById("cal_span_searching"); 64 oWait.innerHTML = 'Buscando...'; 65 var finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); 66 }else { 67 oWait.innerHTML = 'Mínimo de 4 letras para pesquisa'; 68 var select_available_users_tmp = document.getElementById('user_list_in'); 69 for(var i = 0;i < select_available_users_tmp.options.length; i++) 70 select_available_users_tmp.options[i--] = null; 71 } 72 } 73 74 function optionFinder(id){ 75 76 var oWait = document.getElementById("cal_span_searching"); 77 var oText = document.getElementById(id); 78 79 80 if (oText.value.length < 4) { 81 oWait.innerHTML = ''; 82 var select_available_users_tmp = document.getElementById('user_list_in'); 83 for(var i = 0;i < select_available_users_tmp.options.length; i++) 84 select_available_users_tmp.options[i--] = null; 85 } 86 87 if (oText.value.length >= 4) { 88 get_available_users(oText.value); 89 90 var select_available_users_tmp = document.getElementById('user_list_in'); 91 for(var i = 0;i < select_available_users_tmp.options.length; i++) 92 select_available_users_tmp.options[i--] = null; 93 var RegExp_name = new RegExp("\\b"+oText.value, "i"); 94 95 oWait.innerHTML = ' '; 96 } 97 } 98 87 99 function add_user() 88 100 { -
trunk/expressoMail1_2/inc/class.ldap_functions.inc.php
r881 r925 402 402 return $organizations; 403 403 } 404 405 //Busca usuarios de um contexto e ja retorna as options do select - usado por template serpro; 406 function search_users($params) 407 { 408 $this->ldapConnect(false,0); 409 //Monta lista de Grupos e Usuarios 410 $users = Array(); 411 $groups = Array(); 412 $user_context= $this->ldap_context; 413 $owner = $_SESSION['phpgw_info']['expressomail']['user']['owner']; 414 $filtro =utf8_encode($params['filter']); 415 $context =utf8_encode($params['context']);//adicionado 416 417 if ($this->ds) 418 { 419 $justthese = array("gidNumber","cn"); 420 if ($params['type'] == 'search') 421 //$sr=ldap_search($this->ds, $user_context, ("(&(phpgwaccounttype=g)(!(phpgwaccountvisible=-1))(phpgwaccountstatus=A)(cn=*$filtro*))"),$justthese); 422 $sr=ldap_search($this->ds, $context, ("(&(phpgwaccounttype=g)(!(phpgwaccountvisible=-1))(phpgwaccountstatus=A)(cn=*$filtro*))"),$justthese); 423 else 424 $sr=ldap_list($this->ds, $user_context, ("(&(phpgwaccounttype=g)(!(phpgwaccountvisible=-1))(phpgwaccountstatus=A)(cn=*".$filtro."*))"),$justthese); 425 $info = ldap_get_entries($this->ds, $sr); 426 for ($i=0; $i<$info["count"]; $i++) 427 $groups[$uids=$info[$i]["gidnumber"][0]] = Array('name' => $uids=$info[$i]["cn"][0], 'type' => g); 428 $justthese = array("phpgwaccountvisible","uidNumber","cn"); 429 if ($params['type'] == 'search') 430 // $sr=ldap_search($this->ds, $user_context, ("(&(phpgwaccounttype=u)(!(phpgwaccountvisible=-1))(phpgwaccountstatus=A)(|(cn=*$filtro*)(mail=$filtro*)))"),$justthese); 431 $sr=ldap_search($this->ds, $context, ("(&(phpgwaccounttype=u)(!(phpgwaccountvisible=-1))(phpgwaccountstatus=A)(|(cn=*$filtro*)(mail=$filtro*)))"),$justthese); 432 else 433 $sr=ldap_list($this->ds, $user_context, ("(&(phpgwaccounttype=u)(!(phpgwaccountvisible=-1))(phpgwaccountstatus=A)(|(cn=*$filtro*)(mail=$filtro*)))"),$justthese); 434 435 $info = ldap_get_entries($this->ds, $sr); 436 for ($i=0; $i<$info["count"]; $i++) 437 { 438 if ($info[$i]["phpgwaccountvisible"][0] == '-1') 439 continue; 440 $users[$uids=$info[$i]["uidnumber"][0]] = Array('name' => $uids=$info[$i]["cn"][0], 'type' => u); 441 } 442 } 443 ldap_close($this->ds); 444 445 @asort($users); 446 @reset($users); 447 @asort($groups); 448 @reset($groups); 449 $user_options =''; 450 $group_options =''; 451 452 foreach($groups as $id => $user_array) { 453 $newId = $id.'U'; 454 $group_options .= '<option value="'.$newId.'">'.utf8_decode($user_array['name']).'</option>'."\n"; 455 } 456 foreach($users as $id => $user_array) { 457 if($owner != $id){ 458 $newId = $id.'U'; 459 $user_options .= '<option value="'.$newId.'">'.utf8_decode($user_array['name']).'</option>'."\n"; 460 } 461 } 462 return array("users" => $user_options, "groups" => $group_options); 463 } 404 464 405 465 function catalogsearch($params)
Note: See TracChangeset
for help on using the changeset viewer.