Changeset 5014 in subversion


Ignore:
Timestamp:
Aug 3, 2011 8:31:38 AM (22 months ago)
Author:
alec
Message:
  • Add "loading" messages for contacts copying and groups assignment
Location:
trunk/roundcubemail/program
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/js/app.js

    r5003 r5014  
    310310          // register handlers for group assignment via checkboxes 
    311311          if (this.gui_objects.editform) { 
    312             $('input.groupmember').change(function(){ 
    313               var cmd = this.checked ? 'group-addmembers' : 'group-delmembers'; 
    314               ref.http_post(cmd, '_cid='+urlencode(ref.env.cid) 
    315                 + '&_source='+urlencode(ref.env.source) 
    316                 + '&_gid='+urlencode(this.value)); 
     312            $('input.groupmember').change(function() { 
     313              ref.group_member_change(this.checked ? 'add' : 'del', ref.env.cid, ref.env.source, this.value); 
    317314            }); 
    318315          } 
     
    39173914  }; 
    39183915 
     3916  // add/delete member to/from the group 
     3917  this.group_member_change = function(what, cid, source, gid) 
     3918  { 
     3919    what = what == 'add' ? 'add' : 'del'; 
     3920    var lock = this.display_message(this.get_label(what == 'add' ? 'addingmember' : 'removingmember'), 'loading'); 
     3921 
     3922    this.http_post('group-'+what+'members', '_cid='+urlencode(cid) 
     3923      + '&_source='+urlencode(source) 
     3924      + '&_gid='+urlencode(gid), lock); 
     3925  }; 
     3926 
    39193927  // copy a contact to the specified target (group or directory) 
    39203928  this.copy_contact = function(cid, to) 
     
    39233931      cid = this.contact_list.get_selection().join(','); 
    39243932 
    3925     if (to.type == 'group' && to.source == this.env.source) { 
    3926       this.http_post('group-addmembers', '_cid='+urlencode(cid) 
    3927         + '&_source='+urlencode(this.env.source) 
    3928         + '&_gid='+urlencode(to.id)); 
    3929     } 
     3933    if (to.type == 'group' && to.source == this.env.source) 
     3934      this.group_member_change('add', cid, to.source, to.id); 
    39303935    else if (to.type == 'group' && !this.env.address_sources[to.source].readonly) { 
     3936      var lock = this.display_message(this.get_label('copyingcontact'), 'loading'); 
    39313937      this.http_post('copy', '_cid='+urlencode(cid) 
    39323938        + '&_source='+urlencode(this.env.source) 
    39333939        + '&_to='+urlencode(to.source) 
    39343940        + '&_togid='+urlencode(to.id) 
    3935         + (this.env.group ? '&_gid='+urlencode(this.env.group) : '')); 
     3941        + (this.env.group ? '&_gid='+urlencode(this.env.group) : ''), lock); 
    39363942    } 
    39373943    else if (to.id != this.env.source && cid && this.env.address_sources[to.id] && !this.env.address_sources[to.id].readonly) { 
     3944      var lock = this.display_message(this.get_label('copyingcontact'), 'loading'); 
    39383945      this.http_post('copy', '_cid='+urlencode(cid) 
    39393946        + '&_source='+urlencode(this.env.source) 
    39403947        + '&_to='+urlencode(to.id) 
    3941         + (this.env.group ? '&_gid='+urlencode(this.env.group) : '')); 
     3948        + (this.env.group ? '&_gid='+urlencode(this.env.group) : ''), lock); 
    39423949    } 
    39433950  }; 
  • trunk/roundcubemail/program/localization/en_US/messages.inc

    r5003 r5014  
    101101$messages['movingmessage'] = 'Moving message(s)...'; 
    102102$messages['copyingmessage'] = 'Copying message(s)...'; 
     103$messages['copyingcontact'] = 'Copying contact(s)...'; 
    103104$messages['deletingmessage'] = 'Deleting message(s)...'; 
    104105$messages['markingmessage'] = 'Marking message(s)...'; 
     106$messages['addingmember'] = 'Adding contact(s) to the group...'; 
     107$messages['removingmember'] = 'Removing contact(s) from the group...'; 
    105108$messages['receiptsent'] = 'Successfully sent a read receipt.'; 
    106109$messages['errorsendingreceipt'] = 'Could not send the receipt.'; 
     
    113116$messages['importwait'] = 'Importing, please wait...'; 
    114117$messages['importerror'] = 'Import failed! The uploaded file is not a valid vCard file.'; 
    115 $messages['importconfirm'] = '<b>Successfully imported $inserted contacts.</b>'; 
    116 $messages['importconfirmskipped'] = '<b>Skipped $skipped existing entries.</b>'; 
     118$messages['importconfirm'] = '<b>Successfully imported $inserted contacts</b>'; 
     119$messages['importconfirmskipped'] = '<b>Skipped $skipped existing entries</b>'; 
    117120$messages['opnotpermitted'] = 'Operation not permitted!'; 
    118121$messages['nofromaddress'] = 'Missing e-mail address in selected identity.'; 
  • trunk/roundcubemail/program/steps/addressbook/func.inc

    r5009 r5014  
    225225    $OUTPUT->add_gui_object('folderlist', $attrib['id']); 
    226226    // add some labels to client 
    227     $OUTPUT->add_label('deletegroupconfirm', 'groupdeleting'); 
     227    $OUTPUT->add_label('deletegroupconfirm', 'groupdeleting', 'addingmember', 'removingmember'); 
    228228 
    229229    return html::tag('ul', $attrib, $out, html::$common_attrib); 
     
    282282 
    283283    // add some labels to client 
    284     $OUTPUT->add_label('deletecontactconfirm'); 
     284    $OUTPUT->add_label('deletecontactconfirm', 'copyingcontact'); 
    285285 
    286286    return $out; 
  • trunk/roundcubemail/program/steps/addressbook/show.inc

    r4969 r5014  
    202202 
    203203    $RCMAIL->output->add_gui_object('editform', 'form'); 
     204    $RCMAIL->output->add_label('addingmember', 'removingmember'); 
    204205 
    205206    return $form_start . $table->show() . $form_end; 
Note: See TracChangeset for help on using the changeset viewer.