Changeset 287 for trunk/instant_messenger/js/functions.js
- Timestamp:
- 05/26/08 11:45:16 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/instant_messenger/js/functions.js
r275 r287 27 27 var content = get_Element(pJid); 28 28 content.innerHTML += "" + this.insertEmoticons(pEmotion); 29 var smileWindow = document.getElementById(pJid+"__button_dest"); 30 if (smileWindow.firstChild) 31 smileWindow.removeChild(smileWindow.firstChild); 29 32 }, 30 33 … … 88 91 } 89 92 var content = get_Element(pJid); 90 93 94 var colorWindow = document.getElementById(pJid+"__button_dest"); 95 if (colorWindow.firstChild) 96 colorWindow.removeChild(colorWindow.firstChild); 97 91 98 if( _font_color = _document.contentWindow.document.getElementById('colors_'+pJid) ) 92 99 content.innerHTML = "<span id='colors_"+pJid+"'style='color:"+pColor+"'>"+_font_color.innerHTML+"</span>"; … … 346 353 { 347 354 var data = eval(XmlData); 355 348 356 if( data ) 349 357 { 350 358 if( document.getElementById(pAvatar) != null ) 351 359 { 352 var photo_img = document.getElementById(pAvatar); 353 photo_img.src = ( path_im + "inc/class.ldap_im.inc.php?user="+uid ) ? path_im + "inc/class.ldap_im.inc.php?user="+uid : im_photo.src ; 360 if( document.getElementById(pAvatar).src ) 361 { 362 var photo_img = document.getElementById(pAvatar); 363 photo_img.src = ( path_im + "inc/class.ldap_im.inc.php?user="+uid ) ? path_im + "inc/class.ldap_im.inc.php?user="+uid : im_photo.src ; 364 } 365 else 366 { 367 var photo_img = document.getElementById(pAvatar); 368 photo_img.style.backgroundImage = 'url(' + path_im + 'inc/class.ldap_im.inc.php?user='+uid+')'; 369 } 354 370 } 355 371 } … … 361 377 }, 362 378 363 364 379 "newMessageNotification" : function() 380 { 365 381 if ( !focusFlag ) 366 382 { … … 455 471 { 456 472 if(imgStatus != null) 457 func.byId('im_status_src').src = eval('im_' + imgStatus + '.src'); 473 { 474 var img_status = document.getElementById('im_status_src'); 475 img_status.src = eval('im_' + imgStatus + '.src'); 476 } 458 477 } 459 478 this.conn.go('$this.Ujabber.setPresence', {'request' : handler_presence}, this.status); … … 462 481 "remove" : function(pJid) 463 482 { 483 if (pJid == -1) 484 return false; 464 485 if(confirm('Deseja excluir o contato ' + pJid + ' ?')) 465 486 { … … 488 509 if( func.byId(pElement).options[i].selected == true ) 489 510 Jid = func.byId(pElement).options[i].value; 490 491 if(confirm('Deseja excluir o contato ' + Jid + ' ?')) 492 { 493 if( Jid && Jid != -1 ) 494 { 511 if (Jid == -1) 512 return false; 513 else 514 if(confirm('Deseja excluir o contato ' + Jid + ' ?')) 515 { 516 if( Jid && Jid != -1 ) 517 { 495 518 function handler_remove(XmlData) 496 519 { … … 535 558 { 536 559 if( XmlData != "OK" ) 537 alert(' Vcard não cadastrado/atualizado !');560 alert('Erro: Vcard não cadastrado/atualizado !'); 538 561 else 539 562 alert('Vcard cadastrado/atualizado !'); 563 im_window.window_close('vcard_user_im'); 540 564 } 541 565 this.conn.go('$this.Ujabber.newVcard',{'request':handler_savevcard},"vcard="+xmlVcard); … … 571 595 im.off_line(); 572 596 alert('Preferências Salvas !'); 597 im_window.window_close('my_settings_im'); 573 598 } 574 599 }
Note: See TracChangeset
for help on using the changeset viewer.