Changeset 503 for trunk/contactcenter


Ignore:
Timestamp:
10/01/08 16:46:55 (15 years ago)
Author:
niltonneto
Message:

Implementação para trazer os contatos compartilhados.

Location:
trunk/contactcenter
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/contactcenter/inc/class.so_contact.inc.php

    r285 r503  
    256256                                ) 
    257257                        ); 
     258                        $this->relateds = array( 
     259                                        'id_related'    => array( 
     260                                                'name'                  => 'id_related', 
     261                                                'type'                  => array('foreign', 'primary'), 
     262                                                'association'   => array( 
     263                                                        'table'                 => 'phpgw_cc_contact', 
     264                                                        'field'                 => 'id_contact' 
     265                                                ), 
     266                                                'states'                =>      array(), 
     267                                                'values'        => array() 
     268                                        ), 
     269                                        'id_contact'    => array( 
     270                                                'name'                  => 'id_contact', 
     271                                                'type'                  => array('foreign', 'primary'), 
     272                                                'association'   => array( 
     273                                                        'table'                 => 'phpgw_cc_contact', 
     274                                                        'field'                 => 'id_contact' 
     275                                                ), 
     276                                                'states'                =>      array(), 
     277                                                'values'        => array() 
     278                                        ), 
     279                                        'id_typeof_contact_relation'    => array( 
     280                                                'name'                  => 'id_typeof_contact_relation', 
     281                                                'type'                  => array('foreign', 'primary'), 
     282                                                'association'   => array( 
     283                                                        'table'                 => 'phpgw_cc_typeof_ct_rels', 
     284                                                        'field'                 => 'id_typeof_contact_relation' 
     285                                                ), 
     286                                                'states'                =>      array(), 
     287                                                'values'        => array() 
     288                                        ) 
     289                                ); 
    258290                                 
    259291 
     
    320352                                        $this->state = 'new'; 
    321353                                } 
     354                                $temp = $this->db_tables; 
     355                         
     356                                $this->db_tables = array(); //Limpo o array para fazer checkout apenas dos contatos relacionados 
     357                                $this->db_tables['phpgw_cc_contact_rels'] =  array( 
     358                                                'type'          => 'multi', 
     359                                                'keys'          => array( 
     360                                                        'primary' => array( 
     361                                                                &$this->relateds['id_related']), 
     362                                                                &$this->relateds['id_contact'], 
     363                                                        'foreign' => array( 
     364                                                                &$this->relateds['id_related'])), 
     365                                                                &$this->relateds['id_contact'], 
     366                                                'fields'        => & $this->relateds); 
     367                                if (!$this->checkout($id_contact)) 
     368                                { 
     369                                        $this->reset_values(); 
     370                                        $this->state = 'new'; 
     371                                } 
     372                                $this->db_tables = $temp; //Coloco o valor do array antigo. 
    322373                        } 
    323374                        else 
     
    500551                        } 
    501552                         
     553                        return $return; 
     554                } 
     555         
     556                function get_relateds() { 
     557                        $return = array(); 
     558                         
     559                        reset($this->relateds['id_contact']['values']); 
     560                        reset($this->relateds['id_typeof_contact_relation']['values']); 
     561                        while(list(,$id_relation) = each($this->relateds['id_contact']['values']) and 
     562                                list(,$id_relation_type) = each($this->relateds['id_typeof_contact_relation']['values'])) 
     563                        { 
     564                                $return[$id_relation] = $id_relation_type; 
     565                        } 
    502566                        return $return; 
    503567                } 
     
    806870         
    807871                /*! 
     872                        @function set_related 
     873                        @abstract Sets the Contact's related 
     874                        @author Raphael Derosso Pereira 
     875                        @param integer $id_related The new Contact's Relation type ID 
     876                        @param integer $id_type The new Contact's Relation ID  
     877 
     878                */ 
     879                function set_relateds ( $relations , $id_type ) 
     880                { 
     881                        $id = $this->id; 
     882                        $db = $GLOBALS['phpgw']->db; 
     883 
     884                        //Remove todos os contatos relacionados 
     885                        $query = "delete from phpgw_cc_contact_rels where id_related=$id and id_typeof_contact_relation=1"; 
     886                         
     887                        if (!$db->query($query, __LINE__, __FILE__)) { 
     888                                return false; 
     889                        } 
     890                        foreach($relations as $id_relation) { 
     891                                $query = "insert into phpgw_cc_contact_rels (id_contact,id_related,id_typeof_contact_relation) values ($id_relation,$id,$id_type)"; 
     892                                 
     893                                if (!$db->query($query, __LINE__, __FILE__)) { 
     894                                        return false; 
     895                                } 
     896                        } 
     897                        return true; 
     898                } 
     899         
     900                /*! 
    808901                 
    809902                        @function set_address 
     
    831924                        $this->manage_fields($this->addresses['id_address'], 'new', 'new'); 
    832925                        $this->manage_fields($this->addresses['id_contact'], 'new', 'new'); 
     926                         
    833927                } 
    834928         
  • trunk/contactcenter/inc/class.so_main.inc.php

    r2 r503  
    205205                                } 
    206206                        } 
    207  
    208                         $query = $query_main_select . $query_main_from . $query_main_where; 
    209  
     207                         
     208                        if($table_main!='') { //Quando faço checkout e não incluo a tabela principal, a função precisa funcionar... 
     209                                $query = $query_main_select . $query_main_from . $query_main_where; 
     210         
    210211//                      echo 'Query in SO_Main CheckOut: "'.$query.'"<br>'; 
    211                          
    212                         if (!$this->db->query($query,__LINE__, __FILE__)) 
    213                         { 
    214                                 return false; 
    215                         } 
    216                          
    217                         if (!$this->db->next_record()) 
    218                         { 
    219                                 return false; 
    220                         } 
    221                          
    222                         reset($this->db_tables[$table_main]['fields']); 
    223  
    224                         while (list(,$field_info) = each($this->db_tables[$table_main]['fields'])) 
    225                         { 
    226                                 $this->db_tables[$table_main]['fields'][$field_info['name']]['value'] = $this->db->f($field_info['name']); 
    227                                 $this->manage_fields($this->db_tables[$table_main]['fields'][$field_info['name']], 'sync'); 
    228                         } 
    229  
     212                                 
     213                                if ($this->db->query($query,__LINE__, __FILE__)) { 
     214                                        if ($this->db->next_record()) { 
     215                                                reset($this->db_tables[$table_main]['fields']); 
     216                         
     217                                                while (list(,$field_info) = each($this->db_tables[$table_main]['fields'])) 
     218                                                { 
     219                                                        $this->db_tables[$table_main]['fields'][$field_info['name']]['value'] = $this->db->f($field_info['name']); 
     220                                                        $this->manage_fields($this->db_tables[$table_main]['fields'][$field_info['name']], 'sync'); 
     221                                                } 
     222                                        } 
     223                                } 
     224                        } 
     225                        //echo "\n\n\n".$query_multi_select; 
    230226                        foreach($query_multi_select as $table => $query) 
    231227                        { 
     228                                 
    232229                                $query = $query_multi_select[$table] . $query_multi_from[$table] . $query_multi_where[$table]; 
    233230 
    234                                 if (!$this->db->query($query, __LINE__, __FILE__)) 
    235                                 { 
    236                                         return false; 
    237                                 } 
    238                                  
    239                                 $pos = 0; 
    240                                 while($this->db->next_record()) 
    241                                 { 
    242                                         reset($this->db_tables[$table]['fields']);                                       
    243                                         while (list(,$field_info) = each($this->db_tables[$table]['fields'])) 
    244                                         { 
    245                                                 $this->db_tables[$table]['fields'][$field_info['name']]['values'][$pos] = $this->db->f($field_info['name']); 
    246                                                 $this->manage_fields($this->db_tables[$table]['fields'][$field_info['name']], 'sync', 'new'); 
     231                                //echo 'Query in SO_Main CheckOut: "'.$query.'"<br>'; 
     232                                if ($this->db->query($query, __LINE__, __FILE__)) { 
     233                                        $pos = 0; 
     234                                        while($this->db->next_record()) 
     235                                        { 
     236                                                reset($this->db_tables[$table]['fields']);                                       
     237                                                while (list(,$field_info) = each($this->db_tables[$table]['fields'])) 
     238                                                { 
     239                                                        $this->db_tables[$table]['fields'][$field_info['name']]['values'][$pos] = $this->db->f($field_info['name']); 
     240                                                        $this->manage_fields($this->db_tables[$table]['fields'][$field_info['name']], 'sync', 'new'); 
     241                                                } 
     242                                                $pos++; 
    247243                                        } 
    248244                                        $pos++; 
  • trunk/contactcenter/inc/class.ui_data.inc.php

    r418 r503  
    7070                        if($this->page_info['actual_catalog']['class'] == 'bo_group_manager') 
    7171                                $this -> typeContact = 'groups'; 
     72                        else if($this->page_info['actual_catalog']['class'] == 'bo_shared_catalog_manager') 
     73                                $this -> typeContact = 'shared'; 
    7274                        else 
    7375                                $this -> typeContact = 'contacts'; 
     
    147149                         
    148150                        /* Messages */ 
     151                        $GLOBALS['phpgw']->template->set_var('cc_msg_not_allowed',lang('Not Allowed')); 
    149152                        $GLOBALS['phpgw']->template->set_var('cc_msg_no_cards',lang('No Cards')); 
    150153                        $GLOBALS['phpgw']->template->set_var('cc_msg_err_no_room',lang('No Room for Cards! Increase your browser area.')); 
     
    299302                                /* Full Add Methods */ 
    300303                                case 'get_full_data': 
    301                                         return $this->get_full_data($_GET['id']); 
     304                                        return $this->get_full_data($_GET['id'],$_GET['catalog']); 
    302305                                 
    303306                                case 'get_group': 
     
    577580                                unset($ids); 
    578581                                $this->page_info['changed'] = false; 
    579                                   
     582 
    580583                                switch ($this->page_info['actual_catalog']['class']) 
    581584                                { 
     585                                        case 'bo_shared_catalog_manager': 
     586                                                $field_name = 'id_contact'; 
     587 
     588                                                if ($letter !== 'number') 
     589                                                { 
     590                                                        $find_restric[0] = array( 
     591                                                                0 => array( 
     592                                                                        'field' => 'contact.names_ordered', 
     593                                                                        'type'  => 'iLIKE', 
     594                                                                        'value' => $letter !== 'all' ? $letter.'%' : '%' 
     595                                                                ) 
     596                                                        ); 
     597                                                } 
     598                                                else 
     599                                                { 
     600                                                        $find_restric[0] = array( 
     601                                                                0 => array( 
     602                                                                        'type'  => 'branch', 
     603                                                                        'value' => 'OR', 
     604                                                                        'sub_branch' => array( 
     605                                                                                0 => array( 
     606                                                                                        'field' => 'contact.names_ordered', 
     607                                                                                        'type'  => 'LIKE', 
     608                                                                                        'value' => '0%' 
     609                                                                                ), 
     610                                                                                1 => array( 
     611                                                                                        'field' => 'contact.names_ordered', 
     612                                                                                        'type'  => 'LIKE', 
     613                                                                                        'value' => '1%' 
     614                                                                                ), 
     615                                                                                2 => array( 
     616                                                                                        'field' => 'contact.names_ordered', 
     617                                                                                        'type'  => 'LIKE', 
     618                                                                                        'value' => '2%' 
     619                                                                                ), 
     620                                                                                3 => array( 
     621                                                                                        'field' => 'contact.names_ordered', 
     622                                                                                        'type'  => 'LIKE', 
     623                                                                                        'value' => '3%' 
     624                                                                                ), 
     625                                                                                4 => array( 
     626                                                                                        'field' => 'contact.names_ordered', 
     627                                                                                        'type'  => 'LIKE', 
     628                                                                                        'value' => '4%' 
     629                                                                                ), 
     630                                                                                5 => array( 
     631                                                                                        'field' => 'contact.names_ordered', 
     632                                                                                        'type'  => 'LIKE', 
     633                                                                                        'value' => '5%' 
     634                                                                                ), 
     635                                                                                6 => array( 
     636                                                                                        'field' => 'contact.names_ordered', 
     637                                                                                        'type'  => 'LIKE', 
     638                                                                                        'value' => '6%' 
     639                                                                                ), 
     640                                                                                7 => array( 
     641                                                                                        'field' => 'contact.names_ordered', 
     642                                                                                        'type'  => 'LIKE', 
     643                                                                                        'value' => '7%' 
     644                                                                                ), 
     645                                                                                8 => array( 
     646                                                                                        'field' => 'contact.names_ordered', 
     647                                                                                        'type'  => 'LIKE', 
     648                                                                                        'value' => '8%' 
     649                                                                                ), 
     650                                                                                9 => array( 
     651                                                                                        'field' => 'contact.names_ordered', 
     652                                                                                        'type'  => 'LIKE', 
     653                                                                                        'value' => '9%' 
     654                                                                                ) 
     655                                                                        ) 
     656                                                                ) 
     657                                                        ); 
     658                                                } 
     659                                                 
     660                                                $find_field[0] = array('contact.id_contact','contact.names_ordered'); 
     661                                                 
     662                                                $find_other[0] = array( 
     663                                                        'order'  => 'contact.names_ordered' 
     664                                                ); 
     665                                                 
     666                                                break; 
    582667                                        case 'bo_people_catalog': 
    583668                                                $field_name = 'id_contact'; 
     
    9831068                                        foreach ($result as $id => $value) 
    9841069                                        { 
    985                                                 $this->page_info['actual_entries'][] = $value[$field_name]; 
     1070                                                if($this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager') 
     1071                                                        $this->page_info['actual_entries'][] = $value[$field_name]; 
     1072                                                else 
     1073                                                        $this->page_info['actual_entries'][] = array(0=>$value[$field_name],1=>$value['perms']); 
    9861074                                        }  
    9871075                                        //print_r($this->page_info['actual_entries']); 
     
    10611149                                ///---------------- Correção Temporária PHP5 -----------------------/// 
    10621150                                $ids = array(); 
     1151                                $perms = array(); 
    10631152                                $array_temp = array();                   
    10641153                                                                 
    10651154                                foreach($this->page_info['actual_entries'] as $key=>$tmp){ 
    1066                                         $array_temp[] = $tmp;                            
     1155                                                $array_temp[] = $tmp;                            
    10671156                                }        
    10681157                                 
    10691158                                for($i = $id_i; $i < $id_f and $i < $n_entries; $i++) 
    10701159                                { 
    1071                                         $ids[] = $array_temp[$i]; 
     1160                                        if($this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager') 
     1161                                                $ids[] = $array_temp[$i]; 
     1162                                        else { 
     1163                                                $ids[] = $array_temp[$i][0]; 
     1164                                                $perms[] = $array_temp[$i][1]; 
     1165                                        } 
     1166                                        //$perms[] = $array_temp[$i]; 
    10721167                                } 
    10731168                                 
     
    11211216                                        return;                                  
    11221217                                } 
     1218                                $final[10] = $this -> typeContact; 
    11231219                                 
    11241220                                $fields['photo'] = true; 
     
    12021298 
    12031299                                        //      If contact is a public list, then load the forwarding addresses. 
    1204                                                 if($contact['account_type'][0] == 'l' || $contact['account_type'][0] == 'i') 
     1300                                                if($contact['account_type'][0] == 'l') 
    12051301                                                        $final[3][$i][7] = array(); 
     1302                                                         
     1303                                                if($this->page_info['actual_catalog']['class']=='bo_shared_catalog_manager') { 
     1304                                                        $final[3][$i][8] = $perms[$i]; 
     1305                                                } 
    12061306 
    12071307                                                $final[4][$i] = $contact['photo'] ? 1  : 0; 
     
    12871387                 
    12881388                */ 
    1289                 function get_full_data($id) 
     1389                function get_full_data($id,$catalog='bo_people_catalog') 
    12901390                { 
    12911391                        $dateformat = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']; 
    1292                         $this->bo->catalog = CreateObject('contactcenter.bo_people_catalog');            
     1392                        $this->bo->catalog = CreateObject('contactcenter.'.$catalog);            
    12931393                        $fields = $this->bo->catalog->get_fields(true); 
    12941394                        $fields['photo'] = false; 
     
    22142314                        // Support search parameters with accentuation 
    22152315                        if ($this->page_info['actual_catalog']['class'] != 'bo_people_catalog' && 
    2216                                 $this->page_info['actual_catalog']['class'] != 'bo_group_manager') 
     2316                                $this->page_info['actual_catalog']['class'] != 'bo_group_manager' && 
     2317                                $this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager') 
    22172318                        { 
    22182319 
     
    22472348 
    22482349                                if (!$external && $this->page_info['actual_catalog']['class'] != 'bo_people_catalog' && 
    2249                                         $this->page_info['actual_catalog']['class'] != 'bo_group_manager') 
     2350                                        $this->page_info['actual_catalog']['class'] != 'bo_group_manager' && 
     2351                                        $this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager') 
    22502352                                { 
    22512353                                        /* 
     
    22922394 
    22932395                        if ($external || $this->page_info['actual_catalog']['class'] == 'bo_people_catalog' || 
    2294                                 $this->page_info['actual_catalog']['class'] == 'bo_group_manager') 
     2396                                $this->page_info['actual_catalog']['class'] == 'bo_group_manager' || 
     2397                                $this->page_info['actual_catalog']['class'] == 'bo_shared_catalog_manager') 
    22952398                        { 
    22962399                                // Get only this attributes: dn, cn for external catalogs, 
     
    23242427            foreach ($ids as $e_info) 
    23252428            { 
    2326                 $ids_f[] = $e_info[$id_field]; 
     2429                                if($this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager') 
     2430                        $ids_f[] = $e_info[$id_field]; 
     2431                else 
     2432                        $ids_f[] = array(0=>$e_info[$id_field],1=>$e_info['perms']); 
    23272433            } 
    23282434 
  • trunk/contactcenter/js/cc.js

    r294 r503  
    184184function editContact (id){ 
    185185        openFullAdd(); 
    186         populateFullEdit(id); 
     186        populateFullEdit(id,'bo_people_catalog'); 
     187} 
     188function editSharedContact (id){ 
     189        openFullAdd(); 
     190        populateFullEdit(id,'bo_shared_catalog_manager'); 
    187191} 
    188192/************ Edit Group *************/ 
     
    277281} 
    278282 
    279 function populateFullEdit (id) 
     283function populateFullEdit (id,catalog) 
    280284{ 
    281285        var handler = function(responseText) 
     
    298302        }; 
    299303 
    300         Connector.newRequest('populateFullEdit', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id, 'GET', handler); 
     304        Connector.newRequest('populateFullEdit', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id + "&catalog="+catalog, 'GET', handler); 
    301305} 
    302306 
     
    19701974                                        } 
    19711975                                } 
    1972          
     1976                                if (type == "shared") { 
     1977                                        if (data[3][pos][8] & 4)  
     1978                                                eval("document.getElementById(id + ':cc_card_edit').onclick = function(){editSharedContact(Element('"+id+"' + ':cc_id').value);};"); 
     1979                                        else  
     1980                                                document.getElementById(id + ':cc_card_edit').onclick = function(){ 
     1981                                                        alert(Element('cc_msg_not_allowed').value); 
     1982                                                }; 
     1983                                        if (data[3][pos][8] & 8)  
     1984                                                eval("document.getElementById(id + ':cc_card_remove').onclick = function(){removeEntry(Element('" + id + "' + ':cc_id').value);};"); 
     1985                                        else  
     1986                                                document.getElementById(id + ':cc_card_remove').onclick = function(){ 
     1987                                                        alert(Element('cc_msg_not_allowed').value); 
     1988                                                }; 
     1989                                } 
    19731990                                if (--ncards == 0) 
    19741991                                { 
     
    21222139function getCardHTML (id, type) 
    21232140{ 
    2124                 if(type != 'groups') { 
    2125                  
     2141                if(type == 'groups') { 
     2142                        html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' + 
     2143            '<div style="border: 0px solid #999; position: relative;">' +  
     2144                                '<img src="templates/default/images/card.png" border="0" width="' + CC_card_image_width +'" height="' + CC_card_image_height + '"i ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' + 
     2145                                '<img title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style="position: absolute; top: 35px; left: 222px; width: 18px; height: 18px; cursor: pointer; cursor: hand; z-index: 1" onclick="editGroup(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_edit\',0)" onmouseout="resizeIcon(\''+id+':cc_card_edit\',1)" src="templates/default/images/cc_card_edit.png">' + 
     2146                                '<img title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="position: absolute; top: 78px; left: 223px; width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" onmouseover="resizeIcon(\''+id+':cc_card_remove\',0)" onmouseout="resizeIcon(\''+id+':cc_card_remove\',1)" src="templates/default/images/cc_x.png">' +  
     2147                                '<span id="' + id + ':cc_title" style="position: absolute; top: 30px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_name_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_name_full\').style.visibility=\'hidden\'"></span>' + 
     2148                                '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 15px; left: 15px"></span>' + 
     2149                                '<span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML" id="' + id + ':cc_short_name" style="position: absolute; top: 105px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' + 
     2150                                '<input id="' + id + ':cc_id" type="hidden">' + 
     2151                        '</div>' + '</td>'; 
     2152                 
     2153                } 
     2154                else { 
    21262155                        html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' + 
    21272156                                '<div style="border: 0px solid #999; position: relative;">' + 
     
    21422171                                        '<input id="' + id + ':cc_id" type="hidden">' + 
    21432172                                '</div>' + '</td>'; 
    2144                  
    2145                 } else { 
    2146                         html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' + 
    2147             '<div style="border: 0px solid #999; position: relative;">' +  
    2148                                 '<img src="templates/default/images/card.png" border="0" width="' + CC_card_image_width +'" height="' + CC_card_image_height + '"i ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' + 
    2149                                 '<img title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style="position: absolute; top: 35px; left: 222px; width: 18px; height: 18px; cursor: pointer; cursor: hand; z-index: 1" onclick="editGroup(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_edit\',0)" onmouseout="resizeIcon(\''+id+':cc_card_edit\',1)" src="templates/default/images/cc_card_edit.png">' + 
    2150                                 '<img title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="position: absolute; top: 78px; left: 223px; width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" onmouseover="resizeIcon(\''+id+':cc_card_remove\',0)" onmouseout="resizeIcon(\''+id+':cc_card_remove\',1)" src="templates/default/images/cc_x.png">' +  
    2151                                 '<span id="' + id + ':cc_title" style="position: absolute; top: 30px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_name_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_name_full\').style.visibility=\'hidden\'"></span>' + 
    2152                                 '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 15px; left: 15px"></span>' + 
    2153                                 '<span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML" id="' + id + ':cc_short_name" style="position: absolute; top: 105px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' + 
    2154                                 '<input id="' + id + ':cc_id" type="hidden">' + 
    2155                         '</div>' + '</td>'; 
    21562173                } 
    21572174         
     
    21672184                        else 
    21682185                                bg = "this.style.background=\'#EEEEEE\'"; 
     2186                        if(type == 'groups') { 
     2187                                html_card = '<tr width="40%" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' + 
     2188                                        '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' + 
     2189                                        '<span id="' + id + ':cc_title"></span></td>' + 
     2190                                        '<td width="40%" style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML"  id="' + id + ':cc_short_name"></span></td>' + 
     2191                                        '<td align="left" width="55px">'+ 
     2192                                        '<img  title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;"  onclick="editGroup(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' + 
     2193                                        '&nbsp;&nbsp;|&nbsp;&nbsp;'+ 
     2194                                        '<img  title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" src="templates/default/images/cc_x.png">'  + 
     2195                                        '<input id="' + id + ':cc_id" type="hidden">'+                                                                           
     2196                                        '</td></tr>'; 
    21692197                                                 
    2170                         if(type != 'groups') { 
    21712198                         
     2199                        } 
     2200                        else { 
    21722201                                html_card = '<tr  style="height:20px" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' +                                        
    21732202                                        '<span valign="bottom" id="' + id + ':cc_icon_group">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="' + id + ':cc_name"></span></td>' + 
     
    21892218                                        '</td></tr>'; 
    21902219                        } 
    2191                         else { 
    2192                                 html_card = '<tr width="40%" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' + 
    2193                                         '<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' + 
    2194                                         '<span id="' + id + ':cc_title"></span></td>' + 
    2195                                         '<td width="40%" style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML"  id="' + id + ':cc_short_name"></span></td>' + 
    2196                                         '<td align="left" width="55px">'+ 
    2197                                         '<img  title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;"  onclick="editGroup(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' + 
    2198                                         '&nbsp;&nbsp;|&nbsp;&nbsp;'+ 
    2199                                         '<img  title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" src="templates/default/images/cc_x.png">'  + 
    2200                                         '<input id="' + id + ':cc_id" type="hidden">'+                                                                           
    2201                                         '</td></tr>'; 
    2202                         } 
    22032220 
    22042221        return html_card; 
     
    22282245                        html_cards += ''; 
    22292246                } 
    2230                 if((ccTree.catalog_perms & 2) && type != 'groups') 
     2247                if((ccTree.catalog_perms & 2) && type != 'groups' && type!='shared') 
    22312248                        html_cards += '<tr><td colspan=4 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>'; 
    22322249        }        
     
    22672284                        html_cards += '</tr>'; 
    22682285                } 
    2269                 if((ccTree.catalog_perms & 2) && type != 'groups') 
     2286                if((ccTree.catalog_perms & 2) && type != 'groups' && type!='shared') 
    22702287                        html_cards += '<tr><td colspan=3 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>'; 
    22712288        }        
Note: See TracChangeset for help on using the changeset viewer.