- Timestamp:
- 07/28/10 17:35:23 (14 years ago)
- Location:
- trunk/jabberit_messenger/jmessenger/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/jmessenger/js/jscode/loadIM.js
r3094 r3097 1256 1256 1257 1257 // TESTE ROOMS 1258 function createChatRooms() 1259 { 1260 var _from = "alexandrecorreia@im.pr.gov.br" + TROPHYIM_RESOURCE; 1261 var _to = "teste_alexandre@conference.im.pr.gov.br" + "/alexandrecorreia" ; 1262 var new_room = $pres( {from: _from, to: _to } ).c( "x", { xmlns: Strophe.NS.MUC } ); 1263 1264 TrophyIM.connection.send( new_room.tree() ); 1265 } 1266 1267 loadIM.prototype.createChatRooms = createChatRooms; 1258 1268 1259 1269 function listRooms( element ) … … 1298 1308 'lang2' : 'Fechar', 1299 1309 'onclickClose' : '_winBuild("window_List_Rooms","remove");', 1300 'onclickSubmit' : ' alert(\'Vou criar mais uma sala\')'1310 'onclickSubmit' : 'loadscript.createChatRooms();' 1301 1311 }; 1302 1312 … … 1401 1411 function joinRoom( jidRoom, nameRoom ) 1402 1412 { 1403 1413 var test_append_nick = function( room, nick ) 1404 1414 { 1405 1415 var room_nick = room; -
trunk/jabberit_messenger/jmessenger/js/trophyim.js
r3096 r3097 670 670 if( xmlns.indexOf("http://jabber.org/protocol/muc#user") == 0 ) 671 671 { 672 var nameChatRoom = xquery[i].parentNode.getAttribute('from') 672 var nameChatRoom = xquery[i].parentNode.getAttribute('from'); 673 673 nameChatRoom = Strophe.getBareJidFromJid(nameChatRoom); 674 674 … … 695 695 if( nodeUser == null && xquery[i].firstChild.getAttribute('jid') ) 696 696 { 697 nameChatRoom = document.getElementById(nameChatRoom + '__roomChat__participants'); 698 nameChatRoom.appendChild( _UserChatRoom ); 697 if( document.getElementById( nameChatRoom + '__roomChat__participants' ) != null ) 698 { 699 nameChatRoom = document.getElementById( nameChatRoom + '__roomChat__participants' ); 700 nameChatRoom.appendChild( _UserChatRoom ); 701 } 702 else 703 { 704 TrophyIM.makeChatRoom( nameChatRoom, "TESTE_MEU" ); 705 706 nameChatRoom = document.getElementById( nameChatRoom + '__roomChat__participants' ); 707 nameChatRoom.appendChild( _UserChatRoom ); 708 } 699 709 } 700 710 else
Note: See TracChangeset
for help on using the changeset viewer.