summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-09-23 11:18:49 +0000
committeralecpl <alec@alec.pl>2011-09-23 11:18:49 +0000
commitb175394b30266d82c56f085bcf9829231828db7c (patch)
treedff4a0d27a6faad09357c4c1716d789da4abaa95 /program
parent6c1eaec38586a2c542f6b7b9c5c8870059472201 (diff)
- Add loading indicator on contact delete
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js10
-rw-r--r--program/localization/en_US/messages.inc1
-rw-r--r--program/steps/addressbook/func.inc2
3 files changed, 9 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 26b953932..a2092563f 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -4019,8 +4019,9 @@ function rcube_webmail()
this.delete_contacts = function()
{
// exit if no mailbox specified or if selection is empty
- var selection = this.contact_list.get_selection();
- var undelete = this.env.address_sources[this.env.source].undelete;
+ var selection = this.contact_list.get_selection(),
+ undelete = this.env.address_sources[this.env.source].undelete;
+
if (!(selection.length || this.env.cid) || (!undelete && !confirm(this.get_label('deletecontactconfirm'))))
return;
@@ -4048,7 +4049,10 @@ function rcube_webmail()
qs += '&_search='+this.env.search_request;
// send request to server
- this.http_post('delete', '_cid='+urlencode(a_cids.join(','))+'&_source='+urlencode(this.env.source)+'&_from='+(this.env.action ? this.env.action : '')+qs);
+ this.http_post('delete', '_cid='+urlencode(a_cids.join(','))
+ +'&_source='+urlencode(this.env.source)
+ +'&_from='+(this.env.action ? this.env.action : '')+qs,
+ this.display_message(this.get_label('contactdeleting'), 'loading'));
return true;
};
diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc
index 5572a7622..047349f8b 100644
--- a/program/localization/en_US/messages.inc
+++ b/program/localization/en_US/messages.inc
@@ -62,6 +62,7 @@ $messages['deletegroupconfirm'] = 'Do you really want to delete selected group?
$messages['deletemessagesconfirm'] = 'Do you really want to delete selected message(s)?';
$messages['deletefolderconfirm'] = 'Do you really want to delete this folder?';
$messages['purgefolderconfirm'] = 'Do you really want to delete all messages in this folder?';
+$messages['contactdeleting'] = 'Deleting contact(s)...';
$messages['groupdeleting'] = 'Deleting group...';
$messages['folderdeleting'] = 'Deleting folder...';
$messages['foldermoving'] = 'Moving folder...';
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index a1491545f..dd8856a90 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -312,7 +312,7 @@ function rcmail_contacts_list($attrib)
$OUTPUT->include_script('list.js');
// add some labels to client
- $OUTPUT->add_label('deletecontactconfirm', 'copyingcontact');
+ $OUTPUT->add_label('deletecontactconfirm', 'copyingcontact', 'contactdeleting');
return $out;
}