Changeset 65c8764b in github


Ignore:
Timestamp:
Apr 1, 2010 2:52:48 AM (3 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
600981d
Parents:
1d773d7
Message:

Add client-side events when adding/removing groups

Location:
program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • program/js/app.js

    raa12df2 r65c8764b  
    36603660    var li, key = 'G'+id; 
    36613661    if ((li = this.get_folder_li(key))) { 
     3662      this.triggerEvent('removegroup', { id:id, li:li }); 
     3663       
    36623664      li.parentNode.removeChild(li); 
    36633665      delete this.env.contactfolders[key]; 
    36643666      delete this.env.contactgroups[key]; 
    36653667    } 
     3668     
     3669    this.list_contacts(null, 0); 
    36663670  }; 
    36673671   
     
    37173721    var li = $('<li>').attr('id', 'rcmli'+key).addClass('contactgroup').append(link); 
    37183722    $(this.gui_objects.folderlist).append(li); 
     3723     
     3724    this.triggerEvent('insertgroup', { id:prop.id, name:prop.name, li:li[0] }); 
    37193725  }; 
    37203726   
  • program/steps/addressbook/groups.inc

    r1d773d7 r65c8764b  
    4242  if (($gid = get_input_value('_gid', RCUBE_INPUT_POST)) && ($ids = get_input_value('_cid', RCUBE_INPUT_POST))) { 
    4343    $plugin = $RCMAIL->plugins->exec_hook('group_delmembers', array('group_id' => $gid, 'ids' => $ids, 'source' => $source)); 
    44     $ids = $plugin['ids']; 
    4544     
    46     if (!$plugin['abort'] && $CONTACTS->remove_from_group($gid, $ids)) 
     45    if (!$plugin['abort'] && $CONTACTS->remove_from_group($gid, $plugin['ids'])) 
    4746      $OUTPUT->show_message('contactremovedfromgroup'); 
    4847    else if ($plugin['message']) 
Note: See TracChangeset for help on using the changeset viewer.