Merge branch 'master' of github.com:roundcube/roundcubemail
Conflicts: program/js/list.jspull/73/head
commit
a522971cf8
@ -0,0 +1,122 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| bin/updatecss.sh |
|
||||
| |
|
||||
| This file is part of the Roundcube Webmail client |
|
||||
| Copyright (C) 2010-2013, The Roundcube Dev Team |
|
||||
| |
|
||||
| Licensed under the GNU General Public License version 3 or |
|
||||
| any later version with exceptions for skins & plugins. |
|
||||
| See the README file for a full license statement. |
|
||||
| |
|
||||
| PURPOSE: |
|
||||
| Update cache-baster marks for css background images |
|
||||
+-----------------------------------------------------------------------+
|
||||
| Author: Aleksander Machniak <alec@alec.pl> |
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
|
||||
|
||||
require_once INSTALL_PATH . 'program/include/clisetup.php';
|
||||
|
||||
// get arguments
|
||||
$opts = rcube_utils::get_opt(array(
|
||||
'd' => 'dir',
|
||||
));
|
||||
|
||||
if (empty($opts['dir'])) {
|
||||
print "Skin directory not specified (--dir). Using skins/ and plugins/skins/.\n";
|
||||
|
||||
$dir = INSTALL_PATH . 'skins';
|
||||
$dir_p = INSTALL_PATH . 'plugins';
|
||||
$skins = glob("$dir/*", GLOB_ONLYDIR);
|
||||
$skins_p = glob("$dir_p/*/skins/*", GLOB_ONLYDIR);
|
||||
|
||||
$dirs = array_merge($skins, $skins_p);
|
||||
}
|
||||
// Check if directory exists
|
||||
else if (!file_exists($opts['dir'])) {
|
||||
rcube::raise_error("Specified directory doesn't exist.", false, true);
|
||||
}
|
||||
else {
|
||||
$dirs = array($opts['dir']);
|
||||
}
|
||||
|
||||
foreach ($dirs as $dir) {
|
||||
$img_dir = $dir . '/images';
|
||||
if (!file_exists($img_dir)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$files = get_files($dir);
|
||||
$images = get_images($img_dir);
|
||||
$find = array();
|
||||
$replace = array();
|
||||
|
||||
// build regexps array
|
||||
foreach ($images as $path => $sum) {
|
||||
$path_ex = str_replace('.', '\\.', $path);
|
||||
$find[] = "#url\(['\"]?images/$path_ex(\?v=[a-f0-9-\.]+)?['\"]?\)#";
|
||||
$replace[] = "url(images/$path?v=$sum)";
|
||||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
$file = $dir . '/' . $file;
|
||||
print "File: $file\n";
|
||||
$content = file_get_contents($file);
|
||||
$content = preg_replace($find, $replace, $content, -1, $count);
|
||||
if ($count) {
|
||||
file_put_contents($file, $content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function get_images($dir)
|
||||
{
|
||||
$images = array();
|
||||
$dh = opendir($dir);
|
||||
|
||||
while ($file = readdir($dh)) {
|
||||
if (preg_match('/^(.+)\.(gif|ico|png|jpg|jpeg)$/', $file, $m)) {
|
||||
$filepath = "$dir/$file";
|
||||
$images[$file] = substr(md5_file($filepath), 0, 4) . '.' . filesize($filepath);
|
||||
print "Image: $filepath ({$images[$file]})\n";
|
||||
}
|
||||
else if ($file != '.' && $file != '..' && is_dir($dir . '/' . $file)) {
|
||||
foreach (get_images($dir . '/' . $file) as $img => $sum) {
|
||||
$images[$file . '/' . $img] = $sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir($dh);
|
||||
|
||||
return $images;
|
||||
}
|
||||
|
||||
function get_files($dir)
|
||||
{
|
||||
$files = array();
|
||||
$dh = opendir($dir);
|
||||
|
||||
while ($file = readdir($dh)) {
|
||||
if (preg_match('/^(.+)\.(css|html)$/', $file, $m)) {
|
||||
$files[] = $file;
|
||||
}
|
||||
else if ($file != '.' && $file != '..' && is_dir($dir . '/' . $file)) {
|
||||
foreach (get_files($dir . '/' . $file) as $f) {
|
||||
$files[] = $file . '/' . $f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir($dh);
|
||||
|
||||
return $files;
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,51 @@
|
||||
/* Attachment Reminder plugin script */
|
||||
|
||||
function rcmail_get_compose_message()
|
||||
{
|
||||
var msg;
|
||||
|
||||
if (window.tinyMCE && (ed = tinyMCE.get(rcmail.env.composebody))) {
|
||||
msg = ed.getContent();
|
||||
msg = msg.replace(/<blockquote[^>]*>(.|[\r\n])*<\/blockquote>/gmi, '');
|
||||
}
|
||||
else {
|
||||
msg = $('#' + rcmail.env.composebody).val();
|
||||
msg = msg.replace(/^>.*$/gmi, '');
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
function rcmail_check_message(msg)
|
||||
{
|
||||
var i, rx, keywords = rcmail.gettext('keywords', 'attachment_reminder').split(",").concat([".doc", ".pdf"]);
|
||||
|
||||
$.each(keywords, function(n) { return RegExp.escape(n); });
|
||||
rx = new RegExp('(' + keywords.join('|') + ')', 'i');
|
||||
|
||||
return msg.search(rx) != -1;
|
||||
}
|
||||
|
||||
function rcmail_have_attachments()
|
||||
{
|
||||
return rcmail.env.attachments && $('li', rcmail.gui_objects.attachmentlist).length;
|
||||
}
|
||||
|
||||
|
||||
if (window.rcmail) {
|
||||
rcmail.addEventListener('beforesend', function(evt) {
|
||||
var msg = rcmail_get_compose_message(),
|
||||
subject = $('#compose-subject').val();
|
||||
|
||||
if (!rcmail_have_attachments() && (rcmail_check_message(msg) || rcmail_check_message(subject))) {
|
||||
if (confirm(rcmail.gettext('forgotattachment', 'attachment_reminder'))) {
|
||||
if (window.UI && UI.show_uploadform) // Larry skin
|
||||
UI.show_uploadform();
|
||||
else if (window.rcmail_ui && rcmail_ui.show_popup) // classic skin
|
||||
rcmail_ui.show_popup('uploadmenu', true);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* Attachement Reminder
|
||||
*
|
||||
* A plugin that reminds a user to attach the files
|
||||
*
|
||||
* @version @package_version@
|
||||
* @author Thomas Yu - Sian, Liu
|
||||
* @author Aleksander Machniak <machniak@kolabsys.com>
|
||||
*
|
||||
* Copyright (C) 2013 Thomas Yu - Sian, Liu
|
||||
* Copyright (C) 2013, Kolab Systems AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
class attachment_reminder extends rcube_plugin
|
||||
{
|
||||
public $task = 'mail|settings';
|
||||
public $noajax = true;
|
||||
|
||||
|
||||
function init()
|
||||
{
|
||||
$rcmail = rcube::get_instance();
|
||||
|
||||
if ($rcmail->task == 'mail' && $rcmail->action == 'compose') {
|
||||
$this->include_script('attachment_reminder.js');
|
||||
$this->add_texts('localization/', array('keywords', 'forgotattachment'));
|
||||
}
|
||||
|
||||
if ($rcmail->task == 'settings') {
|
||||
$dont_override = $rcmail->config->get('dont_override', array());
|
||||
|
||||
if (!in_array('attachment_reminder', $dont_override)) {
|
||||
$this->add_hook('preferences_list', array($this, 'prefs_list'));
|
||||
$this->add_hook('preferences_save', array($this, 'prefs_save'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function prefs_list($args)
|
||||
{
|
||||
if ($args['section'] == 'compose') {
|
||||
$this->add_texts('localization/');
|
||||
$reminder = rcube::get_instance()->config->get('attachment_reminder');
|
||||
$field_id = 'rcmfd_attachment_reminder';
|
||||
$checkbox = new html_checkbox(array('name' => '_attachment_reminder', 'id' => $field_id, 'value' => 1));
|
||||
|
||||
$args['blocks']['main']['options']['attachment_reminder'] = array(
|
||||
'title' => html::label($field_id, rcube::Q($this->gettext('reminderoption'))),
|
||||
'content' => $checkbox->show($reminder ? 1 : 0),
|
||||
);
|
||||
}
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
function prefs_save($args)
|
||||
{
|
||||
if ($args['section'] == 'compose') {
|
||||
$dont_override = rcube::get_instance()->config->get('dont_override', array());
|
||||
if (!in_array('attachment_reminder', $dont_override)) {
|
||||
$args['prefs']['attachment_reminder'] = !empty($_POST['_attachment_reminder']);
|
||||
}
|
||||
}
|
||||
return $args;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "Haben Sie möglicherweise vergessen eine Datei anzuhängen?";
|
||||
$messages['keywords'] = "anbei,im anhang,angehängt,angefügt,beigefügt,beliegend";
|
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "Haben Sie möglicherweise vergessen eine Datei anzuhängen?";
|
||||
$messages['keywords'] = "anbei,im anhang,angehängt,angefügt,beigefügt,beliegend";
|
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "Did you forget to attach a file?";
|
||||
$messages['reminderoption'] = "Remind about forgotten attachments";
|
||||
$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter";
|
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "¿Olvidó adjuntar un fichero al mensaje?";
|
||||
$messages['keywords'] = "adjunto";
|
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "Avez vous oublié d'attacher un fichier ?";
|
||||
$messages['keywords'] = "joins,joint,attaché,CV";
|
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "Sembra che tu abbia dimenticato di allegare un file!\nPremere Annulla per inviare lo stesso.\nOK per tornare al messaggio senza inviare.";
|
||||
$messages['keywords'] = "allegato,allegati,allegata,allegate,allega,allego,alleghi,attaccato,file,attachment,attach";
|
||||
|
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "Ben je vergeten het bestand bij te voegen?";
|
||||
$messages['keywords'] = "attachment,bestand,bijgaand,bijgaande,brief,bijgevoegd,bijgesloten,CV";
|
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "Czy nie zapomniałeś załączyć pliku?";
|
||||
$messages['reminderoption'] = "Włącz przypominanie o brakującym załączniku";
|
||||
$messages['keywords'] = "załącznik,plik,załącz,CV";
|
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "您似乎忘記加入附件了,你確定要寄出?";
|
||||
$messages['keywords'] = "附件,附加,附檔,附上,附加檔案";
|
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$messages = array();
|
||||
$messages['forgotattachment'] = "您似乎忘記加入附件了,你確定要寄出?";
|
||||
$messages['keywords'] = "附件,附加,附檔,附上,附加檔案";
|
@ -0,0 +1,66 @@
|
||||
<?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>Attachment Reminder</name>
|
||||
<summary>Roundcube plugin that prompts you if it looks like you wanted to attach a file but you didn't.</summary>
|
||||
<description>
|
||||
This Roundcube plugin reminds the user to attach a file if the composed message text indicates that there should be any.
|
||||
</description>
|
||||
<lead>
|
||||
<name>Aleksander Machniak</name>
|
||||
<user>alec</user>
|
||||
<email>alec@alec.pl</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<lead>
|
||||
<name>Thomas Yu - Sian , Liu</name>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<version>
|
||||
<release>1.1</release>
|
||||
<api>1.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
|
||||
<notes>-</notes>
|
||||
<contents>
|
||||
<dir baseinstalldir="/" name="/">
|
||||
<file name="attachment_reminder.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="attachment_reminder.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/de_CH.inc" role="data"></file>
|
||||
<file name="localization/de_DE.inc" role="data"></file>
|
||||
<file name="localization/en_US.inc" role="data"></file>
|
||||
<file name="localization/es_ES.inc" role="data"></file>
|
||||
<file name="localization/fr_FR.inc" role="data"></file>
|
||||
<file name="localization/it_IT.inc" role="data"></file>
|
||||
<file name="localization/nl_NL.inc" role="data"></file>
|
||||
<file name="localization/pl_PL.inc" role="data"></file>
|
||||
<file name="localization/zh_CN.inc" role="data"></file>
|
||||
<file name="localization/zh_TW.inc" 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>
|
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| localization/<lang>/csv2vcard.inc |
|
||||
| |
|
||||
| Localization file of the Roundcube Webmail client |
|
||||
| Copyright (C) 2005-2013, The Roundcube Dev Team |
|
||||
| |
|
||||
| Licensed under the GNU General Public License version 3 or |
|
||||
| any later version with exceptions for skins & plugins. |
|
||||
| See the README file for a full license statement. |
|
||||
| |
|
||||
+-----------------------------------------------------------------------+
|
||||
| Author: Aleksander Machniak <alec@alec.pl> |
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
// This is a list of CSV column names specified in CSV file header
|
||||
// These must be original texts used in Outlook/Thunderbird exported csv files
|
||||
// Encoding UTF-8
|
||||
|
||||
$map = array();
|
||||
|
||||
// MS Outlook 2010
|
||||
$map['anniversary'] = "Anniversaire de mariage ou fête";
|
||||
$map['assistants_name'] = "Nom de l''assistant(e)";
|
||||
$map['assistants_phone'] = "Téléphone de l''assistant(e)";
|
||||
$map['birthday'] = "Anniversaire";
|
||||
$map['business_city'] = "Ville (bureau)";
|
||||
$map['business_countryregion'] = "Pays/Région (bureau)";
|
||||
$map['business_fax'] = "Télécopie (bureau)";
|
||||
$map['business_phone'] = "Téléphone (bureau)";
|
||||
$map['business_phone_2'] = "Téléphone 2 (bureau)";
|
||||
$map['business_postal_code'] = "Code postal (bureau)";
|
||||
$map['business_state'] = "Dép/Région (bureau)";
|
||||
$map['business_street'] = "Rue (bureau)";
|
||||
$map['car_phone'] = "Téléphone (voiture)";
|
||||
$map['categories'] = "Catégories";
|
||||
$map['company'] = "Société";
|
||||
$map['department'] = "Service";
|
||||
$map['email_address'] = "Adresse de messagerie";
|
||||
$map['first_name'] = "Prénom";
|
||||
$map['gender'] = "Sexe";
|
||||
$map['home_city'] = "Ville (domicile)";
|
||||
$map['home_countryregion'] = "Pays/Région (domicile)";
|
||||
$map['home_fax'] = "Télécopie (domicile)";
|
||||
$map['home_phone'] = "Téléphone (domicile)";
|
||||
$map['home_phone_2'] = "Téléphone 2 (domicile)";
|
||||
$map['home_postal_code'] = "Code postal (domicile)";
|
||||
$map['home_state'] = "Dép/Région (domicile)";
|
||||
$map['home_street'] = "Rue (domicile)";
|
||||
$map['job_title'] = "Profession";
|
||||
$map['last_name'] = "Nom";
|
||||
$map['managers_name'] = "Manager's Name";
|
||||
$map['middle_name'] = "Deuxième prénom";
|
||||
$map['mobile_phone'] = "Tél. mobile";
|
||||
$map['notes'] = "Notes";
|
||||
$map['other_city'] = "Ville (autre)";
|
||||
$map['other_countryregion'] = "Pays/Région (autre)";
|
||||
$map['other_fax'] = "Télécopie (autre)";
|
||||
$map['other_phone'] = "Téléphone (autre)";
|
||||
$map['other_postal_code'] = "Code postal (autre)";
|
||||
$map['other_state'] = "Dép/Région (autre)";
|
||||
$map['other_street'] = "Rue (autre)";
|
||||
$map['pager'] = "Récepteur de radiomessagerie";
|
||||
$map['primary_phone'] = "Téléphone principal";
|
||||
$map['spouse'] = "Conjoint(e)";
|
||||
$map['suffix'] = "Suffixe";
|
||||
$map['title'] = "Titre";
|
||||
$map['web_page'] = "Page Web";
|
||||
|
||||
// Thunderbird
|
||||
$map['birth_day'] = "Jour";
|
||||
$map['birth_month'] = "Mois";
|
||||
$map['birth_year'] = "Année de naissance";
|
||||
$map['display_name'] = "Nom à afficher";
|
||||
$map['fax_number'] = "Fax";
|
||||
$map['home_address'] = "Adresse privée";
|
||||
$map['home_country'] = "Région";
|
||||
$map['home_zipcode'] = "Code postal";
|
||||
$map['mobile_number'] = "Portable";
|
||||
$map['nickname'] = "Surnom";
|
||||
$map['organization'] = "Société";
|
||||
$map['pager_number'] = "Pager";
|
||||
$map['primary_email'] = "Adresse électronique principale";
|
||||
$map['secondary_email'] = "Adresse électronique secondaire";
|
||||
$map['web_page_1'] = "Site Web 1";
|
||||
$map['web_page_2'] = "Site Web 2";
|
||||
$map['work_phone'] = "Tél. professionnel";
|
||||
$map['work_address'] = "Adresse professionnelle";
|
||||
$map['work_country'] = "Région";
|
||||
$map['work_zipcode'] = "Code postal";
|
||||
|
||||
// Other
|
||||
$map['_home_city'] = "Ville";
|
@ -1,2 +1,2 @@
|
||||
First Name,Last Name,Display Name,Nickname,Primary Email,Secondary Email,Screen Name,Work Phone,Home Phone,Fax Number,Pager Number,Mobile Number,Home Address,Home Address 2,Home City,Home State,Home ZipCode,Home Country,Work Address,Work Address 2,Work City,Work State,Work ZipCode,Work Country,Job Title,Department,Organization,Web Page 1,Web Page 2,Birth Year,Birth Month,Birth Day,Custom 1,Custom 2,Custom 3,Custom 4,Notes,
|
||||
Firstname,Lastname,Displayname,Nick,test@domain.tld,next@domain.tld,,phone work,phone home,fax,pager,mobile,Priv address,,City,region,xx-xxx,USA,Addr work,,city,region,33-333,Poland,title,department,Organization,http://page.com,http://webpage.tld,1970,11,15,,,,,,
|
||||
Firstname,Lastname,Displayname,Nick,test@domain.tld,next@domain.tld,,phone work,phone home,fax,pager,mobile,Priv address,,City,region,xx-xxx,USA,Addr work,,Wcity,Wstate,33-333,Poland,title,department,Organization,http://page.com,http://webpage.tld,1970,11,15,,,,,,
|
||||
|
|
Loading…
Reference in New Issue