Archive: Style folder icon also in Settings > Folders

pull/6040/head
Aleksander Machniak 8 years ago
parent 1109cd1150
commit 238ec1ecdf

@ -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",

Loading…
Cancel
Save