From 487173ed086d2dd7b21a2f3f51f675a53ce1cacf Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 22 Sep 2011 06:04:31 -0400
Subject: [PATCH] - Small cleanup + fix: list contacts on when list object is found

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

diff --git a/program/js/app.js b/program/js/app.js
index 6acb48d..74c602e 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -278,6 +278,9 @@
         if (this.gui_objects.folderlist)
           this.env.contactfolders = $.extend($.extend({}, this.env.address_sources), this.env.contactgroups);
 
+        this.enable_command('add', 'import', this.env.writable_source);
+        this.enable_command('list', 'listgroup', 'listsearch', 'advanced-search', true);
+
         if (this.gui_objects.contactslist) {
 
           this.contact_list = new rcube_list_widget(this.gui_objects.contactslist,
@@ -300,6 +303,7 @@
           }
 
           this.update_group_commands();
+          this.command('list');
         }
 
         this.set_page_buttons();
@@ -319,21 +323,12 @@
           if (this.env.action == 'add' || this.env.action == 'edit')
               this.init_contact_form();
         }
+
         if (this.gui_objects.qsearchbox) {
           this.enable_command('search', 'reset-search', 'moveto', true);
         }
 
-        if (this.contact_list && this.contact_list.rowcount > 0)
-          this.enable_command('export', true);
-
-        this.enable_command('add', 'import', this.env.writable_source);
-        this.enable_command('list', 'listgroup', 'listsearch', 'advanced-search', true);
-
-        // load contacts of selected source
-        if (!this.env.action)
-          this.command('list', this.env.source);
         break;
-
 
       case 'settings':
         this.enable_command('preferences', 'identities', 'save', 'folders', true);

--
Gitblit v1.9.1