Changeset 2641 for sandbox/jabberit_messenger
- Timestamp:
- 04/27/10 16:43:28 (14 years ago)
- Location:
- sandbox/jabberit_messenger/trophy_expresso
- Files:
-
- 2 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/jabberit_messenger/trophy_expresso/js/AddUser.js
r2634 r2641 233 233 function showForm() 234 234 { 235 235 236 var _paramsWindAddUser = 236 237 { -
sandbox/jabberit_messenger/trophy_expresso/js/trophyim.js
r2631 r2641 132 132 TrophyIM = { 133 133 134 /** AutoConnection 135 * 136 */ 137 138 autoConnection : { connect : true }, 139 140 /** PosWindow 141 * 142 */ 134 143 posWindow : { left : 400, top : 100 }, 135 144 145 /** StatusConnection 146 * 147 */ 148 136 149 statusConn : { connected : false }, 137 150 … … 196 209 for (var c in cookies) 197 210 { 198 while (cookies[c].charAt(0)==' ')211 while ( cookies[c].charAt(0) == ' ') 199 212 { 200 213 cookies[c] = cookies[c].substring(1,cookies[c].length); … … 226 239 227 240 //Load other .js scripts needed 228 document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + ' strophejs/strophe.js'));241 document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + 'js/strophe.min.js')); 229 242 document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + 'js/json2.js')); //Keep this script last 230 243 //Wait a second to give scripts time to load … … 399 412 logout : function() 400 413 { 401 TrophyIM.delCookie('trophyim_bosh_xid'); 414 TrophyIM.autoConnection.connect = false; 415 416 TrophyIM.delCookie('trophyim_bosh_xid'); 402 417 403 418 delete TrophyIM['cookies']['trophyim_bosh_xid']; 404 419 405 420 TrophyIM.connection.disconnect(); 406 TrophyIM.showLogin();407 421 }, 408 422 … … 435 449 if( status == Strophe.Status.DISCONNECTED ) 436 450 { 437 TrophyIM.delCookie('trophyim_bosh_xid'); 438 439 TrophyIM.statusConn.connected = false; 440 441 setTimeout(function() 442 { 443 TrophyIM.showLogin(); 451 if( TrophyIM.autoConnection.connect ) 452 { 453 TrophyIM.delCookie('trophyim_bosh_xid'); 444 454 445 },10000); 446 447 loadIM.clrAllContacts(); 448 449 loadIM.setStatusJabber("Desconectado","unavailable"); 450 451 delete TrophyIM.rosterObj.roster; 452 delete TrophyIM.rosterObj.groups; 455 TrophyIM.statusConn.connected = false; 456 457 setTimeout(function() 458 { 459 TrophyIM.showLogin(); 460 461 },10000); 462 463 loadIM.clrAllContacts(); 464 465 loadIM.setStatusJabber("Desconectado","unavailable"); 466 467 delete TrophyIM.rosterObj.roster; 468 delete TrophyIM.rosterObj.groups; 469 } 453 470 } 454 471 … … 1218 1235 if( type != 'status') 1219 1236 { 1220 TrophyIM.connection.send($pres( ).c('show').t(type).tree()); 1237 if(type == "unavailable") 1238 { 1239 TrophyIM.autoConnection.connect = false; 1240 } 1241 else 1242 { 1243 if( !TrophyIM.autoConnection.connect ) 1244 { 1245 TrophyIM.autoConnection.connect = true; 1246 TrophyIM.load(); 1247 } 1248 else 1249 TrophyIM.connection.send($pres( ).c('show').t(type).tree()); 1250 } 1221 1251 } 1222 1252 else
Note: See TracChangeset
for help on using the changeset viewer.