mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-03 06:44:03 +01:00
Archive: Style folder icon also in Settings > Folders
This commit is contained in:
@@ -57,7 +57,14 @@ if (window.rcmail) {
|
||||
|
||||
// set css style for archive folder
|
||||
var li;
|
||||
if (rcmail.env.archive_folder && (li = rcmail.get_folder_li(rcmail.env.archive_folder, '', true)))
|
||||
$(li).addClass('archive');
|
||||
if (rcmail.env.archive_folder) {
|
||||
if (rcmail.subscription_list)
|
||||
li = rcmail.subscription_list.get_item(rcmail.env.archive_folder);
|
||||
else
|
||||
li = rcmail.get_folder_li(rcmail.env.archive_folder, '', true);
|
||||
|
||||
if (li)
|
||||
$(li).addClass('archive');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ class archive extends rcube_plugin
|
||||
// register special folder type
|
||||
rcube_storage::$folder_types[] = 'archive';
|
||||
|
||||
if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show')
|
||||
&& ($archive_folder = $rcmail->config->get('archive_mbox'))
|
||||
) {
|
||||
$archive_folder = $rcmail->config->get('archive_mbox');
|
||||
|
||||
if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show') && $archive_folder) {
|
||||
$this->include_stylesheet($this->local_skin_path() . '/archive.css', true);
|
||||
$this->include_script('archive.js');
|
||||
$this->add_texts('localization', true);
|
||||
@@ -57,6 +57,13 @@ class archive extends rcube_plugin
|
||||
else if ($rcmail->task == 'settings') {
|
||||
$this->add_hook('preferences_list', array($this, 'prefs_table'));
|
||||
$this->add_hook('preferences_save', array($this, 'save_prefs'));
|
||||
|
||||
if ($rcmail->action == 'folders' && $archive_folder) {
|
||||
$this->include_stylesheet($this->local_skin_path() . '/archive.css', true);
|
||||
$this->include_script('archive.js');
|
||||
// set env variables for client
|
||||
$rcmail->output->set_env('archive_folder', $archive_folder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"type": "roundcube-plugin",
|
||||
"description": "This adds a button to move the selected messages to an archive folder. The folder (and the optional structure of subfolders) can be selected in the settings panel.",
|
||||
"license": "GPLv3+",
|
||||
"version": "3.2",
|
||||
"version": "3.3",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Thomas Bruederli",
|
||||
|
||||
Reference in New Issue
Block a user