Changeset 7173 for trunk/calendar
- Timestamp:
- 09/05/12 16:47:52 (12 years ago)
- Location:
- trunk/calendar/templates/default/js
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/templates/default/js/edit_exmail.js
r7148 r7173 341 341 //BUSCA COM A TECLA F9 342 342 if((e.keyCode) == 120){ 343 343 quickSearchCatalogUser(); 344 344 e.preventDefault(); 345 345 return false; … … 400 400 } 401 401 402 function quickSearchCatalogUser(){ 403 var begin,end; 404 var mailList = document.getElementById('ex_participants').value; 405 var search = ""; 406 if (mailList.lastIndexOf(',') != -1){ 407 begin = mailList.lastIndexOf(','); 408 end = mailList.length; 409 search = mailList.substring(begin+1,255); 410 } 411 else{ 412 begin = 0; 413 end = mailList.length; 414 search = mailList; 415 } 416 var handler_Search = function(data){ 417 if ((!data.status) && (data.error == "many results")){ 418 return false; 419 } 420 if (data.length > 0){ 421 quickSearchUser.showList(data,begin,end); 422 } 423 } 424 if (search.length > 0) 425 cExecute ("$this.ldap_functions.quicksearchcontact&search_for="+search+"&field="+null+"&ID="+null, handler_Search); 426 } 427 402 428 /*Adiciona um novo contato selecionado*/ 403 function update_mailField( email){429 function update_mailField(name,email){ 404 430 var mailList = $('#tbl_ext_participants').find('textarea'); 405 431 var newList = ""; … … 412 438 newList += ctcList[ii] + ","; 413 439 } 414 newList += email+ ",";440 newList += '"'+ name + '"'+ " <" + email + ">" + ","; 415 441 } 416 442 else{ 417 newList += email+",";443 newList += '"'+ name + '"'+ " <" + email + ">" +","; 418 444 } 419 445 mailList.val(newList); … … 494 520 select: function( event, ui ) { 495 521 event.preventDefault(); 496 update_mailField( ui.item.mail);522 update_mailField((ui.item.name ? ui.item.name : ""),ui.item.mail); 497 523 }, 498 524 position : { my: "left top", at: "left bottom", collision: "fit" }
Note: See TracChangeset
for help on using the changeset viewer.