summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-08-02 09:22:02 +0000
committeralecpl <alec@alec.pl>2011-08-02 09:22:02 +0000
commit5731d68a9709b5aab47ea3004a43df7b9e43f98c (patch)
tree9e9b60565c58a68cf563dceefc6cfb58306aa168
parent0d5836bdfe0365cb2baa2281ba55be3745b42c40 (diff)
- Added confirmation dialog for contact group deleting + loading indicator
-rw-r--r--program/js/app.js8
-rw-r--r--program/localization/en_US/messages.inc6
-rw-r--r--program/localization/pl_PL/messages.inc2
-rw-r--r--program/steps/addressbook/func.inc2
4 files changed, 13 insertions, 5 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 3bc4d9145..88f51a191 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -333,7 +333,7 @@ function rcube_webmail()
this.enable_command('add', 'import', this.env.writable_source);
this.enable_command('list', 'listgroup', 'advanced-search', true);
-
+
// load contacts of selected source
if (!this.env.action)
this.command('list', this.env.source);
@@ -4093,8 +4093,10 @@ function rcube_webmail()
this.group_delete = function()
{
- if (this.env.group)
- this.http_post('group-delete', '_source='+urlencode(this.env.source)+'&_gid='+urlencode(this.env.group), true);
+ if (this.env.group && confirm(this.get_label('deletegroupconfirm'))) {
+ var lock = this.set_busy(true, 'groupdeleting');
+ this.http_post('group-delete', '_source='+urlencode(this.env.source)+'&_gid='+urlencode(this.env.group), lock);
+ }
};
// callback from server upon group-delete command
diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc
index befaa25b6..c45aa15a6 100644
--- a/program/localization/en_US/messages.inc
+++ b/program/localization/en_US/messages.inc
@@ -56,10 +56,12 @@ $messages['errormoving'] = 'Could not move the message(s).';
$messages['errorcopying'] = 'Could not copy the message(s).';
$messages['errordeleting'] = 'Could not delete the message(s).';
$messages['errormarking'] = 'Could not mark the message(s).';
-$messages['deletecontactconfirm'] = 'Do you really want to delete the selected contact(s)?';
-$messages['deletemessagesconfirm'] = 'Do you really want to delete the selected message(s)?';
+$messages['deletecontactconfirm'] = 'Do you really want to delete selected contact(s)?';
+$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['groupdeleting'] = 'Deleting group...';
$messages['folderdeleting'] = 'Deleting folder...';
$messages['foldermoving'] = 'Moving folder...';
$messages['foldersubscribing'] = 'Subscribing folder...';
diff --git a/program/localization/pl_PL/messages.inc b/program/localization/pl_PL/messages.inc
index 0f8e609a8..61ad15ff4 100644
--- a/program/localization/pl_PL/messages.inc
+++ b/program/localization/pl_PL/messages.inc
@@ -58,9 +58,11 @@ $messages['errorcopying'] = 'Nie można skopiować wiadomości!';
$messages['errordeleting'] = 'Nie można usunąć wiadomości!';
$messages['errormarking'] = 'Nie można oznaczyć wiadomości!';
$messages['deletecontactconfirm'] = 'Czy na pewno chcesz usunąć wybrane kontakty?';
+$messages['deletegroupconfirm'] = 'Czy na pewno chcesz usunąć wybraną grupę?';
$messages['deletemessagesconfirm'] = 'Czy na pewno chcesz usunąć wybrane wiadomości?';
$messages['deletefolderconfirm'] = 'Czy na pewno chcesz usunąć wybrany folder?';
$messages['purgefolderconfirm'] = 'Czy na pewno chcesz usunąć wszystkie wiadomości w tym folderze?';
+$messages['groupdeleting'] = 'Usuwanie grupy...';
$messages['folderdeleting'] = 'Usuwanie folderu...';
$messages['foldermoving'] = 'Przenoszenie folderu...';
$messages['formincomplete'] = 'Uzupełnij formularz!';
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 6f01667f6..932d34935 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -223,6 +223,8 @@ function rcmail_directory_list($attrib)
$OUTPUT->set_env('contactgroups', $jsdata);
$OUTPUT->add_gui_object('folderlist', $attrib['id']);
+ // add some labels to client
+ $OUTPUT->add_label('deletegroupconfirm', 'groupdeleting');
return html::tag('ul', $attrib, $out, html::$common_attrib);
}