Ignore:
Timestamp:
04/27/10 16:43:28 (14 years ago)
Author:
alexandrecorreia
Message:

Ticket #986 - Correcao para compatibilizar o carregamento do script para o IE.

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  
    233233                function showForm() 
    234234                { 
     235                         
    235236                        var _paramsWindAddUser = 
    236237                        { 
  • sandbox/jabberit_messenger/trophy_expresso/js/trophyim.js

    r2631 r2641  
    132132TrophyIM = { 
    133133     
     134        /** AutoConnection 
     135         *  
     136         */      
     137                 
     138        autoConnection : { connect : true }, 
     139                 
     140        /** PosWindow 
     141         *  
     142         */      
    134143        posWindow : { left : 400, top : 100 },   
    135144                 
     145        /** StatusConnection 
     146         *  
     147         */ 
     148 
    136149        statusConn : { connected : false }, 
    137150         
     
    196209        for (var c in cookies) 
    197210        { 
    198             while (cookies[c].charAt(0)==' ') 
     211                while ( cookies[c].charAt(0) == ' ') 
    199212            {  
    200213                cookies[c] = cookies[c].substring(1,cookies[c].length); 
     
    226239                         
    227240                        //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')); 
    229242                        document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + 'js/json2.js')); //Keep this script last 
    230243                        //Wait a second to give scripts time to load 
     
    399412    logout : function() 
    400413        { 
    401         TrophyIM.delCookie('trophyim_bosh_xid'); 
     414        TrophyIM.autoConnection.connect = false; 
     415         
     416        TrophyIM.delCookie('trophyim_bosh_xid'); 
    402417         
    403418        delete TrophyIM['cookies']['trophyim_bosh_xid']; 
    404419         
    405420        TrophyIM.connection.disconnect(); 
    406         TrophyIM.showLogin(); 
    407421    }, 
    408422         
     
    435449                if( status == Strophe.Status.DISCONNECTED ) 
    436450                { 
    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'); 
    444454                     
    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                        } 
    453470        } 
    454471                 
     
    12181235                if( type != 'status') 
    12191236                { 
    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                        } 
    12211251                } 
    12221252                else 
Note: See TracChangeset for help on using the changeset viewer.