source: trunk/instant_messenger/js/load.js @ 151

Revision 151, 1.3 KB checked in by niltonneto, 16 years ago (diff)

Commit da nova versão do módulo, usando agente em C.
Vide Página do módulo do Trac:
http://www.expressolivre.org/dev/wiki/messenger

A versão anterior encontra-se na subpasta bkp (32/64).

Line 
1    window.document.onmouseover = awayTimer;
2   
3    var _awayTimer_     = null;
4        var cod_emotions = {
5                ":)" : [1,"\\\:\\\)"],
6                ":d" : [2,"\\\:d"],
7                ";)" : [3,"\\\;\\\)"],
8                ":o" : [4,"\\\:o"],
9                ":p" : [5,"\\\:p"],
10                "(h)" : [6,"\\\(h\\\)"],
11                ":@" : [7,"\\\:\\\@"],
12                ":$" : [8,"\\\:\\\$"],
13                ":s" : [9,"\\\:s"],
14                ":(" : [10,"\\\:\\\("],
15                ":'(" : [11,"\\\:\\\'\\\("],
16                ":|" : [12,"\\\:\\\|"]
17        };
18   
19        function shortcut_im()
20        {
21                var local = "";
22                if((local = func.byId('user_info')) && !(func.byId('instant_messenger_content')))
23                {
24                        local.innerHTML = '<img src="' + im_fast_menu.src + '" onclick="javascript:templates.fast_menu();"/>' +
25                                                          '<img id="im_status_src" src="' + im_available.src + '" onclick="javascript:im_window.load(\'_contacts_im_\', \'instant_messenger_content\', \'<title>Expresso Messenger</title>\', \'window.xsl\',\'\',true,true,true);"/>' +
26                                                          local.innerHTML + '<div id="instant_messenger_content"><span id="fast_menu_im"/></div>';
27                }
28                // Carregando Preferências do usuário
29                im.get_preferences();
30        }
31       
32        function awayTimer()
33        {
34                if( _awayTimer_ )
35                {
36                        clearTimeout(_awayTimer_);
37                        if( im.statusFlag && im.statusFlag === 'xa')
38                                im.presence('available');
39                }
40                _awayTimer_ = setTimeout("im.set_timeOut()", parseInt(im.timeOut_im) * 60000 );
41        }
42       
43        shortcut_im();                 
44        awayTimer();
Note: See TracBrowser for help on using the repository browser.