Changeset 36


Ignore:
Timestamp:
06/29/07 15:18:52 (17 years ago)
Author:
niltonneto
Message:

* empty log message *

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/doc/change_log.txt

    r29 r36  
    22módulo Agenda de Eventos, e a partir da versão 29/11/2006 [0.9.17] 
    33Nilton Emilio Buhrer Neto. 
     4 
     505/06/2007 - [0.9.2] 
     6- Adicionando funcionalidade de adicionar eventos externos, pelo email 
     7- Corrigido problema de carregar os usuários da organização selecionada, ao criar um compromisso. 
    48 
    5922/05/2007 - [0.9.2] 
  • trunk/calendar/inc/class.bocalendar.inc.php

    r29 r36  
    26872687                        } 
    26882688 
    2689                         if(!is_object($GLOBALS['phpgw']->send)) 
     2689                        /*if(!is_object($GLOBALS['phpgw']->send)) 
    26902690                        { 
    26912691                                $GLOBALS['phpgw']->send = CreateObject('phpgwapi.send'); 
    2692                         } 
     2692                        }*/ 
    26932693                //      $send = &$GLOBALS['phpgw']->send; 
    26942694                         
     
    27082708                        foreach($to_notify as $userid => $statusid)  
    27092709                        { 
    2710                          
     2710                                $mail->ClearAllRecipients(); 
     2711                                $mail->ClearAttachments(); 
     2712                                 
    27112713                                $userid = (int)$userid; 
    27122714 
     
    27312733 
    27322734                                        $to = $preferences->email_address($userid); 
     2735                                         
    27332736                                        if (empty($to) || $to[0] == '@' || $to[0] == '$')       // we have no valid email-address 
    27342737                                        { 
     
    29452948                                                        break; 
    29462949                                        } 
    2947                                         $mail->AddAddress(implode(",",$to));     
     2950                                        $mail->AddAddress($to); 
    29482951                                        $mail->Body = $tmpbody; 
    29492952                                        $mail->From = $sender; 
     
    29572960                                        if(!$mail->Send()) 
    29582961                                        { 
     2962                                                 
    29592963                                                $returncode=false; 
    29602964                                        } 
     
    29912995                                                if($ex_participant) 
    29922996                                                        $to[] = $ex_participant; 
    2993                                 } 
    2994                                 $mail->AddAddress(implode(",",$to)); 
     2997                                }                
     2998                                foreach($to as $i => $to_array) 
     2999                                        $mail->AddAddress($to_array); 
    29953000                                $_body = explode("<hr size='1' width='100%'>",$tmpbody); 
    29963001                                $tmpbody = $_body[0]; 
     
    29983003                                $tmpbody.= "<br>".lang("Summary").": ".$this->so->cal->event[title]."<br>"; 
    29993004                                $tmpbody.= "<br>".lang("Start date").": ".$GLOBALS['phpgw']->common->show_date($starttime)."<br>".lang("End date").": ".$GLOBALS['phpgw']->common->show_date($endtime)."<br>"; 
    3000                                 $tmpbody.= "<br><br><hr size='1' width='100%'><font color='red'>".lang("This message was sent by server. You must send a message to sender to confirm this event")."</font>"; 
    3001                          
     3005                                $tmpbody.= "<br><br><hr size='1' width='100%'><font color='red'>" 
     3006                                .lang("This message was sent by server. You must send a message to sender to confirm this event")."<br>" 
     3007                                .lang("This is an external event. Even if it added to your expresso its can be changed any time at all")."</font><br>"; 
     3008                                 
     3009                                if ($GLOBALS['bocalendar']->so->cal->event[start][month] > 10) 
     3010                                        $event_month=$GLOBALS['bocalendar']->so->cal->event[start][month]; 
     3011                                else 
     3012                                        $event_month="0".$GLOBALS['bocalendar']->so->cal->event[start][month]; 
     3013                                $tmpbody .="<a href='../index.php?menuaction=calendar.uicalendar.add&date=" 
     3014                                .$GLOBALS['bocalendar']->so->cal->event[start][year] 
     3015                                .$event_month 
     3016                                .$GLOBALS['bocalendar']->so->cal->event[start][mday] 
     3017                                ."&hour=".$GLOBALS['bocalendar']->so->cal->event[start][hour] 
     3018                                ."&minute=".$GLOBALS['bocalendar']->so->cal->event[start][min] 
     3019                                ."&title=".$GLOBALS['bocalendar']->so->cal->event['title'] 
     3020                                ."&description=".$GLOBALS['bocalendar']->so->cal->event['description'] 
     3021                                ."&location=".$GLOBALS['bocalendar']->so->cal->event['location']."'>" 
     3022                                ."<h2>".lang("Add to my expresso")."</h2>"; 
     3023                                 
    30023024                                //attach extern vcard                    
    30033025                                // define('context','$GLOBALS.bocalendar.so.cal.event'); 
     
    30133035                                fclose($attach_fd); 
    30143036                                $mail->From = $sender; 
    3015                                 $mail->FromName = lang("Expresso external user").": ".$GLOBALS['phpgw_info']['user']['fullname']; 
     3037                                $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 
    30163038                                $mail->Sender = $mail->From; 
    30173039                                $mail->SenderName = $mail->FromName; 
  • trunk/calendar/inc/class.uicalendar.inc.php

    r29 r36  
    11811181                                $endmin    = $startmin + (int)$this->bo->prefs['calendar']['defaultlength']; 
    11821182                                $endhour   = $starthour + $this->bo->normalizeminutes($endmin); 
    1183                                 ; 
     1183                                 
     1184                                $subject        = (string)(get_var('title',array('GET'),0)); 
     1185                                if ($subject != '0') 
     1186                                { 
     1187                                        $description    = (string)(get_var('description',array('GET'),0)); 
     1188                                        $location       = (string)(get_var('location',array('GET'),0)); 
     1189                                } 
     1190                                else 
     1191                                        unset($subject); 
     1192                                 
    11841193                                $this->bo->set_start($this->bo->year,$this->bo->month,$this->bo->day,$starthour,$startmin,0); 
    11851194                                $this->bo->set_end($this->bo->year,$this->bo->month,$this->bo->day,$endhour,$endmin,0); 
    1186                                 $this->bo->set_title(''); 
    1187                                 $this->bo->set_description(''); 
     1195                                $this->bo->set_title($subject); 
     1196                                $this->bo->set_description($description); 
     1197                                $this->bo->add_attribute('location',$location); 
    11881198                                $this->bo->set_ex_participants(''); 
    1189                                 $this->bo->add_attribute('location',''); 
    11901199                                $this->bo->add_attribute('uid',''); 
    11911200                                $this->bo->add_attribute('priority',2); 
     
    40054014                                                                                $user_context[] = $dn_part; 
    40064015                                                                } 
    4007                                                                 $user_context = implode(",",$user_context); 
    4008                                                                 $combo_org = $this->get_organizations($context, trim(strtolower($user_context))); 
     4016                                                                // Prepara o contexto do usuario com sua OU raiz, pois ele pode pertencer a uma OU de nivel N. 
     4017                                                                $user_ou = explode(",",str_replace($context,"",implode(",",$user_context)));                                                             
     4018                                                                $user_context = trim(strtolower($user_ou[count($user_ou) - 2].",".$context)); 
     4019                                                                // Fim 
     4020                                                                $combo_org = $this->get_sectors(trim(strtolower($user_context))); 
    40094021                                                                $footer_ext_participantes = lang("Tip: To search in the <b>Global Catalog</b>, type the <b>F9</b> key, like the ExpressoMail."); 
    40104022                                                                 
     
    40454057                                                                                        "<script type='text/javascript'>var DEFAULT_URL = '".$module_name."/controller.php?action=';</script> ".                                                                                         
    40464058                                                                                        "<script type='text/javascript'>" . 
    4047                                                                                         "setTimeout('get_available_users(\"".$module_name."\",\'".$user_context."\')',1000);" . 
     4059                                                                                        "setTimeout('get_available_users(\"".$module_name."\",\'".$user_context."\')',1000);".  
    40484060                                                                                        "</script> " 
    40494061                                                                                                 
     
    46304642                } 
    46314643 
    4632                 function get_organizations($context, $selected='') 
     4644                function get_sectors($selected='') 
    46334645                { 
    46344646                        $s = CreateObject('phpgwapi.sector_search_ldap'); 
    4635                         $sectors_info = $s->get_organizations($context, $selected, false, false); 
     4647                        $sectors_info = $s->get_sectors($selected, false, false); 
    46364648                        return $sectors_info; 
    46374649                } 
     4650                 
    46384651                /* 
    46394652                function get_organizations($context, $selected='') 
  • trunk/calendar/templates/celepar/js/edit_exmail.js

    r18 r36  
    5252                } 
    5353                var options = '###'; 
    54                 if (data) {                      
     54                if (data) { 
    5555                        if(data.groups && data.groups.length > 0) { 
    5656                                data.groups = '<option  value="-1" disabled>------------------- '+document.getElementById("txt_groups").value+' ------------------ </option>' + data.groups; 
     
    7575        }        
    7676 
    77         cExecute (path+'.ldap_functions.get_available_users&context='+context, handler_get_available_users); 
     77        document.getElementById('combo_org').value = context; 
     78        cExecute (path+'.ldap_functions.get_available_users&context='+context+'&type=search', handler_get_available_users); 
    7879} 
    7980function add_user() 
  • trunk/expressoAdmin1_2/docs/change_log.txt

    r32 r36  
    717104/06/2007 
    7272- Permitido ocultar setores. 
     73 
     7414/06/2007 
     75- Melhorado exibição de grupos e listas na inclusão/edição de usuários 
     76(muito mais rápido agora). 
     77- Melhorado exibição dos domínios samba: 
     78        - deixa a opção desmarcado caso não existe nenhum sambaDomain na OU. 
     79        - Seleciona automaticamente o sambaDomain da OU. 
  • trunk/expressoAdmin1_2/templates/default/accounts_form.tpl

    r33 r36  
    316316                </td> 
    317317                <td width="10%" align="right" class="td_right" bgcolor="{color_bg1}"> 
    318                         <input {disabled} type="button" value="{lang_save}" onClick="javascript:validate_fields('{type}');"> 
     318                        <input type="button" value="{lang_save}" onClick="javascript:validate_fields('{type}');"> 
    319319                </td> 
    320320        </tr> 
  • trunk/instant_messenger/inc/class.contacts_im.inc.php

    r33 r36  
    7878                        return 0; 
    7979        } 
     80         
     81        function UserPermission($param) 
     82        { 
     83                $db_acls = $this->db_user->get_accounts_acl(); 
     84                $members = array();              
     85                $search_uid     = ""; 
     86                $search_groups = "|"; 
     87                 
     88                $search_uid = $this->ldap->list_users_ldap("uid=".$param['uid']); 
     89 
     90                foreach($db_acls as $tmp) 
     91                        if($tmp['acl_account'] == $search_uid[0]['uidnumber']) 
     92                                return 1; 
     93                        else 
     94                                $search_groups .= "(gidNumber=".$tmp['acl_account'].")"; 
     95 
     96                $groups = $this->ldap->list_groups_ldap($search_groups); 
     97 
     98                if($groups) 
     99                foreach($groups as $tmp){ 
     100                        $members = $tmp['members'];      
     101                        foreach($members as $mb){                
     102                                if(trim($mb) == trim($search_uid[0]['uid'])) 
     103                                        return 1; 
     104                        }                        
     105                } 
     106                 
     107                return 0; 
     108        } 
    80109} 
    81110?> 
  • trunk/instant_messenger/inc/class.db_im.inc.php

    r33 r36  
    9595                        return 1; 
    9696                }else{ 
    97                         //$query = "insert into phpgw_preferences values('".$user_id."','".$app_name."','".serialize($preferences)."')"; 
    9897                        $query = "update phpgw_preferences set preference_value = '".serialize($preferences)."' where preference_app='".$app_name."' and preference_owner='".$user_id."'"; 
    9998                        if($this->query_db($query)) 
     
    121120                        return unserialize($result[0]['preference_value']); 
    122121                else 
    123                         return "ch_time:true;ch_offline:true;ch_contacts:true;rd_nm:true;rd_al:false;rd_ch:false"; 
     122                        return "ch_time:true;ch_offline:true;ch_contacts:false;rd_nm:true;rd_al:false;rd_ch:false"; 
    124123                 
    125124        } 
  • trunk/instant_messenger/js/im_functions.js

    r33 r36  
    2424      var handler_contacts = function(data) 
    2525      { 
    26             _this.array_users.splice(0,_this.array_users.length); 
    27             _this.array_users = data; 
    28             _this.mount_list(data); 
    29             _this.conf_VcardUser(data[0]); 
    30       } 
    31  
    32       if ( force || this.getWinContactsState() ) 
     26          if( (data.length) >= (_this.array_users.length) || (data.length - 1) > 0){ 
     27                  _this.array_users.splice(0,_this.array_users.length); 
     28              _this.array_users = data; 
     29                  _this.mount_list(data); 
     30                  _this.conf_VcardUser(data[0]); 
     31              } 
     32      } 
     33         
     34          if ( force || this.getWinContactsState() ) 
    3335         cIM.cExecute("$this.Ujabber.list_user",handler_contacts); 
    3436   } 
     
    7779   { 
    7880                // Manutencao 
    79         // 
    80         //   var div_manutencao = document.getElementById('contacts_im_window_body_inner'); 
    81         //       div_manutencao.innerHTML = '<p align="center"><img src='+img_manutencao_im.src+'></p>'; 
    82                 //       return false; 
    83                 // 
    84                 // 
     81        var div_manutencao = document.getElementById('contacts_im_window_body_inner'); 
     82            div_manutencao.innerHTML = '<p align="center"><img src='+img_manutencao_im.src+'></p>'; 
     83                    return false; 
    8584        } 
    8685 
     
    604603      im_menu_action.menu("_span_" + pElement, form_menu_button_right); 
    605604   } 
    606  
    607         /* 
    608          * url_encode 
    609          */ 
    610          
    611         function url_encode(str) 
    612     {  
     605    
     606  /* 
     607   * Integração com o Expresso, verifica se o usuário tem permissão no Módulo IM 
     608   */ 
     609    
     610   IM.prototype.UserPermission = function(uid, handler) 
     611   { 
     612                cIM.cExecute("$this.contacts_im.UserPermission",handler,"uid="+uid); 
     613   } 
     614 
     615  /* 
     616   *  Ação do botão onclick da lista de contatos; 
     617   */ 
     618 
     619   IM.prototype.action_button = function(pEv,pStatus,pJid,pReq) 
     620   { 
     621                var _this = this; 
     622                if(pEv.button > 1){ 
     623                        _this.menu_button_right(pJid,pReq); 
     624                        document.oncontextmenu = new Function("return false"); 
     625                }else{ 
     626                        if(pStatus == parseInt(1)) 
     627                                _this.open_chat(pJid); 
     628                } 
     629   } 
     630         
     631  /* 
     632   * Abre Conversa 
     633   */ 
     634 
     635   IM.prototype.open_chat = function(pJID) 
     636   { 
     637      func.byId(pJID).firstChild.src = img_chat_bubble.src; 
     638      im_win.open_chat(pJID); 
     639   } 
     640 
     641  /* 
     642   * url_encode 
     643   */ 
     644         
     645   function url_encode(str) 
     646   {  
    613647            var hex_chars = "0123456789ABCDEF";  
    614648            var noEncode = /^([a-zA-Z0-9\_\-\.])$/;  
     
    630664            }  
    631665            return strEncode;  
    632         }   
    633  
    634         /* 
    635          *  Ação do botão onclick da lista de contatos; 
    636          */ 
    637  
    638         IM.prototype.action_button = function(pEv,pStatus,pJid,pReq) 
    639         { 
    640                 var _this = this; 
    641                 if(pEv.button > 1){ 
    642                         _this.menu_button_right(pJid,pReq); 
    643                         document.oncontextmenu = new Function("return false"); 
    644                 }else{ 
    645                         if(pStatus == parseInt(1)) 
    646                                 _this.open_chat(pJid); 
    647                 } 
    648         } 
    649          
    650         /* 
    651          * Abre Conversa 
    652          */ 
    653  
    654         IM.prototype.open_chat = function(pJID) 
    655         { 
    656       func.byId(pJID).firstChild.src = img_chat_bubble.src; 
    657       im_win.open_chat(pJID); 
    658         } 
    659  
    660  
    661         String.prototype.rm_space = function() 
    662         { 
     666   }   
     667 
     668   String.prototype.rm_space = function() 
     669   { 
    663670        return this.replace(/( *)/g,""); 
    664         } 
     671   } 
    665672 
    666673// Build Object  
  • trunk/instant_messenger/js/im_templates.js

    r33 r36  
    246246      grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFont(\'Arial\')" id="fontStyle1" style="width:120px;font-family:arial">Arial</div>'; 
    247247      grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFont(\'Courier\')" id="fontStyle1" style="width:120px;font-family:Courier">Courier</div>'; 
    248       grid += '<div class="menuitems" onMouseover="im_wihttp://www1.la.dell.com/content/products/features.aspx/advertised_latn.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFont(\'Times\')" id="fontStyle1" style="width:120px;font-family:Times New Roman">Times New Roman</div>'; 
     248      grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFont(\'Times\')" id="fontStyle1" style="width:120px;font-family:Times New Roman">Times New Roman</div>'; 
    249249      grid += '<div style="background:#cccccc;margin:1px"><img src="../images/blank.gif" height="1" width="1" border="0"/></div>'; 
    250250      grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideFontNameSelection()" id="fontStyle1" style="width:120px">Close This Menu</div>'; 
  • trunk/instant_messenger/js/im_win.js

    r32 r36  
    8484      main_menu_head_pref = func.newEl('span'); 
    8585      func.confEl(main_menu_head_pref, 'id', 'span_menu_pref'); 
    86            func.confEl(main_menu_head_pref,'style','float: left;'); 
     86          func.confEl(main_menu_head_pref,'style','float: left;'); 
    8787 
    8888      br3 = func.newEl('br'); 
     
    9595      func.confEl(main_menu_head_pref_img, 'id', 'img_pref'); 
    9696 
    97            main_menu_head_pref.onclick = function(){IM.menu_preferences('menu_preferences');}; 
     97          main_menu_head_pref.onclick = function(){IM.menu_preferences('menu_preferences');}; 
    9898      main_menu_head_pref_txt = document.createTextNode(IM.get_lang('Options')); 
    9999 
     
    105105      func.insEl(main_menu_head_pref_img, main_menu_head_pref_txt, main_menu_head_div, main_menu_head_pref); 
    106106 
    107       params = new Array(); 
     107          var params = []; 
    108108      params['body']       = main_menu_all; 
    109109      params['close']      = true; 
     
    626626         text += '<a onclick="javascript:IM.sendMessage(\'' + pId + '\')" title="Send a message" style="float:left"><img src="' + im_path + 'templates/default/images/img/skins/deathdart/send.gif" width="102" height="50" border=0 style="margin-top:3px"></a>'; 
    627627 
    628          params = []; 
     628         var params = []; 
    629629         params['body']     = text; 
    630630         params['height']   = 215; 
Note: See TracChangeset for help on using the changeset viewer.