Changeset 5246 for branches/2.3/expressoMail1_2/js/QuickCatalogSearch.js
- Timestamp:
- 12/13/11 13:05:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/expressoMail1_2/js/QuickCatalogSearch.js
r5102 r5246 66 66 title_innerHTML += "<font color='BLACK' nowrap> ("+get_lang('Showing only the results found in your organization')+".)</font>" 67 67 68 if (preferences.cloud_ldap) 69 { 70 title_innerHTML += "<font color='BLACK' nowrap> ("+get_lang('Showing only the results found in your organization')+".)</font>"; 71 } 72 68 73 var title = document.createElement("SPAM"); 69 74 title.id = 'window_QuickCatalogSearch_title'; … … 98 103 butt.onclick = func_add_contact; 99 104 el_A.appendChild(butt); 105 if(preferences.cloud_ldap) 106 { 107 var butt = document.createElement('BUTTON'); 108 butt.id = "QuickCatalogSearch_button_search"; 109 var buttext = document.createTextNode(get_lang("Advanced search")); 110 butt.appendChild(buttext); 111 butt.onclick = function(){openListUsers("1");QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);}; 112 el_A.appendChild(butt); 113 } 100 114 101 115 if (document.getElementById('select_QuickCatalogSearch') == null){ … … 321 335 win = this.arrayWin[el.id]; 322 336 win.open(); 337 Element('search_for').value = ""; 338 if(this.search){ 339 Element('search_for').value = this.search; 340 write_msg("No user found by this search in you organization"); 341 this.search = null; 342 } 323 343 return; 324 344 } … … 344 364 '<table border="0" cellpading="0" cellspacing="0">'+ 345 365 '<tr><td>'+get_lang("Select an organization and click on button <b>Search</b>")+' :</td></tr>'+ 346 '<tr><td><select style="display:none;width:150px" id="select_catalog" name="select_catalog" onchange="javascript:QuickCatalogSearch.update_organizations();"></select> '+ 347 '<select id="select_organization" style="width:150px" name="select_organization"></select> '+ 366 '<tr><td><select style="display:none;width:100px" id="select_catalog" name="select_catalog" onchange="javascript:QuickCatalogSearch.update_organizations();"></select> '+ 367 '<select id="select_organization" style="width:100px" name="select_organization" onchange="javascript:QuickCatalogSearch.update_organizations_sub();" ></select> '+ 368 '<select id="select_organization_sub" style="width:100px;display:none;" name="select_organization_sub"></select> '+ 348 369 '<input type="text" id="search_for" name="search_for" value="" size="30" maxlength="30"/> <input type="button" onclick="QuickCatalogSearch.searchCatalogList(true)" class="button" value="'+get_lang('Search')+'"> <input style="display:visible" type="button" onclick="QuickCatalogSearch.searchCatalogList(false)" class="button" value="'+get_lang('List All')+'"></td></tr>'+ 349 370 '<tr><td><input onclick="javascript:QuickCatalogSearch.changeOptions(this.value)" id="type_l" type="radio" name="type" value="l"/>'+get_lang('Public Lists')+' <input type="radio" id="type_u" name="type" value="u" onclick="javascript:QuickCatalogSearch.changeOptions(this.value)" checked/>'+get_lang('Users')+' '+ … … 386 407 }; 387 408 388 win = new dJSWin({ 409 if(this.search){ 410 Element('search_for').value = this.search; 411 this.search = null; 412 write_msg("No user found by this search in you organization"); 413 } 414 win = new dJSWin({ 389 415 id: 'win_'+el.id, 390 416 content_id: el.id, … … 495 521 } 496 522 } 523 if(preferences.cloud_ldap) 524 QuickCatalogSearch.update_organizations_sub(); 497 525 } 498 cExecute ("$this.ldap_functions.get_organizations&referral=false&catalog="+Element('select_catalog').value, handler_org); 499 } 526 cExecute ("$this.ldap_functions.get_organizations&referral=false&catalog="+Element('select_catalog').value, handler_org); 527 } 528 529 emQuickCatalogSearch.prototype.update_organizations_sub = function(){ 530 while(Element('select_organization_sub').options.length > 0) { 531 Element('select_organization_sub').remove(0); 532 } 533 var handler_org = function(data){ 534 Element('select_organization_sub').style.display = ''; 535 Element('select_organization_sub').options[0] = new Option(get_lang('all'),'all'); 536 if (data != null){ 537 //var user_organization = Element('user_organizations').value; 538 for(x = 0; x < data.length; x++) { 539 Element('select_organization_sub').options[x+1] = new Option(data[x].toUpperCase(),data[x]); 540 // if(user_organization.toUpperCase() == data[x].toUpperCase()) 541 542 } 543 Element('select_organization_sub').options[0].selected = true; 544 } 545 546 } 547 cExecute ("$this.ldap_functions.get_organizations&referral=false&catalog="+Element('select_catalog').value+"&organization="+Element('select_organization').value, handler_org); 548 } 549 500 550 501 551 emQuickCatalogSearch.prototype.changeOptions = function(type){ … … 566 616 return false; 567 617 } 568 var organization = Element('select_organization').value; 618 var organization = Element('select_organization').value; 619 var organization_sub = Element('select_organization_sub').value; 569 620 var search = itemSearch ? Element('search_for').value : ''; 570 621 var catalog = Element('select_catalog').value; … … 641 692 642 693 Element('msg_search').style.visibility = 'visible'; 643 cExecute ("$this.ldap_functions.catalogsearch&max_result="+max_result+"&organization="+organization+"& search_for="+search+"&catalog="+catalog, handler_searchResults);694 cExecute ("$this.ldap_functions.catalogsearch&max_result="+max_result+"&organization="+organization+"&organization_sub="+organization_sub+"&search_for="+search+"&catalog="+catalog, handler_searchResults); 644 695 } 645 696
Note: See TracChangeset
for help on using the changeset viewer.