From 68b6a9e8e49fcd17b5e71cb6c0162fdbd39b44f3 Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Fri, 19 Oct 2007 08:24:04 -0400
Subject: [PATCH] - Enable single-selection toggling in JS list object - Use row id's instead of folder names in folder renaming/moving - Fix some smaller errors in folder renaming/moving

---
 program/steps/settings/manage_folders.inc |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/program/steps/settings/manage_folders.inc b/program/steps/settings/manage_folders.inc
index 84e9928..b329e4c 100644
--- a/program/steps/settings/manage_folders.inc
+++ b/program/steps/settings/manage_folders.inc
@@ -71,7 +71,7 @@
 // rename a mailbox
 else if ($_action=='rename-folder')
   {
-  $a_mboxes = array_merge($IMAP->list_mailboxes(), $IMAP->list_unsubscribed());
+  $a_mboxes = array_unique(array_merge($IMAP->list_mailboxes(), $IMAP->list_unsubscribed()));
   $delimiter = $IMAP->get_hierarchy_delimiter();
 
   if (!empty($_POST['_folder_oldname']) && !empty($_POST['_folder_newname']))
@@ -195,15 +195,9 @@
     if (!$protected)
       $a_js_folders['rcmrow'.($i+1)] = array($folder, rcube_charset_convert($folder, 'UTF-7'));
 
-    $out .= sprintf('<tr id="rcmrow%d" class="%s"' .
-                    ' onmouseover="return %s.focus_subscription(\'%s\')"' .
-                    ' onmouseout="return %s.unfocus_subscription(\'%s\')"><td>%s</td>',
+    $out .= sprintf('<tr id="rcmrow%d" class="%s"><td>%s</td>',
                     $i+1,
                     $zebra_class,
-                    JS_OBJECT_NAME,
-                    $folder_js,
-                    JS_OBJECT_NAME,
-                    $folder_js,
                     Q($folder_html));
                     
     if ($protected)
@@ -213,14 +207,10 @@
 
     // add rename and delete buttons
     if (!$protected)
-      $out .= sprintf('<td><a href="#rename" onclick="%s.command(\'rename-folder\',\'%s\')" title="%s">%s</a>'.
-                      '<td><a href="#delete" onclick="%s.command(\'delete-folder\',\'%s\')" title="%s">%s</a></td>',
-                      JS_OBJECT_NAME,
-                      $folder_js,
+      $out .= sprintf('<td><a href="#rename" title="%s">%s</a>'.
+                      '<td><a href="#delete" title="%s">%s</a></td>',
                       rcube_label('renamefolder'),
                       $edit_button,
-                      JS_OBJECT_NAME,
-                      $folder_js,
                       rcube_label('deletefolder'),
                       $del_button);
     else

--
Gitblit v1.9.1