diff options
author | thomascube <thomas@roundcube.net> | 2010-09-29 10:00:48 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2010-09-29 10:00:48 +0000 |
commit | 2baa16ae6d8355e0dfb38e400fd4115057b0680d (patch) | |
tree | 0e5790c0ff37980bfcdca26b1bfe4c392cf211b6 /plugins/markasjunk | |
parent | 717815c9a88222fc19989d6545134bb4d1df62c9 (diff) |
Copy plugins into 0.4.1 release branch
Diffstat (limited to 'plugins/markasjunk')
-rw-r--r-- | plugins/markasjunk/localization/cs_CZ.inc | 24 | ||||
-rw-r--r-- | plugins/markasjunk/localization/de_DE.inc | 6 | ||||
-rw-r--r-- | plugins/markasjunk/localization/en_US.inc | 7 | ||||
-rw-r--r-- | plugins/markasjunk/localization/es_AR.inc | 7 | ||||
-rw-r--r-- | plugins/markasjunk/localization/es_ES.inc | 7 | ||||
-rw-r--r-- | plugins/markasjunk/localization/et_EE.inc | 7 | ||||
-rw-r--r-- | plugins/markasjunk/localization/ja_JP.inc | 9 | ||||
-rw-r--r-- | plugins/markasjunk/localization/pl_PL.inc | 7 | ||||
-rw-r--r-- | plugins/markasjunk/localization/ru_RU.inc | 7 | ||||
-rw-r--r-- | plugins/markasjunk/localization/sv_SE.inc | 7 | ||||
-rw-r--r-- | plugins/markasjunk/localization/zh_TW.inc | 7 | ||||
-rw-r--r-- | plugins/markasjunk/markasjunk.js | 28 | ||||
-rw-r--r-- | plugins/markasjunk/markasjunk.php | 56 | ||||
-rw-r--r-- | plugins/markasjunk/package.xml | 60 | ||||
-rw-r--r-- | plugins/markasjunk/skins/default/junk_act.png | bin | 0 -> 1995 bytes | |||
-rw-r--r-- | plugins/markasjunk/skins/default/junk_pas.png | bin | 0 -> 1988 bytes |
16 files changed, 239 insertions, 0 deletions
diff --git a/plugins/markasjunk/localization/cs_CZ.inc b/plugins/markasjunk/localization/cs_CZ.inc new file mode 100644 index 000000000..c547e5a44 --- /dev/null +++ b/plugins/markasjunk/localization/cs_CZ.inc @@ -0,0 +1,24 @@ +<?php + +/* + ++-----------------------------------------------------------------------+ +| language/cs_CZ/labels.inc | +| | +| Language file of the Roundcube markasjunk plugin | +| Copyright (C) 2005-2009, Roundcube Dev. - Switzerland | +| Licensed under the GNU GPL | +| | ++-----------------------------------------------------------------------+ +| Author: Milan Kozak <hodza@hodza.net> | ++-----------------------------------------------------------------------+ + +@version $Id: labels.inc 2993 2009-09-26 18:32:07Z alec $ + +*/ + +$labels = array(); +$labels['buttontitle'] = 'Označit jako Spam'; +$labels['reportedasjunk'] = 'Úspěšně nahlášeno jako Spam'; + +?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/de_DE.inc b/plugins/markasjunk/localization/de_DE.inc new file mode 100644 index 000000000..f21edf7cd --- /dev/null +++ b/plugins/markasjunk/localization/de_DE.inc @@ -0,0 +1,6 @@ +<?php +// translation done by Ulli Heist - http://heist.hobby-site.org/ +$labels = array(); +$labels['buttontitle'] = 'als SPAM markieren'; +$labels['reportedasjunk'] = 'Erfolgreich als SPAM gemeldet'; +?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/en_US.inc b/plugins/markasjunk/localization/en_US.inc new file mode 100644 index 000000000..6f63e161a --- /dev/null +++ b/plugins/markasjunk/localization/en_US.inc @@ -0,0 +1,7 @@ +<?php + +$labels = array(); +$labels['buttontitle'] = 'Mark as Junk'; +$labels['reportedasjunk'] = 'Successfully reported as Junk'; + +?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/es_AR.inc b/plugins/markasjunk/localization/es_AR.inc new file mode 100644 index 000000000..decdde2a8 --- /dev/null +++ b/plugins/markasjunk/localization/es_AR.inc @@ -0,0 +1,7 @@ +<?php + +$labels = array(); +$labels['buttontitle'] = 'Marcar como SPAM'; +$labels['reportedasjunk'] = 'Mensaje reportado como SPAM'; + +?> diff --git a/plugins/markasjunk/localization/es_ES.inc b/plugins/markasjunk/localization/es_ES.inc new file mode 100644 index 000000000..8e5ca492d --- /dev/null +++ b/plugins/markasjunk/localization/es_ES.inc @@ -0,0 +1,7 @@ +<?php + +$labels = array(); +$labels['buttontitle'] = 'Marcar como SPAM'; +$labels['reportedasjunk'] = 'Mensaje informado como SPAM'; + +?> diff --git a/plugins/markasjunk/localization/et_EE.inc b/plugins/markasjunk/localization/et_EE.inc new file mode 100644 index 000000000..daf140512 --- /dev/null +++ b/plugins/markasjunk/localization/et_EE.inc @@ -0,0 +1,7 @@ +<?php + +$labels = array(); +$labels['buttontitle'] = 'Märgista Rämpsuks'; +$labels['reportedasjunk'] = 'Edukalt Rämpsuks märgitud'; + +?> diff --git a/plugins/markasjunk/localization/ja_JP.inc b/plugins/markasjunk/localization/ja_JP.inc new file mode 100644 index 000000000..bd5b8b203 --- /dev/null +++ b/plugins/markasjunk/localization/ja_JP.inc @@ -0,0 +1,9 @@ +<?php + +// EN-Revision: 3891 + +$labels = array(); +$labels['buttontitle'] = '迷惑メールとして設定'; +$labels['reportedasjunk'] = '迷惑メールとして報告することに成功しました。'; + +?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/pl_PL.inc b/plugins/markasjunk/localization/pl_PL.inc new file mode 100644 index 000000000..a98f0aab3 --- /dev/null +++ b/plugins/markasjunk/localization/pl_PL.inc @@ -0,0 +1,7 @@ +<?php + +$labels = array(); +$labels['buttontitle'] = 'Oznacz jako SPAM'; +$labels['reportedasjunk'] = 'Pomyślnie oznaczono jako SPAM'; + +?> diff --git a/plugins/markasjunk/localization/ru_RU.inc b/plugins/markasjunk/localization/ru_RU.inc new file mode 100644 index 000000000..32d00c2df --- /dev/null +++ b/plugins/markasjunk/localization/ru_RU.inc @@ -0,0 +1,7 @@ +<?php + +$labels = array(); +$labels['buttontitle'] = 'Переместить в "СПАМ"'; +$labels['reportedasjunk'] = 'Перемещено в "СПАМ"'; + +?> diff --git a/plugins/markasjunk/localization/sv_SE.inc b/plugins/markasjunk/localization/sv_SE.inc new file mode 100644 index 000000000..f4c5959b9 --- /dev/null +++ b/plugins/markasjunk/localization/sv_SE.inc @@ -0,0 +1,7 @@ +<?php + +$labels = array(); +$labels['buttontitle'] = 'Märk som skräp'; +$labels['reportedasjunk'] = 'Framgångsrikt rapporterat som skräp'; + +?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/zh_TW.inc b/plugins/markasjunk/localization/zh_TW.inc new file mode 100644 index 000000000..7b0b22162 --- /dev/null +++ b/plugins/markasjunk/localization/zh_TW.inc @@ -0,0 +1,7 @@ +<?php + +$labels = array(); +$labels['buttontitle'] = '標示為垃圾信'; +$labels['reportedasjunk'] = '成功回報垃圾信'; + +?> diff --git a/plugins/markasjunk/markasjunk.js b/plugins/markasjunk/markasjunk.js new file mode 100644 index 000000000..8b02d7438 --- /dev/null +++ b/plugins/markasjunk/markasjunk.js @@ -0,0 +1,28 @@ +/* Mark-as-Junk plugin script */ + +function rcmail_markasjunk(prop) +{ + if (!rcmail.env.uid && (!rcmail.message_list || !rcmail.message_list.get_selection().length)) + return; + + var uids = rcmail.env.uid ? rcmail.env.uid : rcmail.message_list.get_selection().join(','); + + rcmail.set_busy(true, 'loading'); + rcmail.http_post('plugin.markasjunk', '_uid='+uids+'&_mbox='+urlencode(rcmail.env.mailbox), true); +} + +// callback for app-onload event +if (window.rcmail) { + rcmail.addEventListener('init', function(evt) { + + // register command (directly enable in message view mode) + rcmail.register_command('plugin.markasjunk', rcmail_markasjunk, rcmail.env.uid); + + // add event-listener to message list + if (rcmail.message_list) + rcmail.message_list.addEventListener('select', function(list){ + rcmail.enable_command('plugin.markasjunk', list.get_selection().length > 0); + }); + }) +} + diff --git a/plugins/markasjunk/markasjunk.php b/plugins/markasjunk/markasjunk.php new file mode 100644 index 000000000..4c15a270f --- /dev/null +++ b/plugins/markasjunk/markasjunk.php @@ -0,0 +1,56 @@ +<?php + +/** + * Mark as Junk + * + * Sample plugin that adds a new button to the mailbox toolbar + * to mark the selected messages as Junk and move them to the Junk folder + * + * @version @package_version@ + * @author Thomas Bruederli + */ +class markasjunk extends rcube_plugin +{ + public $task = 'mail'; + + function init() + { + $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'); + $this->add_texts('localization', true); + $this->add_button(array( + 'command' => 'plugin.markasjunk', + 'imagepas' => $skin_path.'/junk_pas.png', + 'imageact' => $skin_path.'/junk_act.png', + 'title' => 'markasjunk.buttontitle'), 'toolbar'); + } + } + + function request_action() + { + $this->add_texts('localization'); + + $GLOBALS['IMAP_FLAGS']['JUNK'] = 'Junk'; + $GLOBALS['IMAP_FLAGS']['NONJUNK'] = 'NonJunk'; + + $uids = get_input_value('_uid', RCUBE_INPUT_POST); + $mbox = get_input_value('_mbox', RCUBE_INPUT_POST); + + $rcmail = rcmail::get_instance(); + $rcmail->imap->unset_flag($uids, 'NONJUNK'); + $rcmail->imap->set_flag($uids, 'JUNK'); + + if (($junk_mbox = $rcmail->config->get('junk_mbox')) && $mbox != $junk_mbox) { + $rcmail->output->command('move_messages', $junk_mbox); + } + + $rcmail->output->command('display_message', $this->gettext('reportedasjunk'), 'confirmation'); + $rcmail->output->send(); + } + +} diff --git a/plugins/markasjunk/package.xml b/plugins/markasjunk/package.xml new file mode 100644 index 000000000..22b1b5689 --- /dev/null +++ b/plugins/markasjunk/package.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 + http://pear.php.net/dtd/tasks-1.0.xsd + http://pear.php.net/dtd/package-2.0 + http://pear.php.net/dtd/package-2.0.xsd"> + <name>markasjunk</name> + <channel>pear.roundcube.net</channel> + <summary>Mark messages as Junk</summary> + <description>Adds a new button to the mailbox toolbar to mark the selected messages as Junk and move them to the configured Junk folder.</description> + <lead> + <name>Thomas Bruederli</name> + <user>thomasb</user> + <email>roundcube@gmail.com</email> + <active>yes</active> + </lead> + <date>2010-03-29</date> + <time>13:20:00</time> + <version> + <release>1.0</release> + <api>1.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> + <notes>-</notes> + <contents> + <dir baseinstalldir="/" name="/"> + <file name="markasjunk.php" role="php"> + <tasks:replace from="@name@" to="name" type="package-info"/> + <tasks:replace from="@package_version@" to="version" type="package-info"/> + </file> + <file name="markasjunk.js" role="data"> + <tasks:replace from="@name@" to="name" type="package-info"/> + <tasks:replace from="@package_version@" to="version" type="package-info"/> + </file> + <file name="localization/en_US.inc" role="data"></file> + <file name="localization/cs_CZ.inc" role="data"></file> + <file name="localization/et_EE.inc" role="data"></file> + <file name="localization/pl_PL.inc" role="data"></file> + <file name="localization/ru_RU.inc" role="data"></file> + <file name="localization/sv_DE.inc" role="data"></file> + <file name="skins/default/junk_act.png" role="data"></file> + <file name="skins/default/junk_pas.png" role="data"></file> + </dir> + <!-- / --> + </contents> + <dependencies> + <required> + <php> + <min>5.2.1</min> + </php> + <pearinstaller> + <min>1.7.0</min> + </pearinstaller> + </required> + </dependencies> + <phprelease/> +</package> diff --git a/plugins/markasjunk/skins/default/junk_act.png b/plugins/markasjunk/skins/default/junk_act.png Binary files differnew file mode 100644 index 000000000..b5a84f604 --- /dev/null +++ b/plugins/markasjunk/skins/default/junk_act.png diff --git a/plugins/markasjunk/skins/default/junk_pas.png b/plugins/markasjunk/skins/default/junk_pas.png Binary files differnew file mode 100644 index 000000000..b88a561a4 --- /dev/null +++ b/plugins/markasjunk/skins/default/junk_pas.png |