- Timestamp:
- 08/16/07 08:04:37 (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/InfoContact.js
r46 r54 132 132 IM.action_button(event, '1', email ,false); 133 133 } 134 emInfoContact.prototype.verifyPermissionIM = function(uid, domain, email){135 136 var handler_verifyPermissionIM = function(data){137 if(!data){138 alert("Esse usuário ("+uid+") não possui o módulo Expresso IM habilitado");139 }140 else141 Preferences.updateLoad(''+uid+"@"+domain+'');142 }143 144 IM.UserPermission(uid,handler_verifyPermissionIM);145 146 }147 134 148 135 emInfoContact.prototype.verifyIM = function(uid, email){ 149 if(!window.IM)150 return "<br><br>";151 136 152 if (!IM.array_users || !IM.array_users.length)153 return "<br ><br>";137 if ( !window.IM || !document.getElementById('myStatus') ) 138 return "<br/><br/>"; 154 139 155 var status = "Not Registered"; 156 var subscription = ""; 157 var _return = ""; 158 var jid = ""; 159 var array_jid = null; 140 var status = IM.infoContact(uid); 141 var _return = '<br/><br/>'; 160 142 161 for(i = 1; i <= IM.array_users.length; i++){ 162 if(!IM.array_users[i] || !IM.array_users[i].jid) 163 continue; 143 if ( status ) 144 { 145 _return += '<img align="center" src="'+status.src+'" />'; 146 _return += '<span onclick="IM.action_button(event,\''+status.jid+'\');"><font size="1" color='; 147 148 if( status.src != img_unavailable.src) 149 _return += '"DARKBLUE"><u style="cursor:pointer;">'+get_lang("User connected")+"</u>"; 150 else 151 _return += '"BLACK">'+get_lang("User not connected"); 164 152 165 jid = IM.array_users[i].jid; 166 array_jid = jid.split("@"); 167 168 if(array_jid[0] == uid){ 169 status = IM.array_users[i].online; 170 subscription = IM.array_users[i].subscription; 171 break; 172 } 173 else 174 jid = uid +"@"+array_jid[1]; 175 176 } 177 178 if(subscription == 'both') { 179 if(status == 1) { 180 _return = "<br><img align='center' src='../instant_messenger/templates/default/images/online.gif'>"; 181 _return += "<span title='"+get_lang("Open chat window")+"' style='cursor:pointer' onclick='InfoContact.openChat(event,\""+jid+"\");InfoContact.hide()'><font size=1 color=DARKBLUE><u>"+get_lang("User connected")+"</u></font></span><br>"; 182 } 183 else if(status == 0) { 184 _return = "<br><img align='center' src='../instant_messenger/templates/default/images/offline.gif'>"; 185 _return += "<span style='cursor:pointer' onclick='InfoContact.hide()'><font size=1 color=BLACK>"+get_lang("User not connected")+"</font></span><br>"; 186 } 187 188 } 189 else if(array_jid != null){ 190 _return = "<br><img align='center' src='../instant_messenger/templates/default/images/not_authorized.gif'>"; 191 if(subscription == 'from') 192 _return += "<font size=1 color=BLACK><u>"+ get_lang("User didn't allow you")+"</u></font><br>"; 193 else if(subscription == 'to') { 194 _return += "<span title='"+get_lang("Authorize")+"' style='cursor:pointer' onclick='Preferences.updateLoad(\""+email+"\");InfoContact.hide()'><font size=1 color=BLACK><u>"+ get_lang("You didn't allow")+"</u></font></span><br>"; 195 } 196 else 197 _return += "<span title='"+get_lang("Register user into my IM")+"' style='cursor:pointer' onclick='InfoContact.verifyPermissionIM(\""+ uid +"\",\""+array_jid[1]+"\");InfoContact.hide()'><font size=1 color=BLACK><u>" + get_lang("User not registered")+"</u></font></span><br>"; 153 _return += "</font></span><br />"; 198 154 } 199 155 -
trunk/phpgwapi/inc/class.preferences.inc.php
r41 r54 554 554 { 555 555 $this->db->transaction_begin(); 556 $this->db->query("DELETE FROM phpgw_preferences WHERE preference_owner='$account_id'", 556 //$this->db->query("DELETE FROM phpgw_preferences WHERE preference_owner='$account_id'", 557 $this->db->query("DELETE FROM phpgw_preferences WHERE preference_owner='$account_id' and preference_app <> 'instant_messenger'", 557 558 __LINE__,__FILE__ 558 559 );
Note: See TracChangeset
for help on using the changeset viewer.