From 0b36d151572e050b51d82e7429fee847ebb33e22 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 20 Nov 2014 06:03:22 -0500
Subject: [PATCH] Add method to display operation (uploading) progress in UI message

---
 plugins/enigma/lib/enigma_ui.php |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/plugins/enigma/lib/enigma_ui.php b/plugins/enigma/lib/enigma_ui.php
index 47366b7..2e95938 100644
--- a/plugins/enigma/lib/enigma_ui.php
+++ b/plugins/enigma/lib/enigma_ui.php
@@ -91,7 +91,7 @@
                     'searchform' => array($this->rc->output, 'search_form'),
                 ));
                 $this->rc->output->set_pagetitle($this->enigma->gettext('enigmakeys'));
-                $this->rc->output->send('enigma.keys'); 
+                $this->rc->output->send('enigma.keys');
             }
         }
     }
@@ -104,11 +104,11 @@
         if ($this->css_loaded)
             return;
 
-        $skin = $this->rc->config->get('skin');
-        if (!file_exists($this->home . "/skins/$skin/enigma.css"))
-            $skin = 'default';
+        $skin_path = $this->enigma->local_skin_path();
+        if (is_file($this->home . "/$skin_path/enigma.css")) {
+            $this->enigma->include_stylesheet("$skin_path/enigma.css");
+        }
 
-        $this->enigma->include_stylesheet("skins/$skin/enigma.css");
         $this->css_added = true;
     }
 
@@ -176,8 +176,7 @@
         $search   = rcube_utils::get_input_value('_q', rcube_utils::INPUT_GPC);
 
         // define list of cols to be displayed
-        $a_show_cols = array('name');
-        $result = array();
+//        $a_show_cols = array('name');
 
         // Get the list
         $list = $this->enigma->engine->list_keys($search);
@@ -200,7 +199,7 @@
                 $size = count($list);
 
                 // Add rows
-                foreach($list as $idx => $key) {
+                foreach ($list as $key) {
                     $this->rc->output->command('enigma_add_list_row',
                         array('name' => rcube::Q($key->name), 'id' => $key->id));
                 }
@@ -416,8 +415,8 @@
         // @TODO: make this work with non-default skins
         $this->enigma->add_button(array(
             'name' => 'enigmamenu',
-            'imagepas' => 'skins/default/enigma.png',
-            'imageact' => 'skins/default/enigma.png',
+            'imagepas' => 'skins/classic/enigma.png',
+            'imageact' => 'skins/classic/enigma.png',
             'onclick' => "rcmail_ui.show_popup('enigmamenu', true); return false",
             'title' => 'securityoptions',
             'domain' => 'enigma',

--
Gitblit v1.9.1