Ignore:
Timestamp:
05/14/10 17:34:49 (14 years ago)
Author:
alexandrecorreia
Message:

Ticket #986 - Implementado os popups para as janelas de conversa e somente para navegadores Firefox.

Location:
sandbox/jabberit_messenger/trophy_expresso
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sandbox/jabberit_messenger/trophy_expresso/js/jscode/loadIM.js

    r2787 r2791  
    448448        function loginPage() 
    449449        { 
     450                var paramsLoginPage =  
     451                { 
     452                        'username' : ((( Base64.decode(getUserCurrent().jid) )) ? Base64.decode(getUserCurrent().jid) : ""), 
     453                        'password' : ((( Base64.decode(getUserCurrent().password) )) ? Base64.decode(getUserCurrent().password) : "")  
     454                } 
     455                 
    450456                var winLoginPage = 
    451457                {        
    452458                         id_window              : "window_login_page", 
    453459                         width                  : 260, 
    454                          height                 : 150, 
     460                         height                 : 120, 
    455461                         top                    : 100, 
    456462                         left                   : 400, 
     
    461467                         title                  : "Expresso Messenger - Login", 
    462468                         closeAction    : "remove", 
    463                          content                : Xtools.parse(Xtools.xml("login_page"), "loginPage.xsl")        
     469                         content                : Xtools.parse(Xtools.xml("login_page"), "loginPage.xsl", paramsLoginPage)       
    464470                }; 
    465471 
     
    773779                } 
    774780                 
    775                 setTimeout( function(){ _rosterDiv(); }, 500 ); 
     781                setTimeout( function(){ _rosterDiv(); }, 550 ); 
    776782        } 
    777783 
     
    10551061        function setUserCurrent() 
    10561062        { 
    1057                 conn.go('p.ff.data_0', 
    1058                                         function(_User) 
    1059                                         { 
    1060                                                 var _user = _User; 
    1061                                                  
    1062                                                 conn.go('p.ff.data_1', 
    1063                                                                 function(_pass) 
    1064                                                                 { 
    1065                                                                         _setUserCurrent( _user, _pass ); 
    1066                                                                 }); 
    1067                                         });      
     1063                if( getUserCurrent() == null ) 
     1064                { 
     1065                        conn.go('p.ff.data_0', 
     1066                                                function(_User) 
     1067                                                { 
     1068                                                        var _user = _User; 
     1069                                                         
     1070                                                        conn.go('p.ff.data_1', 
     1071                                                                        function(_pass) 
     1072                                                                        { 
     1073                                                                                _setUserCurrent( _user, _pass ); 
     1074                                                                        }); 
     1075                                                }); 
     1076                } 
    10681077        } 
    10691078 
  • sandbox/jabberit_messenger/trophy_expresso/js/trophyim.js

    r2787 r2791  
    247247        }         
    248248 
    249         if (!TrophyIM.statusConn.connected) 
     249        if ( !TrophyIM.statusConn.connected ) 
    250250                { 
    251251                        TrophyIM.cookies = TrophyIM.getCookies(); 
     
    253253                        //Load other .js scripts needed 
    254254                        document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + 'js/strophe.min.js')); 
    255                         //document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + 'js/strophe.js')); 
    256255                        document.getElementsByTagName('head')[0].appendChild(DOMObjects.getScript(path_jabberit + 'js/json2.js')); //Keep this script last 
    257256                         
     
    319318                                loadscript.rosterDiv(); 
    320319                                 
    321                                 if ( loadscript.getUserCurrent() != null ) 
     320                                // Get User Current; 
     321                                var _getUserCurrent = loadscript.getUserCurrent(); 
     322                                 
     323                                setTimeout(function() 
    322324                                { 
    323                                         TrophyIM.login( Base64.decode(loadscript.getUserCurrent().jid), Base64.decode(loadscript.getUserCurrent().password)); 
    324                                 } 
    325                                 else 
    326                                 { 
    327                                         loadscript.loginPage(); 
    328                                 } 
     325                                        if ( _getUserCurrent != null ) 
     326                                                TrophyIM.login( Base64.decode( _getUserCurrent.jid ), Base64.decode( _getUserCurrent.password )); 
     327                                        else 
     328                                                loadscript.loginPage(); 
     329                                }, 200); 
    329330            } 
    330331        } 
     
    384385    login : function() 
    385386        { 
    386                 if (TrophyIM.JSONStore.store_working) 
     387                if ( TrophyIM.JSONStore.store_working ) 
    387388                {  
    388389                   //In case they never logged out 
     
    404405                else 
    405406                { 
     407                         
    406408                        var barejid             = document.getElementById('trophyimjid').value 
    407409                        var fulljid             = barejid + TROPHYIM_RESOURCE; 
     
    414416                        { 
    415417                                button.value = 'disconnect'; 
    416                                 TrophyIM.connection.connect(fulljid, password, TrophyIM.onConnect); 
    417                         } 
    418                         else 
    419                         { 
    420                                 button.value = 'connect'; 
    421                                 TrophyIM.connection.disconnect(); 
     418                                //TrophyIM.connection.connect( fulljid , password, TrophyIM.onConnect ); 
     419                                 
     420                                TrophyIM.login( barejid, password ); 
     421                                _winBuild('window_login_page', 'remove'); 
    422422                        } 
    423423                } 
  • sandbox/jabberit_messenger/trophy_expresso/xsl/loginPage.xsl

    r2398 r2791  
    33        <xsl:output method="html" omit-xml-declaration="yes"/> 
    44         
     5        <xsl:param name="username" />    
     6        <xsl:param name="password" /> 
     7         
    58        <xsl:template match="login_page"> 
    69                 
    7                 <div id="trophyimlogin"> 
    8                          
    9                         <form name="cred"> 
    10                                 <table border="0"> 
    11                                         <tr> 
    12                                                 <td align="right">JID:</td> 
    13                                                 <td><input type="text" id="trophyimjid"/></td> 
    14                                         </tr> 
    15                                         <tr> 
    16                                                 <td align="right">Password:</td> 
    17                                                 <td><input type="password" id="trophyimpass"/></td> 
    18                                         </tr> 
    19                                         <tr> 
    20                                                 <td colspan="2" align="center"> 
    21                                                         <input type="button" id="trophyimconnect" value="connect" onclick="TrophyIM.login()"/> 
    22                                                 </td> 
    23                                         </tr> 
    24                                 </table> 
    25                         </form> 
    26                          
    27                 </div> 
     10                <center> 
     11                        <div id="trophyimlogin"> 
     12                                <form name="cred"> 
     13                                        <table style="border:0px"> 
     14                                                <tr> 
     15                                                        <td align="right">Usuário:</td> 
     16                                                        <td><input type="text" id="trophyimjid" value="{$username}" /></td> 
     17                                                </tr> 
     18                                                <tr> 
     19                                                        <td align="right">Password:</td> 
     20                                                        <td><input type="password" id="trophyimpass" value="{$password}" /></td> 
     21                                                </tr> 
     22                                        </table> 
     23                                        <br/> 
     24                                        <table> 
     25                                                <tr> 
     26                                                        <td colspan="2" align="center"> 
     27                                                                <input type="button" id="trophyimconnect" value="connect" onclick="TrophyIM.login()"/> 
     28                                                        </td> 
     29                                                </tr> 
     30                                        </table> 
     31                                </form> 
     32                        </div> 
     33                </center> 
    2834                  
    2935        </xsl:template> 
Note: See TracChangeset for help on using the changeset viewer.