Changeset 4973


Ignore:
Timestamp:
08/22/11 10:47:56 (13 years ago)
Author:
niltonneto
Message:

Ticket #2230 - Corrigido problema ao exibir celular quando serviço VoIP está habilitado.

Location:
branches/2.2/expressoMail1_2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php

    r4950 r4973  
    331331 
    332332                $phoneUser = $contacts_result['phone']; 
    333  
    334                 if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_enabled'] && $phoneUser) { 
    335                         $phoneUser = '<a title="'.$this->functions->getLang("Call to Comercial Number").'" href="#" onclick="InfoContact.connectVoip(\''.$phoneUser.'\',\'com\')">'.$phoneUser.'</a>'; 
    336                         if($contacts_result['mobile']){ 
    337                                 $phoneUser .= ' / <a title="'.$this->functions->getLang("Call to Mobile Number").'" href="#" onclick="InfoContact.connectVoip(\''.$contacts_result['mobile'].'\',\'mob\')">'.$contacts_result['mobile'].'</a>'; 
    338                         } 
    339                 } 
    340                 //verifica de existe o celular do funcionario ($contacts_result["mobile"]), se nao, $phoneUser fica vazia; 
    341  
    342                     $mobileUser = $contacts_result["mobile"]; 
    343                     if($mobileUser && !$voipMobile) { 
    344                             $phoneUser .= " / $mobileUser"; 
    345                     } 
    346                     $empNumber = $contacts_result["employeenumber"]; 
    347                     if($empNumber) { 
    348                             $empNumber = "$empNumber - "; 
    349                     } 
    350                     $ou = $contacts_result["ou"]; 
    351                     if($ou) { 
    352                             $ou = "<br/>$ou" ; 
    353                     } 
     333                $mobileUser = $contacts_result["mobile"]; 
     334                if($mobileUser){ 
     335                        $phoneUser .= " / $mobileUser"; 
     336                } 
     337                 
     338                if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_enabled']) { 
     339                        $phoneUser = $contacts_result['phone']; 
     340                        if($phoneUser) 
     341                                $phoneUser = '<a title="'.$this->functions->getLang("Call to Comercial Number").'" href="#" onclick="InfoContact.connectVoip(\''.$phoneUser.'\',\'com\')">'.$phoneUser.'</a>'; 
     342                        if($mobileUser) 
     343                                $phoneUser .= ' / <a title="'.$this->functions->getLang("Call to Mobile Number").'" href="#" onclick="InfoContact.connectVoip(\''.$mobileUser.'\',\'mob\')">'.$mobileUser.'</a>'; 
     344                } 
     345 
     346                $empNumber = $contacts_result["employeenumber"]; 
     347            if($empNumber) { 
     348                    $empNumber = "$empNumber - "; 
     349            } 
     350            $ou = $contacts_result["ou"]; 
     351            if($ou) { 
     352                    $ou = "<br/>$ou" ; 
     353            } 
    354354 
    355355                // Begin: nickname, firstname and lastname for QuickAdd. 
  • branches/2.2/expressoMail1_2/js/InfoContact.js

    r3388 r4973  
    9393 
    9494 
    95         if(preferences.voip_enabled && phoneUser) { 
    96                 phoneUser = "<a title=\""+get_lang("Call to Comercial Number")+"\" href=\"#\" onclick=\"InfoContact.connectVoip('"+phoneUser+"', 'com')\">"+phoneUser+"</a>"; 
     95        if(preferences.voip_enabled) { 
     96                phoneUser = ''; 
     97                if(data.telefone) 
     98                        phoneUser = "<a title=\""+get_lang("Call to Comercial Number")+"\" href=\"#\" onclick=\"InfoContact.connectVoip('"+ data.telefone+"', 'com')\">"+ data.telefone+"</a>"; 
    9799                if(data.mobile){ 
    98                         phoneUser += " / <a title=\""+get_lang("Call to Mobile Number")+"\" href=\"#\" onclick=\"InfoContact.connectVoip('"+data.mobile+"', 'mob')\">"+data.mobile+"</a>"; 
     100                        phoneUser += "<br>&nbsp;<a title=\""+get_lang("Call to Mobile Number")+"\" href=\"#\" onclick=\"InfoContact.connectVoip('"+data.mobile+"', 'mob')\">"+data.mobile+"</a>"; 
    99101                } 
    100102        } 
     
    104106                                                "<td  style='padding-top:4px' align='center' valign='center' colspan ='2'><img src='templates/"+template+"/images/"+(data.type)+"_catalog.png' /><font size=1 color=BLACK>&nbsp;<b>"+get_lang("Sender's Information")+"</b></font>"+_this.verifyIM(data.uid,data.email)+"</td></tr>"+ 
    105107 
    106                                                 "<tr><td align='center' width='70' height='93' style='padding-left:6px' align='center' valign='center'>"+ 
     108                                                "<tr><td align='center' style='width:70px;height:93px;padding-left:6px' align='center' valign='center'>"+ 
    107109                                                "<img style='float:left' src='./inc/show_img.php?email="+data.email+"'></td>"+ 
    108                                                 "<td style='padding-left:2px' align='left' valign='top'>"+ 
     110                                                "<td style='padding-left:2px' width='70%' align='left' valign='top'>"+ 
    109111                                                "<br><img style='float:left'align='center' src='templates/"+template+"/images/phone.gif' />&nbsp;<font  size=1  color=BLACK>"+(phoneUser ? phoneUser : get_lang("None") )+"</font><br />"+ 
    110                                                 "<font size=1 color=BLACK>"+employeeNumber+"<br/>"+cn+"</font>"+ 
     112                                                "<br><font size=1 color=BLACK>"+cn+"</font><br><b>"+employeeNumber+"</b>"+ 
    111113                                                "<br/>"+ou+"</td></tr>"+ 
    112  
    113                                                 "<tr><td  style='padding-bottom:4px' align='center' valign='center' colspan ='2'><span title='"+get_lang("Write message")+"' style='cursor:pointer' onclick='InfoContact.sendMail(\""+cn+"\",\""+data.email+"\")'><font size=1 color=DARKBLUE><u>"+data.email+"</u></font></span>"+ 
     114                                                "<tr><td  style='padding-bottom:4px' align='center' valign='center' colspan ='2' nowrap><span title='"+get_lang("Write message")+"' style='cursor:pointer' onclick='InfoContact.sendMail(\""+cn+"\",\""+data.email+"\")'><font size=1 color=DARKBLUE><u>"+data.email+"</u></font></span>"+ 
    114115                                                                                "</td></tr></table>"; 
    115116 
Note: See TracChangeset for help on using the changeset viewer.