From 5731d68a9709b5aab47ea3004a43df7b9e43f98c Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 02 Aug 2011 05:22:02 -0400
Subject: [PATCH] - Added confirmation dialog for contact group deleting + loading indicator

---
 program/js/app.js |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 3bc4d91..88f51a1 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -333,7 +333,7 @@
 
         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 @@
 
   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

--
Gitblit v1.9.1