Index: branches/2.3/expressoMail1_2/index.php =================================================================== --- branches/2.3/expressoMail1_2/index.php (revision 4324) +++ branches/2.3/expressoMail1_2/index.php (revision 5246) @@ -78,4 +78,5 @@ $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['telephone_number'] = $GLOBALS['phpgw_info']['user']['telephonenumber']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_cache'] = $current_config['expressoMail_enable_cache']; + $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['cloud_ldap'] = $current_config['expressoMail_cloud_ldap']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_x_origin'] = $current_config['expressoMail_use_x_origin']; $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] = $current_config['expressoMail_Number_of_dynamic_contacts'] ? $current_config['expressoMail_Number_of_dynamic_contacts'] : "0"; Index: branches/2.3/expressoMail1_2/templates/default/config.tpl =================================================================== --- branches/2.3/expressoMail1_2/templates/default/config.tpl (revision 4533) +++ branches/2.3/expressoMail1_2/templates/default/config.tpl (revision 5246) @@ -37,4 +37,13 @@ + +
'+get_lang("Select an organization and click on button Search")+' : |
 '+ - ' '+ + ' |
 '+ + ' '+ + ' '+ ' |
'+get_lang('Public Lists')+' '+get_lang('Users')+' '+ @@ -386,5 +407,10 @@ }; - win = new dJSWin({ + if(this.search){ + Element('search_for').value = this.search; + this.search = null; + write_msg("No user found by this search in you organization"); + } + win = new dJSWin({ id: 'win_'+el.id, content_id: el.id, @@ -495,7 +521,31 @@ } } + if(preferences.cloud_ldap) + QuickCatalogSearch.update_organizations_sub(); } - cExecute ("$this.ldap_functions.get_organizations&referral=false&catalog="+Element('select_catalog').value, handler_org); - } + cExecute ("$this.ldap_functions.get_organizations&referral=false&catalog="+Element('select_catalog').value, handler_org); + } + + emQuickCatalogSearch.prototype.update_organizations_sub = function(){ + while(Element('select_organization_sub').options.length > 0) { + Element('select_organization_sub').remove(0); + } + var handler_org = function(data){ + Element('select_organization_sub').style.display = ''; + Element('select_organization_sub').options[0] = new Option(get_lang('all'),'all'); + if (data != null){ + //var user_organization = Element('user_organizations').value; + for(x = 0; x < data.length; x++) { + Element('select_organization_sub').options[x+1] = new Option(data[x].toUpperCase(),data[x]); +// if(user_organization.toUpperCase() == data[x].toUpperCase()) + + } + Element('select_organization_sub').options[0].selected = true; + } + + } + cExecute ("$this.ldap_functions.get_organizations&referral=false&catalog="+Element('select_catalog').value+"&organization="+Element('select_organization').value, handler_org); + } + emQuickCatalogSearch.prototype.changeOptions = function(type){ @@ -566,5 +616,6 @@ return false; } - var organization = Element('select_organization').value; + var organization = Element('select_organization').value; + var organization_sub = Element('select_organization_sub').value; var search = itemSearch ? Element('search_for').value : ''; var catalog = Element('select_catalog').value; @@ -641,5 +692,5 @@ Element('msg_search').style.visibility = 'visible'; - cExecute ("$this.ldap_functions.catalogsearch&max_result="+max_result+"&organization="+organization+"&search_for="+search+"&catalog="+catalog, handler_searchResults); + cExecute ("$this.ldap_functions.catalogsearch&max_result="+max_result+"&organization="+organization+"&organization_sub="+organization_sub+"&search_for="+search+"&catalog="+catalog, handler_searchResults); } |