From 48e9c14ebded89d858c8be0333f77f77a81b0877 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sat, 31 Mar 2012 12:25:48 +0000 Subject: Move plugins repository into roundcubemail root folder; svn:externals are not defined anymore --- plugins/markasjunk/localization/cs_CZ.inc | 24 +++++++++ plugins/markasjunk/localization/da_DK.inc | 7 +++ plugins/markasjunk/localization/de_CH.inc | 6 +++ plugins/markasjunk/localization/de_DE.inc | 6 +++ plugins/markasjunk/localization/en_US.inc | 8 +++ plugins/markasjunk/localization/es_AR.inc | 7 +++ plugins/markasjunk/localization/es_ES.inc | 7 +++ plugins/markasjunk/localization/et_EE.inc | 7 +++ plugins/markasjunk/localization/gl_ES.inc | 7 +++ plugins/markasjunk/localization/it_IT.inc | 7 +++ plugins/markasjunk/localization/ja_JP.inc | 20 +++++++ plugins/markasjunk/localization/pl_PL.inc | 7 +++ plugins/markasjunk/localization/ru_RU.inc | 20 +++++++ plugins/markasjunk/localization/sk_SK.inc | 15 ++++++ plugins/markasjunk/localization/sv_SE.inc | 7 +++ plugins/markasjunk/localization/zh_TW.inc | 7 +++ plugins/markasjunk/markasjunk.js | 28 ++++++++++ plugins/markasjunk/markasjunk.php | 63 ++++++++++++++++++++++ plugins/markasjunk/package.xml | 69 ++++++++++++++++++++++++ plugins/markasjunk/skins/default/junk_act.png | Bin 0 -> 1995 bytes plugins/markasjunk/skins/default/junk_pas.png | Bin 0 -> 1988 bytes plugins/markasjunk/skins/default/markasjunk.css | 6 +++ 22 files changed, 328 insertions(+) create mode 100644 plugins/markasjunk/localization/cs_CZ.inc create mode 100644 plugins/markasjunk/localization/da_DK.inc create mode 100644 plugins/markasjunk/localization/de_CH.inc create mode 100644 plugins/markasjunk/localization/de_DE.inc create mode 100644 plugins/markasjunk/localization/en_US.inc create mode 100644 plugins/markasjunk/localization/es_AR.inc create mode 100644 plugins/markasjunk/localization/es_ES.inc create mode 100644 plugins/markasjunk/localization/et_EE.inc create mode 100644 plugins/markasjunk/localization/gl_ES.inc create mode 100644 plugins/markasjunk/localization/it_IT.inc create mode 100644 plugins/markasjunk/localization/ja_JP.inc create mode 100644 plugins/markasjunk/localization/pl_PL.inc create mode 100644 plugins/markasjunk/localization/ru_RU.inc create mode 100644 plugins/markasjunk/localization/sk_SK.inc create mode 100644 plugins/markasjunk/localization/sv_SE.inc create mode 100644 plugins/markasjunk/localization/zh_TW.inc create mode 100644 plugins/markasjunk/markasjunk.js create mode 100644 plugins/markasjunk/markasjunk.php create mode 100644 plugins/markasjunk/package.xml create mode 100644 plugins/markasjunk/skins/default/junk_act.png create mode 100644 plugins/markasjunk/skins/default/junk_pas.png create mode 100644 plugins/markasjunk/skins/default/markasjunk.css (limited to 'plugins/markasjunk') diff --git a/plugins/markasjunk/localization/cs_CZ.inc b/plugins/markasjunk/localization/cs_CZ.inc new file mode 100644 index 000000000..18509cf51 --- /dev/null +++ b/plugins/markasjunk/localization/cs_CZ.inc @@ -0,0 +1,24 @@ + | ++-----------------------------------------------------------------------+ + +@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/da_DK.inc b/plugins/markasjunk/localization/da_DK.inc new file mode 100644 index 000000000..e351b0f61 --- /dev/null +++ b/plugins/markasjunk/localization/da_DK.inc @@ -0,0 +1,7 @@ + diff --git a/plugins/markasjunk/localization/de_CH.inc b/plugins/markasjunk/localization/de_CH.inc new file mode 100644 index 000000000..9cfa38dad --- /dev/null +++ b/plugins/markasjunk/localization/de_CH.inc @@ -0,0 +1,6 @@ + \ 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..c1f56ad1d --- /dev/null +++ b/plugins/markasjunk/localization/en_US.inc @@ -0,0 +1,8 @@ + \ 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 @@ + 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 @@ + 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 @@ + diff --git a/plugins/markasjunk/localization/gl_ES.inc b/plugins/markasjunk/localization/gl_ES.inc new file mode 100644 index 000000000..b1f49a23e --- /dev/null +++ b/plugins/markasjunk/localization/gl_ES.inc @@ -0,0 +1,7 @@ + diff --git a/plugins/markasjunk/localization/it_IT.inc b/plugins/markasjunk/localization/it_IT.inc new file mode 100644 index 000000000..cc44fae21 --- /dev/null +++ b/plugins/markasjunk/localization/it_IT.inc @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/plugins/markasjunk/localization/ja_JP.inc b/plugins/markasjunk/localization/ja_JP.inc new file mode 100644 index 000000000..d4fbaea41 --- /dev/null +++ b/plugins/markasjunk/localization/ja_JP.inc @@ -0,0 +1,20 @@ + | + +-----------------------------------------------------------------------+ + @version $Id$ +*/ + +$labels = array(); +$labels['buttontitle'] = '迷惑メールとして設定'; +$labels['reportedasjunk'] = '迷惑メールとして報告しました。'; + 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 @@ + diff --git a/plugins/markasjunk/localization/ru_RU.inc b/plugins/markasjunk/localization/ru_RU.inc new file mode 100644 index 000000000..d3547632a --- /dev/null +++ b/plugins/markasjunk/localization/ru_RU.inc @@ -0,0 +1,20 @@ + | + +-----------------------------------------------------------------------+ + @version $Id$ +*/ + +$labels = array(); +$labels['buttontitle'] = 'Переместить в "СПАМ'; +$labels['reportedasjunk'] = 'Перемещено в "СПАМ'; + diff --git a/plugins/markasjunk/localization/sk_SK.inc b/plugins/markasjunk/localization/sk_SK.inc new file mode 100644 index 000000000..b56ac46af --- /dev/null +++ b/plugins/markasjunk/localization/sk_SK.inc @@ -0,0 +1,15 @@ + + * + */ + +$labels = array(); +$labels['buttontitle'] = 'Označiť ako Spam'; +$labels['reportedasjunk'] = 'Úspešne nahlásené ako Spam'; + +?> 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 @@ + \ 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 @@ + diff --git a/plugins/markasjunk/markasjunk.js b/plugins/markasjunk/markasjunk.js new file mode 100644 index 000000000..0e30fb8f2 --- /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(','), + lock = rcmail.set_busy(true, 'loading'); + + rcmail.http_post('plugin.markasjunk', '_uid='+uids+'&_mbox='+urlencode(rcmail.env.mailbox), lock); +} + +// 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..4db90c1bc --- /dev/null +++ b/plugins/markasjunk/markasjunk.php @@ -0,0 +1,63 @@ +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', + 'class' => 'button buttonPas junk disabled', + 'classact' => 'button junk', + 'title' => 'buttontitle', + 'domain' => 'markasjunk'), '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->storage->unset_flag($uids, 'NONJUNK'); + $rcmail->storage->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..95690eb9b --- /dev/null +++ b/plugins/markasjunk/package.xml @@ -0,0 +1,69 @@ + + + markasjunk + pear.roundcube.net + Mark messages as Junk + Adds a new button to the mailbox toolbar to mark the selected messages as Junk and move them to the configured Junk folder. + + Thomas Bruederli + thomasb + roundcube@gmail.com + yes + + 2010-03-29 + + + 1.1 + 1.1 + + + stable + stable + + GNU GPLv3+ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.2.1 + + + 1.7.0 + + + + + diff --git a/plugins/markasjunk/skins/default/junk_act.png b/plugins/markasjunk/skins/default/junk_act.png new file mode 100644 index 000000000..b5a84f604 Binary files /dev/null and b/plugins/markasjunk/skins/default/junk_act.png differ diff --git a/plugins/markasjunk/skins/default/junk_pas.png b/plugins/markasjunk/skins/default/junk_pas.png new file mode 100644 index 000000000..b88a561a4 Binary files /dev/null and b/plugins/markasjunk/skins/default/junk_pas.png differ 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; +} + -- cgit v1.2.3