Changeset 5320
- Timestamp:
- 01/06/12 14:27:26 (12 years ago)
- Location:
- trunk/jabberit_messenger
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/inc/jabberit_acl.inc.php
r5041 r5320 81 81 $js .= "var _ZINDEX='99000'; "; 82 82 83 84 83 // Xtools Phpgwapi 84 echo "<script type='text/javascript' src='".$webserver_expresso."js/x_tools/xtools.js'></script>"; 85 85 86 87 86 // Javascript JMessenger 87 echo "<script type=\"text/javascript\">".$js."</script>"; 88 88 $js = array( 89 89 'j.connector', -
trunk/jabberit_messenger/jmessenger/inc/jabberit_acl.inc.php
r5041 r5320 86 86 $preferences = $_DbIM->getPreferences(); 87 87 88 89 88 echo "<script type='text/javascript'>".$js."</script>"; 90 89 echo "<script type='text/javascript' src='".$webserver_url . "js/strophe.mini.js'></script>"; 91 90 echo "<script type='text/javascript' src='".$webserver_expresso . "js/browser/browserDetect.js'></script>"; 92 93 94 95 96 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>"; 97 96 echo "<script type='text/javascript' src='".$webserver_url . "js/makeW.mini.js'></script>"; 98 97 echo "<script type='text/javascript' src='".$webserver_url . "js/show_hidden.mini.js'></script>"; 99 98 echo "<script type='text/javascript' src='".$webserver_url . "js/trophyim_constants.js'></script>"; 100 101 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>"; 102 101 echo "<script type='text/javascript' src='".$webserver_url . "js/json2.js'></script>"; 103 102 echo "<script type='text/javascript' src='".$webserver_url . "js/SelectEditable.mini.js'></script>"; -
trunk/jabberit_messenger/jmessenger/js/trophyim.js
r5217 r5320 622 622 if( getAttribute('ask') && getAttribute('ask').toString() === "subscribe" ) 623 623 { 624 if( getAttribute('subscription').toString() === "none" ) 625 { 626 TrophyIM.rosterObj.addContact( getAttribute('jid'), getAttribute('ask'), getAttribute('name'), group_array ); 627 } 628 624 629 if( getAttribute('subscription').toString() === "remove" ) 625 630 { 626 631 TrophyIM.rosterObj.removeContact( getAttribute('jid').toString() ); 627 }628 else629 {630 TrophyIM.rosterObj.addContact( getAttribute('jid'), getAttribute('ask'), getAttribute('name'), group_array );631 632 } 632 633 } … … 642 643 } 643 644 } 644 }645 } 645 646 } 646 647 -
trunk/jabberit_messenger/jmessenger/js/trophyim.mini.js
r5217 r5320 28 28 {loadscript.rosterDiv();}},storeData:function() 29 29 {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+"|"+ 31 TrophyIM.connection.sid+"|"+TrophyIM.connection.rid);TrophyIM.rosterObj.save();}},showLogin:function() 31 32 {if(typeof(JSON)!=undefined&&typeof(Strophe)!=undefined) 32 33 {TrophyIM.JSONStore=new TrophyIMJSONStore();if(TrophyIM.JSONStore.store_working&&TrophyIM.cookies['trophyim_bosh_xid']) … … 67 68 if(status==Strophe.Status.CONNECTED) 68 69 {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+"|"+ 71 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 72 {if(TrophyIM.logging_div) 71 73 {var logging_div=TrophyIM.client_div.removeChild(document.getElementById('trophyimlog'));} … … 84 86 group_array[group_array.length]=groups[g].firstChild.nodeValue;} 85 87 if(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);} 90 if(getAttribute('subscription').toString()==="remove") 91 {TrophyIM.rosterObj.removeContact(getAttribute('jid').toString());}} 90 92 else 91 93 {if((getAttribute('ask')==null&&getAttribute('subscription').toString()==="remove")||getAttribute('subscription').toString()==="remove") … … 405 407 {current=presence} 406 408 else 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"))) 408 411 {current=presence}}}} 409 412 return current;} … … 440 443 return xhr;} 441 444 this.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;}}} 445 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"+ 446 xhr.responseText);return false;}}else{Strophe.error("JSONStore open failed. Status: "+xhr.status);return false;}}} 443 447 this.emptyFix=function(obj){if(typeof(obj)=="object"){for(var i in obj){if(obj[i].constructor==Function) 444 448 continue;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 118 118 } 119 119 } 120 120 121 121 function fastMenu() 122 122 { 123 123 if( arguments.length > 0 ) 124 124 { 125 125 var element = arguments[0]; 126 126 127 127 var _options = [ 128 128 ['Add Contact', 'loadscript.addContacts();'], 129 129 ['Help', 'loadscript.helpJabberit();'], 130 130 ['Preferences', 'loadscript.preferences();'] 131 132 131 ]; 132 133 133 var _itens = ""; 134 134 135 135 for( var i in _options ) 136 136 { 137 137 if( _options[i].constructor == Function ) 138 138 continue; 139 139 140 140 _itens += '<img src="'+jabberit_group_close.src +'"/>'; 141 141 _itens += '<span style="cursor:pointer; margin:3px;" onclick='+_options[i][1]+'>'; … … 153 153 _showhidden.hiddenObject(false); 154 154 }; 155 155 156 156 _optionsItens.onmouseout = function(){ 157 157 _showhidden.hiddenObject(false); 158 158 }; 159 159 160 160 _optionsItens.onmouseover = function(){ 161 161 _showhidden.hiddenObject(true); 162 162 }; 163 163 164 164 _showhidden.action('onmouseover', 'onmouseout', _optionsItens); 165 165 166 166 element.parentNode.appendChild( _optionsItens ); 167 168 169 170 167 } 168 } 169 170 function addUser() 171 171 { 172 172 _ldap.addUser(); -
trunk/jabberit_messenger/js/show_hidden.js
r5183 r5320 6 6 7 7 var _last_displayed; 8 var _timeout = false;8 var _timeout = false; 9 9 10 10 function _config(pObj, pEvent, pHandler) … … 40 40 { 41 41 _timeout = setTimeout( hdObject, _delay); 42 } 42 43 } 43 }44 44 } 45 45 … … 48 48 if( !(_last_displayed && ( _last_displayed.id == _element.id ))) 49 49 { 50 _element.style.display = 'block';51 _last_displayed = _element;52 }50 _element.style.display = 'block'; 51 _last_displayed = _element; 52 } 53 53 } 54 54 … … 104 104 105 105 106 ShowHidden.prototype.action = _view;107 ShowHidden.prototype.hiddenObject 106 ShowHidden.prototype.action = _view; 107 ShowHidden.prototype.hiddenObject = _hidden; 108 108 109 window.ShowHidden= ShowHidden;109 window.ShowHidden = ShowHidden; 110 110 111 111 })();
Note: See TracChangeset
for help on using the changeset viewer.