summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-15 13:47:12 +0000
committeralecpl <alec@alec.pl>2009-09-15 13:47:12 +0000
commit34aec72131fee81697685f9781358e4871ea0150 (patch)
treedf2c6b6d235cc09456f00f5ad0fa5526ea20a993
parent2b77e8daa7f7e5c0a71f615672cdb492dcdf0dad (diff)
- Support skins in 'archive' and 'markasjunk' plugins
-rw-r--r--CHANGELOG1
-rw-r--r--plugins/archive/archive.js4
-rw-r--r--plugins/archive/archive.php18
-rw-r--r--plugins/archive/skins/default/archive_act.png (renamed from plugins/archive/archive_act.png)bin3663 -> 3663 bytes
-rw-r--r--plugins/archive/skins/default/archive_pas.png (renamed from plugins/archive/archive_pas.png)bin977 -> 977 bytes
-rw-r--r--plugins/archive/skins/default/foldericon.png (renamed from plugins/archive/foldericon.png)bin3312 -> 3312 bytes
-rw-r--r--plugins/markasjunk/markasjunk.php7
-rw-r--r--plugins/markasjunk/skins/default/junk_act.png (renamed from plugins/markasjunk/junk_act.png)bin1995 -> 1995 bytes
-rw-r--r--plugins/markasjunk/skins/default/junk_pas.png (renamed from plugins/markasjunk/junk_pas.png)bin1988 -> 1988 bytes
9 files changed, 19 insertions, 11 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 1b0317a0c..c36c25c77 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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)
diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js
index d771fb66b..954fd1549 100644
--- a/plugins/archive/archive.js
+++ b/plugins/archive/archive.js
@@ -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 + ')');
})
}
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index 9df7f8b99..7750160c5 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -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());
diff --git a/plugins/archive/archive_act.png b/plugins/archive/skins/default/archive_act.png
index 2a1735868..2a1735868 100644
--- a/plugins/archive/archive_act.png
+++ b/plugins/archive/skins/default/archive_act.png
Binary files differ
diff --git a/plugins/archive/archive_pas.png b/plugins/archive/skins/default/archive_pas.png
index 8de208583..8de208583 100644
--- a/plugins/archive/archive_pas.png
+++ b/plugins/archive/skins/default/archive_pas.png
Binary files differ
diff --git a/plugins/archive/foldericon.png b/plugins/archive/skins/default/foldericon.png
index ec0853c44..ec0853c44 100644
--- a/plugins/archive/foldericon.png
+++ b/plugins/archive/skins/default/foldericon.png
Binary files differ
diff --git a/plugins/markasjunk/markasjunk.php b/plugins/markasjunk/markasjunk.php
index b269637f4..961a446d8 100644
--- a/plugins/markasjunk/markasjunk.php
+++ b/plugins/markasjunk/markasjunk.php
@@ -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');
}
}
diff --git a/plugins/markasjunk/junk_act.png b/plugins/markasjunk/skins/default/junk_act.png
index b5a84f604..b5a84f604 100644
--- a/plugins/markasjunk/junk_act.png
+++ b/plugins/markasjunk/skins/default/junk_act.png
Binary files differ
diff --git a/plugins/markasjunk/junk_pas.png b/plugins/markasjunk/skins/default/junk_pas.png
index b88a561a4..b88a561a4 100644
--- a/plugins/markasjunk/junk_pas.png
+++ b/plugins/markasjunk/skins/default/junk_pas.png
Binary files differ