diff options
author | svncommit <devs@roundcube.net> | 2007-09-25 07:33:37 +0000 |
---|---|---|
committer | svncommit <devs@roundcube.net> | 2007-09-25 07:33:37 +0000 |
commit | b0dbf3ce3e8a7b72e9d2c2376015f1f47de84d12 (patch) | |
tree | de3e0c5a2530071cb449187784d67433d41dcfbb /program/steps | |
parent | 5f041a37473041070df31233c31885bcd9c36dd1 (diff) |
Enable drag-/dropping of folders to a new parent folder, closes #1457344.
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/settings/manage_folders.inc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/program/steps/settings/manage_folders.inc b/program/steps/settings/manage_folders.inc index b08d9ccc9..b39cef612 100644 --- a/program/steps/settings/manage_folders.inc +++ b/program/steps/settings/manage_folders.inc @@ -22,6 +22,8 @@ // init IMAP connection rcmail_imap_init(TRUE); +$OUTPUT->include_script('list.js'); + // subscribe to one or more mailboxes if ($_action=='subscribe') @@ -71,7 +73,8 @@ else if ($_action=='rename-folder') if ($rename && $OUTPUT->ajax_call) { - $OUTPUT->command('replace_folder_row', $oldname, $rename, rcube_charset_convert($rename, 'UTF-7')); + $display_rename = str_repeat(' ', substr_count($rename, $IMAP->delimiter)) . preg_replace('/.*' . preg_quote($IMAP->delimiter) . '/', '', rcube_charset_convert($rename, 'UTF-7')); + $OUTPUT->command('replace_folder_row', $oldname, $rename, $display_rename); $OUTPUT->command('reset_folder_rename'); $OUTPUT->send(); } @@ -159,14 +162,21 @@ function rcube_subscription_form($attrib) $protected = ($CONFIG['protect_default_folders'] == TRUE && in_array($folder,$CONFIG['default_imap_folders'])); $zebra_class = $i%2 ? 'even' : 'odd'; $folder_js = JQ($folder); - $folder_html = $CONFIG['protect_default_folders'] && in_array($folder, $CONFIG['default_imap_folders']) ? rcube_label(strtolower($folder)) : rcube_charset_convert($folder, 'UTF-7'); + $display_folder = str_repeat(' ', substr_count($folder, $IMAP->delimiter)) . preg_replace('/.*' . preg_quote($IMAP->delimiter) . '/', '', rcube_charset_convert($folder, 'UTF-7')); + $folder_html = $CONFIG['protect_default_folders'] && in_array($folder, $CONFIG['default_imap_folders']) ? rcube_label(strtolower($folder)) : $display_folder; if (!$protected) $a_js_folders['rcmrow'.($i+1)] = array($folder, rcube_charset_convert($folder, 'UTF-7')); - $out .= sprintf('<tr id="rcmrow%d" class="%s"><td>%s</td>', + $out .= sprintf('<tr id="rcmrow%d" class="%s"' . + ' onmouseover="return %s.focus_subscription(\'%s\')"' . + ' onmouseout="return %s.unfocus_subscription(\'%s\')"><td>%s</td>', $i+1, $zebra_class, + JS_OBJECT_NAME, + $folder_js, + JS_OBJECT_NAME, + $folder_js, Q($folder_html)); if ($protected) @@ -197,6 +207,8 @@ function rcube_subscription_form($attrib) $OUTPUT->add_gui_object('subscriptionlist', $attrib['id']); $OUTPUT->set_env('subscriptionrows', $a_js_folders); + $OUTPUT->set_env('defaultfolders', $CONFIG['default_imap_folders']); + $OUTPUT->set_env('delimiter', $IMAP->delimiter); return $out; } |