Changeset 5320


Ignore:
Timestamp:
01/06/12 14:27:26 (12 years ago)
Author:
alexandrecorreia
Message:

Ticket #2260 - Sincronismo do módulo IM para o trunk.

Location:
trunk/jabberit_messenger
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/jabberit_messenger/inc/jabberit_acl.inc.php

    r5041 r5320  
    8181                        $js .= "var _ZINDEX='99000'; ";  
    8282         
    83                         // Xtools Phpgwapi 
    84                         echo "<script type='text/javascript' src='".$webserver_expresso."js/x_tools/xtools.js'></script>"; 
     83            // Xtools Phpgwapi 
     84            echo "<script type='text/javascript' src='".$webserver_expresso."js/x_tools/xtools.js'></script>"; 
    8585                         
    86                         // Javascript JMessenger 
    87                         echo "<script type=\"text/javascript\">".$js."</script>"; 
     86            // Javascript JMessenger 
     87            echo "<script type=\"text/javascript\">".$js."</script>"; 
    8888                        $js = array( 
    8989                                                'j.connector', 
  • trunk/jabberit_messenger/jmessenger/inc/jabberit_acl.inc.php

    r5041 r5320  
    8686                $preferences    = $_DbIM->getPreferences(); 
    8787                 
    88                  
    8988                echo "<script type='text/javascript'>".$js."</script>"; 
    9089                echo "<script type='text/javascript' src='".$webserver_url .        "js/strophe.mini.js'></script>"; 
    9190                echo "<script type='text/javascript' src='".$webserver_expresso .   "js/browser/browserDetect.js'></script>"; 
    92                 echo "<script type='text/javascript' src='".$webserver_url .        "js/jscode/loadIM.mini.js'></script>"; 
    93                 echo "<script type='text/javascript' src='".$webserver_url .        "js/connector.mini.js'></script>"; 
    94                 echo "<script type='text/javascript' src='".$webserver_expresso .   "js/x_tools/xtools.js'></script>"; 
    95                 echo "<script type='text/javascript' src='".$webserver_url .        "js/lang/i18n_pt_Br.mini.js'></script>"; 
    96                 echo "<script type='text/javascript' src='".$webserver_url .        "js/dragdrop.mini.js'></script>"; 
     91                echo "<script type='text/javascript' src='".$webserver_url .        "js/jscode/loadIM.mini.js'></script>"; 
     92                echo "<script type='text/javascript' src='".$webserver_url .        "js/connector.mini.js'></script>"; 
     93                echo "<script type='text/javascript' src='".$webserver_expresso .   "js/x_tools/xtools.js'></script>"; 
     94                echo "<script type='text/javascript' src='".$webserver_url .        "js/lang/i18n_pt_Br.mini.js'></script>"; 
     95                echo "<script type='text/javascript' src='".$webserver_url .        "js/dragdrop.mini.js'></script>"; 
    9796                echo "<script type='text/javascript' src='".$webserver_url .        "js/makeW.mini.js'></script>"; 
    9897                echo "<script type='text/javascript' src='".$webserver_url .        "js/show_hidden.mini.js'></script>"; 
    9998                echo "<script type='text/javascript' src='".$webserver_url .        "js/trophyim_constants.js'></script>"; 
    100                 echo "<script type='text/javascript' src='".$webserver_url .        "js/trophyim.mini.js'></script>"; 
    101                 echo "<script type='text/javascript' src='".$webserver_url .        "js/AddUser.mini.js'></script>";                                             
     99        echo "<script type='text/javascript' src='".$webserver_url .        "js/trophyim.mini.js'></script>"; 
     100        echo "<script type='text/javascript' src='".$webserver_url .        "js/AddUser.mini.js'></script>";                                             
    102101                echo "<script type='text/javascript' src='".$webserver_url .        "js/json2.js'></script>"; 
    103102                echo "<script type='text/javascript' src='".$webserver_url .        "js/SelectEditable.mini.js'></script>"; 
  • trunk/jabberit_messenger/jmessenger/js/trophyim.js

    r5217 r5320  
    622622                if( getAttribute('ask') && getAttribute('ask').toString() === "subscribe" )  
    623623                { 
     624                    if( getAttribute('subscription').toString() === "none" ) 
     625                    { 
     626                        TrophyIM.rosterObj.addContact( getAttribute('jid'), getAttribute('ask'), getAttribute('name'), group_array ); 
     627                    } 
     628                                         
    624629                    if( getAttribute('subscription').toString() === "remove" ) 
    625630                    { 
    626631                        TrophyIM.rosterObj.removeContact( getAttribute('jid').toString() ); 
    627                     } 
    628                     else 
    629                     { 
    630                         TrophyIM.rosterObj.addContact( getAttribute('jid'), getAttribute('ask'), getAttribute('name'), group_array ); 
    631632                    } 
    632633                } 
     
    642643                    } 
    643644                } 
    644             } 
     645                } 
    645646        } 
    646647 
  • trunk/jabberit_messenger/jmessenger/js/trophyim.mini.js

    r5217 r5320  
    2828{loadscript.rosterDiv();}},storeData:function() 
    2929{if(TrophyIM.connection&&TrophyIM.connection.connected) 
    30 {TrophyIM.setCookie('trophyim_bosh_xid',TrophyIM.connection.jid+"|"+TrophyIM.connection.sid+"|"+TrophyIM.connection.rid);TrophyIM.rosterObj.save();}},showLogin:function() 
     30{TrophyIM.setCookie('trophyim_bosh_xid',TrophyIM.connection.jid+"|"+ 
     31TrophyIM.connection.sid+"|"+TrophyIM.connection.rid);TrophyIM.rosterObj.save();}},showLogin:function() 
    3132{if(typeof(JSON)!=undefined&&typeof(Strophe)!=undefined) 
    3233{TrophyIM.JSONStore=new TrophyIMJSONStore();if(TrophyIM.JSONStore.store_working&&TrophyIM.cookies['trophyim_bosh_xid']) 
     
    6768if(status==Strophe.Status.CONNECTED) 
    6869{loadscript.setStatusJabber(i18n.STATUS_AVAILABLE,'available');TrophyIM.statusConn.connected=true;TrophyIM.showClient();}},showClient:function() 
    69 {TrophyIM.setCookie('trophyim_bosh_xid',TrophyIM.connection.jid+"|"+TrophyIM.connection.sid+"|"+TrophyIM.connection.rid);TrophyIM.rosterObj=new TrophyIMRoster();TrophyIM.connection.addHandler(TrophyIM.onVersion,Strophe.NS.VERSION,'iq',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onRoster,Strophe.NS.ROSTER,'iq',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onPresence,null,'presence',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onMessage,null,'message',null,null,null);TrophyIM.connection.send($iq({type:'get',xmlns:Strophe.NS.CLIENT}).c('query',{xmlns:Strophe.NS.ROSTER}).tree());TrophyIM.connection.send($pres().tree());setTimeout(TrophyIM.renderRoster,1000);},clearClient:function() 
     70{TrophyIM.setCookie('trophyim_bosh_xid',TrophyIM.connection.jid+"|"+ 
     71TrophyIM.connection.sid+"|"+TrophyIM.connection.rid);TrophyIM.rosterObj=new TrophyIMRoster();TrophyIM.connection.addHandler(TrophyIM.onVersion,Strophe.NS.VERSION,'iq',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onRoster,Strophe.NS.ROSTER,'iq',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onPresence,null,'presence',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onMessage,null,'message',null,null,null);TrophyIM.connection.send($iq({type:'get',xmlns:Strophe.NS.CLIENT}).c('query',{xmlns:Strophe.NS.ROSTER}).tree());TrophyIM.connection.send($pres().tree());setTimeout(TrophyIM.renderRoster,1000);},clearClient:function() 
    7072{if(TrophyIM.logging_div) 
    7173{var logging_div=TrophyIM.client_div.removeChild(document.getElementById('trophyimlog'));} 
     
    8486group_array[group_array.length]=groups[g].firstChild.nodeValue;} 
    8587if(getAttribute('ask')&&getAttribute('ask').toString()==="subscribe") 
    86 {if(getAttribute('subscription').toString()==="remove") 
    87 {TrophyIM.rosterObj.removeContact(getAttribute('jid').toString());} 
    88 else 
    89 {TrophyIM.rosterObj.addContact(getAttribute('jid'),getAttribute('ask'),getAttribute('name'),group_array);}} 
     88{if(getAttribute('subscription').toString()==="none") 
     89{TrophyIM.rosterObj.addContact(getAttribute('jid'),getAttribute('ask'),getAttribute('name'),group_array);} 
     90if(getAttribute('subscription').toString()==="remove") 
     91{TrophyIM.rosterObj.removeContact(getAttribute('jid').toString());}} 
    9092else 
    9193{if((getAttribute('ask')==null&&getAttribute('subscription').toString()==="remove")||getAttribute('subscription').toString()==="remove") 
     
    405407{current=presence} 
    406408else 
    407 {if(presence['priority']>current['priority']&&((presence['show']=="chat"||presence['show']=="available")||(current['show']!="chat"||current['show']!="available"))) 
     409{if(presence['priority']>current['priority']&&((presence['show']=="chat" 
     410||presence['show']=="available")||(current['show']!="chat"||current['show']!="available"))) 
    408411{current=presence}}}} 
    409412return current;} 
     
    440443return xhr;} 
    441444this.getData=function(vars){if(typeof(TROPHYIM_JSON_STORE)!=undefined){Strophe.debug("Retrieving JSONStore data");var xhr=this._newXHR();var getdata="get="+vars.join(",");try{xhr.open("POST",TROPHYIM_JSON_STORE,false);}catch(e){Strophe.error("JSONStore open failed.");return false;} 
    442 xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');xhr.setRequestHeader('Content-length',getdata.length);xhr.send(getdata);if(xhr.readyState==4&&xhr.status==200){try{var dataObj=JSON.parse(xhr.responseText);return this.emptyFix(dataObj);}catch(e){Strophe.error("Could not parse JSONStore response"+xhr.responseText);return false;}}else{Strophe.error("JSONStore open failed. Status: "+xhr.status);return false;}}} 
     445xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');xhr.setRequestHeader('Content-length',getdata.length);xhr.send(getdata);if(xhr.readyState==4&&xhr.status==200){try{var dataObj=JSON.parse(xhr.responseText);return this.emptyFix(dataObj);}catch(e){Strophe.error("Could not parse JSONStore response"+ 
     446xhr.responseText);return false;}}else{Strophe.error("JSONStore open failed. Status: "+xhr.status);return false;}}} 
    443447this.emptyFix=function(obj){if(typeof(obj)=="object"){for(var i in obj){if(obj[i].constructor==Function) 
    444448continue;if(i=='_empty_'){obj[""]=this.emptyFix(obj['_empty_']);delete obj['_empty_'];}else{obj[i]=this.emptyFix(obj[i]);}}} 
  • trunk/jabberit_messenger/js/load.js

    r5183 r5320  
    118118                } 
    119119        } 
    120  
     120         
    121121    function fastMenu() 
    122                                 { 
     122    { 
    123123        if( arguments.length > 0 ) 
    124124        { 
    125125            var element = arguments[0]; 
    126126 
    127                                         var _options = [ 
     127            var _options = [ 
    128128                                    ['Add Contact', 'loadscript.addContacts();'], 
    129129                                    ['Help', 'loadscript.helpJabberit();'], 
    130130                                    ['Preferences', 'loadscript.preferences();'] 
    131                                         ]; 
    132  
     131                               ]; 
     132             
    133133            var _itens = ""; 
    134  
     134                 
    135135            for( var i in _options ) 
    136                                         { 
     136            { 
    137137                if( _options[i].constructor == Function ) 
    138138                    continue; 
    139                                                  
     139                         
    140140                _itens += '<img src="'+jabberit_group_close.src +'"/>'; 
    141141                _itens += '<span style="cursor:pointer; margin:3px;" onclick='+_options[i][1]+'>'; 
     
    153153                _showhidden.hiddenObject(false); 
    154154            }; 
    155  
     155             
    156156            _optionsItens.onmouseout = function(){ 
    157157                _showhidden.hiddenObject(false); 
    158158            }; 
    159  
     159             
    160160            _optionsItens.onmouseover = function(){ 
    161161                _showhidden.hiddenObject(true); 
    162162            };   
    163  
     163                                                                           
    164164            _showhidden.action('onmouseover', 'onmouseout', _optionsItens); 
    165  
     165                         
    166166            element.parentNode.appendChild( _optionsItens ); 
    167                 } 
    168         } 
    169  
    170         function addUser() 
     167        } 
     168    } 
     169 
     170    function addUser() 
    171171        { 
    172172                _ldap.addUser(); 
  • trunk/jabberit_messenger/js/show_hidden.js

    r5183 r5320  
    66 
    77        var _last_displayed; 
    8         var _timeout = false; 
     8        var _timeout            = false; 
    99 
    1010        function _config(pObj, pEvent, pHandler) 
     
    4040                        { 
    4141                                _timeout = setTimeout( hdObject, _delay); 
     42                        } 
    4243                } 
    43         } 
    4444        } 
    4545 
     
    4848                if( !(_last_displayed && ( _last_displayed.id == _element.id ))) 
    4949                { 
    50                 _element.style.display = 'block'; 
    51                 _last_displayed = _element; 
    52         } 
     50                        _element.style.display = 'block'; 
     51                        _last_displayed = _element; 
     52                } 
    5353        } 
    5454 
     
    104104 
    105105         
    106         ShowHidden.prototype.action  = _view; 
    107         ShowHidden.prototype.hiddenObject = _hidden; 
     106        ShowHidden.prototype.action             = _view; 
     107        ShowHidden.prototype.hiddenObject       = _hidden; 
    108108     
    109     window.ShowHidden = ShowHidden; 
     109        window.ShowHidden                                       = ShowHidden; 
    110110     
    111111})(); 
Note: See TracChangeset for help on using the changeset viewer.