Ignore:
Timestamp:
05/25/11 12:08:00 (13 years ago)
Author:
airton
Message:

Ticket #1928 - Falhas na associação de um contato com um grupo de contato

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.2.0.2/contactcenter/js/ccAddGroup.js

    r4477 r4502  
    3737                this.group_id = Element('group_id'); 
    3838                                 
     39                this.old_contacts_in_list = new Array(); 
     40                 
    3941                ccAGWinHeight = 'ccAGWinHeightMO'; 
    4042 
     
    154156                 
    155157                sdata[0] = this.title.value; 
    156                 var contacts = new Array();                              
     158                var contacts = new Array(); 
     159                var old_contacts = new Array(); 
    157160                 
    158161                for (j =0; j < this.contact_in_list.length; j++) 
    159                         contacts[j] = this.contact_in_list.options[j].value;                     
     162                        contacts[j] = this.contact_in_list.options[j].value; 
     163                for (i = 0; i < this.old_contacts_in_list.length; i++) 
     164                        old_contacts[i] = this.old_contacts_in_list[i]; 
    160165                 
    161166                if(!this.title.value) { 
     
    171176 
    172177                sdata[1] = contacts;             
    173                 sdata[2] = this.group_id.value == 'undefined' ?         sdata[2] = 0 : sdata[2]  = this.group_id.value;                                                  
     178                sdata[2] = this.group_id.value == 'undefined' ?         sdata[2] = 0 : sdata[2]  = this.group_id.value;          
     179                sdata[3] = old_contacts; 
    174180                var sdata = 'add='+escape(serialize(sdata)); 
    175181                Connector.newRequest('cAddGroup.Send', CC_url+'add_group', 'POST', handler, sdata); 
     
    200206                this.title.value = '';                           
    201207        } 
     208         
     209        cAddGroup.prototype.openEditWindow = function() 
     210        { 
     211                var list_old_contacts = Element('contact_in_list'); 
     212                for (var i = 0; i < list_old_contacts.length; i++) 
     213                { 
     214                        this.old_contacts_in_list[i] = list_old_contacts.options[i].value; 
     215                } 
     216                this.window.open(); 
     217        }; 
    202218         
    203219        /* Função para remover contato da lista */       
Note: See TracChangeset for help on using the changeset viewer.