Changeset 2325


Ignore:
Timestamp:
03/22/10 17:08:29 (14 years ago)
Author:
alexandrecorreia
Message:

Ticket #986 - Adicionado function ao botao troca de status e criacao de div.

Location:
sandbox/jabberit_messenger/trophy
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • sandbox/jabberit_messenger/trophy/css/window_azul.css

    r2271 r2325  
    55        color           : #15428b !important; 
    66        display         : none; 
    7         margin          : 20px 5px 0px -15px; 
    87        position        : absolute; 
    98} 
  • sandbox/jabberit_messenger/trophy/css/window_cataratas.css

    r2271 r2325  
    55        color           : #ffffed !important; 
    66        display         : none; 
    7         margin          : 20px 5px 0px -15px; 
    87        position        : absolute; 
    98} 
  • sandbox/jabberit_messenger/trophy/css/window_celepar.css

    r2271 r2325  
    77        color:          : #585656 !important; 
    88        display         : none; 
    9         margin          : 20px 5px 0px -15px; 
    109        position        : absolute; 
    1110} 
  • sandbox/jabberit_messenger/trophy/css/window_comics.css

    r2271 r2325  
    77        color           : #000 !important; 
    88        display         : none; 
    9         margin          : 20px 5px 0px -15px; 
    109        position        : absolute; 
    1110} 
  • sandbox/jabberit_messenger/trophy/css/window_default.css

    r2271 r2325  
    77        color:          : #585656 !important; 
    88        display         : none; 
    9         margin          : 20px 5px 0px -15px; 
    109        position        : absolute; 
    1110} 
  • sandbox/jabberit_messenger/trophy/css/window_escritorio.css

    r2271 r2325  
    77        color           : #fff !important; 
    88        display         : none; 
    9         margin          : 20px 5px 0px -15px; 
    109        position        : absolute; 
    1110} 
  • sandbox/jabberit_messenger/trophy/css/window_metropole.css

    r2271 r2325  
    77        color           : #fffcdf !important; 
    88        display         : none; 
    9         margin          : 20px 5px 0px -15px; 
    109        position        : absolute; 
    1110} 
  • sandbox/jabberit_messenger/trophy/css/window_rochas.css

    r2271 r2325  
    77        color           : #000 !important; 
    88        display         : none; 
    9         margin          : 20px 5px 0px -15px; 
    109        position        : absolute; 
    1110} 
  • sandbox/jabberit_messenger/trophy/js/loadIM.js

    r2320 r2325  
    11(function() 
    22{ 
    3         var path        = "/jmessenger/"; 
    4         var _xtools     = null; 
    5         var zIndex      = 9001; 
     3        var path                        = "/jmessenger/"; 
     4        var _showhidden         = null; 
     5        var _xtools                     = null; 
     6        var zIndex                      = 9001; 
    67         
    78        function configEvents(pObj, pEvent, pHandler) 
     
    134135        } 
    135136         
    136         function TrophyIMStatusDiv() 
    137         { 
    138         var statusDiv = '<div id="trophyimstatus">' + 
    139                                                 '<span>Status::::</span>' + 
    140                                                 '<span id="trophyimstatuslist">Select box</span>' + 
    141                                                 '<br/>' +  
    142                                                 '<form>' + 
    143                                                         '<input type="button" value="disconnect" onclick="TrophyIM.logout()"/>' + 
    144                                                 '</form>' + 
    145                                                         '<input type="button" value="DND" onclick="TrophyIM.setTest(\'dnd\')">'+ 
    146                                                         '<input type="button" value="AWAY" onclick="TrophyIM.setTest(\'away\')">'+ 
    147                                                         '<input type="button" value="XA" onclick="TrophyIM.setTest(\'xa\')">'+ 
    148                                                         '<input type="button" value="INVISIBLE" onclick="TrophyIM.setTest(\'invisible\')">'+ 
    149                                                         '<input type="button" value="UNAVAILABLE" onclick="TrophyIM.setTest(\'unavailable\')">'+ 
    150                                                         '<input type="button" value="AVAILABLE" onclick="TrophyIM.setTest(\'available\')">'+ 
    151                                         '</div>'; 
    152                  
    153                 return statusDiv; 
    154                  
    155         } 
    156          
    157137        function HTMLSnippets( pType ) 
    158138        { 
     
    174154         
    175155                        this.rosterItem         = TrophyIMRosterItem; 
    176                                  
    177                         this.statusDiv          = TrophyIMStatusDiv; 
     156 
    178157                } ); 
    179158        } 
    180          
    181159         
    182160        function getZindex() 
     
    196174        function loadScripts(pFiles) 
    197175        { 
    198                 //Load JavaScript 
     176                // Load JavaScript 
    199177                var loadJavaScript = function(pJs) 
    200178                { 
     
    206184                }; 
    207185                 
    208                 //Load CSS 
     186                // Load CSS 
    209187                var loadStyleSheet = function(pCss) 
    210188                { 
     
    232210                if( arguments.length > 0 ) 
    233211                { 
    234                         alert('Valor : ' + arguments[0]);        
     212                        var element = arguments[0]; 
     213                         
     214                        if( _showhidden == null ) 
     215                                _showhidden = new ShowHidden(300); 
     216                         
     217                        var _status = [ 
     218                                               ['Afastado', 'away', '<img src="images/away.gif" />'], 
     219                                               ['Disponível', 'available', '<img src="images/available.gif" />'], 
     220                                               ['Livre p/ Conversa', 'chat', '<img src="images/chat.gif" />'], 
     221                                               ['Não Disponível', 'xa', '<img src="images/xa.gif" />'], 
     222                                               ['Ocupado', 'dnd', '<img src="images/dnd.gif" />'], 
     223                                          ]; 
     224                         
     225                        var _itens = ""; 
     226                         
     227                        for( var i in _status ) 
     228                        { 
     229                                _itens += '<span style="cursor:pointer;" onclick="TrophyIM.setPresence(\''+_status[i][1]+'\'); loadIM.setStatusJabber(\''+_status[i][0]+'\',\''+_status[i][1]+'\');">'; 
     230                                _itens += _status[i][2]+ "<span style='margin:3px;'>" + _status[i][0] + "</span></span><br/>"; 
     231                        } 
     232                         
     233                        var _statusItens = document.createElement("div"); 
     234                                _statusItens.setAttribute("style", "margin: 62px 0px 0px 76px;"); 
     235                                _statusItens.className          = "x-menu"; 
     236                                _statusItens.style.zIndex       = '99999'; 
     237                                _statusItens.innerHTML          = _itens;   
     238                                                                                   
     239                                _showhidden.action('onmouseover', 'onmouseout', _statusItens); 
     240                                 
     241                        element.parentNode.onmouseout   = function(){ _showhidden.hiddenObject(false); }; 
     242                        element.parentNode.onmouseover  = function(){ _showhidden.hiddenObject(true); }; 
     243                        element.parentNode.appendChild(_statusItens); 
    235244                } 
     245        } 
     246         
     247        function setStatusJabber() 
     248        { 
     249                if( arguments.length > 0 ) 
     250                { 
     251                        var _text       = arguments[0]; 
     252                        var _img        = arguments[1]; 
     253                         
     254                        document.getElementById('statusJabberImg').setAttribute("style", "background-image: url('images/"+_img+".gif'); margin-left: 13px;width:15px; height:15px;"); 
     255                        document.getElementById('statusJabberText').innerHTML = _text; 
     256                }        
    236257        } 
    237258         
     
    250271                                 'js/show_hidden.js', 
    251272                                 'css/trophyim.css', 
    252                                  //'css/window_azul.css' 
     273                                 'css/window_azul.css' 
    253274                                 //'css/window_cataratas.css' 
    254275                                 //'css/window_celepar.css' 
     
    257278                                 //'css/window_escritorio.css' 
    258279                                 //'css/window_metropole.css' 
    259                                  'css/window_rochas.css' 
     280                                 //'css/window_rochas.css' 
    260281                            ]; 
    261282                 
    262283                loadScripts(files); 
    263         } 
    264          
     284                 
     285        } 
    265286         
    266287        loadIM.prototype.configEvents           = configEvents; 
     
    268289        loadIM.prototype.parse                          = parse; 
    269290        loadIM.prototype.setPresence            = setPresence; 
     291        loadIM.prototype.setStatusJabber        = setStatusJabber; 
    270292         
    271293        loadIM.prototype.HTMLSnippets           = new HTMLSnippets; 
  • sandbox/jabberit_messenger/trophy/js/trophyim.js

    r2312 r2325  
    7272        rosterItem      : loadIM.HTMLSnippets.rosterItem( ), 
    7373     
    74         statusDiv       : loadIM.HTMLSnippets.statusDiv( ), 
     74        //statusDiv     : loadIM.HTMLSnippets.statusDiv( ), 
    7575}; 
    7676 
     
    10751075                if( arguments.length > 0 ) 
    10761076                { 
    1077                         //alert('Args 0 : ' + arguments[0]); 
    10781077                        TrophyIM.connection.send($pres( ).c('show').t(arguments[0])); 
    10791078                } 
     
    11061105                        // Add Message in chatBox; 
    11071106                        TrophyIM.addMessage( message, jidTo); 
     1107                                document.getElementById(jidTo + "__sendBox").value = ""; 
     1108                                document.getElementById(jidTo + "__sendBox").focus(); 
    11081109                } 
    11091110        } 
  • sandbox/jabberit_messenger/trophy/xsl/contactsList.xsl

    r2320 r2325  
    99                         
    1010                        <div style="position: absolute; margin-top: -19px; margin-left: 75px; cursor: pointer;" onclick="loadIM.setPresence(this);"> 
    11                                 <div style="background-image: url('images/available.gif'); margin-left: 13px;width:15px; height:15px;"></div> 
    12                                 <div style="margin-top: -13px; margin-left: 30px;"> Online </div> 
     11                                <div id="statusJabberImg" style="background-image: url('images/available.gif'); margin-left: 13px;width:15px; height:15px;"></div> 
     12                                <div id="statusJabberText" style="margin-top: -13px; margin-left: 30px;"> Disponível </div> 
    1313                                <div style="background-image: url('images/arrow_down.gif'); margin-top: -8px; margin-left: 0px; width:15px; height:15px;"/>  
    1414                        </div> 
Note: See TracChangeset for help on using the changeset viewer.