Changeset 4498


Ignore:
Timestamp:
05/24/11 17:58:15 (13 years ago)
Author:
airton
Message:

Ticket #1925 - Permitir associar um contato com um grupo na tela de criação do contato

Location:
sandbox/2.2.0.2/contactcenter
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.2.0.2/contactcenter/inc/class.bo_group.inc.php

    r1280 r4498  
    5959                }                
    6060                 
     61                /*! 
     62                 * @function get_groups_by_user 
     63                 * @abstract Busca todos os grupos cadastrados de um usuário. 
     64                 * @author Luiz Carlos Viana Melo - Prognus 
     65                 * @param (integer) $id_user O ID do usuário. 
     66                 * @return Retorna uma estrutura contendo: 
     67                 * array( 
     68                 *              array( 
     69                 *                      id_group => O ID do grupo; 
     70                 *                      title => O nome do grupo; 
     71                 *                      short_name => O nome abreviado do grupo. 
     72                 *              ) 
     73                 * ) 
     74                 */ 
     75                function get_groups_by_user($id_user = false) 
     76                { 
     77                        return $this->so->select_owner_groups($id_user); 
     78                } 
     79                 
     80                /*! 
     81                 * @function get_contact_groups 
     82                 * @abstract Busca todos os grupos a qual o contato pertence. 
     83                 * @author Luiz Carlos Viana Melo - Prognus 
     84                 * @param (integer) $id_contact O ID do contato. 
     85                 * @return Retorna uma estrutura contendo: 
     86                 * array( 
     87                 *              array( 
     88                 *                      id_contact => O ID do contato; 
     89                 *                      id_connection => O ID da conexão de associação; 
     90                 *                      id_group => O ID do grupo; 
     91                 *                      title => O nome do grupo; 
     92                 *                      short_name => O nome abreviado do grupo. 
     93                 *              ) 
     94                 * ) 
     95                 */ 
     96                function get_contact_groups ($id_contact) 
     97                { 
     98                        return $this->so->select_contact_groups($id_contact); 
     99                } 
     100                 
     101                /*! 
     102                 * @function add_contacts_in_group 
     103                 * @abstract Adiciona novos contatos em um determinado grupo. 
     104                 * @author Luiz Carlos Viana Melo - Prognus 
     105                 * @param (integer) $id_group O ID do grupo onde serão adicionados os contatos. 
     106                 * @param (array) $contacts_conns Os IDs das conexões dos contatos que serão 
     107                 *                                      associados ao grupo. 
     108                 * @return Retorna true caso for adicionado com sucesso. 
     109                 */ 
     110                function add_contacts_in_group($id_group, $contacts_conns) 
     111                { 
     112                        //essa função recebe uma lista de ID de conexões que serão adicionadas no grupo. 
     113                        return $this->so->insertContactsByGroup($id_group, $contacts_conns); 
     114                } 
     115                 
     116                /*! 
     117                 * @function remove_contacts_from_group 
     118                 * @abstract Remove contatos de um grupo. 
     119                 * @author Luiz Carlos Viana Melo - Prognus 
     120                 * @param (integer) $id_group O ID do grupo de onde serão removidos os contatos. 
     121                 * @param (array) $contact_conns Os ID das conexões dos contatos que serão 
     122                 *                                      removidos do grupo. 
     123                 * @return Retorna True caso for removidos com sucesso. 
     124                 */ 
     125                function remove_contacts_from_group($id_group, $contacts_conns) 
     126                { 
     127                        return $this->so->deleteContactsByGroup($id_group, $contacts_conns); 
     128                } 
    61129                 
    62130        } 
  • sandbox/2.2.0.2/contactcenter/inc/class.bo_people_catalog.inc.php

    r4477 r4498  
    518518                { 
    519519                        $contact = CreateObject('contactcenter.so_contact', $id_contact); 
    520                         $connections = $contact->get_connections($extra); 
    521                  
     520                        $connections = $contact->get_connections(); 
     521                        $getDummy = false; 
     522                        if ($extra && $extra === 'defaultwdummy') 
     523                        { 
     524                                $getDummy = true; 
     525                                $extra = 'default'; 
     526                        } 
     527                         
    522528                        $count = 1;      
    523529                        foreach($connections as $id => $type) 
     
    552558                         
    553559                        return $return; 
     560                } 
     561 
     562                /* 
     563                 * @function update_contact_groups 
     564                 * @abstract Atualiza os grupos onde o contato está inserido. 
     565                 * @author Luiz Carlos Viana Melo - Prognus 
     566                 * @param (integer) $id_contact O ID do contato. 
     567                 * @param (array) $groups Os grupos onde o contato será inserido/removido. O 
     568                 * formato dos grupos será: 
     569                 * array( 
     570                 *      'added'         => array( 
     571                 *                                              id_group => array ( 
     572                 *                                                                              'id_group' => O ID do grupo. 
     573                 *                                                                              'title' => O título do grupo. 
     574                 *                                                                      ) 
     575                 *                                      ) 
     576                 *      'removed'       => mesmo formato do added. 
     577                 * ) 
     578                 */ 
     579                function update_contact_groups($id_contact, $groups, $old_connections = false) 
     580                { 
     581                        $connections = $this->get_connections($id_contact, 'defaultwdummy'); 
     582                        $default_connection = false; 
     583                        foreach ($connections as $connection) 
     584                        { 
     585                                if (!$default_connection) 
     586                                { 
     587                                        $default_connection = $connection; 
     588                                } 
     589                                if ($connection['id_type'] === 1) 
     590                                { 
     591                                        $default_connection = $connection; 
     592                                } 
     593                                if($default_connection['id_type'] === 1) 
     594                                { 
     595                                        break; 
     596                                } 
     597                                         
     598                        } 
     599                         
     600                        $altered = false; 
     601 
     602                        if ($default_connection) 
     603                        { 
     604                                $bo_group = CreateObject('contactcenter.bo_group'); 
     605                                $old_groups = $groups['previous_selected']; 
     606                                if ($old_connections) 
     607                                        $bo_group->update_contact_groups($default_connection['id_connection'], $old_connections, $old_groups); 
     608                                $added_groups = $groups['added']; 
     609                                $removed_groups = $groups['removed']; 
     610                                         
     611                                foreach ($added_groups as $group) 
     612                                { 
     613                                        $altered = true; 
     614                                        $c = array(); 
     615                                        $c[] = $default_connection['id_connection']; 
     616                                        $bo_group->add_contacts_in_group($group['id_group'], $c); 
     617                                } 
     618                                         
     619                                foreach ($removed_groups as $group) 
     620                                { 
     621                                        $altered = true; 
     622                                        $c = array(); 
     623                                        $c[] = $default_connection['id_connection']; 
     624                                        $bo_group->remove_contacts_from_group($group['id_group'], $c); 
     625                                } 
     626                        } 
     627                         
     628                        if ($altered) 
     629                        { 
     630                                $contact = CreateObject('contactcenter.so_contact', $id_contact); 
     631                                $contact->set_field("last_status", 'U'); 
     632                                $contact->set_field("last_update",time()."000"); 
     633                                return $contact->commit(); 
     634                        } 
    554635                } 
    555636         
  • sandbox/2.2.0.2/contactcenter/inc/class.so_group.inc.php

    r4477 r4498  
    104104                        return True;             
    105105                }                
     106                 
     107                /*! 
     108                 * @function select_owner_groups 
     109                 * @abstract Busca todos os grupos do usuário atual. 
     110                 * @author Luiz Carlos Viana Melo - Prognus 
     111                 * @param (integer) $id_owner O ID do usuário. 
     112                 * @return Retorna uma estrutura contendo: 
     113                 * array( 
     114                 *              array( 
     115                 *                      id_group => O ID do grupo; 
     116                 *                      title => O nome do grupo; 
     117                 *                      short_name => O nome abreviado do grupo. 
     118                 *              ) 
     119                 * ) 
     120                 */ 
     121                function select_owner_groups($id_owner = false) 
     122                { 
     123                        $query = 'SELECT id_group, title, short_name FROM phpgw_cc_groups '; 
     124                        if ($id_owner) 
     125                                $query .= 'WHERE owner = ' . $id_owner. ' ORDER BY title;'; 
     126                        else 
     127                                $query .= 'WHERE owner = ' . $this->owner . ' ORDER BY title;'; 
     128                                 
     129                        if (!$this->db->query($query)) 
     130                        { 
     131                                exit ('Query failed! File: '.__FILE__.' on line'.__LINE__); 
     132                        } 
     133                         
     134                        $return = false; 
     135                         
     136                        while($this->db->next_record()) 
     137                        { 
     138                                $return[] = $this->db->row();  
     139                        } 
     140                         
     141                        return $return; 
     142                } 
     143                 
     144                /*! 
     145                 * @function select_contact_groups 
     146                 * @abstract Seleciona os grupos do contato. 
     147                 * @author Luiz Carlos Viana Melo - Prognus 
     148                 * @param (integer) $id_contact O ID do contato. 
     149                 * @return Retorna uma estrutura contendo: 
     150                 * array( 
     151                 *              array( 
     152                 *                      id_contact => O ID do contato; 
     153                 *                      id_group => O ID do grupo; 
     154                 *                      title => O nome do grupo; 
     155                 *                      short_name => O nome abreviado do grupo. 
     156                 *              ) 
     157                 * ) 
     158                 */ 
     159                function select_contact_groups($id_contact) 
     160                { 
     161                        $query = 'SELECT Contato.id_contact, ContatoGprs.id_connection, Grupos.id_group, Grupos.title, ' . 
     162                                'Grupos.short_name FROM phpgw_cc_contact_conns Contato, ' .  
     163                                'phpgw_cc_connections Conexao, phpgw_cc_contact_grps ContatoGprs, ' .  
     164                                'phpgw_cc_groups Grupos WHERE Contato.id_contact = ' . $id_contact .  
     165                                ' AND Contato.id_connection = Conexao.id_connection AND ' .  
     166                                'Conexao.id_connection = ContatoGprs.id_connection AND ' .  
     167                                'ContatoGprs.id_group = Grupos.id_group ORDER BY title'; 
     168                         
     169                        if (!$this->db->query($query)) 
     170                        { 
     171                                exit ('Query failed! File: '.__FILE__.' on line'.__LINE__); 
     172                        } 
     173                         
     174                        $return = false; 
     175                         
     176                        while($this->db->next_record()) 
     177                        { 
     178                                $return[] = $this->db->row();  
     179                        } 
     180                         
     181                        return $return; 
     182                } 
    106183                 
    107184                function deleteContactFromGroups($id) 
     
    402479                        "phpgw_cc_contact_conns B, phpgw_cc_connections C,phpgw_cc_contact_grps D,phpgw_cc_groups E where ". 
    403480                        "A.id_contact = B.id_contact and B.id_connection = C.id_connection ". 
    404                         "and B.id_typeof_contact_connection = 1 and ". 
     481                        " and ". 
    405482                        "A.id_owner =".$this->owner." and ".                     
    406483                        "D.id_group = E.id_group and ". 
     
    445522                        'phpgw_cc_contact_conns B, phpgw_cc_connections C,phpgw_cc_contact_grps D where '. 
    446523                        'A.id_contact = B.id_contact and B.id_connection = C.id_connection '. 
    447                         'and B.id_typeof_contact_connection = 1 and '. 
     524                        ' and '. 
    448525                        //'A.id_owner ='.$this->owner.' and D.id_connection = C.id_connection and D.id_group = '.$id_group. 
    449526                        ' D.id_connection = C.id_connection and D.id_group = '.$id_group. //If I have the group ID, why ask about owner? 
  • sandbox/2.2.0.2/contactcenter/inc/class.ui_api.inc.php

    r4196 r4498  
    233233                        $template->set_var('cc_contact_corporative',lang('Corporative')); 
    234234                        $template->set_var('cc_contact_conns',lang('Connections')); 
     235                        $template->set_var('cc_contact_grps', lang('Groups')); 
    235236                        $template->set_var('emails_telephones', lang("E-Mails and Telephones")); 
    236237                        $template->set_var('cc_default', lang("Default")); 
     
    331332                        /* End Contact - Connections */ 
    332333 
    333  
     334                        /* Contact - Groups */ 
     335                        $template->set_var('cc_grps_available', lang('Groups available')); 
     336                        $template->set_var('cc_grps_selected', lang('Selected groups')); 
     337                        $template->set_var('txt_add', lang('Add')); 
     338                        $template->set_var('txt_rem', lang('Remove')); 
     339                        /* End Contact - Groups */ 
    334340 
    335341                        /* Corporate - contact */ 
  • sandbox/2.2.0.2/contactcenter/inc/class.ui_data.inc.php

    r4483 r4498  
    18031803 
    18041804                        /* Relations */ 
    1805  
     1805                         
     1806                        /* Groups */ 
     1807                        /* 
     1808                         * Criado uma estrutura no data que conterá os grupos do 
     1809                         * contato. O formato é: 
     1810                         * data['groups'] = array( 
     1811                         *                                              'id_group' => array( 
     1812                         *                                                                              'id_group', 'title', 'short_name' 
     1813                         *                                                                              ) 
     1814                         *                                              ); 
     1815                         */ 
     1816                        $boGroup = CreateObject('contactcenter.bo_group'); 
     1817                        $groups = $boGroup->get_contact_groups($id); 
     1818                         
     1819                        $i = 0; 
     1820                        $data['groups'] = array(); 
     1821                        foreach($groups as $group) 
     1822                        { 
     1823                                $idGroup = $group['id_group']; 
     1824                                $data['groups'][$idGroup] = array( 
     1825                                        'title'                 => $group['title'], 
     1826                                        'id_group'              => $idGroup, 
     1827                                        'short_name'    => $group['short_name'] 
     1828                                ); 
     1829                                $i++; 
     1830                        } 
     1831                                 
    18061832                        echo serialize($data); 
    18071833                } 
     
    18221848                        $predata[] = $boPeopleCatalog -> get_all_countries(); 
    18231849                        $predata[] = $boPeopleCatalog -> get_all_connections_types(); 
     1850                        $boGroup = CreateObject('contactcenter.bo_group'); 
     1851                        $predata[] = $boGroup->get_groups_by_user(); 
    18241852                        //$predata[] = $this->bo->catalog->get_all_relations_types(); 
    18251853 
     
    24442472                                                /* Does nothing... */ 
    24452473                                                break; 
     2474                                        case 'groups': 
     2475                                                $groups = $data['groups']; 
     2476                                                unset($data['groups']); 
     2477                                                break; 
    24462478 
    24472479                                        default: 
     
    24782510                                        'status' => 'fail' 
    24792511                                ); 
     2512                        } 
     2513                        else 
     2514                        { 
     2515                                $this->bo->catalog->update_contact_groups($id, $groups); 
    24802516                        } 
    24812517 
  • sandbox/2.2.0.2/contactcenter/js/cc.js

    r4305 r4498  
    7474/* Connections Variables */ 
    7575var CC_conn_last_selected = 0; 
     76 
     77/* Grupos inicialmente selecionados */ 
     78var CC_initial_selected_grps = new Array(); 
    7679 
    7780/***********************************************\ 
     
    344347 
    345348                /* Populate Connection Types */ 
    346                 i = 1; 
     349                /* 
     350                 * Código não funcional com o expresso. 
     351                 */ 
     352                /*i = 1; 
    347353                for (j in data[4]) 
    348354                { 
    349355                        Element('cc_conn_type').options[i] = new Option(data[4][j], j); 
    350356                        i++; 
    351                 } 
    352  
     357                }*/ 
     358                 
    353359                /* Populate Relations Types */ 
     360                /* 
     361                 * Código conflitante com a modificação de seleção de grupos durante 
     362                 * a criação de um novo contato. Também foi verificado que este código não 
     363                 * é funcional. 
     364                 */ 
     365                /* 
    354366                i = 0; 
    355367                for (j in data[5]) 
     
    357369                        Element('cc_rels_type').options[i] = new Option(data[5][j], j); 
    358370                        i++; 
     371                }*/ 
     372                 
     373                /* Populate available groups */ 
     374                i = 0; 
     375                var grupos = data[5]; 
     376                for (var grupo in grupos) 
     377                { 
     378                        Element('id_grps_available').options[i] = new Option(grupos[grupo]['title'], grupos[grupo]['id_group']); 
     379                        i++; 
    359380                } 
    360381 
     
    364385 
    365386        Connector.newRequest('populateFullAddConst', CC_url+'get_contact_full_add_const', 'GET', handler); 
     387} 
     388 
     389/* 
     390 * Função que faz a seleção do grupo. 
     391 * Autor: Luiz Carlos Viana Melo - Prognus 
     392 */ 
     393function selectGroup() 
     394{ 
     395        grps_avail = Element('id_grps_available'); 
     396        grps_selec = Element('id_grps_selected'); 
     397         
     398        for (i = 0; i < grps_avail.length; i++) 
     399        { 
     400                if (grps_avail.options[i].selected) { 
     401                        isSelected = false; 
     402 
     403                        for(var j = 0;j < grps_selec.options.length; j++) {                                                                                                                                                      
     404                                if(grps_selec.options[j].value === grps_avail.options[i].value){ 
     405                                        isSelected = true; 
     406                                        break;   
     407                                } 
     408                        } 
     409 
     410                        if(!isSelected){ 
     411 
     412                                option = document.createElement('option'); 
     413                                option.value = grps_avail.options[i].value; 
     414                                option.text = grps_avail.options[i].text; 
     415                                option.selected = false; 
     416                                grps_selec.options[grps_selec.options.length] = option; 
     417                                                                                 
     418                        } 
     419                                                                                         
     420                } 
     421        } 
     422         
     423        for (j =0; j < grps_avail.options.length; j++) 
     424                grps_avail.options[j].selected = false; 
     425} 
     426 
     427/* 
     428 * Função que remove um grupo selecionado. 
     429 * Autor: Luiz Carlos Viana Melo - Prognus 
     430 */ 
     431function deselectGroup() 
     432{ 
     433        grps_selec = Element('id_grps_selected'); 
     434 
     435        for(var i = 0;i < grps_selec.options.length; i++)                                
     436                if(grps_selec.options[i].selected) 
     437                        grps_selec.options[i--] = null; 
    366438} 
    367439 
     
    384456                Element('cc_full_add_contact_id').value = data['cc_full_add_contact_id']; 
    385457                populatePersonalData(data['personal']); 
     458                populateContactGroups(data['groups']); 
    386459                //populateRelations(data['relations']); 
    387460        }; 
    388461        Connector.newRequest('populateFullEdit', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id + "&catalog="+catalog, 'GET', handler); 
     462} 
     463 
     464/* 
     465 * Função que preenche a lista de grupos a qual o contato pertence. 
     466 * Autor: Luiz Carlos Viana Melo - Prognus 
     467 */ 
     468function populateContactGroups(groupsData) 
     469{ 
     470        groups_selected = Element('id_grps_selected'); 
     471        var i = 0; 
     472        CC_initial_selected_grps = new Array(); 
     473        for (var group in groupsData) 
     474        { 
     475                var id_group = groupsData[group]['id_group']; 
     476                option = document.createElement('option'); 
     477                option.value = id_group; 
     478                option.text = groupsData[group]['title']; 
     479                option.selected = false; 
     480                groups_selected.options[i++] = option; 
     481                CC_initial_selected_grps[id_group] = new Array(); 
     482                CC_initial_selected_grps[id_group]['id_group'] = id_group; 
     483                CC_initial_selected_grps[id_group]['title'] = groupsData[group]['title']; 
     484                CC_initial_selected_grps[id_group]['short_name'] = groupsData[group]['short_name']; 
     485        } 
    389486} 
    390487 
     
    441538function resetFullAdd() 
    442539{ 
     540        /* Groups */ 
     541        gprs_selected = Element('id_grps_selected'); 
     542        for (j =0; j < gprs_selected.options.length; j++) { 
     543                gprs_selected.options[j].selected = false; 
     544                gprs_selected.options[j--] = null; 
     545        } 
    443546        /* Clear information container */ 
    444547        CC_contact_full_info = new Array(); 
     
    706809        } 
    707810 
     811        data['groups'] = getAddedRemovedGroups(); 
     812         
    708813        var serial = serialize(data); 
    709814        return 'data=' + escape(serialize(data)); 
     815} 
     816 
     817/* 
     818 * Função que retorna os grupos que foram anteriormente selecionados, adicionados ou removidos pelo 
     819 * usuário. O formato retornado é um array contendo: 
     820 * ['added'] { 
     821 *      [id_group] { 
     822 *              'id_group'              => o ID do grupo 
     823 *              'title'                 => o título do grupo 
     824 *      } 
     825 * }, 
     826 * ['removed'] { 
     827 *      [id_group] { 
     828 *              'id_group'              => o ID do grupo 
     829 *              'title'                 => o título do grupo 
     830 *      } 
     831 * } 
     832 * Autor: Luiz Carlos Viana Melo - Prognus 
     833 */ 
     834function getAddedRemovedGroups() 
     835{ 
     836        var selected_groups = getSelectedGroups(); 
     837        var added_groups = diffContactIDArray(selected_groups, CC_initial_selected_grps); 
     838        var removed_groups = diffContactIDArray(CC_initial_selected_grps, selected_groups); 
     839        var groups = new Array(); 
     840        groups['added'] = added_groups; 
     841        groups['removed'] = removed_groups; 
     842        return groups; 
     843} 
     844 
     845/* 
     846 * Função que retorna os grupos que foram selecionados pelo usuário. O formato retornado é: 
     847 * [id_group] { 
     848 *      'id_group'              => o ID do grupo 
     849 *      'title'                 => o título do grupo 
     850 * } 
     851 * Autor: Luiz Carlos Viana Melo - Prognus 
     852 */ 
     853function getSelectedGroups() 
     854{ 
     855        var gprs_selected = Element('id_grps_selected'); 
     856        var data = new Array(); 
     857        for(i = 0; i < gprs_selected.options.length; i++) 
     858        { 
     859                var id_group = gprs_selected.options[i].value; 
     860                data[id_group] = new Array(); 
     861                data[id_group]['id_group'] = id_group; 
     862                data[id_group]['title'] = gprs_selected.options[i].text; 
     863        } 
     864        return data; 
     865} 
     866 
     867/* 
     868 * Função que retorna a diferença entre 2 arrays com ID dos contatos. 
     869 * Autor: Luiz Carlos Viana Melo - Prognus 
     870 */ 
     871function diffContactIDArray(array1, array2) 
     872{ 
     873        var diff = new Array(); 
     874        for (var group in array1) 
     875        { 
     876                if (!array2[group]) 
     877                        diff.push(array1[group]); 
     878        } 
     879        return diff; 
    710880} 
    711881 
  • sandbox/2.2.0.2/contactcenter/setup/phpgw_es-es.lang

    r4477 r4498  
    9999GPG Finger Print        contactcenter   es-es   Firma GPG 
    100100Group Add       common  es-es   Añadir Grupo 
     101Groups available        contactcenter   es-es   Grupos disponibles 
     102Selected groups contactcenter   es-es   Grupos seleccionados 
    101103Home    contactcenter   es-es   Casa 
    102104Import  contactcenter   es-es   Importar 
  • sandbox/2.2.0.2/contactcenter/templates/default/full_add.tpl

    r1676 r4498  
    1313<input id="cc_contact_personal" type="hidden" value="{cc_contact_personal}"> 
    1414<input id="cc_contact_addrs" type="hidden" value="{cc_contact_addrs}"> 
     15<input id="cc_contact_grps" type="hidden" value="{cc_contact_grps}"> 
    1516<input id="cc_contact_conns" type="hidden" value="{emails_telephones}"> 
    1617<input id="cc_pd_full_name" name="{cc_pd_full_name}" type="hidden"> 
     
    161162        <div style="z-index:10000;position: absolute;display:none; top: 170px; left: 78px;" id="div_cc_conn_is_default"> {cc_default} &nbsp;<select id="cc_email_default" name="cc_email_default" disabled style="display:none"></select><select id="cc_phone_default" name="cc_phone_default" disabled style="display:none"></select></div> 
    162163</div> 
     164 
     165<!-- _GROUPS --> 
     166<div id="cc_contact_groups_tab" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:247px;width:498px"> 
     167        <table border="0" cellpadding="0" cellspacing="0" align="center" width="100%"> 
     168                <tr> 
     169                        <td  align="right"> 
     170                                <table border="0" cellpadding="0" cellspacing="0"> 
     171                                        <tr height="30" class="th"> 
     172                                                <td  align="center">{cc_grps_available}</td>                                     
     173                                        </tr> 
     174                                        <tr height="30" class="th"> 
     175                                                <td  align="right"><select  id="id_grps_available" multiple name="grps_available[]" style="width:200px" size="10"></select></td> 
     176                                        </tr> 
     177                                </table> 
     178                        </td> 
     179                        <td id="buttons" width="95" align="center"> 
     180                                <button type="button" onClick="javascript:selectGroup()"><img src="../phpgwapi/templates/celepar/images/add.png" style="vertical-align: middle;" >&nbsp;{txt_add}</button> 
     181                                <br><br> 
     182                                <button type="button" onClick="javascript:deselectGroup()"><img src="../phpgwapi/templates/celepar/images/rem.png" style="vertical-align: middle;" >&nbsp;{txt_rem}</button>  
     183                        </td> 
     184                        <td  align="left"> 
     185                                <table border="0" cellpadding="0" cellspacing="0"> 
     186                                        <tr height="30" class="th"> 
     187                                                <td  align="center">{cc_grps_selected}</td>                                      
     188                                        </tr> 
     189                                        <tr height="30" class="th"> 
     190                                                <td  align="left"><select  id="id_grps_selected" multiple name="grps_selected[]" style="width:200px" size="10"></select></td> 
     191                                        </tr> 
     192                                </table> 
     193                        </td> 
     194                </tr> 
     195        </table> 
     196</div> 
     197 
    163198<!-- _BOTTOM BUTTONS --> 
    164199<div align="center" id="cc_contact_tab_buttons" style="position: absolute; visibility: hidden; top: 250px; left: 0px; width: 498px; height: 64px; border: 0px solid black"> 
     
    227262                                         'name': Element('cc_contact_addrs').value,  
    228263                                         'selectedClass': 'tab_box_active',  
    229                                          'unselectedClass': 'tab_box'});                                          
     264                                         'unselectedClass': 'tab_box'}); 
     265                tabs.addTab({'id': 'cc_contact_groups_tab', 
     266                                         'name': Element('cc_contact_grps').value, 
     267                                         'selectedClass': 'tab_box_active',  
     268                                         'unselectedClass': 'tab_box'});                          
    230269 
    231270                fullAddWin = new dJSWin({'id': 'cc_full_add_window', 
     
    238277                                         'title_text_color': 'white', 
    239278                                         'button_x_img': Element('cc_phpgw_img_dir').value+'/winclose.gif', 
    240                                          'include_contents': new Array('cc_contact_tab_0', 'cc_contact_tab_1', 'cc_contact_tab_2','cc_contact_tab_buttons'), 
     279                                         'include_contents': new Array('cc_contact_tab_0', 'cc_contact_tab_1', 'cc_contact_tab_2','cc_contact_groups_tab','cc_contact_tab_buttons'), 
    241280                                         'border': true}); 
    242281 
Note: See TracChangeset for help on using the changeset viewer.