summaryrefslogtreecommitdiff
path: root/plugins/markasjunk
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-22 12:05:16 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-22 12:05:16 +0000
commit38394350ffaf894e399b860531bc9d3cee303e0d (patch)
treecfd4023345e280e78b54decb0bd4d2eaa787dd85 /plugins/markasjunk
parent957c5298a18e7aafc39bc33f674322f87702a683 (diff)
Let plugins adapt better to different skins
git-svn-id: https://svn.roundcube.net/trunk@5642 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/markasjunk')
-rw-r--r--plugins/markasjunk/localization/en_US.inc1
-rw-r--r--plugins/markasjunk/markasjunk.php16
-rw-r--r--plugins/markasjunk/package.xml4
-rw-r--r--plugins/markasjunk/skins/default/markasjunk.css6
4 files changed, 19 insertions, 8 deletions
diff --git a/plugins/markasjunk/localization/en_US.inc b/plugins/markasjunk/localization/en_US.inc
index 6f63e161a..c1f56ad1d 100644
--- a/plugins/markasjunk/localization/en_US.inc
+++ b/plugins/markasjunk/localization/en_US.inc
@@ -1,6 +1,7 @@
<?php
$labels = array();
+$labels['buttontext'] = 'Junk';
$labels['buttontitle'] = 'Mark as Junk';
$labels['reportedasjunk'] = 'Successfully reported as Junk';
diff --git a/plugins/markasjunk/markasjunk.php b/plugins/markasjunk/markasjunk.php
index 697d880ca..7f87f5baa 100644
--- a/plugins/markasjunk/markasjunk.php
+++ b/plugins/markasjunk/markasjunk.php
@@ -18,18 +18,22 @@ class markasjunk extends rcube_plugin
$rcmail = rcmail::get_instance();
$this->register_action('plugin.markasjunk', array($this, 'request_action'));
-
+
if ($rcmail->action == '' || $rcmail->action == 'show') {
$skin_path = $this->local_skin_path();
$this->include_script('markasjunk.js');
+ if (is_file($this->home . "/$skin_path/markasjunk.css"))
+ $this->include_stylesheet("$skin_path/markasjunk.css");
$this->add_texts('localization', true);
+
$this->add_button(array(
+ 'type' => 'link',
+ 'label' => 'buttontext',
'command' => 'plugin.markasjunk',
- 'imagepas' => $skin_path.'/junk_pas.png',
- 'imageact' => $skin_path.'/junk_act.png',
- 'width' => 32,
- 'height' => 32,
- 'title' => 'markasjunk.buttontitle'), 'toolbar');
+ 'class' => 'button buttonPas junk disabled',
+ 'classact' => 'button junk',
+ 'title' => 'buttontitle',
+ 'domain' => 'markasjunk'), 'toolbar');
}
}
diff --git a/plugins/markasjunk/package.xml b/plugins/markasjunk/package.xml
index 56e4de0d5..1f6c96cf6 100644
--- a/plugins/markasjunk/package.xml
+++ b/plugins/markasjunk/package.xml
@@ -16,8 +16,8 @@
<date>2010-03-29</date>
<time>13:20:00</time>
<version>
- <release>1.0</release>
- <api>1.0</api>
+ <release>1.1</release>
+ <api>1.1</api>
</version>
<stability>
<release>stable</release>
diff --git a/plugins/markasjunk/skins/default/markasjunk.css b/plugins/markasjunk/skins/default/markasjunk.css
new file mode 100644
index 000000000..89ea568f4
--- /dev/null
+++ b/plugins/markasjunk/skins/default/markasjunk.css
@@ -0,0 +1,6 @@
+
+#messagetoolbar a.button.junk {
+ text-indent: -1000px;
+ background: url(junk_act.png) 0 0 no-repeat;
+}
+