Ignore:
Timestamp:
04/20/10 11:08:51 (14 years ago)
Author:
alexandrecorreia
Message:

Ticket #986 - Notificacao de nova mensagem e posicionamento das janelas.

File:
1 edited

Legend:

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

    r2584 r2599  
    77        var selectEditable      = null; 
    88        var showhidden          = null; 
     9        var timeoutId           = null 
    910        var userCurrent         = null; 
    1011        var Xtools                      = null; 
     
    320321                        if( pFiles[i].indexOf(".css") > -1 ) 
    321322                                document.getElementsByTagName("head")[0].appendChild(loadStyleSheet(pFiles[i])); 
     323                } 
     324        } 
     325         
     326        function notificationNewMessage() 
     327        { 
     328                var oldTitle    = document.title;  
     329                var newTitle    = " ## NOVA MENSAGEM ## ";  
     330                var idWindow    = arguments[1]; 
     331                 
     332                if( timeoutId == null) 
     333                { 
     334                        timeoutId = setInterval(function() 
     335                        {  
     336                                document.title = document.title == newTitle ? ' ' : newTitle; 
     337                                 
     338                        }, 1000); 
     339                         
     340                        configEvents( window, 'onclick', function() 
     341                        {  
     342                                clearInterval(timeoutId); 
     343                                document.title  = oldTitle; 
     344                                timeoutId               = null; 
     345                        }); 
    322346                } 
    323347        } 
     
    653677        } 
    654678         
     679        loadIM.prototype.addIcon                        = addIcon; 
    655680        loadIM.prototype.actionButton           = actionButton; 
    656681        loadIM.prototype.addContact                     = addContact; 
     
    663688        loadIM.prototype.keyPressSearch         = keyPressSearch;        
    664689        loadIM.prototype.loginPage                      = loginPage; 
     690        loadIM.prototype.notification           = notificationNewMessage; 
    665691        loadIM.prototype.parse                          = parse; 
    666692        loadIM.prototype.searchUser                     = searchUser 
Note: See TracChangeset for help on using the changeset viewer.