- Support skins in 'archive' and 'markasjunk' plugins

release-0.6
alecpl 15 years ago
parent 2b77e8daa7
commit 34aec72131

@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
- Support skins in 'archive' and 'markasjunk' plugins
- Added 'html_editor' hook (#1486068)
- Fix DB constraint violation when populating messages cache (#1486052)
- Password: added password strength options (#1486062)

@ -29,8 +29,8 @@ 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)))
$(li).css('background-image', 'url(plugins/archive/foldericon.png)');
if (rcmail.env.archive_folder && rcmail.env.archive_folder_icon && (li = rcmail.get_folder_li(rcmail.env.archive_folder)))
$(li).css('background-image', 'url(' + rcmail.env.archive_folder_icon + ')');
})
}

@ -17,18 +17,22 @@ class archive extends rcube_plugin
{
$this->register_action('plugin.archive', array($this, 'request_action'));
# There is no "Archived flags"
# $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
// There is no "Archived flags"
// $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
$rcmail = rcmail::get_instance();
if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show') && ($archive_folder = $rcmail->config->get('archive_mbox'))) {
if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show')
&& ($archive_folder = $rcmail->config->get('archive_mbox'))) {
$skin_path = 'skins/'.$rcmail->output->config['skin'];
$this->include_script('archive.js');
$this->add_texts('localization', true);
$this->add_button(
array(
'command' => 'plugin.archive',
'imagepas' => 'archive_pas.png',
'imageact' => 'archive_act.png',
'imagepas' => $skin_path.'/archive_pas.png',
'imageact' => $skin_path.'/archive_act.png',
'title' => 'buttontitle',
'domain' => $this->ID,
),
@ -39,13 +43,13 @@ class archive extends rcube_plugin
// set env variable for client
$rcmail->output->set_env('archive_folder', $archive_folder);
$rcmail->output->set_env('archive_folder_icon', $this->url($skin_path.'/foldericon.png'));
// add archive folder to the list of default mailboxes
if (($default_folders = $rcmail->config->get('default_imap_folders')) && !in_array($archive_folder, $default_folders)) {
$default_folders[] = $archive_folder;
$rcmail->config->set('default_imap_folders', $default_folders);
}
}
}
else if ($rcmail->task == 'settings') {
$dont_override = $rcmail->config->get('dont_override', array());

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before

Width:  |  Height:  |  Size: 977 B

After

Width:  |  Height:  |  Size: 977 B

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -20,10 +20,13 @@ class markasjunk extends rcube_plugin
$rcmail = rcmail::get_instance();
if ($rcmail->action == '' || $rcmail->action == 'show') {
$skin_path = 'skins/'.$rcmail->output->config['skin'];
$this->include_script('markasjunk.js');
$this->add_texts('localization', true);
$this->add_button(array('command' => 'plugin.markasjunk', 'imagepas' => 'junk_pas.png',
'imageact' => 'junk_act.png', 'title' => 'markasjunk.buttontitle'), 'toolbar');
$this->add_button(array('command' => 'plugin.markasjunk',
'imagepas' => $skin_path.'/junk_pas.png',
'imageact' => $skin_path.'/junk_act.png',
'title' => 'markasjunk.buttontitle'), 'toolbar');
}
}

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Loading…
Cancel
Save