diff options
593 files changed, 23985 insertions, 11600 deletions
@@ -26,10 +26,15 @@ php_value session.gc_probability 1 <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^favicon\.ico$ skins/larry/images/favicon.ico -# security rules -RewriteRule \.git - [F] -RewriteRule ^/?(README(.md)?|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ - [F] -RewriteRule ^/?(SQL|bin) - [F] + +# security rules: +# - deny access to files not containing a dot or starting with a dot +# in all locations except installer directory +RewriteRule ^(?!installer)(\.?[^\.]+)$ - [F] +# - deny access to some locations +RewriteRule ^/?(\.git|\.tx|SQL|bin|config|logs|temp|tests|program\/(include|lib|localization|steps)) - [F] +# - deny access to some documentation files +RewriteRule /?(README\.md|composer\.json-dist|composer\.json|package\.xml)$ - [F] </IfModule> <IfModule mod_deflate.c> @@ -1,27 +1,81 @@ CHANGELOG Roundcube Webmail =========================== +- Improve UI integration of ACL settings +- Fix directories check in Installer on Windows (#1489576) +- Fix issue when default_addressbook option is set to integer value (#1489407) +- Fix Opera > 15 detection (#1489562) +- Fix security issue in DomainFactory driver of Password plugin +- Fix invalid X-Draft-Info on forwarded message draft (#1489587) + +RELEASE 1.0-rc +-------------- +- Small CSS fix with message notice boxes in Larry skin (#1489497) +- Include groups in contacts search on mail compose (#1489082) +- Add mime-type mapping for .7z files (#1489512) +- Invoke update scripts with php to circumvent execution restrictions (#1489322) +- Fix drag & drop message/contact moving on touch device (#1489431) +- Fix canned responses in HTML mode (#1489536) +- Check/create default folders on every login not only the first (#1489423) +- Update to jQuery-1.11.0 and jQuery-UI-1.9.2 +- Support SMTP socket context options via new config option 'smtp_conn_options' +- Fix compatibility with PHP 5.2 in html.php file (#1489514) +- Remove expand/collapse with plus/minus keys (on numeric keypad) (#1489513) +- Fix issue where filesystem path was added to all-attachments (zip) file (#1489507) +- Fix case-sensitivity of email addresses handling on compose (#1485499) +- Don't alter Message-ID of a draft when sending (#1489409) +- Fix issue where deprecated syntax for HTML lists was not handled properly (#1488768) +- Display different icons when Trash folder is empty or full (#1485775) +- Remember last position of more headers switch (#1488323) +- Fix so message flags modified by another client are applied on the list on refresh (#1485186) +- Fix broken text/* attachments when forwarding/editing a message (#1489426) +- Improved minified files handling, added css minification (#1486988) +- Fix handling of X-Forwarded-For header with multiple addresses (#1489481) +- Fix border issue on folders list in classic skin (#1489473) +- Implemented menu actions to copy/move messages, added folder-selector widget (#1484086) +- Fix security rules in .htaccess preventing access to base URL without the ending slash (#1489477) +- Fix regression where only first new folder was placed in correct place on the list (#1489472) +- Fix issue where children of selected and collapsed thread were skipped on various actions (#1489457) +- Fix issue where groups were not deleted when "Replace entire addressbook" option on contacts import was used (#1489420) +- Fix unreliable mimetype tests in Installer (#1489453) +- Fix performance of listing writeable folders (#1489451) + +RELEASE 1.0-beta +---------------- +- Fix handling of invalid closing tags in HTML messages (#1489446) +- Set real content-type for file downloads (#1489439) +- Update TinyMCE to version 3.5.10 (#1489442) +- Fix keyboard navigation in list widgets (#1489392) +- Allow plugins to grab the reference of opened windows (#1489413) +- Larry skin: Improved status message display for better visibility (#1488974) +- Fix Internet Explorer 11 detection (#1489434) +- Fix date column width to fit the widest possible date format (#1489368) +- Move certain user preference options to a collapsed "advanced" block (#1488829) +- Add file type icons for Powerpoint and Open Office presentations (#1489225) +- Fix operations on folders with trailing spaces in name (#1489419) +- Improve identity selection based on From: header (#1489378) +- Fix issue where mails with inline images of the same name contained only the first image multiple times (#1489406) +- Use left/right arrow keys to collapse/expand thread and spacebar to select a row, change Ctrl key behavior (#1489392) +- Fix an issue where using arrow keys to go up a list can result in selected message being under headers (#1489403) +- Fix an issue where Home/End keys don't focus list row properly, don't scrollTo properly (#1489396) +- Add an option to disable smart Reply-List behaviour - reply_all_mode (#1488734) +- Fix an issue where pressing minus key on contacts list was hiding list records (#1489393) +- Fix an issue where shift + arrow-up key wasn't selecting all messages in collapsed thread (#1489397) +- Added icon for priority column in messages list header (#1489234) +- New feature "Canned Responses" to save and recall boilerplate text snippets - Fix HTML part detection when encapsulated inside multipart/signed (#1489372) -- Fix text wrapping issue with long unwrappable lines (#1489371) - Add spellchecker backend for the After the Deadline service - Replace markdown-style [1] link indexes in plain text email bodies -- Fixed issues where HTML comments inside style tag would hang Internet Explorer - Improved mailto: link arguments handling (#1489363) - Use DOMDocument LIBXML_PARSEHUGE and LIBXML_COMPACT options if possible (#1489302) - Support HTTP_HOST, SERVER_NAME and SERVER_ADDR values in include_host_config feature -- Hide Delivery Status Notification option when smtp_server is unset (#1489336) - Make default font size for HTML messages configurable (request #118) -- Display full attachment name using title attribute when name is too long to display (#1489320) - Fix XSS issue in addressbook group name field [CVE-2013-5646] (#1489333) -- Fix attachment icon issue when rare font/language is used (#1489326) - After message is sent refresh messages list of replied message folder (#1489249) - Add option force specified domain in user login - username_domain_forced (#1489264) -- Fix expanded thread root message styling after refreshing messages list (#1489327) -- Fix issue where From address was removed from Cc and Bcc fields when editing a draft (#1489319) - Add option to import Vcards with group assignments - Save groups membership in Vcard export (#1488509) - Workaround broken PHP function timezone_name_from_abbr (#1489261) -- Fix error_reporting directive check (#1489323) - Make cached message size limit configurable - messages_cache_threshold (#1489317) - Log also failed logins to userlogins log - Add temp_dir_ttl configuration option (#1489304) @@ -82,6 +136,23 @@ CHANGELOG Roundcube Webmail - Fix export of selected contacts from search result (#1488905) - Feature to export only selected contacts from addressbook (by Phil Weir) +RELEASE 0.9.5 +------------- +- Fix failing vCard import when email address field contains spaces (#1489386) +- Fix default spell-check configuration after Google suspended their spell service +- Fix vulnerability in handling _session argument of utils/save-prefs [CVE-2013-6172] (#1489382) +- Fix iframe onload for upload errors handling (#1489379) +- Fix address matching in Return-Path header on identity selection (#1489374) +- Fix text wrapping issue with long unwrappable lines (#1489371) +- Fixed issues where HTML comments inside style tag would hang Internet Explorer +- Hide Delivery Status Notification option when smtp_server is unset (#1489336) +- Display full attachment name using title attribute when name is too long to display (#1489320) +- Fix attachment icon issue when rare font/language is used (#1489326) +- Fix expanded thread root message styling after refreshing messages list (#1489327) +- Fix issue where From address was removed from Cc and Bcc fields when editing a draft (#1489319) +- Fix error_reporting directive check (#1489323) +- Fix de_DE localization of "About" label in Help plugin (#1489325) + RELEASE 0.9.4 ------------- - Make identities matching case insensitive (#1485480) @@ -23,7 +23,7 @@ REQUIREMENTS - Net_SMTP (latest from https://github.com/pear/Net_SMTP/) - Net_IDNA2 0.1.1 or newer - Auth_SASL 1.0.6 or newer - - Net_Sieve 1.8.2 or newer (for managesieve plugin) + - Net_Sieve 1.3.2 or newer (for managesieve plugin) - Crypt_GPG 1.2.0 or newer (for enigma plugin) * php.ini options (see .htaccess file): - error_reporting E_ALL & ~E_NOTICE (or lower) diff --git a/bin/cleandb.sh b/bin/cleandb.sh index ea905c873..3a3c2572e 100755 --- a/bin/cleandb.sh +++ b/bin/cleandb.sh @@ -48,7 +48,7 @@ $threshold = date('Y-m-d 00:00:00', time() - $days * 86400); foreach (array('contacts','contactgroups','identities') as $table) { - $sqltable = get_table_name($table); + $sqltable = $db->table_name($table); // also delete linked records // could be skipped for databases which respect foreign key constraints diff --git a/bin/cssshrink.sh b/bin/cssshrink.sh new file mode 100755 index 000000000..604a0467c --- /dev/null +++ b/bin/cssshrink.sh @@ -0,0 +1,62 @@ +#!/bin/sh +PWD=`dirname "$0"` +JAR_DIR='/tmp' +VERSION='2.4.8' +COMPILER_URL="https://github.com/yui/yuicompressor/releases/download/v${VERSION}/yuicompressor-${VERSION}.zip" + +do_shrink() { + rm -f "$2" + java -jar $JAR_DIR/yuicompressor.jar -v -o "$2" "$1" +} + +if [ ! -w "$JAR_DIR" ]; then + JAR_DIR=$PWD +fi + +if java -version >/dev/null 2>&1; then + : +else + echo "Java not found. Please ensure that the 'java' program is in your PATH." + exit 1 +fi + +if [ ! -r "$JAR_DIR/yuicompressor.jar" ]; then + if which wget >/dev/null 2>&1 && which unzip >/dev/null 2>&1; then + wget "$COMPILER_URL" -O "/tmp/$$.zip" + elif which curl >/dev/null 2>&1 && which unzip >/dev/null 2>&1; then + curl "$COMPILER_URL" -o "/tmp/$$.zip" + else + echo "Please download $COMPILER_URL and extract compiler.jar to $JAR_DIR/." + exit 1 + fi + (cd $JAR_DIR && unzip "/tmp/$$.zip" && mv "yuicompressor-${VERSION}.jar" "yuicompressor.jar") + rm -f "/tmp/$$.zip" +fi + +# compress single file from argument +if [ $# -gt 0 ]; then + CSS_FILE="$1" + + echo "Shrinking $CSS_FILE" + minfile=`echo $CSS_FILE | sed -e 's/\.css$/\.min\.css/'` + do_shrink "$CSS_FILE" "$minfile" + exit +fi + +DIRS="$PWD/../skins/* $PWD/../plugins/* $PWD/../plugins/*/skins/*" +# default: compress application scripts +for dir in $DIRS; do + for file in $dir/*.css; do + echo "$file" | grep -e '.min.css$' >/dev/null + if [ $? -eq 0 ]; then + continue + fi + if [ ! -f "$file" ]; then + continue + fi + + echo "Shrinking $file" + minfile=`echo $file | sed -e 's/\.css$/\.min\.css/'` + do_shrink "$file" "$minfile" + done +done diff --git a/bin/installto.sh b/bin/installto.sh index 269a5dc06..fbd951bdf 100755 --- a/bin/installto.sh +++ b/bin/installto.sh @@ -71,7 +71,7 @@ if (strtolower($input) == 'y') { if (!$err) { echo "Running update script at target...\n"; - system("cd $target_dir && bin/update.sh --version=$oldversion"); + system("cd $target_dir && php bin/update.sh --version=$oldversion"); echo "All done.\n"; } } diff --git a/bin/jsshrink.sh b/bin/jsshrink.sh index c79f90405..f7c7b22e9 100755 --- a/bin/jsshrink.sh +++ b/bin/jsshrink.sh @@ -1,8 +1,11 @@ #!/bin/sh -JS_DIR=`dirname "$0"`/../program/js +PWD=`dirname "$0"` +JS_DIR="$PWD/../program/js" JAR_DIR='/tmp' LANG_IN='ECMASCRIPT3' -CLOSURE_COMPILER_URL='http://closure-compiler.googlecode.com/files/compiler-latest.zip' +# latest version requires Java 7, we'll use an older one +#CLOSURE_COMPILER_URL='http://dl.google.com/closure-compiler/compiler-latest.zip' +CLOSURE_COMPILER_URL='http://dl.google.com/closure-compiler/compiler-20131014.zip' do_shrink() { rm -f "$2" @@ -15,7 +18,7 @@ if [ ! -d "$JS_DIR" ]; then fi if [ ! -w "$JAR_DIR" ]; then - JAR_DIR=`dirname "$0"` + JAR_DIR=$PWD fi if java -version >/dev/null 2>&1; then @@ -47,21 +50,26 @@ if [ $# -gt 0 ]; then LANG_IN="$2" fi - if [ ! -r "${JS_FILE}.src" ]; then - mv "$JS_FILE" "${JS_FILE}.src" - fi echo "Shrinking $JS_FILE" - do_shrink "${JS_FILE}.src" "$JS_FILE" "$LANG_IN" + minfile=`echo $JS_FILE | sed -e 's/\.js$/\.min\.js/'` + do_shrink "$JS_FILE" "$minfile" "$LANG_IN" exit fi +DIRS="$PWD/../program/js $PWD/../skins/* $PWD/../plugins/* $PWD/../plugins/*/skins/*" # default: compress application scripts -for fn in app common googiespell list treelist; do - if [ -r "$JS_DIR/${fn}.js.src" ]; then - echo "$JS_DIR/${fn}.js.src already exists, not overwriting" - else - mv "$JS_DIR/${fn}.js" "$JS_DIR/${fn}.js.src" - fi - echo "Shrinking $JS_DIR/${fn}.js" - do_shrink "$JS_DIR/${fn}.js.src" "$JS_DIR/${fn}.js" "$LANG_IN" +for dir in $DIRS; do + for file in $dir/*.js; do + echo "$file" | grep -e '.min.js$' >/dev/null + if [ $? -eq 0 ]; then + continue + fi + if [ ! -f "$file" ]; then + continue + fi + + echo "Shrinking $file" + minfile=`echo $file | sed -e 's/\.js$/\.min\.js/'` + do_shrink "$file" "$minfile" "$LANG_IN" + done done diff --git a/bin/jsunshrink.sh b/bin/jsunshrink.sh deleted file mode 100755 index ef1bb47a1..000000000 --- a/bin/jsunshrink.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -JS_DIR=`dirname "$0"`/../program/js - -if [ ! -d "$JS_DIR" ]; then - echo "Directory $JS_DIR not found." - exit 1 -fi - -for fn in app common googiespell list treelist; do - if [ -r "$JS_DIR/${fn}.js.src" ]; then - mv "$JS_DIR/${fn}.js.src" "$JS_DIR/${fn}.js" - echo "Reverted $JS_DIR/${fn}.js" - fi -done diff --git a/bin/makedoc.sh b/bin/makedoc.sh index 2a34254cb..3602c3a65 100755 --- a/bin/makedoc.sh +++ b/bin/makedoc.sh @@ -1,7 +1,7 @@ #!/bin/sh TITLE="Roundcube Webmail" -PACKAGES="Core" +PACKAGES="Webmail" INSTALL_PATH="`dirname $0`/.." PATH_PROJECT=$INSTALL_PATH/program/include @@ -16,11 +16,9 @@ then fi OUTPUTFORMAT=HTML -CONVERTER=frames -TEMPLATE=earthli -PRIVATE=off +TEMPLATE=responsive-twig # make documentation -$BIN_PHPDOC -d $PATH_PROJECT,$PATH_FRAMEWORK -t $PATH_DOCS -ti "$TITLE" -dn $PACKAGES \ --o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE +$BIN_PHPDOC -d $PATH_PROJECT,$PATH_FRAMEWORK -t $PATH_DOCS --title "$TITLE" --defaultpackagename $PACKAGES \ + --template=$TEMPLATE diff --git a/bin/transifexpull.sh b/bin/transifexpull.sh index ce25f6fc1..7415c02fd 100755 --- a/bin/transifexpull.sh +++ b/bin/transifexpull.sh @@ -3,6 +3,9 @@ # In 'translator' mode files will contain empty translated texts # where translation is not available, we'll remove these later +# Note: there's a bug in txclib, so if the command below doesn't +# work see https://github.com/transifex/transifex-client/commit/a80320735973dd608b48520bf3b89ad53e2b088b + tx --debug pull -a --mode translator PWD=`dirname "$0"` @@ -33,3 +36,9 @@ done for file in $PWD/../plugins/*/localization/*.inc; do do_clean $file done + +# remove empty localization files +for file in $PWD/../program/localization/*/labels.inc; do grep -q -E '\$labels' $file || rm $file; done +for file in $PWD/../program/localization/*/messages.inc; do grep -q -E '\$messages' $file || rm $file; done +for file in $PWD/../plugins/*/localization/*.inc; do grep -q -E '\$(labels|messages)' $file || rm $file; done + diff --git a/bin/update.sh b/bin/update.sh index 8bfb9d603..d35e1eb0d 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -147,7 +147,7 @@ if ($RCI->configured) { // check file type detection if ($RCI->check_mime_detection()) { echo "WARNING: File type detection doesn't work properly!\n"; - echo "Please check the 'mime_magic' config option or the finfo functions of PHP andrun this script again.\n"; + echo "Please check the 'mime_magic' config option or the finfo functions of PHP and run this script again.\n"; } if ($RCI->check_mime_extensions()) { echo "WARNING: Mimetype to file extension mapping doesn't work properly!\n"; @@ -157,7 +157,7 @@ if ($RCI->configured) { // check database schema if ($RCI->config['db_dsnw']) { echo "Executing database schema update.\n"; - system(INSTALL_PATH . "bin/updatedb.sh --package=roundcube --version=" . $opts['version'] + system("php " . INSTALL_PATH . "bin/updatedb.sh --package=roundcube --version=" . $opts['version'] . " --dir=" . INSTALL_PATH . DIRECTORY_SEPARATOR . "SQL", $res); $success = !$res; @@ -165,7 +165,7 @@ if ($RCI->configured) { // index contacts for fulltext searching if ($opts['version'] && version_compare(version_parse($opts['version']), '0.6.0', '<')) { - system(INSTALL_PATH . 'bin/indexcontacts.sh'); + system("php " . INSTALL_PATH . 'bin/indexcontacts.sh'); } if ($success) { diff --git a/config/.htaccess b/config/.htaccess deleted file mode 100644 index 8e6a345dc..000000000 --- a/config/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Order allow,deny -Deny from all
\ No newline at end of file diff --git a/config/defaults.inc.php b/config/defaults.inc.php index 65c9eaaba..8c9b96f1a 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -73,6 +73,10 @@ $config['syslog_id'] = 'roundcube'; // For possible values see installer or http://php.net/manual/en/function.openlog.php $config['syslog_facility'] = LOG_USER; +// Activate this option if logs should be written to per-user directories. +// Data will only be logged if a directry <log_dir>/<username>/ exists and is writable. +$config['per_user_logging'] = false; + // Log sent messages to <log_dir>/sendmail or to syslog $config['smtp_log'] = true; @@ -231,6 +235,19 @@ $config['smtp_helo_host'] = ''; // timeout > 0 causes connection errors (https://bugs.php.net/bug.php?id=54511) $config['smtp_timeout'] = 0; +// SMTP socket context options +// See http://php.net/manual/en/context.ssl.php +// The example below enables server certificate validation, and +// requires 'smtp_timeout' to be non zero. +// $config['smtp_conn_options'] = array( +// 'ssl' => array( +// 'verify_peer' => true, +// 'verify_depth => 3, +// 'cafile' => '/etc/openssl/certs/ca.crt', +// ), +// ); +$config['smtp_conn_options'] = null; + // ---------------------------------- // LDAP // ---------------------------------- @@ -252,6 +269,10 @@ $config['enable_installer'] = false; // don't allow these settings to be overriden by the user $config['dont_override'] = array(); +// define which settings should be listed under the 'advanced' block +// which is hidden by default +$config['advanced_prefs'] = array(); + // provide an URL where a user can get support for this Roundcube installation // PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE! $config['support_url'] = ''; @@ -272,10 +293,10 @@ $config['user_aliases'] = false; // use this folder to store log files (must be writeable for apache user) // This is used by the 'file' log driver. -$config['log_dir'] = 'logs/'; +$config['log_dir'] = RCUBE_INSTALL_PATH . 'logs/'; // use this folder to store temp files (must be writeable for apache user) -$config['temp_dir'] = 'temp/'; +$config['temp_dir'] = RCUBE_INSTALL_PATH . 'temp/'; // expire files in temp_dir after 48 hours // possible units: s, m, h, d, w @@ -615,6 +636,12 @@ $config['upload_progress'] = false; // Setting it to 0, disables the feature. $config['undo_timeout'] = 0; +// A static list of canned responses which are immutable for the user +$config['compose_responses_static'] = array( +// array('name' => 'Canned Response 1', 'text' => 'Static Response One'), +// array('name' => 'Canned Response 2', 'text' => 'Static Response Two'), +); + // ---------------------------------- // ADDRESSBOOK SETTINGS // ---------------------------------- @@ -681,6 +708,8 @@ $config['ldap_public']['Verisign'] = array( // DN and password to bind as before searching for bind DN, if anonymous search is not allowed 'search_bind_dn' => '', 'search_bind_pw' => '', + // Optional map of replacement strings => attributes used when binding for an individual address book + 'search_bind_attrib' => array(), // e.g. array('%udc' => 'ou') // Default for %dn variable if search doesn't return DN value 'search_dn_default' => '', // Optional authentication identifier to be used as SASL authorization proxy @@ -762,14 +791,19 @@ $config['ldap_public']['Verisign'] = array( // if the groups base_dn is empty, the contact base_dn is used for the groups as well // -> in this case, assure that groups and contacts are separated due to the concernig filters! 'groups' => array( - 'base_dn' => '', - 'scope' => 'sub', // Search mode: sub|base|list - 'filter' => '(objectClass=groupOfNames)', - 'object_classes' => array("top", "groupOfNames"), - 'member_attr' => 'member', // Name of the member attribute, e.g. uniqueMember - 'name_attr' => 'cn', // Attribute to be used as group name - 'member_filter' => '(objectclass=*)', // Optional filter to use when querying for group members - 'vlv' => false, // Use VLV controls to list groups + 'base_dn' => '', + 'scope' => 'sub', // Search mode: sub|base|list + 'filter' => '(objectClass=groupOfNames)', + 'object_classes' => array('top', 'groupOfNames'), // Object classes to be assigned to new groups + 'member_attr' => 'member', // Name of the default member attribute, e.g. uniqueMember + 'name_attr' => 'cn', // Attribute to be used as group name + 'email_attr' => 'mail', // Group email address attribute (e.g. for mailing lists) + 'member_filter' => '(objectclass=*)', // Optional filter to use when querying for group members + 'vlv' => false, // Use VLV controls to list groups + 'class_member_attr' => array( // Mapping of group object class to member attribute used in these objects + 'groupofnames' => 'member', + 'groupofuniquenames' => 'uniquemember' + ), ), // this configuration replaces the regular groups listing in the directory tree with // a hard-coded list of groups, each listing entries with the configured base DN and filter. @@ -1010,3 +1044,8 @@ $config['default_font_size'] = '10pt'; // Enables display of email address with name instead of a name (and address in title) $config['message_show_email'] = false; + +// Default behavior of Reply-All button: +// 0 - Reply-All always +// 1 - Reply-List if mailing list is detected +$config['reply_all_mode'] = 0; diff --git a/config/mimetypes.php b/config/mimetypes.php index 7665df3e9..5fe3467be 100644 --- a/config/mimetypes.php +++ b/config/mimetypes.php @@ -49,6 +49,8 @@ return array( 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xps' => 'application/vnd.ms-xpsdocument', 'rar' => 'application/x-rar-compressed', + '7z' => 'application/x-7z-compressed', + 's7z' => 'application/x-7z-compressed', 'vcf' => 'text/vcard', 'ics' => 'text/calendar', ); @@ -32,6 +32,7 @@ | | +-------------------------------------------------------------------------+ | Author: Thomas Bruederli <roundcube@gmail.com> | + | Author: Aleksander Machniak <alec@alec.pl> | +-------------------------------------------------------------------------+ */ @@ -49,34 +50,36 @@ ob_start(); // check if config files had errors if ($err_str = $RCMAIL->config->get_error()) { - rcmail::raise_error(array( - 'code' => 601, - 'type' => 'php', - 'message' => $err_str), false, true); + rcmail::raise_error(array( + 'code' => 601, + 'type' => 'php', + 'message' => $err_str), false, true); } // check DB connections and exit on failure if ($err_str = $RCMAIL->db->is_error()) { - rcmail::raise_error(array( - 'code' => 603, - 'type' => 'db', - 'message' => $err_str), FALSE, TRUE); + rcmail::raise_error(array( + 'code' => 603, + 'type' => 'db', + 'message' => $err_str), FALSE, TRUE); } // error steps if ($RCMAIL->action == 'error' && !empty($_GET['_code'])) { - rcmail::raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE); + rcmail::raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE); } // check if https is required (for login) and redirect if necessary if (empty($_SESSION['user_id']) && ($force_https = $RCMAIL->config->get('force_https', false))) { - $https_port = is_bool($force_https) ? 443 : $force_https; - if (!rcube_utils::https_check($https_port)) { - $host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']); - $host .= ($https_port != 443 ? ':' . $https_port : ''); - header('Location: https://' . $host . $_SERVER['REQUEST_URI']); - exit; - } + $https_port = is_bool($force_https) ? 443 : $force_https; + + if (!rcube_utils::https_check($https_port)) { + $host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']); + $host .= ($https_port != 443 ? ':' . $https_port : ''); + + header('Location: https://' . $host . $_SERVER['REQUEST_URI']); + exit; + } } // trigger startup plugin hook @@ -86,165 +89,176 @@ $RCMAIL->action = $startup['action']; // try to log in if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { - $request_valid = $_SESSION['temp'] && $RCMAIL->check_request(rcube_utils::INPUT_POST, 'login'); - - // purge the session in case of new login when a session already exists - $RCMAIL->kill_session(); - - $auth = $RCMAIL->plugins->exec_hook('authenticate', array( - 'host' => $RCMAIL->autoselect_host(), - 'user' => trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST)), - 'pass' => rcube_utils::get_input_value('_pass', rcube_utils::INPUT_POST, true, - $RCMAIL->config->get('password_charset', 'ISO-8859-1')), - 'cookiecheck' => true, - 'valid' => $request_valid, - )); - - // Login - if ($auth['valid'] && !$auth['abort'] && - $RCMAIL->login($auth['user'], $auth['pass'], $auth['host'], $auth['cookiecheck']) - ) { - // create new session ID, don't destroy the current session - // it was destroyed already by $RCMAIL->kill_session() above - $RCMAIL->session->remove('temp'); - $RCMAIL->session->regenerate_id(false); - - // send auth cookie if necessary - $RCMAIL->session->set_auth_cookie(); - - // log successful login - $RCMAIL->log_login(); - - // restore original request parameters - $query = array(); - if ($url = rcube_utils::get_input_value('_url', rcube_utils::INPUT_POST)) { - parse_str($url, $query); - - // prevent endless looping on login page - if ($query['_task'] == 'login') - unset($query['_task']); - - // prevent redirect to compose with specified ID (#1488226) - if ($query['_action'] == 'compose' && !empty($query['_id'])) - $query = array(); - } + $request_valid = $_SESSION['temp'] && $RCMAIL->check_request(rcube_utils::INPUT_POST, 'login'); - // allow plugins to control the redirect url after login success - $redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail')); - unset($redir['abort'], $redir['_err']); + // purge the session in case of new login when a session already exists + $RCMAIL->kill_session(); - // send redirect - $OUTPUT->redirect($redir); - } - else { - if (!$auth['valid']) { - $error_code = RCMAIL::ERROR_INVALID_REQUEST; + $auth = $RCMAIL->plugins->exec_hook('authenticate', array( + 'host' => $RCMAIL->autoselect_host(), + 'user' => trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST)), + 'pass' => rcube_utils::get_input_value('_pass', rcube_utils::INPUT_POST, true, + $RCMAIL->config->get('password_charset', 'ISO-8859-1')), + 'cookiecheck' => true, + 'valid' => $request_valid, + )); + + // Login + if ($auth['valid'] && !$auth['abort'] + && $RCMAIL->login($auth['user'], $auth['pass'], $auth['host'], $auth['cookiecheck']) + ) { + // create new session ID, don't destroy the current session + // it was destroyed already by $RCMAIL->kill_session() above + $RCMAIL->session->remove('temp'); + $RCMAIL->session->regenerate_id(false); + + // send auth cookie if necessary + $RCMAIL->session->set_auth_cookie(); + + // log successful login + $RCMAIL->log_login(); + + // restore original request parameters + $query = array(); + if ($url = rcube_utils::get_input_value('_url', rcube_utils::INPUT_POST)) { + parse_str($url, $query); + + // prevent endless looping on login page + if ($query['_task'] == 'login') { + unset($query['_task']); + } + + // prevent redirect to compose with specified ID (#1488226) + if ($query['_action'] == 'compose' && !empty($query['_id'])) { + $query = array(); + } + } + + // allow plugins to control the redirect url after login success + $redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail')); + unset($redir['abort'], $redir['_err']); + + // send redirect + $OUTPUT->redirect($redir); } else { - $error_code = $auth['error'] ? $auth['error'] : $RCMAIL->login_error(); - } + if (!$auth['valid']) { + $error_code = RCMAIL::ERROR_INVALID_REQUEST; + } + else { + $error_code = $auth['error'] ? $auth['error'] : $RCMAIL->login_error(); + } - $error_labels = array( - RCMAIL::ERROR_STORAGE => 'storageerror', - RCMAIL::ERROR_COOKIES_DISABLED => 'cookiesdisabled', - RCMAIL::ERROR_INVALID_REQUEST => 'invalidrequest', - RCMAIL::ERROR_INVALID_HOST => 'invalidhost', - ); + $error_labels = array( + RCMAIL::ERROR_STORAGE => 'storageerror', + RCMAIL::ERROR_COOKIES_DISABLED => 'cookiesdisabled', + RCMAIL::ERROR_INVALID_REQUEST => 'invalidrequest', + RCMAIL::ERROR_INVALID_HOST => 'invalidhost', + ); - $error_message = $error_labels[$error_code] ? $error_labels[$error_code] : 'loginfailed'; + $error_message = $error_labels[$error_code] ? $error_labels[$error_code] : 'loginfailed'; - // log failed login - $RCMAIL->log_login($auth['user'], true, $error_code); + $OUTPUT->show_message($error_message, 'warning'); - $OUTPUT->show_message($error_message, 'warning'); - $RCMAIL->plugins->exec_hook('login_failed', array( - 'code' => $error_code, 'host' => $auth['host'], 'user' => $auth['user'])); - $RCMAIL->kill_session(); - } + // log failed login + $RCMAIL->log_login($auth['user'], true, $error_code); + + $RCMAIL->plugins->exec_hook('login_failed', array( + 'code' => $error_code, 'host' => $auth['host'], 'user' => $auth['user'])); + + $RCMAIL->kill_session(); + } } // end session (after optional referer check) -else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcube_utils::check_referer())) { - $userdata = array( - 'user' => $_SESSION['username'], - 'host' => $_SESSION['storage_host'], - 'lang' => $RCMAIL->user->language, - ); - $OUTPUT->show_message('loggedout'); - $RCMAIL->logout_actions(); - $RCMAIL->kill_session(); - $RCMAIL->plugins->exec_hook('logout_after', $userdata); +else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) + && (!$RCMAIL->config->get('referer_check') || rcube_utils::check_referer()) +) { + $userdata = array( + 'user' => $_SESSION['username'], + 'host' => $_SESSION['storage_host'], + 'lang' => $RCMAIL->user->language, + ); + + $OUTPUT->show_message('loggedout'); + + $RCMAIL->logout_actions(); + $RCMAIL->kill_session(); + $RCMAIL->plugins->exec_hook('logout_after', $userdata); } // check session and auth cookie else if ($RCMAIL->task != 'login' && $_SESSION['user_id'] && $RCMAIL->action != 'send') { - if (!$RCMAIL->session->check_auth()) { - $RCMAIL->kill_session(); - $session_error = true; - } + if (!$RCMAIL->session->check_auth()) { + $RCMAIL->kill_session(); + $session_error = true; + } } // not logged in -> show login page if (empty($RCMAIL->user->ID)) { - // log session failures - $task = rcube_utils::get_input_value('_task', rcube_utils::INPUT_GPC); - if ($task && !in_array($task, array('login','logout')) && !$session_error && ($sess_id = $_COOKIE[ini_get('session.name')])) { - $RCMAIL->session->log("Aborted session " . $sess_id . "; no valid session data found"); - $session_error = true; - } - - if ($OUTPUT->ajax_call) - $OUTPUT->redirect(array('_err' => 'session'), 2000); - - if (!empty($_REQUEST['_framed'])) - $OUTPUT->command('redirect', $RCMAIL->url(array('_err' => 'session'))); - - // check if installer is still active - if ($RCMAIL->config->get('enable_installer') && is_readable('./installer/index.php')) { - $OUTPUT->add_footer(html::div(array('style' => "background:#ef9398; border:2px solid #dc5757; padding:0.5em; margin:2em auto; width:50em"), - html::tag('h2', array('style' => "margin-top:0.2em"), "Installer script is still accessible") . - html::p(null, "The install script of your Roundcube installation is still stored in its default location!") . - html::p(null, "Please <b>remove</b> the whole <tt>installer</tt> folder from the Roundcube directory because . - these files may expose sensitive configuration data like server passwords and encryption keys - to the public. Make sure you cannot access the <a href=\"./installer/\">installer script</a> from your browser.") - ) - ); - } + // log session failures + $task = rcube_utils::get_input_value('_task', rcube_utils::INPUT_GPC); + + if ($task && !in_array($task, array('login','logout')) + && !$session_error && ($sess_id = $_COOKIE[ini_get('session.name')]) + ) { + $RCMAIL->session->log("Aborted session $sess_id; no valid session data found"); + $session_error = true; + } + + // check if installer is still active + if ($RCMAIL->config->get('enable_installer') && is_readable('./installer/index.php')) { + $OUTPUT->add_footer(html::div(array('style' => "background:#ef9398; border:2px solid #dc5757; padding:0.5em; margin:2em auto; width:50em"), + html::tag('h2', array('style' => "margin-top:0.2em"), "Installer script is still accessible") . + html::p(null, "The install script of your Roundcube installation is still stored in its default location!") . + html::p(null, "Please <b>remove</b> the whole <tt>installer</tt> folder from the Roundcube directory because . + these files may expose sensitive configuration data like server passwords and encryption keys + to the public. Make sure you cannot access the <a href=\"./installer/\">installer script</a> from your browser.") + )); + } - if ($session_error || $_REQUEST['_err'] == 'session') - $OUTPUT->show_message('sessionerror', 'error', null, true, -1); + if ($session_error || $_REQUEST['_err'] == 'session') { + $OUTPUT->show_message('sessionerror', 'error', null, true, -1); + } + + if ($OUTPUT->ajax_call || !empty($_REQUEST['_framed'])) { + $OUTPUT->command('session_error', $RCMAIL->url(array('_err' => 'session'))); + $OUTPUT->send('iframe'); + } - $plugin = $RCMAIL->plugins->exec_hook('unauthenticated', array('task' => 'login', 'error' => $session_error)); + $plugin = $RCMAIL->plugins->exec_hook('unauthenticated', array('task' => 'login', 'error' => $session_error)); - $RCMAIL->set_task($plugin['task']); - $OUTPUT->send($plugin['task']); + $RCMAIL->set_task($plugin['task']); + + $OUTPUT->send($plugin['task']); } // CSRF prevention else { - // don't check for valid request tokens in these actions - $request_check_whitelist = array('login'=>1, 'spell'=>1, 'spell_html'=>1); - - if (!$request_check_whitelist[$RCMAIL->action]) { - // check client X-header to verify request origin - if ($OUTPUT->ajax_call) { - if (rcube_utils::request_header('X-Roundcube-Request') != $RCMAIL->get_request_token()) { - header('HTTP/1.1 403 Forbidden'); - die("Invalid Request"); - } - } - // check request token in POST form submissions - else if (!empty($_POST) && !$RCMAIL->check_request()) { - $OUTPUT->show_message('invalidrequest', 'error'); - $OUTPUT->send($RCMAIL->task); + // don't check for valid request tokens in these actions + $request_check_whitelist = array('login'=>1, 'spell'=>1, 'spell_html'=>1); + + if (!$request_check_whitelist[$RCMAIL->action]) { + // check client X-header to verify request origin + if ($OUTPUT->ajax_call) { + if (rcube_utils::request_header('X-Roundcube-Request') != $RCMAIL->get_request_token()) { + header('HTTP/1.1 403 Forbidden'); + die("Invalid Request"); + } + } + // check request token in POST form submissions + else if (!empty($_POST) && !$RCMAIL->check_request()) { + $OUTPUT->show_message('invalidrequest', 'error'); + $OUTPUT->send($RCMAIL->task); + } + + // check referer if configured + if ($RCMAIL->config->get('referer_check') && !rcube_utils::check_referer()) { + raise_error(array( + 'code' => 403, 'type' => 'php', + 'message' => "Referer check failed"), true, true); + } } - - // check referer if configured - if ($RCMAIL->config->get('referer_check') && !rcube_utils::check_referer()) { - raise_error(array( - 'code' => 403, 'type' => 'php', - 'message' => "Referer check failed"), true, true); - } - } } // we're ready, user is authenticated and the request is safe @@ -254,58 +268,57 @@ $RCMAIL->action = $plugin['action']; // handle special actions if ($RCMAIL->action == 'keep-alive') { - $OUTPUT->reset(); - $RCMAIL->plugins->exec_hook('keep_alive', array()); - $OUTPUT->send(); + $OUTPUT->reset(); + $RCMAIL->plugins->exec_hook('keep_alive', array()); + $OUTPUT->send(); } else if ($RCMAIL->action == 'save-pref') { - include INSTALL_PATH . 'program/steps/utils/save_pref.inc'; + include INSTALL_PATH . 'program/steps/utils/save_pref.inc'; } // include task specific functions -if (is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/func.inc')) - include_once $incfile; +if (is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/func.inc')) { + include_once $incfile; +} // allow 5 "redirects" to another action $redirects = 0; $incstep = null; while ($redirects < 5) { - // execute a plugin action - if ($RCMAIL->plugins->is_plugin_task($RCMAIL->task)) { - if (!$RCMAIL->action) $RCMAIL->action = 'index'; - $RCMAIL->plugins->exec_action($RCMAIL->task.'.'.$RCMAIL->action); - break; - } - else if (preg_match('/^plugin\./', $RCMAIL->action)) { - $RCMAIL->plugins->exec_action($RCMAIL->action); - break; - } - // try to include the step file - else if (($stepfile = $RCMAIL->get_action_file()) - && is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/'.$stepfile) - ) { - // include action file only once (in case it don't exit) - include_once $incfile; - $redirects++; - } - else { - break; - } + // execute a plugin action + if ($RCMAIL->plugins->is_plugin_task($RCMAIL->task)) { + if (!$RCMAIL->action) $RCMAIL->action = 'index'; + $RCMAIL->plugins->exec_action($RCMAIL->task.'.'.$RCMAIL->action); + break; + } + else if (preg_match('/^plugin\./', $RCMAIL->action)) { + $RCMAIL->plugins->exec_action($RCMAIL->action); + break; + } + // try to include the step file + else if (($stepfile = $RCMAIL->get_action_file()) + && is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/'.$stepfile) + ) { + // include action file only once (in case it don't exit) + include_once $incfile; + $redirects++; + } + else { + break; + } } if ($RCMAIL->action == 'refresh') { - $RCMAIL->plugins->exec_hook('refresh', array()); + $RCMAIL->plugins->exec_hook('refresh', array('last' => intval(rcube_utils::get_input_value('_last', rcube_utils::INPUT_GPC)))); } // parse main template (default) $OUTPUT->send($RCMAIL->task); - // if we arrive here, something went wrong rcmail::raise_error(array( - 'code' => 404, - 'type' => 'php', - 'line' => __LINE__, - 'file' => __FILE__, - 'message' => "Invalid request"), true, true); - + 'code' => 404, + 'type' => 'php', + 'line' => __LINE__, + 'file' => __FILE__, + 'message' => "Invalid request"), true, true); diff --git a/installer/rcube_install.php b/installer/rcube_install.php index df05db493..2fae3c5ca 100644 --- a/installer/rcube_install.php +++ b/installer/rcube_install.php @@ -467,7 +467,8 @@ class rcube_install $files = array( 'installer/images/roundcube_logo.png' => 'image/png', 'program/resources/blank.tif' => 'image/tiff', - 'skins/larry/templates/login.html' => 'text/html', + 'skins/larry/images/buttons.gif' => 'image/gif', + 'skins/larry/README' => 'text/plain', ); $errors = array(); @@ -490,7 +491,7 @@ class rcube_install 'application/zip' => 'zip', 'application/x-tar' => 'tar', 'application/java-archive' => 'jar', - 'image/bmp' => 'bmp', + 'image/gif' => 'gif', 'image/svg+xml' => 'svg', ); diff --git a/installer/test.php b/installer/test.php index f834308ad..5d28d5f57 100644 --- a/installer/test.php +++ b/installer/test.php @@ -91,7 +91,7 @@ if ($RCI->config['log_driver'] != 'syslog') $dirs[] = $RCI->config['log_dir'] ? $RCI->config['log_dir'] : 'logs'; foreach ($dirs as $dir) { - $dirpath = $dir[0] == '/' ? $dir : INSTALL_PATH . $dir; + $dirpath = rcube_utils::is_absolute_path($dir) ? $dir : INSTALL_PATH . $dir; if (is_writable(realpath($dirpath))) { $RCI->pass($dir); $pass = true; diff --git a/logs/.gitignore b/logs/.gitignore new file mode 100644 index 000000000..f59ec20aa --- /dev/null +++ b/logs/.gitignore @@ -0,0 +1 @@ +*
\ No newline at end of file diff --git a/logs/.htaccess b/logs/.htaccess deleted file mode 100644 index 8e6a345dc..000000000 --- a/logs/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Order allow,deny -Deny from all
\ No newline at end of file diff --git a/plugins/acl/acl.js b/plugins/acl/acl.js index d6934780f..acea60a4c 100644 --- a/plugins/acl/acl.js +++ b/plugins/acl/acl.js @@ -11,9 +11,16 @@ if (window.rcmail) { rcmail.acl_list_init(); // enable autocomplete on user input if (rcmail.env.acl_users_source) { - rcmail.init_address_input_events($('#acluser'), {action:'settings/plugin.acl-autocomplete'}); + var inst = rcmail.is_framed() ? parent.rcmail : rcmail; + inst.init_address_input_events($('#acluser'), {action:'settings/plugin.acl-autocomplete'}); + + // pass config settings and localized texts to autocomplete context + inst.set_env({ autocomplete_max:rcmail.env.autocomplete_max, autocomplete_min_length:rcmail.env.autocomplete_min_length }); + inst.add_label('autocompletechars', rcmail.labels.autocompletechars); + inst.add_label('autocompletemore', rcmail.labels.autocompletemore); + // fix inserted value - rcmail.addEventListener('autocomplete_insert', function(e) { + inst.addEventListener('autocomplete_insert', function(e) { if (e.field.id != 'acluser') return; @@ -64,14 +71,14 @@ rcube_webmail.prototype.acl_delete = function() // Save ACL data rcube_webmail.prototype.acl_save = function() { - var user = $('#acluser').val(), rights = '', type; + var user = $('#acluser', this.acl_form).val(), rights = '', type; - $(':checkbox', this.env.acl_advanced ? $('#advancedrights') : sim_ul = $('#simplerights')).map(function() { + $((this.env.acl_advanced ? '#advancedrights :checkbox' : '#simplerights :checkbox'), this.acl_form).map(function() { if (this.checked) rights += this.value; }); - if (type = $('input:checked[name=usertype]').val()) { + if (type = $('input:checked[name=usertype]', this.acl_form).val()) { if (type != 'user') user = type; } @@ -97,7 +104,7 @@ rcube_webmail.prototype.acl_save = function() rcube_webmail.prototype.acl_cancel = function() { this.ksearch_blur(); - this.acl_form.hide(); + this.acl_popup.dialog('close'); } // Update data after save (and hide form) @@ -115,7 +122,7 @@ rcube_webmail.prototype.acl_update = function(o) // hide autocomplete popup this.ksearch_blur(); // hide form - this.acl_form.hide(); + this.acl_popup.dialog('close'); } // Switch table display mode @@ -132,7 +139,9 @@ rcube_webmail.prototype.acl_mode_switch = function(elem) // ACL table initialization rcube_webmail.prototype.acl_list_init = function() { - $('#acl-switch')[this.env.acl_advanced ? 'addClass' : 'removeClass']('selected'); + var method = this.env.acl_advanced ? 'addClass' : 'removeClass'; + $('#acl-switch')[method]('selected'); + $(this.gui_objects.acltable)[method]('advanced'); this.acl_list = new rcube_list_widget(this.gui_objects.acltable, {multiselect:true, draggable:false, keyboard:true, toggleselect:true}); @@ -300,7 +309,6 @@ rcube_webmail.prototype.acl_init_form = function(id) if (id && (row = this.acl_list.rows[id])) { row = row.obj; li_elements.map(function() { - val = this.value; td = $('td.'+this.id, row); if (td.length && td.hasClass('enabled')) this.checked = true; @@ -312,22 +320,38 @@ rcube_webmail.prototype.acl_init_form = function(id) type = id; } // mark read (lrs) rights by default - else + else { li_elements.filter(function() { return this.id.match(/^acl([lrs]|read)$/); }).prop('checked', true); + } name_input.val(val); $('input[value='+type+']').prop('checked', true); this.acl_id = id; - // position the form horizontally - var bw = body.width(), mw = this.acl_form.width(); + var me = this, inst = window.rcmail, body = document.body; + var buttons = {}; + buttons[rcmail.gettext('save')] = function(e) { inst.command('acl-save'); }; + buttons[rcmail.gettext('cancel')] = function(e) { inst.command('acl-cancel'); }; + + // display it as popup + this.acl_popup = rcmail.show_popup_dialog( + '<div style="width:480px;height:280px"> </div>', + id ? rcmail.gettext('acl.editperms') : rcmail.gettext('acl.newuser'), + buttons, + { + modal: true, + closeOnEscape: false, + close: function(e, ui) { + (rcmail.is_framed() ? parent.rcmail : rcmail).ksearch_hide(); + me.acl_form.appendTo(body).hide(); + $(this).remove(); + } + } + ); - if (bw >= mw) - this.acl_form.css({left: parseInt((bw - mw)/2)+'px'}); + this.acl_form.appendTo(this.acl_popup).show(); - // display it - this.acl_form.show(); if (type == 'user') name_input.focus(); diff --git a/plugins/acl/acl.php b/plugins/acl/acl.php index a840bcd58..681ef0ee9 100644 --- a/plugins/acl/acl.php +++ b/plugins/acl/acl.php @@ -150,7 +150,8 @@ class acl extends rcube_plugin $this->load_config(); $this->specials = $this->rc->config->get('acl_specials', $this->specials); $this->add_texts('localization/', array('deleteconfirm', 'norights', - 'nouser', 'deleting', 'saving')); + 'nouser', 'deleting', 'saving', 'newuser', 'editperms')); + $this->rc->output->add_label('save', 'cancel'); $this->include_script('acl.js'); $this->rc->output->include_script('list.js'); $this->include_stylesheet($this->local_skin_path().'/acl.css'); @@ -307,7 +308,7 @@ class acl extends rcube_plugin . $val); } - $out = html::tag('ul', array('id' => 'usertype'), $ul, html::$common_attrib); + $out = html::tag('ul', array('id' => 'usertype', 'class' => $attrib['class']), $ul, html::$common_attrib); } // Display text input alone else { diff --git a/plugins/acl/composer.json b/plugins/acl/composer.json index 6c08130e0..923b0ae7e 100644 --- a/plugins/acl/composer.json +++ b/plugins/acl/composer.json @@ -3,7 +3,7 @@ "type": "roundcube-plugin", "description": "IMAP Folders Access Control Lists Management (RFC4314, RFC2086).", "license": "GNU GPLv3+", - "version": "1.2", + "version": "1.3", "authors": [ { "name": "Aleksander Machniak", diff --git a/plugins/acl/localization/br.inc b/plugins/acl/localization/br.inc new file mode 100644 index 000000000..bd2f0cbc0 --- /dev/null +++ b/plugins/acl/localization/br.inc @@ -0,0 +1,31 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/acl/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail ACL plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ +*/ +$labels['sharing'] = 'Rannañ'; +$labels['myrights'] = 'Aotreoù mont e-barzh'; +$labels['username'] = 'Implijer:'; +$labels['advanced'] = 'Doare araokaet'; +$labels['anyone'] = 'An holl implijerien (neb hini)'; +$labels['aclr'] = 'Kemennadoù lennet'; +$labels['aclc'] = 'Krouiñ isrenkelloù'; +$labels['aclk'] = 'Krouiñ isrenkelloù'; +$labels['acld'] = 'Dilemel kemennadoù'; +$labels['aclt'] = 'Dilemel kemennadoù'; +$labels['aclx'] = 'Dilemel ar renkell'; +$labels['aclread'] = 'Lennet'; +$labels['aclwrite'] = 'Skrivañ'; +?> diff --git a/plugins/acl/localization/ca_ES.inc b/plugins/acl/localization/ca_ES.inc index d238524b3..56012f457 100644 --- a/plugins/acl/localization/ca_ES.inc +++ b/plugins/acl/localization/ca_ES.inc @@ -18,17 +18,17 @@ $labels['sharing'] = 'Comparteix'; $labels['myrights'] = 'Permisos d\'accés'; $labels['username'] = 'Usuari:'; -$labels['advanced'] = 'Mode avançat'; +$labels['advanced'] = 'mode avançat'; $labels['newuser'] = 'Afegeix una entrada'; -$labels['actions'] = 'Accions dels permisos d\'accés'; -$labels['anyone'] = 'Tots els usuaris'; -$labels['anonymous'] = 'Convidats'; +$labels['actions'] = 'Accions dels permisos d\'accés...'; +$labels['anyone'] = 'Tots els usuaris (qualsevol)'; +$labels['anonymous'] = 'Convidats (anònim)'; $labels['identifier'] = 'Identificador'; $labels['acll'] = 'Cerca'; $labels['aclr'] = 'Llegeix missatges'; $labels['acls'] = 'Conserva\'l com a llegit'; -$labels['aclw'] = 'Escriu marques'; -$labels['acli'] = 'Insereix (copia dins)'; +$labels['aclw'] = 'Marques d\'escriptura'; +$labels['acli'] = 'Insereix (Copia dins)'; $labels['aclp'] = 'Envia l\'entrada'; $labels['aclc'] = 'Crea subcarpetes'; $labels['aclk'] = 'Crea subcarpetes'; @@ -67,8 +67,8 @@ $labels['longacli'] = 'Els missatges poden ser escrits i copiats a la carpeta'; $labels['longaclp'] = 'Els missatges poden ser enviats a aquesta carpeta'; $labels['longaclc'] = 'Es poden crear (or reanomenar) carpetes directament sota aquesta carpeta'; $labels['longaclk'] = 'Es poden crear (or reanomenar) carpetes directament sota aquesta carpeta'; -$labels['longacld'] = 'Poden ser canviats els missatges amb l\'indicador Suprimit'; -$labels['longaclt'] = 'Poden ser canviats els missatges amb l\'indicador Suprimit'; +$labels['longacld'] = 'Els missatges amb l\'indicador Suprimit poden ser canviats'; +$labels['longaclt'] = 'Els missatges amb l\'indicador Suprimit poden ser canviats'; $labels['longacle'] = 'Els missatges poden ser purgats'; $labels['longaclx'] = 'La carpeta pot ser suprimida o reanomenada'; $labels['longacla'] = 'Els permisos d\'accés a la carpeta poden ser canviats'; @@ -76,14 +76,14 @@ $labels['longaclfull'] = 'Control total fins i tot la gestió de carpetes'; $labels['longaclread'] = 'La carpeta pot ser oberta per llegir'; $labels['longaclwrite'] = 'Els missatges poden ser marcats, escrits o copiats a la carpeta'; $labels['longacldelete'] = 'Els missatges poden ser suprimits'; -$messages['deleting'] = 'Suprimint els permisos d\'accés...'; -$messages['saving'] = 'Desant els permisos d\'accés...'; +$messages['deleting'] = 'S\'estan suprimint els permisos d\'accés...'; +$messages['saving'] = 'S\'estan desant els permisos d\'accés...'; $messages['updatesuccess'] = 'Els permisos d\'accés han estat canviats correctament'; $messages['deletesuccess'] = 'Els permisos d\'accés han estat suprimits correctament'; -$messages['createsuccess'] = 'Els permisos d\'accés han afegits suprimits correctament'; -$messages['updateerror'] = 'No s\'ha pogut actualitzar els permisos d\'accés'; -$messages['deleteerror'] = 'No s\'ha pogut suprimir els permisos d\'accés'; -$messages['createerror'] = 'No s\'ha pogut afegir els permisos d\'accés'; +$messages['createsuccess'] = 'Els permisos d\'accés han estat afegits correctament'; +$messages['updateerror'] = 'No s\'han pogut actualitzar els permisos d\'accés'; +$messages['deleteerror'] = 'No s\'han pogut suprimir els permisos d\'accés'; +$messages['createerror'] = 'No s\'han pogut afegir els permisos d\'accés'; $messages['deleteconfirm'] = 'Esteu segurs que voleu suprimir els permisos d\'accés de l\'usuari o usuaris seleccionats?'; $messages['norights'] = 'No s\'ha especificat cap permÃs'; $messages['nouser'] = 'No s\'ha especificat cap nom d\'usuari'; diff --git a/plugins/acl/localization/en_CA.inc b/plugins/acl/localization/en_CA.inc new file mode 100644 index 000000000..2dd7e4ec0 --- /dev/null +++ b/plugins/acl/localization/en_CA.inc @@ -0,0 +1,90 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/acl/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail ACL plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ +*/ +$labels['sharing'] = 'Sharing'; +$labels['myrights'] = 'Access Rights'; +$labels['username'] = 'User:'; +$labels['advanced'] = 'advanced mode'; +$labels['newuser'] = 'Add entry'; +$labels['actions'] = 'Access right actions...'; +$labels['anyone'] = 'All users (anyone)'; +$labels['anonymous'] = 'Guests (anonymous)'; +$labels['identifier'] = 'Identifier'; +$labels['acll'] = 'Lookup'; +$labels['aclr'] = 'Read messages'; +$labels['acls'] = 'Keep Seen state'; +$labels['aclw'] = 'Write flags'; +$labels['acli'] = 'Insert (Copy into)'; +$labels['aclp'] = 'Post'; +$labels['aclc'] = 'Create subfolders'; +$labels['aclk'] = 'Create subfolders'; +$labels['acld'] = 'Delete messages'; +$labels['aclt'] = 'Delete messages'; +$labels['acle'] = 'Expunge'; +$labels['aclx'] = 'Delete folder'; +$labels['acla'] = 'Administer'; +$labels['aclfull'] = 'Full control'; +$labels['aclother'] = 'Other'; +$labels['aclread'] = 'Read'; +$labels['aclwrite'] = 'Write'; +$labels['acldelete'] = 'Delete'; +$labels['shortacll'] = 'Lookup'; +$labels['shortaclr'] = 'Read'; +$labels['shortacls'] = 'Keep'; +$labels['shortaclw'] = 'Write'; +$labels['shortacli'] = 'Insert'; +$labels['shortaclp'] = 'Post'; +$labels['shortaclc'] = 'Create'; +$labels['shortaclk'] = 'Create'; +$labels['shortacld'] = 'Delete'; +$labels['shortaclt'] = 'Delete'; +$labels['shortacle'] = 'Expunge'; +$labels['shortaclx'] = 'Folder delete'; +$labels['shortacla'] = 'Administer'; +$labels['shortaclother'] = 'Other'; +$labels['shortaclread'] = 'Read'; +$labels['shortaclwrite'] = 'Write'; +$labels['shortacldelete'] = 'Delete'; +$labels['longacll'] = 'The folder is visible on lists and can be subscribed to'; +$labels['longaclr'] = 'The folder can be opened for reading'; +$labels['longacls'] = 'Messages Seen flag can be changed'; +$labels['longaclw'] = 'Messages flags and keywords can be changed, except Seen and Deleted'; +$labels['longacli'] = 'Messages can be written or copied to the folder'; +$labels['longaclp'] = 'Messages can be posted to this folder'; +$labels['longaclc'] = 'Folders can be created (or renamed) directly under this folder'; +$labels['longaclk'] = 'Folders can be created (or renamed) directly under this folder'; +$labels['longacld'] = 'Messages Delete flag can be changed'; +$labels['longaclt'] = 'Messages Delete flag can be changed'; +$labels['longacle'] = 'Messages can be expunged'; +$labels['longaclx'] = 'The folder can be deleted or renamed'; +$labels['longacla'] = 'The folder access rights can be changed'; +$labels['longaclfull'] = 'Full control including folder administration'; +$labels['longaclread'] = 'The folder can be opened for reading'; +$labels['longaclwrite'] = 'Messages can be marked, written or copied to the folder'; +$labels['longacldelete'] = 'Messages can be deleted'; +$messages['deleting'] = 'Deleting access rights...'; +$messages['saving'] = 'Saving access rights...'; +$messages['updatesuccess'] = 'Successfully changed access rights'; +$messages['deletesuccess'] = 'Successfully deleted access rights'; +$messages['createsuccess'] = 'Successfully added access rights'; +$messages['updateerror'] = 'Unable to update access rights'; +$messages['deleteerror'] = 'Unable to delete access rights'; +$messages['createerror'] = 'Unable to add access rights'; +$messages['deleteconfirm'] = 'Are you sure, you want to remove access rights of selected user(s)?'; +$messages['norights'] = 'No rights has been specified!'; +$messages['nouser'] = 'No username has been specified!'; +?> diff --git a/plugins/acl/localization/en_GB.inc b/plugins/acl/localization/en_GB.inc index 16616c746..cf8156ba5 100644 --- a/plugins/acl/localization/en_GB.inc +++ b/plugins/acl/localization/en_GB.inc @@ -81,6 +81,7 @@ $messages['saving'] = 'Saving access rights...'; $messages['updatesuccess'] = 'Successfully changed access rights'; $messages['deletesuccess'] = 'Successfully deleted access rights'; $messages['createsuccess'] = 'Successfully added access rights'; +$messages['updateerror'] = 'Unable to update access rights'; $messages['deleteerror'] = 'Unable to delete access rights'; $messages['createerror'] = 'Unable to add access rights'; $messages['deleteconfirm'] = 'Are you sure, you want to remove access rights of selected user(s)?'; diff --git a/plugins/acl/localization/en_US.inc b/plugins/acl/localization/en_US.inc index 3c61266be..ce665768a 100644 --- a/plugins/acl/localization/en_US.inc +++ b/plugins/acl/localization/en_US.inc @@ -19,8 +19,9 @@ $labels['sharing'] = 'Sharing'; $labels['myrights'] = 'Access Rights'; $labels['username'] = 'User:'; -$labels['advanced'] = 'advanced mode'; +$labels['advanced'] = 'Advanced mode'; $labels['newuser'] = 'Add entry'; +$labels['editperms'] = 'Edit permissions'; $labels['actions'] = 'Access right actions...'; $labels['anyone'] = 'All users (anyone)'; $labels['anonymous'] = 'Guests (anonymous)'; diff --git a/plugins/acl/localization/es_419.inc b/plugins/acl/localization/es_419.inc new file mode 100644 index 000000000..f83196175 --- /dev/null +++ b/plugins/acl/localization/es_419.inc @@ -0,0 +1,50 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/acl/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail ACL plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ +*/ +$labels['username'] = 'Usuario:'; +$labels['advanced'] = 'modo avanzado'; +$labels['newuser'] = 'Agregar entrada'; +$labels['anyone'] = 'Todos los usuarios '; +$labels['anonymous'] = 'Invitados (anonimos)'; +$labels['identifier'] = 'Identificador'; +$labels['acll'] = 'Busqueda'; +$labels['aclr'] = 'Leer mensajes'; +$labels['acli'] = 'Insertar (copiar a)'; +$labels['aclc'] = 'Crear subcarpetas'; +$labels['aclk'] = 'crear subcarpetas'; +$labels['acld'] = 'Eliminar mensaje'; +$labels['aclt'] = 'Eliminar mensajes'; +$labels['aclx'] = 'Eliminar carpeta'; +$labels['aclother'] = 'Otro'; +$labels['aclread'] = 'Leer'; +$labels['aclwrite'] = 'Escribir'; +$labels['acldelete'] = 'Eliminar'; +$labels['shortacll'] = 'Busqueda'; +$labels['shortaclr'] = 'Leer'; +$labels['shortaclw'] = 'Escribir'; +$labels['shortacli'] = 'Insertar'; +$labels['shortaclc'] = 'Crear'; +$labels['shortaclk'] = 'Crear'; +$labels['shortacld'] = 'Eliminar'; +$labels['shortaclt'] = 'Eliminar'; +$labels['shortaclother'] = 'Otro'; +$labels['shortaclread'] = 'Leer'; +$labels['shortaclwrite'] = 'Escribir'; +$labels['shortacldelete'] = 'Eliminar'; +$labels['longaclr'] = 'La carpeta puede ser abierta para lectura'; +$labels['longacli'] = 'Se pueden escribir o copiar mensajes a la carpeta'; +?> diff --git a/plugins/acl/localization/fo_FO.inc b/plugins/acl/localization/fo_FO.inc new file mode 100644 index 000000000..b2712b86d --- /dev/null +++ b/plugins/acl/localization/fo_FO.inc @@ -0,0 +1,90 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/acl/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail ACL plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ +*/ +$labels['sharing'] = 'Deiling'; +$labels['myrights'] = 'Atgongdar-rættindi'; +$labels['username'] = 'Brúkari:'; +$labels['advanced'] = 'Framkomin støða'; +$labels['newuser'] = 'Legg inn'; +$labels['actions'] = 'Stillingar til atgongu-rættindi'; +$labels['anyone'] = 'Allir brúkarir (øll)'; +$labels['anonymous'] = 'Gestir (dulnevnd)'; +$labels['identifier'] = 'dátuheiti'; +$labels['acll'] = 'Slá upp'; +$labels['aclr'] = 'Les boð'; +$labels['acls'] = 'Varveit lisna støðu'; +$labels['aclw'] = 'HvÃt Fløgg'; +$labels['acli'] = 'Inn'; +$labels['aclp'] = 'Send'; +$labels['aclc'] = 'Ger undurmappur'; +$labels['aclk'] = 'Ger undurmappur'; +$labels['acld'] = 'Strika boð'; +$labels['aclt'] = 'Strika boð'; +$labels['acle'] = 'Strika út'; +$labels['aclx'] = 'Strika mappu'; +$labels['acla'] = 'Umsit'; +$labels['aclfull'] = 'Full stýring'; +$labels['aclother'] = 'Annað'; +$labels['aclread'] = 'Les'; +$labels['aclwrite'] = 'Skriva'; +$labels['acldelete'] = 'Strika'; +$labels['shortacll'] = 'Slá upp'; +$labels['shortaclr'] = 'Les'; +$labels['shortacls'] = 'Varveit'; +$labels['shortaclw'] = 'Skriva'; +$labels['shortacli'] = 'Legg inn'; +$labels['shortaclp'] = 'Send'; +$labels['shortaclc'] = 'Stovna'; +$labels['shortaclk'] = 'Stovna'; +$labels['shortacld'] = 'Strika'; +$labels['shortaclt'] = 'Strika'; +$labels['shortacle'] = 'Strika út'; +$labels['shortaclx'] = 'Strika mappu'; +$labels['shortacla'] = 'Umsit'; +$labels['shortaclother'] = 'Annað'; +$labels['shortaclread'] = 'Les'; +$labels['shortaclwrite'] = 'Skriva'; +$labels['shortacldelete'] = 'Strika'; +$labels['longacll'] = 'Mappan er sjónlig á listum og til ber at tekna seg fyri hana'; +$labels['longaclr'] = 'Mappan kann verða opna til lesná'; +$labels['longacls'] = 'Viðmerki ið vÃsur á lisin boð kann broytast'; +$labels['longaclw'] = 'Boð viðmerki og lyklaorð kunnu øll broytast, undantikið Sæð og Strika'; +$labels['longacli'] = 'Boð kunnu verða skriva og flutt til eina aðra mappu'; +$labels['longaclp'] = 'Boð kunnu verða send til hesa mappu'; +$labels['longaclc'] = 'Mappur kunnu verða stovnaðar (ella umdoyptar) beinleiðis undir hesu mappu'; +$labels['longaclk'] = 'Mappur kunnu verða stovnaðar (ella umdoyptar) beinleiðis undir hesu mappu'; +$labels['longacld'] = 'Viðmerki ið vÃsur á strika boð kann broytast'; +$labels['longaclt'] = 'Viðmerki ið vÃsur á strika boð kann broytast'; +$labels['longacle'] = 'Boð kunnu verða strika út'; +$labels['longaclx'] = 'Mappan kann verða strika ella umdoypt'; +$labels['longacla'] = 'Atgongdu-rættindini til hesa mappu kunnu broytast'; +$labels['longaclfull'] = 'Full stýring, Ãrokna mappu-umsiting'; +$labels['longaclread'] = 'Mappan kann latast upp til lesná'; +$labels['longaclwrite'] = 'Boð kunnu verða viðmerkt, skriva ella avritast til mappuna'; +$labels['longacldelete'] = 'Boð kunnu verða strikað'; +$messages['deleting'] = 'Strikar atgongu-rættindi...'; +$messages['saving'] = 'Goymur atgongu-rættindi...'; +$messages['updatesuccess'] = 'Atgongu-rættindi broytt væleyndað'; +$messages['deletesuccess'] = 'Atgongu-rættindi strika væleyndað'; +$messages['createsuccess'] = 'Atgongu-rættindi stovna væleyndað'; +$messages['updateerror'] = 'Til ber ikki at dagføra atgongu-rættindi'; +$messages['deleteerror'] = 'Til ber ikki at strika atgongu-rættindi'; +$messages['createerror'] = 'Til ber ikki at leggja aftrat atgongu-rættindi'; +$messages['deleteconfirm'] = 'Ert tú vÃs/ur à at tú ynskir at strika atgongu-rættindini hjá valdum brúkar(um)?'; +$messages['norights'] = 'Eingi rættindi tilskila!'; +$messages['nouser'] = 'Einki brúkaranavn var tilskila!'; +?> diff --git a/plugins/acl/localization/gl_ES.inc b/plugins/acl/localization/gl_ES.inc index 17aaf2599..cd8f9a47a 100644 --- a/plugins/acl/localization/gl_ES.inc +++ b/plugins/acl/localization/gl_ES.inc @@ -16,17 +16,17 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ */ $labels['sharing'] = 'Compartindo'; -$labels['myrights'] = 'Dereitos de acceso'; -$labels['username'] = 'Usuario:'; +$labels['myrights'] = 'Permisos de acceso'; +$labels['username'] = 'Utente:'; $labels['advanced'] = 'Modo avanzado'; $labels['newuser'] = 'Engadir entrada'; -$labels['actions'] = 'Accións sobre os dereitos de acceso...'; -$labels['anyone'] = 'Tódolos usuarios (calquera)'; -$labels['anonymous'] = 'Invitados (anónimo)'; +$labels['actions'] = 'Accións sobre os Permisos de acceso...'; +$labels['anyone'] = 'Todas as persoas usuarias (calquera)'; +$labels['anonymous'] = 'Persoas convidadas (anónimo)'; $labels['identifier'] = 'Identificador'; $labels['acll'] = 'Bloquear'; $labels['aclr'] = 'Ler mensaxes'; -$labels['acls'] = 'Manter o estado coma visto'; +$labels['acls'] = 'Manter estado actividade'; $labels['aclw'] = 'Marcas de lectura'; $labels['acli'] = 'Engadir (Copiar en)'; $labels['aclp'] = 'EnvÃo'; @@ -35,56 +35,56 @@ $labels['aclk'] = 'Crear subcartafoles'; $labels['acld'] = 'Borrar mensaxes'; $labels['aclt'] = 'Borrar mensaxes'; $labels['acle'] = 'Expurga'; -$labels['aclx'] = 'Eliminar carpeta'; +$labels['aclx'] = 'Eliminar cartafol'; $labels['acla'] = 'Administrar'; $labels['aclfull'] = 'Control total'; $labels['aclother'] = 'Outros'; $labels['aclread'] = 'Lectura'; $labels['aclwrite'] = 'Escritura'; $labels['acldelete'] = 'Borrado'; -$labels['shortacll'] = 'Busca'; +$labels['shortacll'] = 'Buscar'; $labels['shortaclr'] = 'Ler'; $labels['shortacls'] = 'Manter'; $labels['shortaclw'] = 'Escribir'; -$labels['shortacli'] = 'Insertar'; -$labels['shortaclp'] = 'EnvÃo'; +$labels['shortacli'] = 'Inserir'; +$labels['shortaclp'] = 'Publicar'; $labels['shortaclc'] = 'Crear'; $labels['shortaclk'] = 'Crear'; -$labels['shortacld'] = 'Borrar'; -$labels['shortaclt'] = 'Borrar'; +$labels['shortacld'] = 'Eliminar'; +$labels['shortaclt'] = 'Eliminar'; $labels['shortacle'] = 'Expurga'; -$labels['shortaclx'] = 'Borrar cartafol'; +$labels['shortaclx'] = 'Eliminar cartafol'; $labels['shortacla'] = 'Administrar'; $labels['shortaclother'] = 'Outros'; $labels['shortaclread'] = 'Lectura'; $labels['shortaclwrite'] = 'Escritura'; -$labels['shortacldelete'] = 'Borrado'; -$labels['longacll'] = 'O cartafol é visible e pode ser suscrito'; +$labels['shortacldelete'] = 'Eliminar'; +$labels['longacll'] = 'O cartafol é visÃbel e pode ser subscrito'; $labels['longaclr'] = 'Pódese abrir o cartafol para lectura'; $labels['longacls'] = 'Pódese mudar o marcador de Mensaxes Enviadas'; -$labels['longaclw'] = 'Pódense mudar marcadores e palabras chave agás Olladas e Borradas'; +$labels['longaclw'] = 'Pódense mudar marcadores e palabras chave agás Vistas e Borradas'; $labels['longacli'] = 'Pódense escreber ou copiar as mensaxes a este cartafol'; $labels['longaclp'] = 'Pódense enviar as mensaxes a este cartafol'; -$labels['longaclc'] = 'Pódense crear (ou renomear) os cartafois directamente baixo deste cartafol'; -$labels['longaclk'] = 'Pódense crear (ou renomear) os cartafois directamente baixo deste cartafol'; -$labels['longacld'] = 'Pódense mudar as mensaxes coa marca de Borrado'; -$labels['longaclt'] = 'Pódense mudar as mensaxes coa marca de Borrado'; -$labels['longacle'] = 'Pódense eliminar as mensaxes'; +$labels['longaclc'] = 'Pódense crear (ou renomear) os cartafoles directamente baixo deste cartafol'; +$labels['longaclk'] = 'Pódense crear (ou renomear) os cartafoles directamente baixo deste cartafol'; +$labels['longacld'] = 'Pódense mudar as mensaxes coa marca Eliminar'; +$labels['longaclt'] = 'Pódense mudar as mensaxes coa marca Eliminar'; +$labels['longacle'] = 'As mensaxes poden ser expurgadas'; $labels['longaclx'] = 'Pódese borrar ou renomear o cartafol'; -$labels['longacla'] = 'Pódense mudar os dereitos de acceso ao cartafol'; -$labels['longaclfull'] = 'Control total inclúe administración de cartafois'; +$labels['longacla'] = 'Pódense mudar os permisos de acceso ao cartafol'; +$labels['longaclfull'] = 'Control total inclúe administración de cartafoles'; $labels['longaclread'] = 'Pódese abrir o cartafol para lectura'; $labels['longaclwrite'] = 'Pódense marcar, escribir ou copiar as mensaxes no cartafol'; $labels['longacldelete'] = 'Pódense borrar as mensaxes'; -$messages['deleting'] = 'Borrando dereitos de acceso...'; -$messages['saving'] = 'Gardando dereitos de acceso...'; -$messages['updatesuccess'] = 'Mudados con éxito os dereitos de acceso'; -$messages['deletesuccess'] = 'Borrados con éxito os dereitos de acceso'; -$messages['createsuccess'] = 'Engadidos con éxito os dereitos de acceso'; -$messages['updateerror'] = 'Non se poden actualizar os dereitos de acceso'; -$messages['deleteerror'] = 'Non se poden borrar os dereitos de acceso'; -$messages['createerror'] = 'Non se poden engadir dereitos de acceso'; -$messages['deleteconfirm'] = 'De certo quere eliminar os dereitos de acceso do usuario(s) escollido?'; +$messages['deleting'] = 'Borrando permisos de acceso...'; +$messages['saving'] = 'Gardando permisos de acceso...'; +$messages['updatesuccess'] = 'Mudados con éxito os permisos de acceso'; +$messages['deletesuccess'] = 'Borrados con éxito os permisos de acceso'; +$messages['createsuccess'] = 'Engadidos con éxito os permisos de acceso'; +$messages['updateerror'] = 'Non se poden actualizar os permisos de acceso'; +$messages['deleteerror'] = 'Non se poden borrar os permisos de acceso'; +$messages['createerror'] = 'Non se poden engadir permisos de acceso'; +$messages['deleteconfirm'] = 'De certo que queres eliminar os permisos de acceso da(s) persoa(s) usuaria(s) escollida(s)?'; $messages['norights'] = 'Non se especificaron permisos!'; -$messages['nouser'] = 'Non se especificou o nome de usuario!'; +$messages['nouser'] = 'Non se especificou o nome da persoa usuaria!'; ?> diff --git a/plugins/acl/localization/hr_HR.inc b/plugins/acl/localization/hr_HR.inc new file mode 100644 index 000000000..ce666c4a8 --- /dev/null +++ b/plugins/acl/localization/hr_HR.inc @@ -0,0 +1,90 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/acl/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail ACL plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ +*/ +$labels['sharing'] = 'Dijeljenje'; +$labels['myrights'] = 'Prava pristupa'; +$labels['username'] = 'Korisnik:'; +$labels['advanced'] = 'Napredni naÄin'; +$labels['newuser'] = 'Dodaj unos/pravilo'; +$labels['actions'] = 'Akcije prava pristupa...'; +$labels['anyone'] = 'Svi korisnici (anyone)'; +$labels['anonymous'] = 'Gosti (anonymous)'; +$labels['identifier'] = 'Identifikator'; +$labels['acll'] = 'Pretraga'; +$labels['aclr'] = 'ProÄitaj poruke'; +$labels['acls'] = 'Zadrži u stanju "ViÄ‘eno"'; +$labels['aclw'] = 'ZapiÅ¡i oznake'; +$labels['acli'] = 'Umetni (kopiraj u)'; +$labels['aclp'] = 'PoÅ¡alji'; +$labels['aclc'] = 'Napravi podmapu'; +$labels['aclk'] = 'Napravi podmapu'; +$labels['acld'] = 'ObriÅ¡i poruke'; +$labels['aclt'] = 'ObriÅ¡i poruke'; +$labels['acle'] = 'Trajno obriÅ¡i'; +$labels['aclx'] = 'ObriÅ¡i mapu'; +$labels['acla'] = 'Administriraj'; +$labels['aclfull'] = 'Potpuna kontrola'; +$labels['aclother'] = 'Drugo'; +$labels['aclread'] = 'ÄŒitanje'; +$labels['aclwrite'] = 'Pisanje'; +$labels['acldelete'] = 'ObriÅ¡i'; +$labels['shortacll'] = 'Pretraži'; +$labels['shortaclr'] = 'ÄŒitaj'; +$labels['shortacls'] = 'Zadrži'; +$labels['shortaclw'] = 'PiÅ¡i'; +$labels['shortacli'] = 'Umetni'; +$labels['shortaclp'] = 'PoÅ¡alji'; +$labels['shortaclc'] = 'Stvori'; +$labels['shortaclk'] = 'Stvori'; +$labels['shortacld'] = 'ObriÅ¡i'; +$labels['shortaclt'] = 'ObriÅ¡i'; +$labels['shortacle'] = 'Trajno obriÅ¡i'; +$labels['shortaclx'] = 'ObriÅ¡i mapu'; +$labels['shortacla'] = 'Administriraj'; +$labels['shortaclother'] = 'Drugo'; +$labels['shortaclread'] = 'ÄŒitanje'; +$labels['shortaclwrite'] = 'Pisanje'; +$labels['shortacldelete'] = 'Brisanje'; +$labels['longacll'] = 'Mapa je vidljiva u listi i može se na nju pretplatiti'; +$labels['longaclr'] = 'Mapa može biti otvorena za Äitanje'; +$labels['longacls'] = 'Oznaku "ViÄ‘eno" je moguće mijenjati u porukama'; +$labels['longaclw'] = 'Oznake i kljuÄne rijeÄi, osim oznaka "ViÄ‘eno" i "Obrisano", se mogu mijenjati'; +$labels['longacli'] = 'Poruke mogu biti pohranjene ili kopirane u mapu'; +$labels['longaclp'] = 'Poruke mogu biti postavljene u mapu'; +$labels['longaclc'] = 'Mape pod ovom mapom se mogu stvarati (i preimenovati)'; +$labels['longaclk'] = 'Mape pod ovom mapom se mogu stvarati (i preimenovati)'; +$labels['longacld'] = 'Oznaku "Obrisano" je moguće mijenjati u porukama'; +$labels['longaclt'] = 'Oznaku "Obrisano" je moguće mijenjati u porukama'; +$labels['longacle'] = 'Poruke mogu biti izbrisane'; +$labels['longaclx'] = 'Mapa može biti obrisana ili preimenovana'; +$labels['longacla'] = 'Prava pristupa nad mapom se mogu mijenjati'; +$labels['longaclfull'] = 'Potpuna kontrola ukljuÄujući administraciju mapa'; +$labels['longaclread'] = 'Mapa može biti otvorena za Äitanje'; +$labels['longaclwrite'] = 'Poruke mogu biti oznaÄene, pohranjene ili kopirane u mapu'; +$labels['longacldelete'] = 'Poruke mogu biti obrisane'; +$messages['deleting'] = 'BriÅ¡em prava pristupa...'; +$messages['saving'] = 'Pohranjujem prava pristupa'; +$messages['updatesuccess'] = 'Prava pristupa uspjeÅ¡no promjenjena'; +$messages['deletesuccess'] = 'Prava pristupa uspjeÅ¡no obrisana'; +$messages['createsuccess'] = 'Prava pristupa uspjeÅ¡no dodana'; +$messages['updateerror'] = 'Ne mogu pohraniti vCard'; +$messages['deleteerror'] = 'Ne mogu obrisati prava pristupa'; +$messages['createerror'] = 'Ne mogu dodati prava pristupa'; +$messages['deleteconfirm'] = 'Jeste li sigurni da želite obrisati prava pristupa za odabranog korisnika(e)?'; +$messages['norights'] = 'Nije navedeno pravo pristupa!'; +$messages['nouser'] = 'Nije navedeno korisniÄko ime!'; +?> diff --git a/plugins/acl/localization/hy_AM.inc b/plugins/acl/localization/hy_AM.inc index b474f6309..403b5ab10 100644 --- a/plugins/acl/localization/hy_AM.inc +++ b/plugins/acl/localization/hy_AM.inc @@ -81,6 +81,7 @@ $messages['saving'] = 'ÕŠÕ¡Õ°ÕºÕ¡Õ¶Õ¾Õ¸Ö‚Õ´ Õ¥Õ¶ Õ´Õ¸Ö‚Õ¿Ö„Õ« Õ«Ö€Õ¡Õ¾Õ¸Ö‚Õ¶Ö„Õ¶ $messages['updatesuccess'] = 'Õ„Õ¸Ö‚Õ¿Ö„Õ« Õ«Ö€Õ¡Õ¾Õ¸Ö‚Õ¶Ö„Õ¶Õ¥Ö€Õ¨ Õ¢Õ¡Ö€Õ¥Õ°Õ¡Õ»Õ¸Õ² ÖƒÕ¸ÖƒÕ¸ÕÕ¾Õ¥ÖÕ«Õ¶Ö‰'; $messages['deletesuccess'] = 'Õ„Õ¸Ö‚Õ¿Ö„Õ« Õ«Ö€Õ¡Õ¾Õ¸Ö‚Õ¶Ö„Õ¶Õ¥Ö€Õ¨ Õ¢Õ¡Ö€Õ¥Õ°Õ¡Õ»Õ¸Õ² Õ»Õ¶Õ»Õ¾Õ¥ÖÕ«Õ¶Ö‰'; $messages['createsuccess'] = 'Õ„Õ¸Ö‚Õ¿Ö„Õ« Õ«Ö€Õ¡Õ¾Õ¸Ö‚Õ¶Ö„Õ¶Õ¥Ö€Õ¨ Õ¢Õ¡Ö€Õ¥Õ°Õ¡Õ»Õ¸Õ² Õ¡Õ¾Õ¥Õ¬Õ¡ÖÕ¾Õ¥ÖÕ¾Õ«Õ¶Ö‰'; +$messages['updateerror'] = 'Õ„Õ¸Ö‚Õ¿Ö„Õ« Õ«Ö€Õ¡Õ¾Õ¸Ö‚Õ¶Ö„Õ¶Õ¥Ö€Õ« Õ©Õ¡Ö€Õ´Õ¡ÖÕ¸Ö‚Õ´Õ¨ Õ¡Õ¶Õ»Õ¡Õ¿Õ¥Õ¬'; $messages['deleteerror'] = 'Õ„Õ¸Ö‚Õ¿Ö„Õ« Õ«Ö€Õ¡Õ¾Õ¸Ö‚Õ¶Ö„Õ¶Õ¥Ö€Õ¨ Õ»Õ¶Õ»Õ¸Ö‚Õ´Õ¨ Õ±Õ¡ÕÕ¸Õ²Õ¾Õ¥ÖÖ‰'; $messages['createerror'] = 'Õ„Õ¸Ö‚Õ¿Ö„Õ« Õ«Ö€Õ¡Õ¾Õ¸Ö‚Õ¶Ö„Õ¶Õ¥Ö€Õ¨ Õ¡Õ¾Õ¥Õ¬Õ¡ÖÕ¸Ö‚Õ´Õ¨ Õ±Õ¡ÕÕ¸Õ²Õ¾Õ¥ÖÖ‰'; $messages['deleteconfirm'] = 'Ô´Õ¸Ö‚Ö„ Õ¾Õ½Õ¿Õ¡ÕžÕ° Õ§Ö„, Õ¸Ö€ ÖÕ¡Õ¶Õ¯Õ¡Õ¶Õ¸Ö‚Õ´ Õ¥Ö„ Õ¶Õ·Õ¾Õ¡Õ® Ö…Õ£Õ¿Õ¾Õ¸Õ²Õ¶Õ¥Ö€Õ«Õ¶ Õ¦Ö€Õ¯Õ¥Õ¬ Õ´Õ¸Ö‚Õ¿Ö„Õ« Õ«Ö€Õ¡Õ¾Õ¸Ö‚Õ¶Ö„Õ¶Õ¥Ö€Õ«ÖÖ‰'; diff --git a/plugins/acl/localization/km_KH.inc b/plugins/acl/localization/km_KH.inc new file mode 100644 index 000000000..f112f3cf3 --- /dev/null +++ b/plugins/acl/localization/km_KH.inc @@ -0,0 +1,68 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/acl/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail ACL plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ +*/ +$labels['sharing'] = 'ការ​ចែក​រំលែក'; +$labels['myrights'] = 'សិទ្ធិ​ចូល'; +$labels['username'] = 'អ្នក​ប្រើ៖'; +$labels['advanced'] = 'បែប​កម្រិážâ€‹ážáŸ’ពស់'; +$labels['newuser'] = 'បន្ážáŸ‚ម​ធាážáž»'; +$labels['actions'] = 'សកម្មភាព​សិទ្ធិ​ចូល...'; +$labels['anyone'] = 'អ្នក​ប្រើ​ទាំង​អស់ (នរណា​ម្នាក់)'; +$labels['anonymous'] = 'ភ្ញៀវ (អនាមិក)'; +$labels['acll'] = 'ស្វែងរក'; +$labels['aclr'] = 'អាន​សារ'; +$labels['acli'] = 'បញ្ចូល (ចម្លង​មក​ដាក់)'; +$labels['aclp'] = 'ប្រកាស'; +$labels['aclc'] = 'បង្កើážâ€‹ážážâ€‹ážšáž„'; +$labels['aclk'] = 'បង្កើážâ€‹ážážâ€‹ážšáž„'; +$labels['acld'] = 'លុប​សារ'; +$labels['aclt'] = 'លុប​សារ'; +$labels['acle'] = 'ដកចáŸáž‰'; +$labels['aclx'] = 'លុប​ážáž'; +$labels['acla'] = 'អភិបាល'; +$labels['aclfull'] = 'បញ្ជា​ទាំង​អស់'; +$labels['aclother'] = 'ផ្សáŸáž„ៗ'; +$labels['aclread'] = 'អាន'; +$labels['aclwrite'] = 'សរសáŸážš'; +$labels['acldelete'] = 'លុប'; +$labels['shortacll'] = 'ស្វែងរក'; +$labels['shortaclr'] = 'អាន'; +$labels['shortacls'] = 'រក្សា'; +$labels['shortaclw'] = 'សរសáŸážš'; +$labels['shortacli'] = 'បញ្ចូល'; +$labels['shortaclp'] = 'ប្រកាស'; +$labels['shortaclc'] = 'បង្កើáž'; +$labels['shortaclk'] = 'បង្កើáž'; +$labels['shortacld'] = 'លុប'; +$labels['shortaclt'] = 'លុប'; +$labels['shortacle'] = 'ដកចáŸáž‰'; +$labels['shortaclx'] = 'ការ​លុប​ážáž'; +$labels['shortacla'] = 'អភិបាល'; +$labels['shortaclother'] = 'ផ្សáŸáž„ៗ'; +$labels['shortaclread'] = 'អាន'; +$labels['shortaclwrite'] = 'សរសáŸážš'; +$labels['shortacldelete'] = 'លុប'; +$labels['longaclr'] = 'ážážâ€‹áž“áŸáŸ‡â€‹áž¢áž¶áž…​បើក​សម្រាប់​អាន'; +$labels['longacldelete'] = 'សារ​នáŸáŸ‡â€‹áž¢áž¶áž…​ážáŸ’រូវ​បាន​លុប'; +$messages['deleting'] = 'កំពុង​លុប​សិទ្ធិ​ចូល...'; +$messages['saving'] = 'រក្សា​ទុក​សិទ្ធិ​ចូល...'; +$messages['updateerror'] = 'មិន​អាច​ធ្វើ​បច្ចុប្បន្នភាព​សិទ្ធិ​ចូល'; +$messages['createerror'] = 'មិន​អាច​បន្ážáŸ‚ម​សិទ្ធិ​ចូល'; +$messages['deleteconfirm'] = 'ážáž¾â€‹áž¢áŸ’នក​ពិážâ€‹áž‡áž¶â€‹áž…ង់​ដក​សិទ្ធ​ចូល​ពី​អ្នក​ប្រើប្រាស់​ដែល​បាន​រើស​មែនទáŸ?'; +$messages['norights'] = 'មិន​បាន​បញ្ជាក់​សិទ្ធិ​ច្បាស់​លាស់!'; +$messages['nouser'] = 'មិន​បាន​បញ្ជាក់​ឈ្មោះ​អ្នក​ប្រើ!'; +?> diff --git a/plugins/acl/localization/lv_LV.inc b/plugins/acl/localization/lv_LV.inc index 83ceec5eb..cadb34ae2 100644 --- a/plugins/acl/localization/lv_LV.inc +++ b/plugins/acl/localization/lv_LV.inc @@ -15,6 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ */ +$labels['sharing'] = 'DalÄ«Å¡anÄs'; $labels['myrights'] = 'Piekļuves tiesÄ«bas'; $labels['username'] = 'LietotÄjs:'; $labels['advanced'] = 'paplaÅ¡inÄtais režīms'; @@ -25,10 +26,15 @@ $labels['anonymous'] = 'Viesi (anonÄ«mie)'; $labels['identifier'] = 'Identifikators'; $labels['acll'] = 'Atrast'; $labels['aclr'] = 'LasÄ«t ziņojumus'; +$labels['acls'] = 'PaturÄ“t "RedzÄ“tÄ" statusu'; +$labels['aclw'] = 'SaglabÄt atzÄ«mes'; +$labels['acli'] = 'Ievietot (IekopÄ“t)'; +$labels['aclp'] = 'NosÅ«tÄ«t'; $labels['aclc'] = 'Izveidot apakÅ¡mapes'; $labels['aclk'] = 'Izveidot apakÅ¡mapes'; $labels['acld'] = 'DzÄ“st ziņojumus'; $labels['aclt'] = 'DzÄ“st ziņojumus'; +$labels['acle'] = 'IzdzÄ“st'; $labels['aclx'] = 'DzÄ“st mapi'; $labels['acla'] = 'PÄrvaldÄ«t'; $labels['aclfull'] = 'Pilna kontrole'; @@ -41,17 +47,29 @@ $labels['shortaclr'] = 'LasÄ«t'; $labels['shortacls'] = 'PaturÄ“t'; $labels['shortaclw'] = 'RakstÄ«t'; $labels['shortacli'] = 'Ievietot'; +$labels['shortaclp'] = 'NosÅ«tÄ«t'; $labels['shortaclc'] = 'Izveidot'; $labels['shortaclk'] = 'Izveidot'; $labels['shortacld'] = 'DzÄ“st'; $labels['shortaclt'] = 'DzÄ“st'; +$labels['shortacle'] = 'IzdzÄ“st'; $labels['shortaclx'] = 'Mapju dzÄ“Å¡ana'; $labels['shortacla'] = 'PÄrvaldÄ«t'; $labels['shortaclother'] = 'Cits'; $labels['shortaclread'] = 'LasÄ«t'; $labels['shortaclwrite'] = 'RakstÄ«t'; $labels['shortacldelete'] = 'DzÄ“st'; +$labels['longacll'] = 'Mape ir redzama kopÄ“jÄ mapju sarakstÄ un var tikt abonÄ“ta'; $labels['longaclr'] = 'Å i mape var tikt atvÄ“rta lasÄ«Å¡anai'; +$labels['longacls'] = 'Ziņojumu "RedzÄ“ts" atzÄ«me var tik mainÄ«ta'; +$labels['longaclw'] = 'Ziņojumu atzÄ«mes, izņemot "RedzÄ“ts" un "DzÄ“sts", un atslÄ“gvÄrdi var tik mainÄ«ti'; +$labels['longacli'] = 'Ziņojumi var tikt ierakstÄ«ti vai pÄrkopÄ“ti uz Å¡o mapi'; +$labels['longaclp'] = 'VÄ“stules var tikt ievietotas Å¡ajÄ mapÄ“'; +$labels['longaclc'] = 'Zem Å¡Ä«s mapes pa tieÅ¡o var tikt izveidotas (vai pÄrsauktas) citas mapes'; +$labels['longaclk'] = 'Zem Å¡Ä«s mapes pa tieÅ¡o var tikt izveidotas (vai pÄrsauktas) citas mapes'; +$labels['longacld'] = 'Ziņojumu "DzÄ“st" atzÄ«me var tikt mainÄ«ta'; +$labels['longaclt'] = 'Ziņojumu "DzÄ“st" atzÄ«me var tikt mainÄ«ta'; +$labels['longacle'] = 'VÄ“stules var tikt izdzÄ“stas'; $labels['longaclx'] = 'Mape var tikt gan dzÄ“sta, gan pÄrdÄ“vÄ“ta'; $labels['longacla'] = 'Mapes pieejas tiesÄ«bas var tikt izmainÄ«tas'; $labels['longaclfull'] = 'Pilna kontrole, iekļaujot arÄ« mapju administrÄ“Å¡anu'; diff --git a/plugins/acl/localization/sk_SK.inc b/plugins/acl/localization/sk_SK.inc index eb410f119..c4ea0e53c 100644 --- a/plugins/acl/localization/sk_SK.inc +++ b/plugins/acl/localization/sk_SK.inc @@ -16,32 +16,32 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ */ $labels['sharing'] = 'Zdieľanie'; -$labels['myrights'] = 'PrÃstupové práva'; +$labels['myrights'] = 'PrÃstupové oprávnenia'; $labels['username'] = 'PoužÃvateľ:'; -$labels['advanced'] = 'režim pre pokroÄilých'; -$labels['newuser'] = 'PridaÅ¥ údaj'; -$labels['actions'] = 'PrÃstupové práva ÄinnostÃ...'; +$labels['advanced'] = 'pokroÄilý režim'; +$labels['newuser'] = 'PridaÅ¥ záznam'; +$labels['actions'] = 'PrÃstupové práva pre akcie...'; $labels['anyone'] = 'VÅ¡etci užÃvatelia (ktokoľvek)'; -$labels['anonymous'] = 'Hostia (anonymne)'; +$labels['anonymous'] = 'Hostia (anonymnÃ)'; $labels['identifier'] = 'Identifikátor'; $labels['acll'] = 'VyhľadaÅ¥'; $labels['aclr'] = 'ÄŒÃtaÅ¥ správy'; $labels['acls'] = 'PonechaÅ¥ ako preÄÃtané'; -$labels['aclw'] = 'PrÃznaky na zapisovanie'; +$labels['aclw'] = 'PrÃznaky pre zápis'; $labels['acli'] = 'VložiÅ¥ (SkopÃrovaÅ¥ do)'; $labels['aclp'] = 'OdoslaÅ¥ na'; $labels['aclc'] = 'VytvoriÅ¥ podprieÄinky'; $labels['aclk'] = 'VytvoriÅ¥ podprieÄinky'; -$labels['acld'] = 'ZmazaÅ¥ správy'; -$labels['aclt'] = 'ZmazaÅ¥ správy'; +$labels['acld'] = 'VymazaÅ¥ správy'; +$labels['aclt'] = 'VymazaÅ¥ správy'; $labels['acle'] = 'VyÄistiÅ¥'; -$labels['aclx'] = 'ZmazaÅ¥ prieÄinok'; +$labels['aclx'] = 'VymazaÅ¥ prieÄinok'; $labels['acla'] = 'SpravovaÅ¥'; -$labels['aclfull'] = 'Plný prÃstup'; -$labels['aclother'] = 'Ostatné'; +$labels['aclfull'] = 'Úplný prÃstup'; +$labels['aclother'] = 'Iné'; $labels['aclread'] = 'ÄŒÃtanie'; $labels['aclwrite'] = 'Zápis'; -$labels['acldelete'] = 'OdstrániÅ¥'; +$labels['acldelete'] = 'Odstránenie'; $labels['shortacll'] = 'VyhľadaÅ¥'; $labels['shortaclr'] = 'ÄŒÃtanie'; $labels['shortacls'] = 'PonechaÅ¥'; @@ -50,41 +50,41 @@ $labels['shortacli'] = 'VložiÅ¥'; $labels['shortaclp'] = 'OdoslaÅ¥ na'; $labels['shortaclc'] = 'VytvoriÅ¥'; $labels['shortaclk'] = 'VytvoriÅ¥'; -$labels['shortacld'] = 'OdstrániÅ¥'; -$labels['shortaclt'] = 'OdstrániÅ¥'; +$labels['shortacld'] = 'VymazaÅ¥'; +$labels['shortaclt'] = 'VymazaÅ¥'; $labels['shortacle'] = 'VyÄistiÅ¥'; -$labels['shortaclx'] = 'OdstrániÅ¥ prieÄinok'; +$labels['shortaclx'] = 'VymazaÅ¥ prieÄinok'; $labels['shortacla'] = 'SpravovaÅ¥'; -$labels['shortaclother'] = 'Ostatné'; +$labels['shortaclother'] = 'Iné'; $labels['shortaclread'] = 'ÄŒÃtanie'; $labels['shortaclwrite'] = 'Zápis'; -$labels['shortacldelete'] = 'OdstrániÅ¥'; -$labels['longacll'] = 'PrieÄinok je v zoznamoch viditeľný a dá sa doň zapÃsaÅ¥'; +$labels['shortacldelete'] = 'Odstránenie'; +$labels['longacll'] = 'PrieÄinok je v zoznamoch viditeľný a dá sa k nemu prihlásiÅ¥'; $labels['longaclr'] = 'PreÄinok je možné otvoriÅ¥ na ÄÃtanie'; $labels['longacls'] = 'PrÃznak "PreÄÃtané" je možné zmeniÅ¥'; -$labels['longaclw'] = 'PrÃznaky správ a kľúÄové slová je možné zmeniÅ¥, okrem "PreÄÃtané" a "Vymazané'; +$labels['longaclw'] = 'PrÃznaky správ a kľúÄové slová je možné zmeniÅ¥, okrem "PreÄÃtané" a "Vymazané"'; $labels['longacli'] = 'Do tohto prieÄinka je možné zapisovaÅ¥ alebo kopÃrovaÅ¥ správy'; $labels['longaclp'] = 'Do tohto prieÄinka je možné publikovaÅ¥ správy'; -$labels['longaclc'] = 'PrieÄinky je možné vytváraÅ¥ (alebo premenúvaÅ¥) priamo v tomto prieÄinku'; -$labels['longaclk'] = 'PrieÄinky je možné vytváraÅ¥ (alebo premenúvaÅ¥) priamo v tomto prieÄinku'; +$labels['longaclc'] = 'PrieÄinky je možné vytváraÅ¥ (alebo premenovávaÅ¥) priamo v tomto prieÄinku'; +$labels['longaclk'] = 'PrieÄinky je možné vytváraÅ¥ (alebo premenovávaÅ¥) priamo v tomto prieÄinku'; $labels['longacld'] = 'PrÃznak správ "Vymazané" je možné zmeniÅ¥'; $labels['longaclt'] = 'PrÃznak správ "Vymazané" je možné zmeniÅ¥'; -$labels['longacle'] = 'Správy je možné vymazaÅ¥'; +$labels['longacle'] = 'Správy je možné vyÄistiÅ¥'; $labels['longaclx'] = 'PrieÄinok je možné vymazaÅ¥ alebo premenovaÅ¥'; -$labels['longacla'] = 'Je možné zmeniÅ¥ prÃstupové práva k prieÄinku'; +$labels['longacla'] = 'PrÃstupové oprávnenia k tomuto prieÄinku je možné zmeniÅ¥'; $labels['longaclfull'] = 'Úplný prÃstup, vrátane správy prieÄinka'; $labels['longaclread'] = 'PreÄinok je možné otvoriÅ¥ na ÄÃtanie'; $labels['longaclwrite'] = 'Správy je možné oznaÄiÅ¥, zapÃsaÅ¥ alebo skopÃrovaÅ¥ do preÄinka'; $labels['longacldelete'] = 'Správy je možné vymazaÅ¥'; -$messages['deleting'] = 'Odstraňovanie prÃstupových práv...'; -$messages['saving'] = 'Ukladanie prÃstupových práv...'; -$messages['updatesuccess'] = 'PrÃstupové práva boli úspeÅ¡ne zmenené'; -$messages['deletesuccess'] = 'PrÃstupové práva boli úspeÅ¡ne vymazané'; -$messages['createsuccess'] = 'PrÃstupové práva boli úspeÅ¡ne pridané'; -$messages['updateerror'] = 'Nemožno aktualizovaÅ¥ prÃstupové práva'; -$messages['deleteerror'] = 'PrÃstupové práva sa nepodarilo vymazaÅ¥'; -$messages['createerror'] = 'PrÃstupové práva sa nepodarilo pridaÅ¥'; -$messages['deleteconfirm'] = 'Ste si istý, že chcete odstrániÅ¥ prÃstupové práva vybranému použÃvateľovi/použÃvateľom?'; -$messages['norights'] = 'Neboli urÄené žiadne práva!'; +$messages['deleting'] = 'Odstraňovanie prÃstupových oprávnenÃ...'; +$messages['saving'] = 'Ukladanie prÃstupových oprávnenÃ...'; +$messages['updatesuccess'] = 'PrÃstupové oprávnenia boli úspeÅ¡ne zmenené'; +$messages['deletesuccess'] = 'PrÃstupové oprávnenia boli úspeÅ¡ne vymazané'; +$messages['createsuccess'] = 'PrÃstupové oprávnenia boli úspeÅ¡ne pridané'; +$messages['updateerror'] = 'Nemožno aktualizovaÅ¥ prÃstupové oprávnenia'; +$messages['deleteerror'] = 'PrÃstupové oprávnenia sa nepodarilo vymazaÅ¥'; +$messages['createerror'] = 'PrÃstupové oprávnenia sa nepodarilo pridaÅ¥'; +$messages['deleteconfirm'] = 'Naozaj chcete odstrániÅ¥ prÃstupové oprávnenia vybraného použÃvateľa?'; +$messages['norights'] = 'Neboli urÄené žiadne oprávnenia!'; $messages['nouser'] = 'Nebolo urÄené žiadne meno použÃvateľa!'; ?> diff --git a/plugins/acl/localization/sv_SE.inc b/plugins/acl/localization/sv_SE.inc index 37c374a29..529c11f47 100644 --- a/plugins/acl/localization/sv_SE.inc +++ b/plugins/acl/localization/sv_SE.inc @@ -21,12 +21,12 @@ $labels['username'] = 'Användare:'; $labels['advanced'] = 'avancerat läge'; $labels['newuser'] = 'Lägg till'; $labels['actions'] = 'Hantera Ã¥tkomsträttigheter...'; -$labels['anyone'] = 'Alla användare (alla)'; +$labels['anyone'] = 'Alla användare (vem som helst)'; $labels['anonymous'] = 'Gäster (anonyma)'; $labels['identifier'] = 'Identifikation'; $labels['acll'] = 'Uppslagning'; $labels['aclr'] = 'Läs meddelanden'; -$labels['acls'] = 'BehÃ¥ll status Sett'; +$labels['acls'] = 'BehÃ¥ll status Läst'; $labels['aclw'] = 'Skriv flaggor'; $labels['acli'] = 'Infoga (kopiera in)'; $labels['aclp'] = 'Posta'; @@ -61,14 +61,14 @@ $labels['shortaclwrite'] = 'Skriv'; $labels['shortacldelete'] = 'Ta bort'; $labels['longacll'] = 'Katalogen är synlig i listor och den kan prenumereras pÃ¥'; $labels['longaclr'] = 'Katalogen kan öppnas för läsning'; -$labels['longacls'] = 'Meddelandeflagga Sett kan ändras'; -$labels['longaclw'] = 'Meddelandeflaggor och nyckelord kan ändras, undantaget Sett och Raderat'; +$labels['longacls'] = 'Meddelandeflagga Läst kan ändras'; +$labels['longaclw'] = 'Meddelandeflaggor och nyckelord kan ändras, undantaget Läst och Borttagen'; $labels['longacli'] = 'Meddelanden kan skrivas eller kopieras till katalogen'; $labels['longaclp'] = 'Meddelanden kan postas till denna katalog'; $labels['longaclc'] = 'Kataloger kan skapas (eller ges annat namn) direkt i denna katalog'; $labels['longaclk'] = 'Kataloger kan skapas (eller ges annat namn) direkt i denna katalog'; -$labels['longacld'] = 'Meddelandeflagga Raderat kan ändras'; -$labels['longaclt'] = 'Meddelandeflagga Raderat kan ändras'; +$labels['longacld'] = 'Meddelandeflagga Borttaget kan ändras'; +$labels['longaclt'] = 'Meddelandeflagga Borttaget kan ändras'; $labels['longacle'] = 'Meddelanden kan utplÃ¥nas'; $labels['longaclx'] = 'Katalogen kan tas bort eller ges annat namn'; $labels['longacla'] = 'Katalogens Ã¥tkomsträttigheter kan ändras'; diff --git a/plugins/acl/localization/uk_UA.inc b/plugins/acl/localization/uk_UA.inc new file mode 100644 index 000000000..ada0afa3c --- /dev/null +++ b/plugins/acl/localization/uk_UA.inc @@ -0,0 +1,45 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/acl/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail ACL plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ +*/ +$labels['myrights'] = 'Права доÑтупу'; +$labels['username'] = 'КориÑтувач:'; +$labels['advanced'] = 'розширений режим'; +$labels['anyone'] = 'Ð’ÑÑ– кориÑтувачі (кожен)'; +$labels['anonymous'] = 'ГоÑÑ‚Ñ– (аноніми)'; +$labels['aclc'] = 'Створити підтеки'; +$labels['aclk'] = 'Створити підтеки'; +$labels['acld'] = 'Вилучити повідомленнÑ'; +$labels['aclt'] = 'Вилучити повідомленнÑ'; +$labels['aclx'] = 'Вилучити теку'; +$labels['aclfull'] = 'Повний контроль'; +$labels['aclother'] = 'Інше'; +$labels['aclread'] = 'Читати'; +$labels['acldelete'] = 'Видалити'; +$labels['shortaclr'] = 'Читати'; +$labels['shortacls'] = 'Залишити'; +$labels['shortacli'] = 'Ð’Ñтавити'; +$labels['shortaclc'] = 'Створити'; +$labels['shortaclk'] = 'Створити'; +$labels['shortacld'] = 'Видалити'; +$labels['shortaclt'] = 'Видалити'; +$labels['shortaclx'] = 'Видалити теку'; +$labels['shortaclother'] = 'Інше'; +$labels['shortacldelete'] = 'Видалити'; +$labels['longaclfull'] = 'Повний контроль включаючи теку адмініÑтратора'; +$messages['deleting'] = 'Ð’Ð¸Ð»ÑƒÑ‡ÐµÐ½Ð½Ñ Ð¿Ñ€Ð°Ð² доÑтупу...'; +$messages['saving'] = 'Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð¿Ñ€Ð°Ð² доÑтупу...'; +?> diff --git a/plugins/acl/localization/vi_VN.inc b/plugins/acl/localization/vi_VN.inc index a3839982b..e772eb8e7 100644 --- a/plugins/acl/localization/vi_VN.inc +++ b/plugins/acl/localization/vi_VN.inc @@ -20,7 +20,7 @@ $labels['myrights'] = 'Quyá»n truy cáºp'; $labels['username'] = 'NgÆ°á»i dùng:'; $labels['advanced'] = 'Chế Ä‘á»™ tÃnh năng cao hÆ¡n'; $labels['newuser'] = 'Thêm bà i viết'; -$labels['actions'] = 'Cách ứng xá» quyá»n truy cáºp'; +$labels['actions'] = 'Các thao tác quyá»n truy cáºp'; $labels['anyone'] = 'Tất cả ngÆ°á»i dùng (bất kỳ ai)'; $labels['anonymous'] = 'Khách (nặc danh)'; $labels['identifier'] = 'Äịnh danh'; @@ -59,8 +59,8 @@ $labels['shortaclother'] = 'Loại khác'; $labels['shortaclread'] = 'Äá»c'; $labels['shortaclwrite'] = 'Viết'; $labels['shortacldelete'] = 'Xoá'; -$labels['longacll'] = 'Giữ liệu đã được liệt kê và có thể đóng góp'; -$labels['longaclr'] = 'Giữ liệu có thể được mở để Ä‘á»c'; +$labels['longacll'] = 'ThÆ° mục đã được hiển thị và có thể đăng ký sá» dụng'; +$labels['longaclr'] = 'ThÆ° mục có thể được mở để Ä‘á»c'; $labels['longacls'] = 'CỠđánh dấu thÆ° đã xem qua có thể thay đổi'; $labels['longaclw'] = 'Cá» thÆ° và từ khóa có thể thay đổi, ngoại trừ đã xem qua và bị xóa'; $labels['longacli'] = 'ThÆ° có thể được ghi hoặc sao chép và o giữ liệu'; @@ -81,6 +81,7 @@ $messages['saving'] = 'LÆ°u quyá»n truy cáºp...'; $messages['updatesuccess'] = 'Thay đổi quyá»n truy cáºp thà nh công...'; $messages['deletesuccess'] = 'Xóa quyá»n truy cáºp thà nh công...'; $messages['createsuccess'] = 'Thêm quyá»n truy cáºp thà nh công...'; +$messages['updateerror'] = 'Không thể cáºp nháºt quyá»n truy cáºp'; $messages['deleteerror'] = 'Khôngthể xóa quyá»n truy cáºp'; $messages['createerror'] = 'Không thể thêm quyá»n truy cáºp'; $messages['deleteconfirm'] = 'Bạn có chắc là muốn xóa bá» quyá»n truy cáºp của ngÆ°á»i dùng được chá»n?'; diff --git a/plugins/acl/localization/zh_CN.inc b/plugins/acl/localization/zh_CN.inc index 68d294489..2542c3237 100644 --- a/plugins/acl/localization/zh_CN.inc +++ b/plugins/acl/localization/zh_CN.inc @@ -61,7 +61,11 @@ $labels['shortaclwrite'] = '写入'; $labels['shortacldelete'] = 'åˆ é™¤'; $labels['longacll'] = '该文件夹在列表上å¯è§ä¸”å¯è¢«è®¢é˜…'; $labels['longaclr'] = '该文件夹å¯è¢«æ‰“开阅读'; -$labels['longacli'] = '消æ¯å¯å†™æˆ–å¯è¢«å¤åˆ¶è‡³æ–‡ä»¶å¤¹ä¸'; +$labels['longacls'] = '已读消æ¯æ ‡è¯†å¯ä»¥æ”¹å˜'; +$labels['longaclw'] = 'é™¤å·²è¯»å’Œåˆ é™¤è¡¨ç¤ºå¤–å…¶ä»–æ¶ˆæ¯æ ‡è¯†å¯ä»¥æ”¹å˜'; +$labels['longacli'] = '消æ¯å¯è¢«æ ‡è®°ï¼Œæ’°å†™æˆ–å¤åˆ¶è‡³æ–‡ä»¶å¤¹ä¸'; +$labels['longaclk'] = '文件夹å¯è¢«åˆ›å»º(或改å)于现有目录下'; +$labels['longacld'] = '消æ¯å·²åˆ é™¤æ ‡è¯†å¯ä»¥æ”¹å˜'; $labels['longacle'] = '消æ¯å¯è¢«æ¸…除'; $labels['longaclx'] = '该文件夹å¯è¢«åˆ 除或é‡å‘½å'; $labels['longacla'] = '文件夹访问æƒé™å¯è¢«ä¿®æ”¹'; @@ -73,6 +77,7 @@ $messages['saving'] = 'ä¿å˜è®¿é—®æƒé™ä¸â€¦'; $messages['updatesuccess'] = 'æˆåŠŸä¿®æ”¹è®¿é—®æƒé™'; $messages['deletesuccess'] = 'æˆåŠŸåˆ 除访问æƒé™'; $messages['createsuccess'] = 'æˆåŠŸæ·»åŠ 访问æƒé™'; +$messages['updateerror'] = 'æ— æ³•æ›´æ–°è®¿é—®æƒé™'; $messages['deleteerror'] = 'æ— æ³•åˆ é™¤è®¿é—®æƒé™'; $messages['createerror'] = 'æ— æ³•æ·»åŠ è®¿é—®æƒé™'; $messages['deleteconfirm'] = '您确定è¦ç§»é™¤é€‰ä¸ç”¨æˆ·çš„访问æƒé™å—?'; diff --git a/plugins/acl/package.xml b/plugins/acl/package.xml index 98460e82f..a99ad4ffa 100644 --- a/plugins/acl/package.xml +++ b/plugins/acl/package.xml @@ -13,10 +13,10 @@ <email>alec@alec.pl</email> <active>yes</active> </lead> - <date>2013-03-01</date> + <date>2014-02-04</date> <version> - <release>1.2</release> - <api>0.7</api> + <release>1.3</release> + <api>1.0</api> </version> <stability> <release>stable</release> diff --git a/plugins/acl/skins/classic/acl.css b/plugins/acl/skins/classic/acl.css index cf3391f49..e95e3b341 100644 --- a/plugins/acl/skins/classic/acl.css +++ b/plugins/acl/skins/classic/acl.css @@ -87,9 +87,7 @@ #aclform { - top: 80px; - width: 480px; - padding: 10px; + display: none; } #aclform div diff --git a/plugins/acl/skins/classic/templates/table.html b/plugins/acl/skins/classic/templates/table.html index bca63d0b3..5c4d2d8a0 100644 --- a/plugins/acl/skins/classic/templates/table.html +++ b/plugins/acl/skins/classic/templates/table.html @@ -24,17 +24,13 @@ </ul> </div> -<div id="aclform" class="popupmenu"> +<div id="aclform" style="position:absolute; width:480px; top:0; left:0; padding:10px"> <fieldset class="thinbordered"><legend><roundcube:label name="acl.identifier" /></legend> <roundcube:object name="acluser" class="toolbarmenu" id="acluser" size="35" /> </fieldset> <fieldset class="thinbordered"><legend><roundcube:label name="acl.myrights" /></legend> <roundcube:object name="aclrights" class="toolbarmenu" /> </fieldset> - <div> - <roundcube:button command="acl-cancel" type="input" class="button" label="cancel" /> - <roundcube:button command="acl-save" type="input" class="button mainaction" label="save" /> - </div> </div> <script type="text/javascript"> diff --git a/plugins/acl/skins/larry/acl.css b/plugins/acl/skins/larry/acl.css index e392a269e..96c1092a0 100644 --- a/plugins/acl/skins/larry/acl.css +++ b/plugins/acl/skins/larry/acl.css @@ -29,7 +29,6 @@ #acltable td { white-space: nowrap; - border: none; text-align: center; } @@ -38,19 +37,24 @@ border-left: #BBD3DA dotted 1px; font-size: 11px; font-weight: bold; + width: auto; } #acltable tbody td { border-bottom: #DDDDDD 1px solid; text-align: center; - padding: 2px; + height: 16px; cursor: default; } #acltable thead td.user { - border-left: none; + width: 30%; +} + +#acltable.advanced thead td.user { + width: 25%; } #acltable tbody td.user @@ -60,7 +64,6 @@ text-overflow: ellipsis; -o-text-overflow: ellipsis; border-left: none; - width: 50px; } #acltable tbody td.partial @@ -99,10 +102,7 @@ #aclform { - top: 80px; - width: 480px; - padding: 10px; - background-color: white; + display: none; } #aclform div diff --git a/plugins/acl/skins/larry/templates/table.html b/plugins/acl/skins/larry/templates/table.html index 3cf8292a4..c0b8329c6 100644 --- a/plugins/acl/skins/larry/templates/table.html +++ b/plugins/acl/skins/larry/templates/table.html @@ -12,20 +12,16 @@ <li><roundcube:button command="acl-edit" label="edit" class="icon" classAct="icon active" innerclass="icon edit" /></li> <li><roundcube:button command="acl-delete" label="delete" class="icon" classAct="icon active" innerclass="icon delete" /></li> <roundcube:if condition="!in_array('acl_advanced_mode', (array)config:dont_override)" /> - <li><roundcube:button name="acl-switch" id="acl-switch" label="acl.advanced" onclick="rcmail.command('acl-mode-switch')" class="active" /></li> + <li><roundcube:button name="acl-switch" id="acl-switch" label="acl.advanced" onclick="rcmail.command('acl-mode-switch');return false" class="active" /></li> <roundcube:endif /> </ul> </div> -<div id="aclform" class="popupmenu propform"> +<div id="aclform" class="propform" style="position:absolute; width:480px; top:0; left:0; padding:8px"> <fieldset class="thinbordered"><legend><roundcube:label name="acl.identifier" /></legend> - <roundcube:object name="acluser" id="acluser" size="35" /> + <roundcube:object name="acluser" id="acluser" size="35" class="proplist" /> </fieldset> <fieldset class="thinbordered"><legend><roundcube:label name="acl.myrights" /></legend> - <roundcube:object name="aclrights" /> + <roundcube:object name="aclrights" class="proplist" /> </fieldset> - <div class="formbuttons"> - <roundcube:button command="acl-cancel" type="input" class="button" label="cancel" /> - <roundcube:button command="acl-save" type="input" class="button mainaction" label="save" /> - </div> </div> diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js index 3500b9fe4..813033401 100644 --- a/plugins/archive/archive.js +++ b/plugins/archive/archive.js @@ -1,6 +1,6 @@ -/* +/** * Archive plugin script - * @version 2.0 + * @version 2.1 */ function rcmail_archive(prop) @@ -8,29 +8,38 @@ function rcmail_archive(prop) if (!rcmail.env.uid && (!rcmail.message_list || !rcmail.message_list.get_selection().length)) return; - if (rcmail.env.mailbox.indexOf(rcmail.env.archive_folder) != 0) { + if (!rcmail_is_archive()) { if (!rcmail.env.archive_type) { // simply move to archive folder (if no partition type is set) rcmail.command('move', rcmail.env.archive_folder); } else { // let the server sort the messages to the according subfolders - var post_data = { _uid: rcmail.message_list.get_selection().join(','), _mbox: rcmail.env.mailbox }; - rcmail.http_post('plugin.move2archive', post_data); + rcmail.http_post('plugin.move2archive', rcmail.selection_post_data()); } } } +function rcmail_is_archive() +{ + // check if current folder is an archive folder or one of its children + if (rcmail.env.mailbox == rcmail.env.archive_folder + || rcmail.env.mailbox.startsWith(rcmail.env.archive_folder + rcmail.env.delimiter) + ) { + return 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.archive', rcmail_archive, (rcmail.env.uid && rcmail.env.mailbox != rcmail.env.archive_folder)); + rcmail.register_command('plugin.archive', rcmail_archive, rcmail.env.uid && !rcmail_is_archive()); // add event-listener to message list if (rcmail.message_list) rcmail.message_list.addEventListener('select', function(list) { - rcmail.enable_command('plugin.archive', (list.get_selection().length > 0 && rcmail.env.mailbox != rcmail.env.archive_folder)); + rcmail.enable_command('plugin.archive', list.get_selection().length > 0 && !rcmail_is_archive()); }); // set css style for archive folder @@ -41,7 +50,7 @@ if (window.rcmail) { // callback for server response rcmail.addEventListener('plugin.move2archive_response', function(result) { if (result.update) - rcmail.command('checkmail'); // refresh list + rcmail.command('list'); // refresh list }); }) } diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php index 7a81606ab..a0fd2efa9 100644 --- a/plugins/archive/archive.php +++ b/plugins/archive/archive.php @@ -6,9 +6,9 @@ * Plugin that adds a new button to the mailbox toolbar * to move messages to a (user selectable) archive folder. * - * @version 2.0 + * @version 2.1 * @license GNU GPLv3+ - * @author Andre Rodier, Thomas Bruederli + * @author Andre Rodier, Thomas Bruederli, Aleksander Machniak */ class archive extends rcube_plugin { @@ -110,19 +110,29 @@ class archive extends rcube_plugin */ function move_messages() { - $rcmail = rcmail::get_instance(); $this->add_texts('localization'); - $storage = $rcmail->get_storage(); + $rcmail = rcmail::get_instance(); + $storage = $rcmail->get_storage(); + $delimiter = $storage->get_hierarchy_delimiter(); + $archive_folder = $rcmail->config->get('archive_mbox'); + $archive_type = $rcmail->config->get('archive_type', ''); + $storage->set_folder(($current_mbox = rcube_utils::get_input_value('_mbox', RCUBE_INPUT_POST))); - $delimiter = $storage->get_hierarchy_delimiter(); - $archive_folder = $rcmail->config->get('archive_mbox'); - $archive_type = $rcmail->config->get('archive_type', ''); + $result = array('reload' => false, 'update' => false, 'errors' => array()); + $folders = array(); + $uids = rcube_utils::get_input_value('_uid', RCUBE_INPUT_POST); + $search_request = get_input_value('_search', RCUBE_INPUT_GPC); - $result = array('reload' => false, 'update' => false, 'errors' => array()); + if ($uids == '*') { + $index = $storage->index(null, rcmail_sort_column(), rcmail_sort_order()); + $uids = $index->get(); + } + else { + $uids = explode(',', $uids); + } - $uids = explode(',', rcube_utils::get_input_value('_uid', RCUBE_INPUT_POST)); foreach ($uids as $uid) { if (!$archive_folder || !($message = $rcmail->storage->get_message($uid))) { continue; @@ -164,12 +174,27 @@ class archive extends rcube_plugin } // compose full folder path - $folder = $archive_folder . ($subfolder ? $delimiter . $subfolder : ''); + $folder = $archive_folder . ($subfolder ? $delimiter . $subfolder : ''); // create archive subfolder if it doesn't yet exist - if (!$storage->folder_exists($folder, false)) { - if ($storage->create_folder($folder, true)) - $result['reload'] = true; + // we'll create all folders in the path + if (!in_array($folder, $folders)) { + if (empty($list)) { + $list = $storage->list_folders('', $archive_folder . '*', 'mail', null, true); + } + $path = explode($delimiter, $folder); + + for ($i=0; $i<count($path); $i++) { + $_folder = implode($delimiter, array_slice($path, 0, $i+1)); + if (!in_array($_folder, $list)) { + if ($storage->create_folder($_folder, true)) { + $result['reload'] = true; + $list[] = $_folder; + } + } + } + + $folders[] = $folder; } // move message to target folder @@ -192,7 +217,22 @@ class archive extends rcube_plugin $rcmail->output->show_message($this->gettext('archived'), 'confirmation'); } - $rcmail->output->command('plugin.move2archive_response', $result); + // refresh saved search set after moving some messages + if ($search_request && $rcmail->storage->get_search_set()) { + $_SESSION['search'] = $rcmail->storage->refresh_search(); + } + + if ($_POST['_from'] == 'show' && !empty($result['update'])) { + if ($next = get_input_value('_next_uid', RCUBE_INPUT_GPC)) { + $rcmail->output->command('show_message', $next); + } + else { + $rcmail->output->command('command', 'list'); + } + } + else { + $rcmail->output->command('plugin.move2archive_response', $result); + } } /** @@ -228,7 +268,7 @@ class archive extends rcube_plugin $archive_type->add($this->gettext('archivetypefolder'), 'folder'); $args['blocks']['archive'] = array( - 'name' => Q(rcube_label('settingstitle', 'archive')), + 'name' => Q($this->gettext('settingstitle')), 'options' => array('archive_type' => array( 'title' => $this->gettext('archivetype'), 'content' => $archive_type->show($rcmail->config->get('archive_type')) diff --git a/plugins/archive/composer.json b/plugins/archive/composer.json index 7826545b8..8a585ad09 100644 --- a/plugins/archive/composer.json +++ b/plugins/archive/composer.json @@ -3,12 +3,17 @@ "type": "roundcube-plugin", "description": "This adds a button to move the selected messages to an archive folder. The folder (and the optional structure of subfolders) can be selected in the settings panel.", "license": "GNU GPLv3+", - "version": "2.0", + "version": "2.1", "authors": [ { "name": "Thomas Bruederli", "email": "roundcube@gmail.com", "role": "Lead" + }, + { + "name": "Aleksander Machniak", + "email": "alec@alec.pl", + "role": "Developer" } ], "repositories": [ diff --git a/plugins/archive/localization/ca_ES.inc b/plugins/archive/localization/ca_ES.inc index bce2c202a..2fc7e5dbe 100644 --- a/plugins/archive/localization/ca_ES.inc +++ b/plugins/archive/localization/ca_ES.inc @@ -19,10 +19,10 @@ $labels['buttontext'] = 'Arxiva'; $labels['buttontitle'] = 'Arxiva aquest missatge'; $labels['archived'] = 'Arxivat correctament'; $labels['archivedreload'] = 'Arxivat correctament. Recarregueu la pà gina per veure les noves carpetes de l\'arxiu.'; -$labels['archiveerror'] = 'Alguns missatges no han pogut ser arxivats'; -$labels['archivefolder'] = 'Arxiva'; +$labels['archiveerror'] = 'Alguns missatges no s\'han pogut arxivar'; +$labels['archivefolder'] = 'Arxiu'; $labels['settingstitle'] = 'Arxiu'; -$labels['archivetype'] = 'Dividir arxiu per'; +$labels['archivetype'] = 'Divideix arxiu per'; $labels['archivetypeyear'] = 'Any (p.ex. Arxiu/2012)'; $labels['archivetypemonth'] = 'Mes (p.ex. Arxiu/2012/06)'; $labels['archivetypefolder'] = 'Carpeta original'; diff --git a/plugins/archive/localization/en_CA.inc b/plugins/archive/localization/en_CA.inc new file mode 100644 index 000000000..58cb7f439 --- /dev/null +++ b/plugins/archive/localization/en_CA.inc @@ -0,0 +1,31 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/archive/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Archive plugin | + | Copyright (C) 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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ +*/ +$labels['buttontext'] = 'Archive'; +$labels['buttontitle'] = 'Archive this message'; +$labels['archived'] = 'Successfully archived'; +$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.'; +$labels['archiveerror'] = 'Some messages could not be archived'; +$labels['archivefolder'] = 'Archive'; +$labels['settingstitle'] = 'Archive'; +$labels['archivetype'] = 'Divide archive by'; +$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)'; +$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)'; +$labels['archivetypefolder'] = 'Original folder'; +$labels['archivetypesender'] = 'Sender email'; +$labels['unkownsender'] = 'unknown'; +?> diff --git a/plugins/archive/localization/en_GB.inc b/plugins/archive/localization/en_GB.inc index 5c03b82d5..58cb7f439 100644 --- a/plugins/archive/localization/en_GB.inc +++ b/plugins/archive/localization/en_GB.inc @@ -18,5 +18,14 @@ $labels['buttontext'] = 'Archive'; $labels['buttontitle'] = 'Archive this message'; $labels['archived'] = 'Successfully archived'; +$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.'; +$labels['archiveerror'] = 'Some messages could not be archived'; $labels['archivefolder'] = 'Archive'; +$labels['settingstitle'] = 'Archive'; +$labels['archivetype'] = 'Divide archive by'; +$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)'; +$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)'; +$labels['archivetypefolder'] = 'Original folder'; +$labels['archivetypesender'] = 'Sender email'; +$labels['unkownsender'] = 'unknown'; ?> diff --git a/plugins/archive/localization/es_419.inc b/plugins/archive/localization/es_419.inc new file mode 100644 index 000000000..3f26a018e --- /dev/null +++ b/plugins/archive/localization/es_419.inc @@ -0,0 +1,29 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/archive/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Archive plugin | + | Copyright (C) 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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ +*/ +$labels['buttontext'] = 'Archivo'; +$labels['buttontitle'] = 'Archivar este mensaje'; +$labels['archived'] = 'Archivado exitosamente'; +$labels['archivedreload'] = 'Achivado exitosamente. '; +$labels['archiveerror'] = 'Algunos mensajes no pudieron ser archivados'; +$labels['archivefolder'] = 'Archivo'; +$labels['archivetype'] = 'Dividir archivo por'; +$labels['archivetypeyear'] = 'Año (ej. Archivo/2012)'; +$labels['archivetypemonth'] = 'Mes (ej. Archivo/2012/06)'; +$labels['archivetypefolder'] = 'Carpeta original'; +$labels['unkownsender'] = 'desconocido'; +?> diff --git a/plugins/archive/localization/fo_FO.inc b/plugins/archive/localization/fo_FO.inc new file mode 100644 index 000000000..2022b41dd --- /dev/null +++ b/plugins/archive/localization/fo_FO.inc @@ -0,0 +1,31 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/archive/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Archive plugin | + | Copyright (C) 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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ +*/ +$labels['buttontext'] = 'Goym à skjalasavni'; +$labels['buttontitle'] = 'Goym hetta boð à skjalasavni'; +$labels['archived'] = 'Goymt à skjalasavn'; +$labels['archivedreload'] = 'Goymt à skjalasavn. Les inn aftur sÃðu fyri at sÃggja nýggjar mappur'; +$labels['archiveerror'] = 'Onkur boð kundu ikki leggjast à skjalagoymslu'; +$labels['archivefolder'] = 'Goym à skjalasavni'; +$labels['settingstitle'] = 'Goym à skjalasavni'; +$labels['archivetype'] = 'Deil skjalagoymslu við'; +$labels['archivetypeyear'] = 'Ãr (t.d. Skjalagoymsla/2012)'; +$labels['archivetypemonth'] = 'Mánar(t.d. Skjalahgoymsla/2012/06)'; +$labels['archivetypefolder'] = 'Uppruna mappa'; +$labels['archivetypesender'] = 'Sendara teldupostur'; +$labels['unkownsender'] = 'ókent'; +?> diff --git a/plugins/archive/localization/gl_ES.inc b/plugins/archive/localization/gl_ES.inc index 1eda2542b..7ce96a0df 100644 --- a/plugins/archive/localization/gl_ES.inc +++ b/plugins/archive/localization/gl_ES.inc @@ -18,7 +18,7 @@ $labels['buttontext'] = 'Arquivo'; $labels['buttontitle'] = 'Arquivar esta mensaxe'; $labels['archived'] = 'Aquivouse a mensaxe'; -$labels['archivedreload'] = 'Arquivado correctamente. Recargue a páxina para ver os novos cartafoles de arquivado.'; +$labels['archivedreload'] = 'Arquivado correctamente. Recargua a páxina para ver os novos cartafoles de arquivado.'; $labels['archiveerror'] = 'Non se puideron arquivar algunhas mensaxes'; $labels['archivefolder'] = 'Arquivo'; $labels['settingstitle'] = 'Arquivar'; @@ -26,6 +26,6 @@ $labels['archivetype'] = 'Dividir o arquivo por'; $labels['archivetypeyear'] = 'Ano (p.ex. Arquivo/2012)'; $labels['archivetypemonth'] = 'Mes (p.ex. Arquivo/2012/06)'; $labels['archivetypefolder'] = 'Cartafol orixe'; -$labels['archivetypesender'] = 'Enderezo do remitente'; +$labels['archivetypesender'] = 'Enderezo da persoa remitente'; $labels['unkownsender'] = 'descoñecido'; ?> diff --git a/plugins/archive/localization/hr_HR.inc b/plugins/archive/localization/hr_HR.inc index 2a99cb687..e6334cce0 100644 --- a/plugins/archive/localization/hr_HR.inc +++ b/plugins/archive/localization/hr_HR.inc @@ -17,6 +17,15 @@ */ $labels['buttontext'] = 'Arhiva'; $labels['buttontitle'] = 'Arhiviraj poruku'; -$labels['archived'] = 'UspjeÅ¡no arhivirana'; +$labels['archived'] = 'UspjeÅ¡no arhivirano'; +$labels['archivedreload'] = 'UspjeÅ¡no arhivirano. Osvježite stranicu kako biste vidjeli nove arhivske mape.'; +$labels['archiveerror'] = 'Neke poruke nije bilo moguće arhivirati'; $labels['archivefolder'] = 'Arhiva'; +$labels['settingstitle'] = 'Arhiva'; +$labels['archivetype'] = 'Podijeli arhivu po'; +$labels['archivetypeyear'] = 'Godina (npr. Arhiva/2012)'; +$labels['archivetypemonth'] = 'Mjesec (e.g. Arhiva/2012/06)'; +$labels['archivetypefolder'] = 'Izvorna mapa'; +$labels['archivetypesender'] = 'E-mail adresa poÅ¡iljatelja'; +$labels['unkownsender'] = 'nepoznato'; ?> diff --git a/plugins/archive/localization/hy_AM.inc b/plugins/archive/localization/hy_AM.inc index a380346d4..47fc8d6f6 100644 --- a/plugins/archive/localization/hy_AM.inc +++ b/plugins/archive/localization/hy_AM.inc @@ -18,5 +18,14 @@ $labels['buttontext'] = 'Ô±Ö€ÕÕ«Õ¾'; $labels['buttontitle'] = 'Ô±Ö€ÕÕ«Õ¾Õ¡ÖÕ¶Õ¥Õ¬ Õ¡ÕµÕ½ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨'; $labels['archived'] = 'Ô²Õ¡Ö€Õ¥Õ°Õ¡Õ»Õ¸Õ² Õ¡Ö€ÕÕ«Õ¾Õ¡ÖÕ¾Õ¥Ö'; +$labels['archivedreload'] = 'Ô²Õ¡Ö€Õ¥Õ°Õ¡Õ»Õ¸Õ² Õ¡Ö€ÕÕ«Õ¾Õ¡ÖÕ¾Õ¥Ö: ÕŽÕ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Ö„ Õ§Õ»Õ¨ Õ¶Õ¸Ö€ Õ¡Ö€ÕÕ«Õ¾Õ¡ÖÕ¾Õ¡Õ® ÕºÕ¡Õ¶Õ¡Õ¯Õ¶Õ¥Ö€Õ¨ Õ¿Õ¥Õ½Õ¶Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€:'; +$labels['archiveerror'] = 'ÕˆÖ€Õ¸Õ· Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€ Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ¡Ö€ÕÕ«Õ¾Õ¡ÖÕ¶Õ¥Õ¬'; $labels['archivefolder'] = 'Ô±Ö€ÕÕ«Õ¾'; +$labels['settingstitle'] = 'Ô±Ö€ÕÕ«Õ¾'; +$labels['archivetype'] = 'Ô²Õ¡ÕªÕ¡Õ¶Õ¥Õ¬ Õ¡Ö€ÕÕ«Õ¾Õ¨'; +$labels['archivetypeyear'] = 'ÕÕ¡Ö€Õ¥Õ©Õ«Õ¾ (Ö…Ö€.Õ Ô±Ö€ÕÕ«Õ¾/2012)'; +$labels['archivetypemonth'] = 'Ô±Õ´Õ½Õ¡Õ©Õ«Õ¾ (Ö…Ö€.Õ Ô±Ö€ÕÕ«Õ¾/2012/06)'; +$labels['archivetypefolder'] = 'Ô±Õ¼Õ¡Õ»Õ«Õ¶ ÕºÕ¡Õ¶Õ¡Õ¯Õ¨'; +$labels['archivetypesender'] = 'ÕˆÖ‚Õ²Õ¡Ö€Õ¯Õ¸Õ²Õ« Õ§Õ¬-ÖƒÕ¸Õ½Õ¿Õ¨'; +$labels['unkownsender'] = 'Õ¡Õ¶Õ°Õ¡ÕµÕ¿'; ?> diff --git a/plugins/archive/localization/km_KH.inc b/plugins/archive/localization/km_KH.inc index d4b1c3baa..ab2e5e2cc 100644 --- a/plugins/archive/localization/km_KH.inc +++ b/plugins/archive/localization/km_KH.inc @@ -16,7 +16,16 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ */ $labels['buttontext'] = 'áž”áŸážŽáŸ’ណសារ'; -$labels['buttontitle'] = 'áž”áŸážŽáŸ’ណសារ សារលិážáž·áž áž“áŸáŸ‡'; -$labels['archived'] = 'áž”áŸážŽáŸ’ណសារ បានសំរáŸáž…'; +$labels['buttontitle'] = 'ធ្វើ​សារ​នáŸáŸ‡â€‹áž‡áž¶â€‹áž”ណ្ណសារ'; +$labels['archived'] = 'ធ្វើ​ជា​បណ្ណសារ​បាន​សម្រáŸáž…'; +$labels['archivedreload'] = 'ធ្វើ​ជា​បណ្ណសារ​បាន​សម្រáŸáž…។ ផ្ទុក​ទំពáŸážšâ€‹áž¡áž¾áž„​វិញ ដើម្បី​មើល​ážážâ€‹áž”ណ្ណសារ​ážáŸ’មី។'; +$labels['archiveerror'] = 'សារ​ážáŸ’លះ​មិន​អាច​ážáŸ’រូវ​បាន​ធ្វើ​ជា​បណ្ណសារ​ទáŸ'; $labels['archivefolder'] = 'áž”áŸážŽáŸ’ណសារ'; +$labels['settingstitle'] = 'បណ្ណសារ'; +$labels['archivetype'] = 'ចែក​បណ្ណសារ​ážáž¶áž˜'; +$labels['archivetypeyear'] = 'ឆ្នាំ (ឧទា. បណ្ណសារ/2012)'; +$labels['archivetypemonth'] = 'ážáŸ‚ (ឧទា. បណ្ណសារ/2012/06)'; +$labels['archivetypefolder'] = 'ážážâ€‹ážŠáž¾áž˜'; +$labels['archivetypesender'] = 'អ្នក​ផ្ញើ​អ៊ីមែល'; +$labels['unkownsender'] = 'មិន​ស្គាល់'; ?> diff --git a/plugins/archive/localization/mn_MN.inc b/plugins/archive/localization/mn_MN.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/mn_MN.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/ms_MY.inc b/plugins/archive/localization/ms_MY.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/ms_MY.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/my_MM.inc b/plugins/archive/localization/my_MM.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/my_MM.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/nl_BE.inc b/plugins/archive/localization/nl_BE.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/nl_BE.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/nqo.inc b/plugins/archive/localization/nqo.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/nqo.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/om.inc b/plugins/archive/localization/om.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/om.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/sk_SK.inc b/plugins/archive/localization/sk_SK.inc index f3f447b90..79506f650 100644 --- a/plugins/archive/localization/sk_SK.inc +++ b/plugins/archive/localization/sk_SK.inc @@ -17,14 +17,14 @@ */ $labels['buttontext'] = 'ArchivovaÅ¥'; $labels['buttontitle'] = 'ArchivovaÅ¥ túto správu'; -$labels['archived'] = 'ÚspeÅ¡ne archivované'; +$labels['archived'] = 'ÚspeÅ¡ne uložené do archÃvu'; $labels['archivedreload'] = 'Archivovanie bolo úspeÅ¡ne dokonÄené. Ak si chcete prezrieÅ¥ nové archÃvne prieÄinky, obnovte stránku.'; $labels['archiveerror'] = 'Niektoré správy nebolo možné archivovaÅ¥'; $labels['archivefolder'] = 'ArchivovaÅ¥'; $labels['settingstitle'] = 'ArchÃv'; $labels['archivetype'] = 'RozdeliÅ¥ archÃv po'; -$labels['archivetypeyear'] = 'Rok (naprÃklad ArchÃv/2012)'; -$labels['archivetypemonth'] = 'Mesiac (naprÃklad ArchÃv/2012/06)'; +$labels['archivetypeyear'] = 'rokoch (naprÃklad ArchÃv/2012)'; +$labels['archivetypemonth'] = 'mesiacoch (naprÃklad ArchÃv/2012/06)'; $labels['archivetypefolder'] = 'Pôvodný prieÄinok'; $labels['archivetypesender'] = 'E-mailová adresa odosielateľa'; $labels['unkownsender'] = 'neznámy'; diff --git a/plugins/archive/localization/te_IN.inc b/plugins/archive/localization/te_IN.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/te_IN.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/th_TH.inc b/plugins/archive/localization/th_TH.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/th_TH.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/ti.inc b/plugins/archive/localization/ti.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/ti.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/tzm.inc b/plugins/archive/localization/tzm.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/tzm.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/uk_UA.inc b/plugins/archive/localization/uk_UA.inc index d2b461fca..92fbc79ea 100644 --- a/plugins/archive/localization/uk_UA.inc +++ b/plugins/archive/localization/uk_UA.inc @@ -18,5 +18,14 @@ $labels['buttontext'] = 'Ðрхів'; $labels['buttontitle'] = 'Ðрхівувати це повідомленнÑ'; $labels['archived'] = 'ПеренеÑено в архів'; +$labels['archivedreload'] = 'Ðрхівацію уÑпішно завершено. Перезавантажте Ñторінку щоб побачити теку з архівами.'; +$labels['archiveerror'] = 'ДеÑкі Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð½ÐµÐ¼Ð¾Ð¶ÑƒÑ‚ÑŒ бути зархівованими'; $labels['archivefolder'] = 'Ðрхів'; +$labels['settingstitle'] = 'Ðрхів'; +$labels['archivetype'] = 'Розділіть архів по'; +$labels['archivetypeyear'] = 'Рік (наприклад Ðрхів/2012)'; +$labels['archivetypemonth'] = 'МіÑÑць (наприклад Ðрхів/2012/06)'; +$labels['archivetypefolder'] = 'Оригінальний каталог'; +$labels['archivetypesender'] = 'Відправник email'; +$labels['unkownsender'] = 'невідомо'; ?> diff --git a/plugins/archive/localization/ur_PK.inc b/plugins/archive/localization/ur_PK.inc deleted file mode 100644 index 8e95162d5..000000000 --- a/plugins/archive/localization/ur_PK.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Archive plugin | - | Copyright (C) 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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ -*/ -?> diff --git a/plugins/archive/localization/vi_VN.inc b/plugins/archive/localization/vi_VN.inc index 61e02085b..b2fe3899a 100644 --- a/plugins/archive/localization/vi_VN.inc +++ b/plugins/archive/localization/vi_VN.inc @@ -18,5 +18,14 @@ $labels['buttontext'] = 'LÆ°u trữ'; $labels['buttontitle'] = 'LÆ°u lại bức thÆ° nà y'; $labels['archived'] = 'LÆ°u lại thà nh công'; +$labels['archivedreload'] = 'Äã lÆ°u thà nh công. Tải lại trang nà y để thấy các thÆ° mục lÆ°u trữ má»›i.'; +$labels['archiveerror'] = 'Má»™t số thÆ° không thể lÆ°u lại được'; $labels['archivefolder'] = 'LÆ°u trữ'; +$labels['settingstitle'] = 'LÆ°u trữ'; +$labels['archivetype'] = 'Chia bá»™ lÆ°u trữ bởi'; +$labels['archivetypeyear'] = 'Năm (và dụ: LÆ°u trữ/2012)'; +$labels['archivetypemonth'] = 'Tháng (và dụ: LÆ°u trữ/2012/06)'; +$labels['archivetypefolder'] = 'ThÆ° mục nguyên gốc'; +$labels['archivetypesender'] = 'Äịa chỉ thÆ° Ä‘iện tá» của ngÆ°á»i gá»i'; +$labels['unkownsender'] = 'Không rõ'; ?> diff --git a/plugins/archive/package.xml b/plugins/archive/package.xml index 62a009a99..ec3323e4b 100644 --- a/plugins/archive/package.xml +++ b/plugins/archive/package.xml @@ -13,9 +13,15 @@ <email>roundcube@gmail.com</email> <active>yes</active> </lead> - <date>2013-01-20</date> + <lead> + <name>Aleksander Machniak</name> + <user>alec</user> + <email>alec@alec.pl</email> + <active>yes</active> + </lead> + <date>2013-10-30</date> <version> - <release>2.0</release> + <release>2.1</release> <api>2.0</api> </version> <stability> diff --git a/plugins/archive/skins/classic/archive.css b/plugins/archive/skins/classic/archive.css index 3880fe3da..fc5984b39 100644 --- a/plugins/archive/skins/classic/archive.css +++ b/plugins/archive/skins/classic/archive.css @@ -4,7 +4,7 @@ background: url(archive_act.png) 0 0 no-repeat; } -#mailboxlist li.mailbox.archive { +#mailboxlist li.mailbox.archive > a { background-image: url(foldericon.png); background-position: 5px 1px; } diff --git a/plugins/attachment_reminder/localization/ca_ES.inc b/plugins/attachment_reminder/localization/ca_ES.inc index 957548bfb..ca22fbd41 100644 --- a/plugins/attachment_reminder/localization/ca_ES.inc +++ b/plugins/attachment_reminder/localization/ca_ES.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ */ -$messages['forgotattachment'] = "Heu oblidat afegir un fitxer?"; -$messages['reminderoption'] = "AvÃs de fitxers adjunts oblidats"; +$messages['forgotattachment'] = "Us heu oblidat afegir un fitxer?"; +$messages['reminderoption'] = "Recordatori de fitxers adjunts oblidats"; $messages['keywords'] = "adjunt,fitxer,adjuntar,adjuntat,adjuntant,CV,carta"; diff --git a/plugins/attachment_reminder/localization/el_GR.inc b/plugins/attachment_reminder/localization/el_GR.inc index e47995f3a..c0d01b404 100644 --- a/plugins/attachment_reminder/localization/el_GR.inc +++ b/plugins/attachment_reminder/localization/el_GR.inc @@ -16,5 +16,5 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ */ $messages['forgotattachment'] = "Μήπως ξεχάσετε να επισυνάψετε Îνα αÏχείο; "; -$messages['reminderoption'] = "ΥπενθÏμιση ξεχάσmena συνημμÎνα "; +$messages['reminderoption'] = "Μήπως ξεχάσετε να επισυνάψετε Îνα αÏχείο; "; $messages['keywords'] = "συνημμÎνο, αÏχείο, συννημενο, επισυναψη, επισυνάπτοντας, κλειστό, βιογÏαφικό σημείωμα, συνοδευτική επιστολή"; diff --git a/plugins/archive/localization/ar.inc b/plugins/attachment_reminder/localization/en_CA.inc index 8e95162d5..730e206f7 100644 --- a/plugins/archive/localization/ar.inc +++ b/plugins/attachment_reminder/localization/en_CA.inc @@ -2,7 +2,7 @@ /* +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | + | plugins/attachment_reminder/localization/<lang>.inc | | | | Localization file of the Roundcube Webmail Archive plugin | | Copyright (C) 2013, The Roundcube Dev Team | @@ -13,6 +13,8 @@ | | +-----------------------------------------------------------------------+ - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ */ -?> +$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"; diff --git a/plugins/attachment_reminder/localization/en_GB.inc b/plugins/attachment_reminder/localization/en_GB.inc new file mode 100644 index 000000000..730e206f7 --- /dev/null +++ b/plugins/attachment_reminder/localization/en_GB.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/attachment_reminder/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Archive plugin | + | Copyright (C) 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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ +*/ +$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"; diff --git a/plugins/attachment_reminder/localization/es_419.inc b/plugins/attachment_reminder/localization/es_419.inc new file mode 100644 index 000000000..0c9a33bfe --- /dev/null +++ b/plugins/attachment_reminder/localization/es_419.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/attachment_reminder/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Archive plugin | + | Copyright (C) 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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ +*/ +$messages['forgotattachment'] = "¿Has olvidado adjuntar un archivo?"; +$messages['reminderoption'] = "Recordar si olvido adjuntar archivos"; +$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter"; diff --git a/plugins/archive/localization/bn_BD.inc b/plugins/attachment_reminder/localization/es_MX.inc index 8e95162d5..c3b4aaa02 100644 --- a/plugins/archive/localization/bn_BD.inc +++ b/plugins/attachment_reminder/localization/es_MX.inc @@ -2,7 +2,7 @@ /* +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | + | plugins/attachment_reminder/localization/<lang>.inc | | | | Localization file of the Roundcube Webmail Archive plugin | | Copyright (C) 2013, The Roundcube Dev Team | @@ -13,6 +13,8 @@ | | +-----------------------------------------------------------------------+ - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ */ -?> +$messages['forgotattachment'] = ""; +$messages['reminderoption'] = ""; +$messages['keywords'] = ""; diff --git a/plugins/attachment_reminder/localization/fi_FI.inc b/plugins/attachment_reminder/localization/fi_FI.inc index 53d2a9abb..a39d8b28d 100644 --- a/plugins/attachment_reminder/localization/fi_FI.inc +++ b/plugins/attachment_reminder/localization/fi_FI.inc @@ -17,4 +17,4 @@ */ $messages['forgotattachment'] = "Unohditko liittää tiedoston?"; $messages['reminderoption'] = "Muistuta mahdollisesti unohtuneista liitteistä"; -$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter,liite,tiedosto,liitteenä,liitetiedosto"; +$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter,liite,tiedosto,liitteenä,liitetiedosto,ansioluettelo"; diff --git a/plugins/archive/localization/ia.inc b/plugins/attachment_reminder/localization/fo_FO.inc index 8e95162d5..260ec0361 100644 --- a/plugins/archive/localization/ia.inc +++ b/plugins/attachment_reminder/localization/fo_FO.inc @@ -2,7 +2,7 @@ /* +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | + | plugins/attachment_reminder/localization/<lang>.inc | | | | Localization file of the Roundcube Webmail Archive plugin | | Copyright (C) 2013, The Roundcube Dev Team | @@ -13,6 +13,8 @@ | | +-----------------------------------------------------------------------+ - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ */ -?> +$messages['forgotattachment'] = "Gloymdi tú at viðhefta ein fÃl?"; +$messages['reminderoption'] = "Ãminn um gloymdar viðheftingar"; +$messages['keywords'] = "viðhefting,fÃlur,heft,viðheft,heftir,lagt innÃ,CV,fylgi skriv"; diff --git a/plugins/attachment_reminder/localization/gl_ES.inc b/plugins/attachment_reminder/localization/gl_ES.inc index bd126b2af..a45f63bd1 100644 --- a/plugins/attachment_reminder/localization/gl_ES.inc +++ b/plugins/attachment_reminder/localization/gl_ES.inc @@ -17,4 +17,4 @@ */ $messages['forgotattachment'] = "Esqueceches adxuntar un ficheiro?"; $messages['reminderoption'] = "Lembrete de adxuntos esquecidos"; -$messages['keywords'] = "adxunto,ficheiro,engádega, engadido,engadindo,anexo,CV,cuberta,carta"; +$messages['keywords'] = "anexo, arquivo, engadir, anexo, anexando, pechado, CV, carta de presentación"; diff --git a/plugins/attachment_reminder/localization/hr_HR.inc b/plugins/attachment_reminder/localization/hr_HR.inc new file mode 100644 index 000000000..4037b16e9 --- /dev/null +++ b/plugins/attachment_reminder/localization/hr_HR.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/attachment_reminder/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Archive plugin | + | Copyright (C) 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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ +*/ +$messages['forgotattachment'] = "Jeste li zaboravili dodati privitak?"; +$messages['reminderoption'] = "Podsjeti na zaboravljen privitak"; +$messages['keywords'] = "privitak,datoteka,dodati,dodano,dodajem,u privitku,CV,motivacijsko pismo"; diff --git a/plugins/attachment_reminder/localization/km_KH.inc b/plugins/attachment_reminder/localization/km_KH.inc new file mode 100644 index 000000000..f6b207c1a --- /dev/null +++ b/plugins/attachment_reminder/localization/km_KH.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/attachment_reminder/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Archive plugin | + | Copyright (C) 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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ +*/ +$messages['forgotattachment'] = "ážáž¾áž¢áŸ’នក​ភ្លáŸáž…​ភ្ជាប់​ឯកសារ​ឬ?"; +$messages['reminderoption'] = "រំលឹង​អំពី​ឯកសារ​ភ្ជាប់​ដែល​បាន​ភ្លáŸáž…"; +$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter"; diff --git a/plugins/archive/localization/hi_IN.inc b/plugins/attachment_reminder/localization/kn_IN.inc index 8e95162d5..9783afa97 100644 --- a/plugins/archive/localization/hi_IN.inc +++ b/plugins/attachment_reminder/localization/kn_IN.inc @@ -2,7 +2,7 @@ /* +-----------------------------------------------------------------------+ - | plugins/archive/localization/<lang>.inc | + | plugins/attachment_reminder/localization/<lang>.inc | | | | Localization file of the Roundcube Webmail Archive plugin | | Copyright (C) 2013, The Roundcube Dev Team | @@ -13,6 +13,8 @@ | | +-----------------------------------------------------------------------+ - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ */ -?> +$messages['forgotattachment'] = "ನೀವೠಫೈಲೠಅಟà³à²¯à²¾à²šà³ ಮಾಡಲೠಮರೆತಿರà³à²µà²¿à²°à²¾?"; +$messages['reminderoption'] = ""; +$messages['keywords'] = ""; diff --git a/plugins/attachment_reminder/localization/pt_BR.inc b/plugins/attachment_reminder/localization/pt_BR.inc index b06e8923e..4b61e951c 100644 --- a/plugins/attachment_reminder/localization/pt_BR.inc +++ b/plugins/attachment_reminder/localization/pt_BR.inc @@ -16,5 +16,5 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ */ $messages['forgotattachment'] = "Você esqueceu-se de anexar um arquivo?"; -$messages['reminderoption'] = "Alertar quando os anexos forem esquecidos"; +$messages['reminderoption'] = "Alertar sobre o possÃvel esquecimento de anexos"; $messages['keywords'] = "anexo,arquivo,anexar,anexado,anexando,incluso,CV,currÃculo"; diff --git a/plugins/attachment_reminder/localization/uk_UA.inc b/plugins/attachment_reminder/localization/uk_UA.inc index c3b4aaa02..122fb2bee 100644 --- a/plugins/attachment_reminder/localization/uk_UA.inc +++ b/plugins/attachment_reminder/localization/uk_UA.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ */ -$messages['forgotattachment'] = ""; -$messages['reminderoption'] = ""; +$messages['forgotattachment'] = "Ви забули прикріпити файл?"; +$messages['reminderoption'] = "Ðагадати про забуте вкладеннÑ"; $messages['keywords'] = ""; diff --git a/plugins/attachment_reminder/localization/vi_VN.inc b/plugins/attachment_reminder/localization/vi_VN.inc index c3b4aaa02..b5604302b 100644 --- a/plugins/attachment_reminder/localization/vi_VN.inc +++ b/plugins/attachment_reminder/localization/vi_VN.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/ */ -$messages['forgotattachment'] = ""; -$messages['reminderoption'] = ""; -$messages['keywords'] = ""; +$messages['forgotattachment'] = "Bạn đã quên không Ä‘Ãnh kèm tệp tin?"; +$messages['reminderoption'] = "Nhắc vá» tệp tin Ä‘Ãnh kèm bị quên"; +$messages['keywords'] = "tệp Ä‘Ãnh kèm,tệp tin,Ä‘Ãnh kèm,đã Ä‘Ãnh kèm,Ä‘ang Ä‘Ãnh kèm táºp tin,Ä‘Ãnh kèm,CV,thÆ° mở đầu"; diff --git a/plugins/enigma/README b/plugins/enigma/README index 22d6e513a..c4e474be2 100644 --- a/plugins/enigma/README +++ b/plugins/enigma/README @@ -12,6 +12,7 @@ Enigma Plugin Status: - Handling of PGP keys files attached to incoming messages - PGP encrypted messages decryption (started) - PGP keys management UI (started) +- S/MIME signatures verification (started) * TODO (must have): diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php index 25520a27d..870b923b6 100644 --- a/plugins/enigma/enigma.php +++ b/plugins/enigma/enigma.php @@ -179,10 +179,11 @@ class enigma extends rcube_plugin { // add labels $this->add_texts('localization/'); - +/* $p['list']['enigmasettings'] = array( 'id' => 'enigmasettings', 'section' => $this->gettext('enigmasettings'), ); +*/ $p['list']['enigmacerts'] = array( 'id' => 'enigmacerts', 'section' => $this->gettext('enigmacerts'), ); @@ -203,11 +204,13 @@ class enigma extends rcube_plugin */ function preferences_list($p) { +/* if ($p['section'] == 'enigmasettings') { // This makes that section is not removed from the list $p['blocks']['dummy']['options']['dummy'] = array(); } - else if ($p['section'] == 'enigmacerts') { + else */ + if ($p['section'] == 'enigmacerts') { // This makes that section is not removed from the list $p['blocks']['dummy']['options']['dummy'] = array(); } @@ -313,18 +316,24 @@ class enigma extends rcube_plugin $attrib['id'] = 'enigma-message'; if ($sig instanceof enigma_signature) { - if ($sig->valid) { + $sender = ($sig->name ? $sig->name . ' ' : '') . '<' . $sig->email . '>'; + + if ($sig->valid === enigma_error::E_UNVERIFIED) { + $attrib['class'] = 'enigmawarning'; + $msg = str_replace('$sender', $sender, $this->gettext('sigunverified')); + $msg = str_replace('$keyid', $sig->id, $msg); + $msg = rcube::Q($msg); + } + else if ($sig->valid) { $attrib['class'] = 'enigmanotice'; - $sender = ($sig->name ? $sig->name . ' ' : '') . '<' . $sig->email . '>'; $msg = rcube::Q(str_replace('$sender', $sender, $this->gettext('sigvalid'))); } else { $attrib['class'] = 'enigmawarning'; - $sender = ($sig->name ? $sig->name . ' ' : '') . '<' . $sig->email . '>'; $msg = rcube::Q(str_replace('$sender', $sender, $this->gettext('siginvalid'))); } } - else if ($sig->getCode() == enigma_error::E_KEYNOTFOUND) { + else if ($sig && $sig->getCode() == enigma_error::E_KEYNOTFOUND) { $attrib['class'] = 'enigmawarning'; $msg = rcube::Q(str_replace('$keyid', enigma_key::format_id($sig->getData('id')), $this->gettext('signokey'))); diff --git a/plugins/enigma/lib/enigma_driver_gnupg.php b/plugins/enigma/lib/enigma_driver_gnupg.php index 5aa32217e..c4280a089 100644 --- a/plugins/enigma/lib/enigma_driver_gnupg.php +++ b/plugins/enigma/lib/enigma_driver_gnupg.php @@ -76,7 +76,7 @@ class enigma_driver_gnupg extends enigma_driver // Create Crypt_GPG object try { - $this->gpg = new Crypt_GPG(array( + $this->gpg = new Crypt_GPG(array( 'homedir' => $this->homedir, // 'debug' => true, )); @@ -89,20 +89,20 @@ class enigma_driver_gnupg extends enigma_driver function encrypt($text, $keys) { /* - foreach ($keys as $key) { - $this->gpg->addEncryptKey($key); - } - $enc = $this->gpg->encrypt($text); - return $enc; + foreach ($keys as $key) { + $this->gpg->addEncryptKey($key); + } + $enc = $this->gpg->encrypt($text); + return $enc; */ } function decrypt($text, $key, $passwd) { -// $this->gpg->addDecryptKey($key, $passwd); +// $this->gpg->addDecryptKey($key, $passwd); try { - $dec = $this->gpg->decrypt($text); - return $dec; + $dec = $this->gpg->decrypt($text); + return $dec; } catch (Exception $e) { return $this->get_error_from_exception($e); @@ -112,17 +112,17 @@ class enigma_driver_gnupg extends enigma_driver function sign($text, $key, $passwd) { /* - $this->gpg->addSignKey($key, $passwd); - $signed = $this->gpg->sign($text, Crypt_GPG::SIGN_MODE_DETACHED); - return $signed; + $this->gpg->addSignKey($key, $passwd); + $signed = $this->gpg->sign($text, Crypt_GPG::SIGN_MODE_DETACHED); + return $signed; */ } function verify($text, $signature) { try { - $verified = $this->gpg->verify($text, $signature); - return $this->parse_signature($verified[0]); + $verified = $this->gpg->verify($text, $signature); + return $this->parse_signature($verified[0]); } catch (Exception $e) { return $this->get_error_from_exception($e); @@ -141,11 +141,11 @@ class enigma_driver_gnupg extends enigma_driver return $this->get_error_from_exception($e); } } - + public function list_keys($pattern='') { try { - $keys = $this->gpg->getKeys($pattern); + $keys = $this->gpg->getKeys($pattern); $result = array(); //print_r($keys); foreach ($keys as $idx => $key) { @@ -153,13 +153,13 @@ class enigma_driver_gnupg extends enigma_driver unset($keys[$idx]); } //print_r($result); - return $result; + return $result; } catch (Exception $e) { return $this->get_error_from_exception($e); } } - + public function get_key($keyid) { $list = $this->list_keys($keyid); @@ -167,7 +167,7 @@ class enigma_driver_gnupg extends enigma_driver if (is_array($list)) return array_shift($list); - // error + // error return $list; } @@ -178,14 +178,12 @@ class enigma_driver_gnupg extends enigma_driver public function del_key($keyid) { // $this->get_key($keyid); - - } - + public function del_privkey($keyid) { try { - $this->gpg->deletePrivateKey($keyid); + $this->gpg->deletePrivateKey($keyid); return true; } catch (Exception $e) { @@ -196,14 +194,14 @@ class enigma_driver_gnupg extends enigma_driver public function del_pubkey($keyid) { try { - $this->gpg->deletePublicKey($keyid); + $this->gpg->deletePublicKey($keyid); return true; } catch (Exception $e) { return $this->get_error_from_exception($e); } } - + /** * Converts Crypt_GPG exception into Enigma's error object * @@ -281,7 +279,7 @@ class enigma_driver_gnupg extends enigma_driver $ekey->users[$idx] = $id; } - + $ekey->name = trim($ekey->users[0]->name . ' <' . $ekey->users[0]->email . '>'); foreach ($key->getSubKeys() as $idx => $subkey) { @@ -297,9 +295,9 @@ class enigma_driver_gnupg extends enigma_driver $ekey->subkeys[$idx] = $skey; }; - + $ekey->id = $ekey->subkeys[0]->id; - + return $ekey; } } diff --git a/plugins/enigma/lib/enigma_driver_phpssl.php b/plugins/enigma/lib/enigma_driver_phpssl.php new file mode 100644 index 000000000..50af44762 --- /dev/null +++ b/plugins/enigma/lib/enigma_driver_phpssl.php @@ -0,0 +1,238 @@ +<?php +/* + +-------------------------------------------------------------------------+ + | S/MIME driver for the Enigma Plugin | + | | + | This program is free software; you can redistribute it and/or modify | + | it under the terms of the GNU General Public License version 2 | + | as published by the Free Software Foundation. | + | | + | 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, write to the Free Software Foundation, Inc., | + | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | + | | + +-------------------------------------------------------------------------+ + | Author: Aleksander Machniak <alec@alec.pl> | + +-------------------------------------------------------------------------+ +*/ + +class enigma_driver_phpssl extends enigma_driver +{ + private $rc; + //private $gpg; + private $homedir; + private $user; + + function __construct($user) + { + $rcmail = rcmail::get_instance(); + $this->rc = $rcmail; + $this->user = $user; + } + + /** + * Driver initialization and environment checking. + * Should only return critical errors. + * + * @return mixed NULL on success, enigma_error on failure + */ + function init() + { + $homedir = $this->rc->config->get('enigma_smime_homedir', INSTALL_PATH . '/plugins/enigma/home'); + + if (!$homedir) + return new enigma_error(enigma_error::E_INTERNAL, + "Option 'enigma_smime_homedir' not specified"); + + // check if homedir exists (create it if not) and is readable + if (!file_exists($homedir)) + return new enigma_error(enigma_error::E_INTERNAL, + "Keys directory doesn't exists: $homedir"); + if (!is_writable($homedir)) + return new enigma_error(enigma_error::E_INTERNAL, + "Keys directory isn't writeable: $homedir"); + + $homedir = $homedir . '/' . $this->user; + + // check if user's homedir exists (create it if not) and is readable + if (!file_exists($homedir)) + mkdir($homedir, 0700); + + if (!file_exists($homedir)) + return new enigma_error(enigma_error::E_INTERNAL, + "Unable to create keys directory: $homedir"); + if (!is_writable($homedir)) + return new enigma_error(enigma_error::E_INTERNAL, + "Unable to write to keys directory: $homedir"); + + $this->homedir = $homedir; + + } + + function encrypt($text, $keys) + { + } + + function decrypt($text, $key, $passwd) + { + } + + function sign($text, $key, $passwd) + { + } + + function verify($struct, $message) + { + // use common temp dir + $temp_dir = $this->rc->config->get('temp_dir'); + $msg_file = tempnam($temp_dir, 'rcmMsg'); + $cert_file = tempnam($temp_dir, 'rcmCert'); + + $fh = fopen($msg_file, "w"); + if ($struct->mime_id) { + $message->get_part_content($struct->mime_id, $fh, true, 0, false); + } + else { + $this->rc->storage->get_raw_body($message->uid, $fh); + } + fclose($fh); + + // @TODO: use stored certificates + + // try with certificate verification + $sig = openssl_pkcs7_verify($msg_file, 0, $cert_file); + $validity = true; + + if ($sig !== true) { + // try without certificate verification + $sig = openssl_pkcs7_verify($msg_file, PKCS7_NOVERIFY, $cert_file); + $validity = enigma_error::E_UNVERIFIED; + } + + if ($sig === true) { + $sig = $this->parse_sig_cert($cert_file, $validity); + } + else { + $errorstr = $this->get_openssl_error(); + $sig = new enigma_error(enigma_error::E_INTERNAL, $errorstr); + } + + // remove temp files + @unlink($msg_file); + @unlink($cert_file); + + return $sig; + } + + public function import($content, $isfile=false) + { + } + + public function list_keys($pattern='') + { + } + + public function get_key($keyid) + { + } + + public function gen_key($data) + { + } + + public function del_key($keyid) + { + } + + public function del_privkey($keyid) + { + } + + public function del_pubkey($keyid) + { + } + + /** + * Converts Crypt_GPG_Key object into Enigma's key object + * + * @param Crypt_GPG_Key Key object + * + * @return enigma_key Key object + */ + private function parse_key($key) + { +/* + $ekey = new enigma_key(); + + foreach ($key->getUserIds() as $idx => $user) { + $id = new enigma_userid(); + $id->name = $user->getName(); + $id->comment = $user->getComment(); + $id->email = $user->getEmail(); + $id->valid = $user->isValid(); + $id->revoked = $user->isRevoked(); + + $ekey->users[$idx] = $id; + } + + $ekey->name = trim($ekey->users[0]->name . ' <' . $ekey->users[0]->email . '>'); + + foreach ($key->getSubKeys() as $idx => $subkey) { + $skey = new enigma_subkey(); + $skey->id = $subkey->getId(); + $skey->revoked = $subkey->isRevoked(); + $skey->created = $subkey->getCreationDate(); + $skey->expires = $subkey->getExpirationDate(); + $skey->fingerprint = $subkey->getFingerprint(); + $skey->has_private = $subkey->hasPrivate(); + $skey->can_sign = $subkey->canSign(); + $skey->can_encrypt = $subkey->canEncrypt(); + + $ekey->subkeys[$idx] = $skey; + }; + + $ekey->id = $ekey->subkeys[0]->id; + + return $ekey; +*/ + } + + private function get_openssl_error() + { + $tmp = array(); + while ($errorstr = openssl_error_string()) { + $tmp[] = $errorstr; + } + + return join("\n", array_values($tmp)); + } + + private function parse_sig_cert($file, $validity) + { + $cert = openssl_x509_parse(file_get_contents($file)); + + if (empty($cert) || empty($cert['subject'])) { + $errorstr = $this->get_openssl_error(); + return new enigma_error(enigm_error::E_INTERNAL, $errorstr); + } + + $data = new enigma_signature(); + + $data->id = $cert['hash']; //? + $data->valid = $validity; + $data->fingerprint = $cert['serialNumber']; + $data->created = $cert['validFrom_time_t']; + $data->expires = $cert['validTo_time_t']; + $data->name = $cert['subject']['CN']; +// $data->comment = ''; + $data->email = $cert['subject']['emailAddress']; + + return $data; + } + +} diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php index 8a64c07ff..e4972c6a9 100644 --- a/plugins/enigma/lib/enigma_engine.php +++ b/plugins/enigma/lib/enigma_engine.php @@ -92,9 +92,6 @@ class enigma_engine if ($this->smime_driver) return; - // NOT IMPLEMENTED! - return; - $driver = 'enigma_driver_' . $this->rc->config->get('enigma_smime_driver', 'phpssl'); $username = $this->rc->user->get_username(); @@ -246,7 +243,7 @@ class enigma_engine fclose($fh); } - + /** * Handler for PGP/MIME signed message. * Verifies signature. @@ -255,14 +252,14 @@ class enigma_engine */ private function parse_pgp_signed(&$p) { - $this->load_pgp_driver(); - $struct = $p['structure']; - // Verify signature if ($this->rc->action == 'show' || $this->rc->action == 'preview') { + $this->load_pgp_driver(); + $struct = $p['structure']; + $msg_part = $struct->parts[0]; $sig_part = $struct->parts[1]; - + // Get bodies $this->set_part_body($msg_part, $p['object']->uid); $this->set_part_body($sig_part, $p['object']->uid); @@ -294,7 +291,31 @@ class enigma_engine */ private function parse_smime_signed(&$p) { - $this->load_smime_driver(); + // Verify signature + if ($this->rc->action == 'show' || $this->rc->action == 'preview') { + $this->load_smime_driver(); + + $struct = $p['structure']; + $msg_part = $struct->parts[0]; + + // Verify + $sig = $this->smime_driver->verify($struct, $p['object']); + + // Store signature data for display + $this->signatures[$struct->mime_id] = $sig; + + // Message can be multipart (assign signature to each subpart) + if (!empty($msg_part->parts)) { + foreach ($msg_part->parts as $part) + $this->signed_parts[$part->mime_id] = $struct->mime_id; + } + else { + $this->signed_parts[$msg_part->mime_id] = $struct->mime_id; + } + + // Remove signature file from attachments list + unset($struct->parts[1]); + } } /** @@ -306,22 +327,22 @@ class enigma_engine { $this->load_pgp_driver(); $part = $p['structure']; - + // Get body $this->set_part_body($part, $p['object']->uid); - // Decrypt + // Decrypt $result = $this->pgp_decrypt($part->body); - + // Store decryption status $this->decryptions[$part->mime_id] = $result; - + // Parse decrypted message if ($result === true) { // @TODO } } - + /** * Handler for PGP/MIME encrypted message. * @@ -359,7 +380,7 @@ class enigma_engine */ private function parse_smime_encrypted(&$p) { - $this->load_smime_driver(); +// $this->load_smime_driver(); } /** diff --git a/plugins/enigma/lib/enigma_error.php b/plugins/enigma/lib/enigma_error.php index 9f424dc2b..ab8d01557 100644 --- a/plugins/enigma/lib/enigma_error.php +++ b/plugins/enigma/lib/enigma_error.php @@ -34,7 +34,9 @@ class enigma_error const E_KEYNOTFOUND = 3; const E_DELKEY = 4; const E_BADPASS = 5; - + const E_EXPIRED = 6; + const E_UNVERIFIED = 7; + function __construct($code = null, $message = '', $data = array()) { $this->code = $code; diff --git a/plugins/enigma/lib/enigma_ui.php b/plugins/enigma/lib/enigma_ui.php index adb619d0c..2e95938f2 100644 --- a/plugins/enigma/lib/enigma_ui.php +++ b/plugins/enigma/lib/enigma_ui.php @@ -91,7 +91,7 @@ class enigma_ui 'searchform' => array($this->rc->output, 'search_form'), )); $this->rc->output->set_pagetitle($this->enigma->gettext('enigmakeys')); - $this->rc->output->send('enigma.keys'); + $this->rc->output->send('enigma.keys'); } } } @@ -104,11 +104,11 @@ class enigma_ui if ($this->css_loaded) return; - $skin = $this->rc->config->get('skin'); - if (!file_exists($this->home . "/skins/$skin/enigma.css")) - $skin = 'default'; + $skin_path = $this->enigma->local_skin_path(); + if (is_file($this->home . "/$skin_path/enigma.css")) { + $this->enigma->include_stylesheet("$skin_path/enigma.css"); + } - $this->enigma->include_stylesheet("skins/$skin/enigma.css"); $this->css_added = true; } @@ -415,8 +415,8 @@ class enigma_ui // @TODO: make this work with non-default skins $this->enigma->add_button(array( 'name' => 'enigmamenu', - 'imagepas' => 'skins/default/enigma.png', - 'imageact' => 'skins/default/enigma.png', + 'imagepas' => 'skins/classic/enigma.png', + 'imageact' => 'skins/classic/enigma.png', 'onclick' => "rcmail_ui.show_popup('enigmamenu', true); return false", 'title' => 'securityoptions', 'domain' => 'enigma', diff --git a/plugins/enigma/localization/en_US.inc b/plugins/enigma/localization/en_US.inc index e0f03d9a0..f1ff8d1fb 100644 --- a/plugins/enigma/localization/en_US.inc +++ b/plugins/enigma/localization/en_US.inc @@ -1,9 +1,9 @@ <?php $labels = array(); -$labels['enigmasettings'] = 'Enigma: Settings'; -$labels['enigmacerts'] = 'Enigma: Certificates (S/MIME)'; -$labels['enigmakeys'] = 'Enigma: Keys (PGP)'; +$labels['enigmasettings'] = 'Enigma Settings'; +$labels['enigmacerts'] = 'S/MIME Certificates'; +$labels['enigmakeys'] = 'PGP Keys'; $labels['keysfromto'] = 'Keys $from to $to of $count'; $labels['keyname'] = 'Name'; $labels['keyid'] = 'Key ID'; @@ -36,6 +36,7 @@ $labels['signmsg'] = 'Digitally sign this message'; $messages = array(); $messages['sigvalid'] = 'Verified signature from $sender.'; $messages['siginvalid'] = 'Invalid signature from $sender.'; +$messages['sigunverified'] = 'Unverified signature. Certificate not verified. Certificate ID: $keyid.'; $messages['signokey'] = 'Unverified signature. Public key not found. Key ID: $keyid.'; $messages['sigerror'] = 'Unverified signature. Internal error.'; $messages['decryptok'] = 'Message decrypted.'; diff --git a/plugins/help/config.inc.php.dist b/plugins/help/config.inc.php.dist index 7cc8d5f00..e7eaf7ad5 100644 --- a/plugins/help/config.inc.php.dist +++ b/plugins/help/config.inc.php.dist @@ -2,7 +2,7 @@ // Help content iframe source // %l will be replaced by the language code resolved using the 'help_language_map' option -$config['help_source'] = 'http://roundcube.net/doc/help/0.9/%l/'; +$config['help_source'] = 'http://docs.roundcube.net/doc/help/1.0/%l/'; // Map task/action combinations to deep-links // Use '<task>/<action>' or only '<task>' strings as keys diff --git a/plugins/help/help.js b/plugins/help/help.js index 59a93c537..03edb7ab2 100644 --- a/plugins/help/help.js +++ b/plugins/help/help.js @@ -1,4 +1,4 @@ -/* +/** * Help plugin client script * @version 1.4 */ diff --git a/plugins/help/help.php b/plugins/help/help.php index 37fd908a3..df08caf71 100644 --- a/plugins/help/help.php +++ b/plugins/help/help.php @@ -33,6 +33,11 @@ class help extends rcube_plugin $this->register_action('about', array($this, 'action')); $this->register_action('license', array($this, 'action')); + $this->add_hook('startup', array($this, 'startup')); + } + + function startup($args) + { $rcmail = rcmail::get_instance(); // add taskbar button diff --git a/plugins/help/localization/ber.inc b/plugins/help/localization/ber.inc deleted file mode 100644 index 046e45733..000000000 --- a/plugins/help/localization/ber.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | localization//labels.inc | - | | - | Language file of the Roundcube Webmail client | - | Copyright (C) 2012, The Roundcube Dev Team | - | Licensed under the GNU General Public License | - | | - +-----------------------------------------------------------------------+ - | Author: FULL NAME <EMAIL@ADDRESS> | - +-----------------------------------------------------------------------+ -*/ - - diff --git a/plugins/help/localization/el_GR.inc b/plugins/help/localization/el_GR.inc index 74be22bf1..153c7ad48 100644 --- a/plugins/help/localization/el_GR.inc +++ b/plugins/help/localization/el_GR.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ */ -$labels['help'] = 'Βοηθεια'; +$labels['help'] = 'Βοήθεια'; $labels['about'] = 'Σχετικά'; $labels['license'] = 'Άδεια χÏήσης'; ?> diff --git a/plugins/help/localization/bn_BD.inc b/plugins/help/localization/en_CA.inc index 46160477e..11a282f10 100644 --- a/plugins/help/localization/bn_BD.inc +++ b/plugins/help/localization/en_CA.inc @@ -15,4 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ */ +$labels['help'] = 'Help'; +$labels['about'] = 'About'; +$labels['license'] = 'License'; ?> diff --git a/plugins/help/localization/hi_IN.inc b/plugins/help/localization/es_419.inc index 46160477e..5567c924a 100644 --- a/plugins/help/localization/hi_IN.inc +++ b/plugins/help/localization/es_419.inc @@ -15,4 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ */ +$labels['help'] = 'Ayuda'; +$labels['about'] = 'Sobre'; +$labels['license'] = 'Licencia'; ?> diff --git a/plugins/help/localization/ia.inc b/plugins/help/localization/fo_FO.inc index 46160477e..05d7a8652 100644 --- a/plugins/help/localization/ia.inc +++ b/plugins/help/localization/fo_FO.inc @@ -15,4 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ */ +$labels['help'] = 'Hjálp'; +$labels['about'] = 'Um'; +$labels['license'] = 'Heimildarskjal'; ?> diff --git a/plugins/help/localization/hr_HR.inc b/plugins/help/localization/hr_HR.inc new file mode 100644 index 000000000..89a46e4ea --- /dev/null +++ b/plugins/help/localization/hr_HR.inc @@ -0,0 +1,21 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/help/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Help plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ +*/ +$labels['help'] = 'Pomoć'; +$labels['about'] = 'O programu'; +$labels['license'] = 'Licenca'; +?> diff --git a/plugins/help/localization/ar.inc b/plugins/help/localization/kn_IN.inc index 46160477e..ce852d7e8 100644 --- a/plugins/help/localization/ar.inc +++ b/plugins/help/localization/kn_IN.inc @@ -15,4 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ */ +$labels['help'] = 'ಸಹಾಯ'; +$labels['license'] = 'ಪರವಾನಗಿ'; ?> diff --git a/plugins/help/localization/ml_IN.inc b/plugins/help/localization/ml_IN.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/ml_IN.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/mn_MN.inc b/plugins/help/localization/mn_MN.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/mn_MN.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/ms_MY.inc b/plugins/help/localization/ms_MY.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/ms_MY.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/my_MM.inc b/plugins/help/localization/my_MM.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/my_MM.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/nl_BE.inc b/plugins/help/localization/nl_BE.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/nl_BE.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/nqo.inc b/plugins/help/localization/nqo.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/nqo.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/om.inc b/plugins/help/localization/om.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/om.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/sk_SK.inc b/plugins/help/localization/sk_SK.inc index ca88dbbe0..cead6f58a 100644 --- a/plugins/help/localization/sk_SK.inc +++ b/plugins/help/localization/sk_SK.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ */ -$labels['help'] = 'Nápoveda'; +$labels['help'] = 'PomocnÃk'; $labels['about'] = 'O aplikácii'; $labels['license'] = 'Licencia'; ?> diff --git a/plugins/help/localization/te_IN.inc b/plugins/help/localization/te_IN.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/te_IN.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/th_TH.inc b/plugins/help/localization/th_TH.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/th_TH.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/tzm.inc b/plugins/help/localization/tzm.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/tzm.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/localization/ur_PK.inc b/plugins/help/localization/ur_PK.inc deleted file mode 100644 index 46160477e..000000000 --- a/plugins/help/localization/ur_PK.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/help/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ -*/ -?> diff --git a/plugins/help/skins/larry/templates/help.html b/plugins/help/skins/larry/templates/help.html index bfd3f1141..f1d1f232e 100644 --- a/plugins/help/skins/larry/templates/help.html +++ b/plugins/help/skins/larry/templates/help.html @@ -21,7 +21,6 @@ <div class="iframebox help_<roundcube:var name='env:action' />"> <roundcube:object name="helpcontent" id="helpcontentframe" style="width:100%; height:100%" frameborder="0" src="/watermark.html" /> </div> - <roundcube:object name="message" id="message" class="statusbar" /> </div> </div> diff --git a/plugins/hide_blockquote/localization/az_AZ.inc b/plugins/hide_blockquote/localization/az_AZ.inc index b4ae17129..6fdd4410b 100644 --- a/plugins/hide_blockquote/localization/az_AZ.inc +++ b/plugins/hide_blockquote/localization/az_AZ.inc @@ -17,5 +17,5 @@ */ $labels['hide'] = 'GizlÉ™t'; $labels['show'] = 'GöstÉ™r'; -$labels['quotelimit'] = 'SÉ™tr saytı göstÉ™rilÉ™ndÉ™n çoxdursa sitatı gizlÉ™:'; +$labels['quotelimit'] = 'SayÄŸac xÉ™tti çoxdursa sitatı gizlÉ™'; ?> diff --git a/plugins/hide_blockquote/localization/bn_BD.inc b/plugins/hide_blockquote/localization/en_CA.inc index 83c0e3cb6..0256e712a 100644 --- a/plugins/hide_blockquote/localization/bn_BD.inc +++ b/plugins/hide_blockquote/localization/en_CA.inc @@ -15,4 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ */ +$labels['hide'] = 'Hide'; +$labels['show'] = 'Show'; +$labels['quotelimit'] = 'Hide citation when lines count is greater than'; ?> diff --git a/plugins/hide_blockquote/localization/hi_IN.inc b/plugins/hide_blockquote/localization/es_419.inc index 83c0e3cb6..8a6f06cd8 100644 --- a/plugins/hide_blockquote/localization/hi_IN.inc +++ b/plugins/hide_blockquote/localization/es_419.inc @@ -15,4 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ */ +$labels['hide'] = 'Ocultar'; +$labels['show'] = 'Mostrar'; +$labels['quotelimit'] = 'Ocultar la cita cuando el número de lineas sea mayor a '; ?> diff --git a/plugins/hide_blockquote/localization/fa_AF.inc b/plugins/hide_blockquote/localization/fo_FO.inc index 83c0e3cb6..fe962f65b 100644 --- a/plugins/hide_blockquote/localization/fa_AF.inc +++ b/plugins/hide_blockquote/localization/fo_FO.inc @@ -15,4 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ */ +$labels['hide'] = 'Goym'; +$labels['show'] = 'VÃs'; +$labels['quotelimit'] = 'Goym stevning tá ið tað eru meiri reglur enn'; ?> diff --git a/plugins/hide_blockquote/localization/ar.inc b/plugins/hide_blockquote/localization/hr_HR.inc index 83c0e3cb6..d5cc4f3b5 100644 --- a/plugins/hide_blockquote/localization/ar.inc +++ b/plugins/hide_blockquote/localization/hr_HR.inc @@ -15,4 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ */ +$labels['hide'] = 'Sakrij'; +$labels['show'] = 'Pokaži'; +$labels['quotelimit'] = 'Sakrij citat ako broj linija prelazi'; ?> diff --git a/plugins/hide_blockquote/localization/ia.inc b/plugins/hide_blockquote/localization/ia.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/ia.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/km_KH.inc b/plugins/hide_blockquote/localization/km_KH.inc new file mode 100644 index 000000000..466468d77 --- /dev/null +++ b/plugins/hide_blockquote/localization/km_KH.inc @@ -0,0 +1,21 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/hide_blockquote/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Hide-Blockquote plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ +*/ +$labels['hide'] = 'លាក់'; +$labels['show'] = 'បង្ហាញ'; +$labels['quotelimit'] = 'លាក់​អážáŸ’ážáž”ទ​សម្រង់​ពáŸáž›â€‹áž…ំនួន​ជួរ​ធំ​ជាង'; +?> diff --git a/plugins/hide_blockquote/localization/ml_IN.inc b/plugins/hide_blockquote/localization/ml_IN.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/ml_IN.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/mn_MN.inc b/plugins/hide_blockquote/localization/mn_MN.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/mn_MN.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/ms_MY.inc b/plugins/hide_blockquote/localization/ms_MY.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/ms_MY.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/my_MM.inc b/plugins/hide_blockquote/localization/my_MM.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/my_MM.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/nl_BE.inc b/plugins/hide_blockquote/localization/nl_BE.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/nl_BE.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/nqo.inc b/plugins/hide_blockquote/localization/nqo.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/nqo.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/om.inc b/plugins/hide_blockquote/localization/om.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/om.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/sk_SK.inc b/plugins/hide_blockquote/localization/sk_SK.inc index 2a41c1ec6..c5fe73f9a 100644 --- a/plugins/hide_blockquote/localization/sk_SK.inc +++ b/plugins/hide_blockquote/localization/sk_SK.inc @@ -17,5 +17,5 @@ */ $labels['hide'] = 'SkryÅ¥'; $labels['show'] = 'ZobraziÅ¥'; -$labels['quotelimit'] = 'SkryÅ¥ citáciu pokiaľ je poÄet riadkov väÄÅ¡Ã než'; +$labels['quotelimit'] = 'SkryÅ¥ citovaný text, ak je poÄet riadkov väÄÅ¡Ã než'; ?> diff --git a/plugins/hide_blockquote/localization/te_IN.inc b/plugins/hide_blockquote/localization/te_IN.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/te_IN.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/th_TH.inc b/plugins/hide_blockquote/localization/th_TH.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/th_TH.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/ti.inc b/plugins/hide_blockquote/localization/ti.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/ti.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/tzm.inc b/plugins/hide_blockquote/localization/tzm.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/tzm.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/hide_blockquote/localization/ur_PK.inc b/plugins/hide_blockquote/localization/ur_PK.inc deleted file mode 100644 index 83c0e3cb6..000000000 --- a/plugins/hide_blockquote/localization/ur_PK.inc +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012-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. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ -*/ -?> diff --git a/plugins/http_authentication/http_authentication.php b/plugins/http_authentication/http_authentication.php index d86e1791c..83f29c84f 100644 --- a/plugins/http_authentication/http_authentication.php +++ b/plugins/http_authentication/http_authentication.php @@ -29,7 +29,7 @@ class http_authentication extends rcube_plugin function startup($args) { - if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { + if (!empty($_SERVER['PHP_AUTH_USER'])) { $rcmail = rcmail::get_instance(); $rcmail->add_shutdown_function(array('http_authentication', 'shutdown')); @@ -38,7 +38,8 @@ class http_authentication extends rcube_plugin $args['action'] = 'login'; } // Set user password in session (see shutdown() method for more info) - else if (!empty($_SESSION['user_id']) && empty($_SESSION['password'])) { + else if (!empty($_SESSION['user_id']) && empty($_SESSION['password']) + && !empty($_SERVER['PHP_AUTH_PW'])) { $_SESSION['password'] = $rcmail->encrypt($_SERVER['PHP_AUTH_PW']); } } @@ -61,9 +62,10 @@ class http_authentication extends rcube_plugin return $args; } - if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { + if (!empty($_SERVER['PHP_AUTH_USER'])) { $args['user'] = $_SERVER['PHP_AUTH_USER']; - $args['pass'] = $_SERVER['PHP_AUTH_PW']; + if (!empty($_SERVER['PHP_AUTH_PW'])) + $args['pass'] = $_SERVER['PHP_AUTH_PW']; } $args['cookiecheck'] = false; diff --git a/plugins/jqueryui/jqueryui.php b/plugins/jqueryui/jqueryui.php index e9b3c215e..73daa5d8e 100644 --- a/plugins/jqueryui/jqueryui.php +++ b/plugins/jqueryui/jqueryui.php @@ -5,7 +5,7 @@ * * Provide the jQuery UI library with according themes. * - * @version 1.9.1 + * @version 1.9.2 * @author Cor Bosman <roundcube@wa.ter.net> * @author Thomas Bruederli <roundcube@gmail.com> * @license GNU GPLv3+ @@ -16,7 +16,7 @@ class jqueryui extends rcube_plugin public function init() { - $version = '1.9.1'; + $version = '1.9.2'; $rcmail = rcmail::get_instance(); $this->load_config(); diff --git a/plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js b/plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js deleted file mode 100755 index aa7a923e7..000000000 --- a/plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! jQuery UI - v1.9.1 - 2012-10-25 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js -* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */ - -(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();return"area"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!=="map"?!1:(o=e("img[usemap=#"+i+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,"visibility")==="hidden"}).length}var n=0,r=/^ui-id-\d+$/;e.ui=e.ui||{};if(e.ui.version)return;e.extend(e.ui,{version:"1.9.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):t=this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);if(!isNaN(s)&&s!==0)return s}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11)return;for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},contains:e.contains,hasScroll:function(t,n){if(e(t).css("overflow")==="hidden")return!1;var r=n&&n==="left"?"scrollLeft":"scrollTop",i=!1;return t[r]>0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e<t+n},isOver:function(t,n,r,i,s,o){return e.ui.isOverAxis(t,r,s)&&e.ui.isOverAxis(n,i,o)}})})(jQuery);(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n=0,r;(r=t[n])!=null;n++)try{e(r).triggerHandler("remove")}catch(s){}i(t)},e.widget=function(t,n,r){var i,s,o,u,a=t.split(".")[0];t=t.split(".")[1],i=a+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[a]=e[a]||{},s=e[a][t],o=e[a][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,s,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),u=new n,u.options=e.widget.extend({},u.options),e.each(r,function(t,i){e.isFunction(i)&&(r[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},r=function(e){return n.prototype[t].apply(this,e)};return function(){var t=this._super,n=this._superApply,s;return this._super=e,this._superApply=r,s=i.apply(this,arguments),this._super=t,this._superApply=n,s}}())}),o.prototype=e.widget.extend(u,{widgetEventPrefix:u.widgetEventPrefix||t},r,{constructor:o,namespace:a,widgetName:t,widgetBaseClass:i,widgetFullName:i}),s?(e.each(s._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,o,n._proto)}),delete s._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o)},e.widget.extend=function(n){var i=r.call(arguments,1),s=0,o=i.length,u,a;for(;s<o;s++)for(u in i[s])a=i[s][u],i[s].hasOwnProperty(u)&&a!==t&&(e.isPlainObject(a)?n[u]=e.isPlainObject(n[u])?e.widget.extend({},n[u],a):e.widget.extend({},a):n[u]=a);return n},e.widget.bridge=function(n,i){var s=i.prototype.widgetFullName;e.fn[n]=function(o){var u=typeof o=="string",a=r.call(arguments,1),f=this;return o=!u&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,u?this.each(function(){var r,i=e.data(this,s);if(!i)return e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+o+"'");if(!e.isFunction(i[o])||o.charAt(0)==="_")return e.error("no such method '"+o+"' for "+n+" widget instance");r=i[o].apply(i,a);if(r!==i&&r!==t)return f=r&&r.jquery?f.pushStack(r.get()):r,!1}):this.each(function(){var t=e.data(this,s);t?t.option(o||{})._init():new i(o,this)}),f}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u<s.length-1;u++)o[s[u]]=o[s[u]]||{},o=o[s[u]];n=s.pop();if(r===t)return o[n]===t?null:o[n];o[n]=r}else{if(r===t)return this.options[n]===t?null:this.options[n];i[n]=r}}return this._setOptions(i),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,e==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n){var r,i=this;n?(t=r=e(t),this.bindings=this.bindings.add(t)):(n=t,t=this.element,r=this.widget()),e.each(n,function(n,s){function o(){if(i.options.disabled===!0||e(this).hasClass("ui-state-disabled"))return;return(typeof s=="string"?i[s]:s).apply(i,arguments)}typeof s!="string"&&(o.guid=s.guid=s.guid||o.guid||e.guid++);var u=n.match(/^(\w+)\s*(.*)$/),a=u[1]+i.eventNamespace,f=u[2];f?r.delegate(f,a,o):t.bind(a,o)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return(typeof e=="string"?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,s,o=this.options[t];r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent;if(s)for(i in s)i in n||(n[i]=s[i]);return this.element.trigger(n,r),!(e.isFunction(o)&&o.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,s){typeof i=="string"&&(i={effect:i});var o,u=i?i===!0||typeof i=="number"?n:i.effect||n:t;i=i||{},typeof i=="number"&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=s,i.delay&&r.delay(i.delay),o&&e.effects&&(e.effects.effect[u]||e.uiBackCompat!==!1&&e.effects[u])?r[t](i):u!==t&&r[u]?r[u](i.duration,i.easing,s):r.queue(function(n){e(this)[t](),s&&s.call(r[0]),n()})}}),e.uiBackCompat!==!1&&(e.Widget.prototype._getCreateOptions=function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]})})(jQuery);(function(e,t){var n=!1;e(document).mouseup(function(e){n=!1}),e.widget("ui.mouse",{version:"1.9.1",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(n)return;this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var r=this,i=t.which===1,s=typeof this.options.cancel=="string"&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;if(!i||s||!this._mouseCapture(t))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(t)!==!1;if(!this._mouseStarted)return t.preventDefault(),!0}return!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),n=!0,!0},_mouseMove:function(t){return!e.ui.ie||document.documentMode>=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\+\-]\d+%?/,f=/^\w+/,l=/%$/,c=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var r,i,s=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return e("body").append(s),r=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i=n==="scroll"||n==="auto"&&t.width<t.element[0].scrollWidth,s=r==="scroll"||r==="auto"&&t.height<t.element[0].scrollHeight;return{width:i?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),r=e.isWindow(n[0]);return{element:n,isWindow:r,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:r?n.width():n.outerWidth(),height:r?n.height():n.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return c.apply(this,arguments);t=e.extend({},t);var n,l,d,v,m,g=e(t.of),y=e.position.getWithinInfo(t.within),b=e.position.getScrollInfo(y),w=g[0],E=(t.collision||"flip").split(" "),S={};return w.nodeType===9?(l=g.width(),d=g.height(),v={top:0,left:0}):e.isWindow(w)?(l=g.width(),d=g.height(),v={top:g.scrollTop(),left:g.scrollLeft()}):w.preventDefault?(t.at="left top",l=d=0,v={top:w.pageY,left:w.pageX}):(l=g.outerWidth(),d=g.outerHeight(),v=g.offset()),m=e.extend({},v),e.each(["my","at"],function(){var e=(t[this]||"").split(" "),n,r;e.length===1&&(e=o.test(e[0])?e.concat(["center"]):u.test(e[0])?["center"].concat(e):["center","center"]),e[0]=o.test(e[0])?e[0]:"center",e[1]=u.test(e[1])?e[1]:"center",n=a.exec(e[0]),r=a.exec(e[1]),S[this]=[n?n[0]:0,r?r[0]:0],t[this]=[f.exec(e[0])[0],f.exec(e[1])[0]]}),E.length===1&&(E[1]=E[0]),t.at[0]==="right"?m.left+=l:t.at[0]==="center"&&(m.left+=l/2),t.at[1]==="bottom"?m.top+=d:t.at[1]==="center"&&(m.top+=d/2),n=h(S.at,l,d),m.left+=n[0],m.top+=n[1],this.each(function(){var o,u,a=e(this),f=a.outerWidth(),c=a.outerHeight(),w=p(this,"marginLeft"),x=p(this,"marginTop"),T=f+w+p(this,"marginRight")+b.width,N=c+x+p(this,"marginBottom")+b.height,C=e.extend({},m),k=h(S.my,a.outerWidth(),a.outerHeight());t.my[0]==="right"?C.left-=f:t.my[0]==="center"&&(C.left-=f/2),t.my[1]==="bottom"?C.top-=c:t.my[1]==="center"&&(C.top-=c/2),C.left+=k[0],C.top+=k[1],e.support.offsetFractions||(C.left=s(C.left),C.top=s(C.top)),o={marginLeft:w,marginTop:x},e.each(["left","top"],function(r,i){e.ui.position[E[r]]&&e.ui.position[E[r]][i](C,{targetWidth:l,targetHeight:d,elemWidth:f,elemHeight:c,collisionPosition:o,collisionWidth:T,collisionHeight:N,offset:[n[0]+k[0],n[1]+k[1]],my:t.my,at:t.at,within:y,elem:a})}),e.fn.bgiframe&&a.bgiframe(),t.using&&(u=function(e){var n=v.left-C.left,s=n+l-f,o=v.top-C.top,u=o+d-c,h={target:{element:g,left:v.left,top:v.top,width:l,height:d},element:{element:a,left:C.left,top:C.top,width:f,height:c},horizontal:s<0?"left":n>0?"right":"center",vertical:u<0?"top":o>0?"bottom":"middle"};l<f&&i(n+s)<l&&(h.horizontal="center"),d<c&&i(o+u)<d&&(h.vertical="middle"),r(i(n),i(s))>r(i(o),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,c=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,h=-2*t.offset[0],p,d;if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p<i(a))e.left+=l+c+h}else if(f>0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;if(d>0||i(d)<f)e.left+=l+c+h}},top:function(e,t){var n=t.within,r=n.offset.top+n.scrollTop,s=n.height,o=n.isWindow?n.scrollTop:n.offset.top,u=e.top-t.collisionPosition.marginTop,a=u-o,f=u+t.collisionHeight-s-o,l=t.my[1]==="top",c=l?-t.elemHeight:t.my[1]==="bottom"?t.elemHeight:0,h=t.at[1]==="top"?t.targetHeight:t.at[1]==="bottom"?-t.targetHeight:0,p=-2*t.offset[1],d,v;a<0?(v=e.top+c+h+p+t.collisionHeight-s-r,e.top+c+h+p>a&&(v<0||v<i(a))&&(e.top+=c+h+p)):f>0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)<f)&&(e.top+=c+h+p))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,n,r,i,s,o=document.getElementsByTagName("body")[0],u=document.createElement("div");t=document.createElement(o?"div":"body"),r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&e.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in r)t.style[s]=r[s];t.appendChild(u),n=o||document.documentElement,n.insertBefore(t,n.firstChild),u.style.cssText="position: absolute; left: 10.7432222px;",i=e(u).offset().left,e.support.offsetFractions=i>10&&i<11,t.innerHTML="",n.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset)return n.call(this,r);var i=r.offset.split(" "),s=r.at.split(" ");return i.length===1&&(i[1]=i[0]),/^\d/.test(i[0])&&(i[0]="+"+i[0]),/^\d/.test(i[1])&&(i[1]="+"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),n.call(this,e.extend(r,{at:s[0]+i[0]+" "+s[1]+i[1],offset:t}))}}(jQuery)})(jQuery);(function(e,t){var n=0,r={},i={};r.height=r.paddingTop=r.paddingBottom=r.borderTopWidth=r.borderBottomWidth="hide",i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.9.1",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.accordionId="ui-accordion-"+(this.element.attr("id")||++n),r=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset"),this.headers=this.element.find(r.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this._hoverable(this.headers),this._focusable(this.headers),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),!r.collapsible&&(r.active===!1||r.active==null)&&(r.active=0),r.active<0&&(r.active+=this.headers.length),this.active=this._findActive(r.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top"),this.active.next().addClass("ui-accordion-content-active").show(),this._createIcons(),this.refresh(),this.element.attr("role","tablist"),this.headers.attr("role","tab").each(function(n){var r=e(this),i=r.attr("id"),s=r.next(),o=s.attr("id");i||(i=t+"-header-"+n,r.attr("id",i)),o||(o=t+"-panel-"+n,s.attr("id",o)),r.attr("aria-controls",o),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._on(this.headers,{keydown:"_keydown"}),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._setupEvents(r.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this.options.heightStyle!=="content"&&e.css("height","")},_setOption:function(e,t){if(e==="active"){this._activate(t);return}e==="event"&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),e==="collapsible"&&!t&&this.options.active===!1&&this._activate(0),e==="icons"&&(this._destroyIcons(),t&&this._createIcons()),e==="disabled"&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)},_keydown:function(t){if(t.altKey||t.ctrlKey)return;var n=e.ui.keyCode,r=this.headers.length,i=this.headers.index(t.target),s=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:s=this.headers[(i+1)%r];break;case n.LEFT:case n.UP:s=this.headers[(i-1+r)%r];break;case n.SPACE:case n.ENTER:this._eventHandler(t);break;case n.HOME:s=this.headers[0];break;case n.END:s=this.headers[r-1]}s&&(e(t.target).attr("tabIndex",-1),e(s).attr("tabIndex",0),s.focus(),t.preventDefault())},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t,n,r=this.options.heightStyle,i=this.element.parent();r==="fill"?(e.support.minHeight||(n=i.css("overflow"),i.css("overflow","hidden")),t=i.height(),this.element.siblings(":visible").each(function(){var n=e(this),r=n.css("position");if(r==="absolute"||r==="fixed")return;t-=n.outerHeight(!0)}),n&&i.css("overflow",n),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):r==="auto"&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).height("").height())}).height(t))},_activate:function(t){var n=this._findActive(t)[0];if(n===this.active[0])return;n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return typeof t=="number"?this.headers.eq(t):e()},_setupEvents:function(t){var n={};if(!t)return;e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._on(this.headers,n)},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i[0]===r[0],o=s&&n.collapsible,u=o?e():i.next(),a=r.next(),f={oldHeader:r,oldPanel:a,newHeader:o?e():i,newPanel:u};t.preventDefault();if(s&&!n.collapsible||this._trigger("beforeActivate",t,f)===!1)return;n.active=o?!1:this.headers.index(i),this.active=s?e():i,this._toggle(f),r.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&r.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),s||(i.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),i.next().addClass("ui-accordion-content-active"))},_toggle:function(t){var n=t.newPanel,r=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=r,this.options.animate?this._animate(n,r,t):(r.hide(),n.show(),this._toggleComplete(t)),r.attr({"aria-expanded":"false","aria-hidden":"true"}),r.prev().attr("aria-selected","false"),n.length&&r.length?r.prev().attr("tabIndex",-1):n.length&&this.headers.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),n.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(e,t,n){var s,o,u,a=this,f=0,l=e.length&&(!t.length||e.index()<t.index()),c=this.options.animate||{},h=l&&c.down||c,p=function(){a._toggleComplete(n)};typeof h=="number"&&(u=h),typeof h=="string"&&(o=h),o=o||h.easing||c.easing,u=u||h.duration||c.duration;if(!t.length)return e.animate(i,u,o,p);if(!e.length)return t.animate(r,u,o,p);s=e.show().outerHeight(),t.animate(r,{duration:u,easing:o,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(i,{duration:u,easing:o,complete:p,step:function(e,n){n.now=Math.round(e),n.prop!=="height"?f+=n.now:a.options.heightStyle!=="content"&&(n.now=Math.round(s-t.outerHeight()-f),f=0)}})},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.uiBackCompat!==!1&&(function(e,t){e.extend(t.options,{navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}});var n=t._create;t._create=function(){if(this.options.navigation){var t=this,r=this.element.find(this.options.header),i=r.next(),s=r.add(i).find("a").filter(this.options.navigationFilter)[0];s&&r.add(i).each(function(n){if(e.contains(this,s))return t.options.active=Math.floor(n/2),!1})}n.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options,{heightStyle:null,autoHeight:!0,clearStyle:!1,fillSpace:!1});var n=t._create,r=t._setOption;e.extend(t,{_create:function(){this.options.heightStyle=this.options.heightStyle||this._mergeHeightStyle(),n.call(this)},_setOption:function(e){if(e==="autoHeight"||e==="clearStyle"||e==="fillSpace")this.options.heightStyle=this._mergeHeightStyle();r.apply(this,arguments)},_mergeHeightStyle:function(){var e=this.options;if(e.fillSpace)return"fill";if(e.clearStyle)return"content";if(e.autoHeight)return"auto"}})}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options.icons,{activeHeader:null,headerSelected:"ui-icon-triangle-1-s"});var n=t._createIcons;t._createIcons=function(){this.options.icons&&(this.options.icons.activeHeader=this.options.icons.activeHeader||this.options.icons.headerSelected),n.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){t.activate=t._activate;var n=t._findActive;t._findActive=function(e){return e===-1&&(e=!1),e&&typeof e!="number"&&(e=this.headers.index(this.headers.filter(e)),e===-1&&(e=!1)),n.call(this,e)}}(jQuery,jQuery.ui.accordion.prototype),jQuery.ui.accordion.prototype.resize=jQuery.ui.accordion.prototype.refresh,function(e,t){e.extend(t.options,{change:null,changestart:null});var n=t._trigger;t._trigger=function(e,t,r){var i=n.apply(this,arguments);return i?(e==="beforeActivate"?i=n.call(this,"changestart",t,{oldHeader:r.oldHeader,oldContent:r.oldPanel,newHeader:r.newHeader,newContent:r.newPanel}):e==="activate"&&(i=n.call(this,"change",t,{oldHeader:r.oldHeader,oldContent:r.oldPanel,newHeader:r.newHeader,newContent:r.newPanel})),i):!1}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options,{animate:null,animated:"slide"});var n=t._create;t._create=function(){var e=this.options;e.animate===null&&(e.animated?e.animated==="slide"?e.animate=300:e.animated==="bounceslide"?e.animate={duration:200,down:{easing:"easeOutBounce",duration:1e3}}:e.animate=e.animated:e.animate=!1),n.call(this)}}(jQuery,jQuery.ui.accordion.prototype))})(jQuery);(function(e,t){var n=0;e.widget("ui.autocomplete",{version:"1.9.1",defaultElement:"<input>",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,n,r;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(i){if(this.element.prop("readOnly")){t=!0,r=!0,n=!0;return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move("previousPage",i);break;case s.PAGE_DOWN:t=!0,this._move("nextPage",i);break;case s.UP:t=!0,this._keyEvent("previous",i);break;case s.DOWN:t=!0,this._keyEvent("next",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return}if(n)return;var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move("previousPage",r);break;case i.PAGE_DOWN:this._move("nextPage",r);break;case i.UP:this._keyEvent("previous",r);break;case i.DOWN:this._keyEvent("next",r)}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(r){r.target!==t.element[0]&&r.target!==n&&!e.contains(n,r.target)&&t.close()})})},menufocus:function(t,n){if(this.isNewMenu){this.isNewMenu=!1;if(t.originalEvent&&/^mouse/.test(t.originalEvent.type)){this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)});return}}var r=n.item.data("ui-autocomplete-item")||n.item.data("item.autocomplete");!1!==this._trigger("focus",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item")||t.item.data("item.autocomplete"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),e==="source"&&this._initSource(),e==="appendTo"&&this.menu.element.appendTo(this.document.find(t||"body")[0]),e==="disabled"&&t&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is("textarea")?!0:this.element.is("input")?!1:this.element.prop("isContentEditable")},_initSource:function(){var t,n,r=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,r){r(e.ui.autocomplete.filter(t,n.term))}):typeof this.options.source=="string"?(n=this.options.source,this.source=function(t,i){r.xhr&&r.xhr.abort(),r.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e){i(e)},error:function(){i([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){e=e!=null?e:this._value(),this.term=this._value();if(e.length<this.options.minLength)return this.close(t);if(this._trigger("search",t)===!1)return;return this._search(e)},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=this,t=++n;return function(r){t===n&&e.__response(r),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return typeof t=="string"?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var n=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(n,t),this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,n){var r=this;e.each(n,function(e,n){r._renderItemData(t,n)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,n){return e("<li>").append(e("<a>").text(n.label)).appendTo(t)},_move:function(e,t){if(!this.menu.element.is(":visible")){this.search(null,t);return}if(this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)){this._value(this.term),this.menu.blur();return}this.menu[e](t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(e,t),t.preventDefault()}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return r.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments);if(this.options.disabled||this.cancelSearch)return;e&&e.length?t=this.options.messages.results(e.length):t=this.options.messages.noResults,this.liveRegion.text(t)}})})(jQuery);(function(e,t){var n,r,i,s,o="ui-button ui-widget ui-state-default ui-corner-all",u="ui-state-hover ui-state-active ",a="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",f=function(){var t=e(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},l=function(t){var n=t.name,r=t.form,i=e([]);return n&&(r?i=e(r).find("[name='"+n+"']"):i=e("[name='"+n+"']",t.ownerDocument).filter(function(){return!this.form})),i};e.widget("ui.button",{version:"1.9.1",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,f),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,u=this.options,a=this.type==="checkbox"||this.type==="radio",c="ui-state-hover"+(a?"":" ui-state-active"),h="ui-state-focus";u.label===null&&(u.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html()),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){if(u.disabled)return;e(this).addClass("ui-state-hover"),this===n&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){if(u.disabled)return;e(this).removeClass(c)}).bind("click"+this.eventNamespace,function(e){u.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){t.buttonElement.addClass(h)}).bind("blur"+this.eventNamespace,function(){t.buttonElement.removeClass(h)}),a&&(this.element.bind("change"+this.eventNamespace,function(){if(s)return;t.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(e){if(u.disabled)return;s=!1,r=e.pageX,i=e.pageY}).bind("mouseup"+this.eventNamespace,function(e){if(u.disabled)return;if(r!==e.pageX||i!==e.pageY)s=!0})),this.type==="checkbox"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(u.disabled||s)return!1;e(this).toggleClass("ui-state-active"),t.buttonElement.attr("aria-pressed",t.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(u.disabled||s)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var n=t.element[0];l(n).not(n).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(u.disabled)return!1;e(this).addClass("ui-state-active"),n=this,t.document.one("mouseup",function(){n=null})}).bind("mouseup"+this.eventNamespace,function(){if(u.disabled)return!1;e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(u.disabled)return!1;(t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",u.disabled),this._resetButton()},_determineButtonType:function(){var e,t,n;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button",this.type==="checkbox"||this.type==="radio"?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),n=this.element.is(":checked"),n&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",n)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+u+" "+a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){this._super(e,t);if(e==="disabled"){t?this.element.prop("disabled",!0):this.element.prop("disabled",!1);return}this._resetButton()},refresh:function(){var t=this.element.is(":disabled")||this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),this.type==="radio"?l(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);return}var t=this.buttonElement.removeClass(a),n=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),r=this.options.icons,i=r.primary&&r.secondary,s=[];r.primary||r.secondary?(this.options.text&&s.push("ui-button-text-icon"+(i?"s":r.primary?"-primary":"-secondary")),r.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+r.primary+"'></span>"),r.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+r.secondary+"'></span>"),this.options.text||(s.push(i?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(n)))):s.push("ui-button-text-only"),t.addClass(s.join(" "))}}),e.widget("ui.buttonset",{version:"1.9.1",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){e==="disabled"&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){$(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&$(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&$(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",function(){$.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])||($(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),$(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&$(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&$(this).addClass("ui-datepicker-next-hover"))})}function extendRemove(e,t){$.extend(e,t);for(var n in t)if(t[n]==null||t[n]==undefined)e[n]=t[n];return e}$.extend($.ui,{datepicker:{version:"1.9.1"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(e,t){var n=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(e,t){var n=$(e);t.append=$([]),t.trigger=$([]);if(n.hasClass(this.markerClassName))return;this._attachments(n,t),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),this._autoSize(t),$.data(e,PROP_NAME,t),t.settings.disabled&&this._disableDatepicker(e)},_attachments:function(e,t){var n=this._get(t,"appendText"),r=this._get(t,"isRTL");t.append&&t.append.remove(),n&&(t.append=$('<span class="'+this._appendClass+'">'+n+"</span>"),e[r?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove();var i=this._get(t,"showOn");(i=="focus"||i=="both")&&e.focus(this._showDatepicker);if(i=="button"||i=="both"){var s=this._get(t,"buttonText"),o=this._get(t,"buttonImage");t.trigger=$(this._get(t,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):$('<button type="button"></button>').addClass(this._triggerClass).html(o==""?s:$("<img/>").attr({src:o,alt:s,title:s}))),e[r?"before":"after"](t.trigger),t.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==e[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=e[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(e[0])):$.datepicker._showDatepicker(e[0]),!1})}},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,11,20),n=this._get(e,"dateFormat");if(n.match(/[DM]/)){var r=function(e){var t=0,n=0;for(var r=0;r<e.length;r++)e[r].length>t&&(t=e[r].length,n=r);return n};t.setMonth(r(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),t.setDate(r(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())}e.input.attr("size",this._formatDate(e,t).length)}},_inlineDatepicker:function(e,t){var n=$(e);if(n.hasClass(this.markerClassName))return;n.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),$.data(e,PROP_NAME,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block")},_dialogDatepicker:function(e,t,n,r,i){var s=this._dialogInst;if(!s){this.uuid+=1;var o="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+o+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),s=this._dialogInst=this._newInst(this._dialogInput,!1),s.settings={},$.data(this._dialogInput[0],PROP_NAME,s)}extendRemove(s.settings,r||{}),t=t&&t.constructor==Date?this._formatDate(s,t):t,this._dialogInput.val(t),this._pos=i?i.length?i:[i.pageX,i.pageY]:null;if(!this._pos){var u=document.documentElement.clientWidth,a=document.documentElement.clientHeight,f=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[u/2-100+f,a/2-150+l]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),s.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,s),this},_destroyDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName))return;var r=e.nodeName.toLowerCase();$.removeData(e,PROP_NAME),r=="input"?(n.append.remove(),n.trigger.remove(),t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(r=="div"||r=="span")&&t.removeClass(this.markerClassName).empty()},_enableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName))return;var r=e.nodeName.toLowerCase();if(r=="input")e.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);i.children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t})},_disableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName))return;var r=e.nodeName.toLowerCase();if(r=="input")e.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);i.children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t}),this._disabledInputs[this._disabledInputs.length]=e},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]==e)return!0;return!1},_getInst:function(e){try{return $.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,n){var r=this._getInst(e);if(arguments.length==2&&typeof t=="string")return t=="defaults"?$.extend({},$.datepicker._defaults):r?t=="all"?$.extend({},r.settings):this._get(r,t):null;var i=t||{};typeof t=="string"&&(i={},i[t]=n);if(r){this._curInst==r&&this._hideDatepicker();var s=this._getDateDatepicker(e,!0),o=this._getMinMaxDate(r,"min"),u=this._getMinMaxDate(r,"max");extendRemove(r.settings,i),o!==null&&i.dateFormat!==undefined&&i.minDate===undefined&&(r.settings.minDate=this._formatDate(r,o)),u!==null&&i.dateFormat!==undefined&&i.maxDate===undefined&&(r.settings.maxDate=this._formatDate(r,u)),this._attachments($(e),r),this._autoSize(r),this._setDate(r,s),this._updateAlternate(r),this._updateDatepicker(r)}},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(e){var t=$.datepicker._getInst(e.target),n=!0,r=t.dpDiv.is(".ui-datepicker-rtl");t._keyEvent=!0;if($.datepicker._datepickerShowing)switch(e.keyCode){case 9:$.datepicker._hideDatepicker(),n=!1;break;case 13:var i=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",t.dpDiv);i[0]&&$.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,i[0]);var s=$.datepicker._get(t,"onSelect");if(s){var o=$.datepicker._formatDate(t);s.apply(t.input?t.input[0]:null,[o,t])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&$.datepicker._clearDate(e.target),n=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&$.datepicker._gotoToday(e.target),n=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,r?1:-1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,-7,"D"),n=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,r?-1:1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,7,"D"),n=e.ctrlKey||e.metaKey;break;default:n=!1}else e.keyCode==36&&e.ctrlKey?$.datepicker._showDatepicker(this):n=!1;n&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t=$.datepicker._getInst(e.target);if($.datepicker._get(t,"constrainInput")){var n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||e.metaKey||r<" "||!n||n.indexOf(r)>-1}},_doKeyUp:function(e){var t=$.datepicker._getInst(e.target);if(t.input.val()!=t.lastVal)try{var n=$.datepicker.parseDate($.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,$.datepicker._getFormatConfig(t));n&&($.datepicker._setDateFromField(t),$.datepicker._updateAlternate(t),$.datepicker._updateDatepicker(t))}catch(r){$.datepicker.log(r)}return!0},_showDatepicker:function(e){e=e.target||e,e.nodeName.toLowerCase()!="input"&&(e=$("input",e.parentNode)[0]);if($.datepicker._isDisabledDatepicker(e)||$.datepicker._lastInput==e)return;var t=$.datepicker._getInst(e);$.datepicker._curInst&&$.datepicker._curInst!=t&&($.datepicker._curInst.dpDiv.stop(!0,!0),t&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var n=$.datepicker._get(t,"beforeShow"),r=n?n.apply(e,[e,t]):{};if(r===!1)return;extendRemove(t.settings,r),t.lastVal=null,$.datepicker._lastInput=e,$.datepicker._setDateFromField(t),$.datepicker._inDialog&&(e.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(e),$.datepicker._pos[1]+=e.offsetHeight);var i=!1;$(e).parents().each(function(){return i|=$(this).css("position")=="fixed",!i});var s={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(t),s=$.datepicker._checkOffset(t,s,i),t.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":i?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"});if(!t.inline){var o=$.datepicker._get(t,"showAnim"),u=$.datepicker._get(t,"duration"),a=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");if(!!e.length){var n=$.datepicker._getBorders(t.dpDiv);e.css({left:-n[0],top:-n[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})}};t.dpDiv.zIndex($(e).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&($.effects.effect[o]||$.effects[o])?t.dpDiv.show(o,$.datepicker._get(t,"showOptions"),u,a):t.dpDiv[o||"show"](o?u:null,a),(!o||!u)&&a(),t.input.is(":visible")&&!t.input.is(":disabled")&&t.input.focus(),$.datepicker._curInst=t}},_updateDatepicker:function(e){this.maxRows=4;var t=$.datepicker._getBorders(e.dpDiv);instActive=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var n=e.dpDiv.find("iframe.ui-datepicker-cover");!n.length||n.css({left:-t[0],top:-t[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()}),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var r=this._getNumberOfMonths(e),i=r[1],s=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),i>1&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",s*i+"em"),e.dpDiv[(r[0]!=1||r[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e==$.datepicker._curInst&&$.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement&&e.input.focus();if(e.yearshtml){var o=e.yearshtml;setTimeout(function(){o===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),o=e.yearshtml=null},0)}},_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]},_checkOffset:function(e,t,n){var r=e.dpDiv.outerWidth(),i=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,u=document.documentElement.clientWidth+(n?0:$(document).scrollLeft()),a=document.documentElement.clientHeight+(n?0:$(document).scrollTop());return t.left-=this._get(e,"isRTL")?r-s:0,t.left-=n&&t.left==e.input.offset().left?$(document).scrollLeft():0,t.top-=n&&t.top==e.input.offset().top+o?$(document).scrollTop():0,t.left-=Math.min(t.left,t.left+r>u&&u>r?Math.abs(t.left+r-u):0),t.top-=Math.min(t.top,t.top+i>a&&a>i?Math.abs(i+o):0),t},_findPos:function(e){var t=this._getInst(e),n=this._get(t,"isRTL");while(e&&(e.type=="hidden"||e.nodeType!=1||$.expr.filters.hidden(e)))e=e[n?"previousSibling":"nextSibling"];var r=$(e).offset();return[r.left,r.top]},_hideDatepicker:function(e){var t=this._curInst;if(!t||e&&t!=$.data(e,PROP_NAME))return;if(this._datepickerShowing){var n=this._get(t,"showAnim"),r=this._get(t,"duration"),i=function(){$.datepicker._tidyDialog(t)};$.effects&&($.effects.effect[n]||$.effects[n])?t.dpDiv.hide(n,$.datepicker._get(t,"showOptions"),r,i):t.dpDiv[n=="slideDown"?"slideUp":n=="fadeIn"?"fadeOut":"hide"](n?r:null,i),n||i(),this._datepickerShowing=!1;var s=this._get(t,"onClose");s&&s.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(!$.datepicker._curInst)return;var t=$(e.target),n=$.datepicker._getInst(t[0]);(t[0].id!=$.datepicker._mainDivId&&t.parents("#"+$.datepicker._mainDivId).length==0&&!t.hasClass($.datepicker.markerClassName)&&!t.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||t.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=n)&&$.datepicker._hideDatepicker()},_adjustDate:function(e,t,n){var r=$(e),i=this._getInst(r[0]);if(this._isDisabledDatepicker(r[0]))return;this._adjustInstDate(i,t+(n=="M"?this._get(i,"showCurrentAtPos"):0),n),this._updateDatepicker(i)},_gotoToday:function(e){var t=$(e),n=this._getInst(t[0]);if(this._get(n,"gotoCurrent")&&n.currentDay)n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear;else{var r=new Date;n.selectedDay=r.getDate(),n.drawMonth=n.selectedMonth=r.getMonth(),n.drawYear=n.selectedYear=r.getFullYear()}this._notifyChange(n),this._adjustDate(t)},_selectMonthYear:function(e,t,n){var r=$(e),i=this._getInst(r[0]);i["selected"+(n=="M"?"Month":"Year")]=i["draw"+(n=="M"?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(r)},_selectDay:function(e,t,n,r){var i=$(e);if($(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(i[0]))return;var s=this._getInst(i[0]);s.selectedDay=s.currentDay=$("a",r).html(),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=n,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear))},_clearDate:function(e){var t=$(e),n=this._getInst(t[0]);this._selectDate(t,"")},_selectDate:function(e,t){var n=$(e),r=this._getInst(n[0]);t=t!=null?t:this._formatDate(r),r.input&&r.input.val(t),this._updateAlternate(r);var i=this._get(r,"onSelect");i?i.apply(r.input?r.input[0]:null,[t,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],typeof r.input[0]!="object"&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var t=this._get(e,"altField");if(t){var n=this._get(e,"altFormat")||this._get(e,"dateFormat"),r=this._getDate(e),i=this.formatDate(n,r,this._getFormatConfig(e));$(t).each(function(){$(this).val(i)})}},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1},parseDate:function(e,t,n){if(e==null||t==null)throw"Invalid arguments";t=typeof t=="object"?t.toString():t+"";if(t=="")return null;var r=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff;r=typeof r!="string"?r:(new Date).getFullYear()%100+parseInt(r,10);var i=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,s=(n?n.dayNames:null)||this._defaults.dayNames,o=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,u=(n?n.monthNames:null)||this._defaults.monthNames,a=-1,f=-1,l=-1,c=-1,h=!1,p=function(t){var n=y+1<e.length&&e.charAt(y+1)==t;return n&&y++,n},d=function(e){var n=p(e),r=e=="@"?14:e=="!"?20:e=="y"&&n?4:e=="o"?3:2,i=new RegExp("^\\d{1,"+r+"}"),s=t.substring(g).match(i);if(!s)throw"Missing number at position "+g;return g+=s[0].length,parseInt(s[0],10)},v=function(e,n,r){var i=$.map(p(e)?r:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)}),s=-1;$.each(i,function(e,n){var r=n[1];if(t.substr(g,r.length).toLowerCase()==r.toLowerCase())return s=n[0],g+=r.length,!1});if(s!=-1)return s+1;throw"Unknown name at position "+g},m=function(){if(t.charAt(g)!=e.charAt(y))throw"Unexpected literal at position "+g;g++},g=0;for(var y=0;y<e.length;y++)if(h)e.charAt(y)=="'"&&!p("'")?h=!1:m();else switch(e.charAt(y)){case"d":l=d("d");break;case"D":v("D",i,s);break;case"o":c=d("o");break;case"m":f=d("m");break;case"M":f=v("M",o,u);break;case"y":a=d("y");break;case"@":var b=new Date(d("@"));a=b.getFullYear(),f=b.getMonth()+1,l=b.getDate();break;case"!":var b=new Date((d("!")-this._ticksTo1970)/1e4);a=b.getFullYear(),f=b.getMonth()+1,l=b.getDate();break;case"'":p("'")?m():h=!0;break;default:m()}if(g<t.length){var w=t.substr(g);if(!/^\s+/.test(w))throw"Extra/unparsed characters found in date: "+w}a==-1?a=(new Date).getFullYear():a<100&&(a+=(new Date).getFullYear()-(new Date).getFullYear()%100+(a<=r?0:-100));if(c>-1){f=1,l=c;do{var E=this._getDaysInMonth(a,f-1);if(l<=E)break;f++,l-=E}while(!0)}var b=this._daylightSavingAdjust(new Date(a,f-1,l));if(b.getFullYear()!=a||b.getMonth()+1!=f||b.getDate()!=l)throw"Invalid date";return b},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(e,t,n){if(!t)return"";var r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,i=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,o=(n?n.monthNames:null)||this._defaults.monthNames,u=function(t){var n=h+1<e.length&&e.charAt(h+1)==t;return n&&h++,n},a=function(e,t,n){var r=""+t;if(u(e))while(r.length<n)r="0"+r;return r},f=function(e,t,n,r){return u(e)?r[t]:n[t]},l="",c=!1;if(t)for(var h=0;h<e.length;h++)if(c)e.charAt(h)=="'"&&!u("'")?c=!1:l+=e.charAt(h);else switch(e.charAt(h)){case"d":l+=a("d",t.getDate(),2);break;case"D":l+=f("D",t.getDay(),r,i);break;case"o":l+=a("o",Math.round(((new Date(t.getFullYear(),t.getMonth(),t.getDate())).getTime()-(new Date(t.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":l+=a("m",t.getMonth()+1,2);break;case"M":l+=f("M",t.getMonth(),s,o);break;case"y":l+=u("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=t.getTime()*1e4+this._ticksTo1970;break;case"'":u("'")?l+="'":c=!0;break;default:l+=e.charAt(h)}return l},_possibleChars:function(e){var t="",n=!1,r=function(t){var n=i+1<e.length&&e.charAt(i+1)==t;return n&&i++,n};for(var i=0;i<e.length;i++)if(n)e.charAt(i)=="'"&&!r("'")?n=!1:t+=e.charAt(i);else switch(e.charAt(i)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":r("'")?t+="'":n=!0;break;default:t+=e.charAt(i)}return t},_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()==e.lastVal)return;var n=this._get(e,"dateFormat"),r=e.lastVal=e.input?e.input.val():null,i,s;i=s=this._getDefaultDate(e);var o=this._getFormatConfig(e);try{i=this.parseDate(n,r,o)||s}catch(u){this.log(u),r=t?"":r}e.selectedDay=i.getDate(),e.drawMonth=e.selectedMonth=i.getMonth(),e.drawYear=e.selectedYear=i.getFullYear(),e.currentDay=r?i.getDate():0,e.currentMonth=r?i.getMonth():0,e.currentYear=r?i.getFullYear():0,this._adjustInstDate(e)},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(e,t,n){var r=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},i=function(t){try{return $.datepicker.parseDate($.datepicker._get(e,"dateFormat"),t,$.datepicker._getFormatConfig(e))}catch(n){}var r=(t.toLowerCase().match(/^c/)?$.datepicker._getDate(e):null)||new Date,i=r.getFullYear(),s=r.getMonth(),o=r.getDate(),u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=u.exec(t);while(a){switch(a[2]||"d"){case"d":case"D":o+=parseInt(a[1],10);break;case"w":case"W":o+=parseInt(a[1],10)*7;break;case"m":case"M":s+=parseInt(a[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(i,s))}a=u.exec(t)}return new Date(i,s,o)},s=t==null||t===""?n:typeof t=="string"?i(t):typeof t=="number"?isNaN(t)?n:r(t):new Date(t.getTime());return s=s&&s.toString()=="Invalid Date"?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var r=!t,i=e.selectedMonth,s=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),(i!=e.selectedMonth||s!=e.selectedYear)&&!n&&this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(r?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&e.input.val()==""?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,-t,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,+t,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(n)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t=new Date;t=this._daylightSavingAdjust(new Date(t.getFullYear(),t.getMonth(),t.getDate()));var n=this._get(e,"isRTL"),r=this._get(e,"showButtonPanel"),i=this._get(e,"hideIfNoPrevNext"),s=this._get(e,"navigationAsDateFormat"),o=this._getNumberOfMonths(e),u=this._get(e,"showCurrentAtPos"),a=this._get(e,"stepMonths"),f=o[0]!=1||o[1]!=1,l=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),c=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),p=e.drawMonth-u,d=e.drawYear;p<0&&(p+=12,d--);if(h){var v=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth()-o[0]*o[1]+1,h.getDate()));v=c&&v<c?c:v;while(this._daylightSavingAdjust(new Date(d,p,1))>v)p--,p<0&&(p=11,d--)}e.drawMonth=p,e.drawYear=d;var m=this._get(e,"prevText");m=s?this.formatDate(m,this._daylightSavingAdjust(new Date(d,p-a,1)),this._getFormatConfig(e)):m;var g=this._canAdjustMonth(e,-1,d,p)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>":i?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>",y=this._get(e,"nextText");y=s?this.formatDate(y,this._daylightSavingAdjust(new Date(d,p+a,1)),this._getFormatConfig(e)):y;var b=this._canAdjustMonth(e,1,d,p)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>":i?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>",w=this._get(e,"currentText"),E=this._get(e,"gotoCurrent")&&e.currentDay?l:t;w=s?this.formatDate(w,E,this._getFormatConfig(e)):w;var S=e.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(e,"closeText")+"</button>",x=r?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(n?S:"")+(this._isInRange(e,E)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+w+"</button>":"")+(n?"":S)+"</div>":"",T=parseInt(this._get(e,"firstDay"),10);T=isNaN(T)?0:T;var N=this._get(e,"showWeek"),C=this._get(e,"dayNames"),k=this._get(e,"dayNamesShort"),L=this._get(e,"dayNamesMin"),A=this._get(e,"monthNames"),O=this._get(e,"monthNamesShort"),M=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),D=this._get(e,"selectOtherMonths"),P=this._get(e,"calculateWeek")||this.iso8601Week,H=this._getDefaultDate(e),B="";for(var j=0;j<o[0];j++){var F="";this.maxRows=4;for(var I=0;I<o[1];I++){var q=this._daylightSavingAdjust(new Date(d,p,e.selectedDay)),R=" ui-corner-all",U="";if(f){U+='<div class="ui-datepicker-group';if(o[1]>1)switch(I){case 0:U+=" ui-datepicker-group-first",R=" ui-corner-"+(n?"right":"left");break;case o[1]-1:U+=" ui-datepicker-group-last",R=" ui-corner-"+(n?"left":"right");break;default:U+=" ui-datepicker-group-middle",R=""}U+='">'}U+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+R+'">'+(/all|left/.test(R)&&j==0?n?b:g:"")+(/all|right/.test(R)&&j==0?n?g:b:"")+this._generateMonthYearHeader(e,p,d,c,h,j>0||I>0,A,O)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var z=N?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"";for(var W=0;W<7;W++){var X=(W+T)%7;z+="<th"+((W+T+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+C[X]+'">'+L[X]+"</span></th>"}U+=z+"</tr></thead><tbody>";var V=this._getDaysInMonth(d,p);d==e.selectedYear&&p==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,V));var J=(this._getFirstDayOfMonth(d,p)-T+7)%7,K=Math.ceil((J+V)/7),Q=f?this.maxRows>K?this.maxRows:K:K;this.maxRows=Q;var G=this._daylightSavingAdjust(new Date(d,p,1-J));for(var Y=0;Y<Q;Y++){U+="<tr>";var Z=N?'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(G)+"</td>":"";for(var W=0;W<7;W++){var et=M?M.apply(e.input?e.input[0]:null,[G]):[!0,""],tt=G.getMonth()!=p,nt=tt&&!D||!et[0]||c&&G<c||h&&G>h;Z+='<td class="'+((W+T+6)%7>=5?" ui-datepicker-week-end":"")+(tt?" ui-datepicker-other-month":"")+(G.getTime()==q.getTime()&&p==e.selectedMonth&&e._keyEvent||H.getTime()==G.getTime()&&H.getTime()==q.getTime()?" "+this._dayOverClass:"")+(nt?" "+this._unselectableClass+" ui-state-disabled":"")+(tt&&!_?"":" "+et[1]+(G.getTime()==l.getTime()?" "+this._currentClass:"")+(G.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+((!tt||_)&&et[2]?' title="'+et[2]+'"':"")+(nt?"":' data-handler="selectDay" data-event="click" data-month="'+G.getMonth()+'" data-year="'+G.getFullYear()+'"')+">"+(tt&&!_?" ":nt?'<span class="ui-state-default">'+G.getDate()+"</span>":'<a class="ui-state-default'+(G.getTime()==t.getTime()?" ui-state-highlight":"")+(G.getTime()==l.getTime()?" ui-state-active":"")+(tt?" ui-priority-secondary":"")+'" href="#">'+G.getDate()+"</a>")+"</td>",G.setDate(G.getDate()+1),G=this._daylightSavingAdjust(G)}U+=Z+"</tr>"}p++,p>11&&(p=0,d++),U+="</tbody></table>"+(f?"</div>"+(o[0]>0&&I==o[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),F+=U}B+=F}return B+=x+($.ui.ie6&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),e._keyEvent=!1,B},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a=this._get(e,"changeMonth"),f=this._get(e,"changeYear"),l=this._get(e,"showMonthAfterYear"),c='<div class="ui-datepicker-title">',h="";if(s||!a)h+='<span class="ui-datepicker-month">'+o[t]+"</span>";else{var p=r&&r.getFullYear()==n,d=i&&i.getFullYear()==n;h+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var v=0;v<12;v++)(!p||v>=r.getMonth())&&(!d||v<=i.getMonth())&&(h+='<option value="'+v+'"'+(v==t?' selected="selected"':"")+">"+u[v]+"</option>");h+="</select>"}l||(c+=h+(s||!a||!f?" ":""));if(!e.yearshtml){e.yearshtml="";if(s||!f)c+='<span class="ui-datepicker-year">'+n+"</span>";else{var m=this._get(e,"yearRange").split(":"),g=(new Date).getFullYear(),y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?g+parseInt(e,10):parseInt(e,10);return isNaN(t)?g:t},b=y(m[0]),w=Math.max(b,y(m[1]||""));b=r?Math.max(b,r.getFullYear()):b,w=i?Math.min(w,i.getFullYear()):w,e.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';for(;b<=w;b++)e.yearshtml+='<option value="'+b+'"'+(b==n?' selected="selected"':"")+">"+b+"</option>";e.yearshtml+="</select>",c+=e.yearshtml,e.yearshtml=null}}return c+=this._get(e,"yearSuffix"),l&&(c+=(s||!a||!f?" ":"")+h),c+="</div>",c},_adjustInstDate:function(e,t,n){var r=e.drawYear+(n=="Y"?t:0),i=e.drawMonth+(n=="M"?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+(n=="D"?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,s)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),(n=="M"||n=="Y")&&this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&t<n?n:t;return i=r&&i>r?r:i,i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return(new Date(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(n,r+(t<0?t:i[0]*i[1]),1));return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max");return(!n||t.getTime()>=n.getTime())&&(!r||t.getTime()<=r.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return typeof e!="string"||e!="isDisabled"&&e!="getDate"&&e!="widget"?e=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){typeof e=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.1",window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(e,t){var n="ui-dialog ui-widget ui-widget-content ui-corner-all ",r={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.9.1",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.top-n)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var t=this,r=this.options,i=r.title||" ",s,o,u,a,f;s=(this.uiDialog=e("<div>")).addClass(n+r.dialogClass).css({display:"none",outline:0,zIndex:r.zIndex}).attr("tabIndex",-1).keydown(function(n){r.closeOnEscape&&!n.isDefaultPrevented()&&n.keyCode&&n.keyCode===e.ui.keyCode.ESCAPE&&(t.close(n),n.preventDefault())}).mousedown(function(e){t.moveToTop(!1,e)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s),o=(this.uiDialogTitlebar=e("<div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){s.focus()}).prependTo(s),u=e("<a href='#'></a>").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(e){e.preventDefault(),t.close(e)}).appendTo(o),(this.uiDialogTitlebarCloseText=e("<span>")).addClass("ui-icon ui-icon-closethick").text(r.closeText).appendTo(u),a=e("<span>").uniqueId().addClass("ui-dialog-title").html(i).prependTo(o),f=(this.uiDialogButtonPane=e("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=e("<div>")).addClass("ui-dialog-buttonset").appendTo(f),s.attr({role:"dialog","aria-labelledby":a.attr("id")}),o.find("*").add(o).disableSelection(),this._hoverable(u),this._focusable(u),r.draggable&&e.fn.draggable&&this._makeDraggable(),r.resizable&&e.fn.resizable&&this._makeResizable(),this._createButtons(r.buttons),this._isOpen=!1,e.fn.bgiframe&&s.bgiframe(),this._on(s,{keydown:function(t){if(!r.modal||t.keyCode!==e.ui.keyCode.TAB)return;var n=e(":tabbable",s),i=n.filter(":first"),o=n.filter(":last");if(t.target===o[0]&&!t.shiftKey)return i.focus(1),!1;if(t.target===i[0]&&t.shiftKey)return o.focus(1),!1}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var e,t=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(t){var n=this,r,i;if(!this._isOpen)return;if(!1===this._trigger("beforeClose",t))return;return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)}):(this.uiDialog.hide(),this._trigger("close",t)),e.ui.dialog.overlay.resize(),this.options.modal&&(r=0,e(".ui-dialog").each(function(){this!==n.uiDialog[0]&&(i=e(this).css("z-index"),isNaN(i)||(r=Math.max(r,i)))}),e.ui.dialog.maxZ=r),this},isOpen:function(){return this._isOpen},moveToTop:function(t,n){var r=this.options,i;return r.modal&&!t||!r.stack&&!r.modal?this._trigger("focus",n):(r.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=r.zIndex),this.overlay&&(e.ui.dialog.maxZ+=1,e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ,this.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ)),i={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},e.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",e.ui.dialog.maxZ),this.element.attr(i),this._trigger("focus",n),this)},open:function(){if(this._isOpen)return;var t,n=this.options,r=this.uiDialog;return this._size(),this._position(n.position),r.show(n.show),this.overlay=n.modal?new e.ui.dialog.overlay(this):null,this.moveToTop(!0),t=this.element.find(":tabbable"),t.length||(t=this.uiDialogButtonPane.find(":tabbable"),t.length||(t=r)),t.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this},_createButtons:function(t){var n=this,r=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),typeof t=="object"&&t!==null&&e.each(t,function(){return!(r=!0)}),r?(e.each(t,function(t,r){r=e.isFunction(r)?{click:r,text:t}:r;var i=e("<button type='button'></button>").attr(r,!0).unbind("click").click(function(){r.click.apply(n.element[0],arguments)}).appendTo(n.uiButtonSet);e.fn.button&&i.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function r(e){return{position:e.position,offset:e.offset}}var t=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,i){e(this).addClass("ui-dialog-dragging"),t._trigger("dragStart",n,r(i))},drag:function(e,n){t._trigger("drag",e,r(n))},stop:function(i,s){n.position=[s.position.left-t.document.scrollLeft(),s.position.top-t.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),t._trigger("dragStop",i,r(s)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(n){function u(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}n=n===t?this.options.resizable:n;var r=this,i=this.options,s=this.uiDialog.css("position"),o=typeof n=="string"?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:o,start:function(t,n){e(this).addClass("ui-dialog-resizing"),r._trigger("resizeStart",t,u(n))},resize:function(e,t){r._trigger("resize",e,u(t))},stop:function(t,n){e(this).removeClass("ui-dialog-resizing"),i.height=e(this).height(),i.width=e(this).width(),r._trigger("resizeStop",t,u(n)),e.ui.dialog.overlay.resize()}}).css("position",s).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var n=[],r=[0,0],i;if(t){if(typeof t=="string"||typeof t=="object"&&"0"in t)n=t.split?t.split(" "):[t[0],t[1]],n.length===1&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(r[e]=n[e],n[e]=t)}),t={my:n[0]+(r[0]<0?r[0]:"+"+r[0])+" "+n[1]+(r[1]<0?r[1]:"+"+r[1]),at:n.join(" ")};t=e.extend({},e.ui.dialog.prototype.options.position,t)}else t=e.ui.dialog.prototype.options.position;i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.position(t),i||this.uiDialog.hide()},_setOptions:function(t){var n=this,s={},o=!1;e.each(t,function(e,t){n._setOption(e,t),e in r&&(o=!0),e in i&&(s[e]=t)}),o&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,r){var i,s,o=this.uiDialog;switch(t){case"buttons":this._createButtons(r);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+r);break;case"dialogClass":o.removeClass(this.options.dialogClass).addClass(n+r);break;case"disabled":r?o.addClass("ui-dialog-disabled"):o.removeClass("ui-dialog-disabled");break;case"draggable":i=o.is(":data(draggable)"),i&&!r&&o.draggable("destroy"),!i&&r&&this._makeDraggable();break;case"position":this._position(r);break;case"resizable":s=o.is(":data(resizable)"),s&&!r&&o.resizable("destroy"),s&&typeof r=="string"&&o.resizable("option","handles",r),!s&&r!==!1&&this._makeResizable(r);break;case"title":e(".ui-dialog-title",this.uiDialogTitlebar).html(""+(r||" "))}this._super(t,r)},_size:function(){var t,n,r,i=this.options,s=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),n=Math.max(0,i.minHeight-t),i.height==="auto"?e.support.minHeight?this.element.css({minHeight:n,height:"auto"}):(this.uiDialog.show(),r=this.element.css("height","auto").height(),s||this.uiDialog.hide(),this.element.height(Math.max(r,n))):this.element.height(Math.max(i.height-t,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(t){this.instances.length===0&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(t){if(e(t.target).zIndex()<e.ui.dialog.overlay.maxZ)return!1})},1),e(window).bind("resize.dialog-overlay",e.ui.dialog.overlay.resize));var n=this.oldInstances.pop()||e("<div>").addClass("ui-widget-overlay");return e(document).bind("keydown.dialog-overlay",function(r){var i=e.ui.dialog.overlay.instances;i.length!==0&&i[i.length-1]===n&&t.options.closeOnEscape&&!r.isDefaultPrevented()&&r.keyCode&&r.keyCode===e.ui.keyCode.ESCAPE&&(t.close(r),r.preventDefault())}),n.appendTo(document.body).css({width:this.width(),height:this.height()}),e.fn.bgiframe&&n.bgiframe(),this.instances.push(n),n},destroy:function(t){var n=e.inArray(t,this.instances),r=0;n!==-1&&this.oldInstances.push(this.instances.splice(n,1)[0]),this.instances.length===0&&e([document,window]).unbind(".dialog-overlay"),t.height(0).width(0).remove(),e.each(this.instances,function(){r=Math.max(r,this.css("z-index"))}),this.maxZ=r},height:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),n=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),t<n?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,n;return e.ui.ie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),n=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),t<n?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.css({width:0,height:0}).css({width:e.ui.dialog.overlay.width(),height:e.ui.dialog.overlay.height()})}}),e.extend(e.ui.dialog.overlay.prototype,{destroy:function(){e.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(e,t){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute");if(!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);var r=this.element[0],i=!1;while(r&&(r=r.parentNode))r==document&&(i=!0);if(!i&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!n||this.options.revert=="valid"&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var n=!this.options.handle||!e(this.options.handle,this.element).length?!0:!1;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):n.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo(n.appendTo=="parent"?this.element[0].parentNode:n.appendTo),r[0]!=this.element[0]&&!/(fixed|absolute)/.test(r.css("position"))&&r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];if(!r)return;var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n}else t.containment.constructor==Array&&(this.containment=t.containment)},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]}else u=this.containment;t.pageX-this.offset.click.left<u[0]&&(s=u[0]+this.offset.click.left),t.pageY-this.offset.click.top<u[1]&&(o=u[1]+this.offset.click.top),t.pageX-this.offset.click.left>u[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;o=u?f-this.offset.click.top<u[1]||f-this.offset.click.top>u[3]?f-this.offset.click.top<u[1]?f+n.grid[1]:f-n.grid[1]:f:f;var l=n.grid[0]?this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX;s=u?l-this.offset.click.left<u[0]||l-this.offset.click.left>u[2]?l-this.offset.click.left<u[0]?l+n.grid[0]:l-n.grid[0]:l:l}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,n,r){return r=r||this._uiHash(),e.ui.plugin.call(this,t,[n,r]),t=="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,n,r)},plugins:{},_uiHash:function(e){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n){var r=e(this).data("draggable"),i=r.options,s=e.extend({},n,{item:r.element});r.sortables=[],e(i.connectToSortable).each(function(){var n=e.data(this,"sortable");n&&!n.options.disabled&&(r.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger("activate",t,s))})},stop:function(t,n){var r=e(this).data("draggable"),i=e.extend({},n,{item:r.element});e.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,r.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,i))})},drag:function(t,n){var r=e(this).data("draggable"),i=this,s=function(t){var n=this.offset.click.top,r=this.offset.click.left,i=this.positionAbs.top,s=this.positionAbs.left,o=t.height,u=t.width,a=t.top,f=t.left;return e.ui.isOver(i+n,s+r,a,f,o,u)};e.each(r.sortables,function(s){var o=!1,u=this;this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,e.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!=u&&this.instance._intersectsWith(this.instance.containerCache)&&e.ui.contains(u.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),r._trigger("fromSortable",t),r.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n){var r=e("body"),i=e(this).data("draggable").options;r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(t,n){var r=e(this).data("draggable").options;r._cursor&&e("body").css("cursor",r._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(t,n){var r=e(this).data("draggable").options;r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(t,n){var r=e(this).data("draggable");r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"&&(r.overflowOffset=r.scrollParent.offset())},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=!1;if(r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"){if(!i.axis||i.axis!="x")r.overflowOffset.top+r.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-r.overflowOffset.top<i.scrollSensitivity&&(r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop-i.scrollSpeed);if(!i.axis||i.axis!="y")r.overflowOffset.left+r.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-r.overflowOffset.left<i.scrollSensitivity&&(r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft-i.scrollSpeed)}else{if(!i.axis||i.axis!="x")t.pageY-e(document).scrollTop()<i.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-i.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<i.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+i.scrollSpeed));if(!i.axis||i.axis!="y")t.pageX-e(document).scrollLeft()<i.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-i.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<i.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+i.scrollSpeed))}s!==!1&&e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(r,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n){var r=e(this).data("draggable"),i=r.options;r.snapElements=[],e(i.snap.constructor!=String?i.snap.items||":data(draggable)":i.snap).each(function(){var t=e(this),n=t.offset();this!=r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})})},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=i.snapTolerance,o=n.offset.left,u=o+r.helperProportions.width,a=n.offset.top,f=a+r.helperProportions.height;for(var l=r.snapElements.length-1;l>=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;if(!(c-s<o&&o<h+s&&p-s<a&&a<d+s||c-s<o&&o<h+s&&p-s<f&&f<d+s||c-s<u&&u<h+s&&p-s<a&&a<d+s||c-s<u&&u<h+s&&p-s<f&&f<d+s)){r.snapElements[l].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=!1;continue}if(i.snapMode!="inner"){var v=Math.abs(p-f)<=s,m=Math.abs(d-a)<=s,g=Math.abs(c-u)<=s,y=Math.abs(h-o)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p-r.helperProportions.height,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h}).left-r.margins.left)}var b=v||m||g||y;if(i.snapMode!="outer"){var v=Math.abs(p-a)<=s,m=Math.abs(d-f)<=s,g=Math.abs(c-o)<=s,y=Math.abs(h-u)<=s;v&&(n.position.top=r._convertPositionTo("relative",{top:p,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d-r.helperProportions.height,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h-r.helperProportions.width}).left-r.margins.left)}!r.snapElements[l].snapping&&(v||m||g||y||b)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=v||m||g||y||b}}}),e.ui.plugin.add("draggable","stack",{start:function(t,n){var r=e(this).data("draggable").options,i=e.makeArray(e(r.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});if(!i.length)return;var s=parseInt(i[0].style.zIndex)||0;e(i).each(function(e){this.style.zIndex=s+e}),this[0].style.zIndex=s+i.length}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(t,n){var r=e(this).data("draggable").options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}})})(jQuery);(function(e,t){e.widget("ui.droppable",{version:"1.9.1",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var t=this.options,n=t.accept;this.isover=0,this.isout=1,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];for(var n=0;n<t.length;n++)t[n]==this&&t.splice(n,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,n){t=="accept"&&(this.accept=e.isFunction(n)?n:function(e){return e.is(n)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;if(!n||(n.currentItem||n.element)[0]==this.element[0])return;this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;if(!n||(n.currentItem||n.element)[0]==this.element[0])return;this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var r=n||e.ui.ddmanager.current;if(!r||(r.currentItem||r.element)[0]==this.element[0])return!1;var i=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"droppable");if(t.options.greedy&&!t.options.disabled&&t.options.scope==r.options.scope&&t.accept.call(t.element[0],r.currentItem||r.element)&&e.ui.intersect(r,e.extend(t,{offset:t.element.offset()}),t.options.tolerance))return i=!0,!1}),i?!1:this.accept.call(this.element[0],r.currentItem||r.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(r)),this.element):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(t,n,r){if(!n.offset)return!1;var i=(t.positionAbs||t.position.absolute).left,s=i+t.helperProportions.width,o=(t.positionAbs||t.position.absolute).top,u=o+t.helperProportions.height,a=n.offset.left,f=a+n.proportions.width,l=n.offset.top,c=l+n.proportions.height;switch(r){case"fit":return a<=i&&s<=f&&l<=o&&u<=c;case"intersect":return a<i+t.helperProportions.width/2&&s-t.helperProportions.width/2<f&&l<o+t.helperProportions.height/2&&u-t.helperProportions.height/2<c;case"pointer":var h=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,p=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,d=e.ui.isOver(p,h,l,a,n.proportions.height,n.proportions.width);return d;case"touch":return(o>=l&&o<=c||u>=l&&u<=c||o<l&&u>c)&&(i>=a&&i<=f||s>=a&&s<=f||i<a&&s>f);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var r=e.ui.ddmanager.droppables[t.options.scope]||[],i=n?n.type:null,s=(t.currentItem||t.element).find(":data(droppable)").andSelf();e:for(var o=0;o<r.length;o++){if(r[o].options.disabled||t&&!r[o].accept.call(r[o].element[0],t.currentItem||t.element))continue;for(var u=0;u<s.length;u++)if(s[u]==r[o].element[0]){r[o].proportions.height=0;continue e}r[o].visible=r[o].element.css("display")!="none";if(!r[o].visible)continue;i=="mousedown"&&r[o]._activate.call(r[o],n),r[o].offset=r[o].element.offset(),r[o].proportions={width:r[o].element[0].offsetWidth,height:r[o].element[0].offsetHeight}}},drop:function(t,n){var r=!1;return e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options)return;!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(r=this._drop.call(this,n)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,n))}),r},dragStart:function(t,n){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var r=e.ui.intersect(t,this,this.options.tolerance),i=!r&&this.isover==1?"isout":r&&this.isover==0?"isover":null;if(!i)return;var s;if(this.options.greedy){var o=this.options.scope,u=this.element.parents(":data(droppable)").filter(function(){return e.data(this,"droppable").options.scope===o});u.length&&(s=e.data(u[0],"droppable"),s.greedyChild=i=="isover"?1:0)}s&&i=="isover"&&(s.isover=0,s.isout=1,s._out.call(s,n)),this[i]=1,this[i=="isout"?"isover":"isout"]=0,this[i=="isover"?"_over":"_out"].call(this,n),s&&i=="isout"&&(s.isout=0,s.isover=1,s._over.call(s,n))})},dragStop:function(t,n){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}}})(jQuery);jQuery.effects||function(e,t){var n=e.uiBackCompat!==!1,r="ui-effects-";e.effects={effect:{}},function(t,n){function p(e,t,n){var r=a[t.type]||{};return e==null?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:0>e?0:r.max<e?r.max:e)}function d(e){var n=o(),r=n._rgba=[];return e=e.toLowerCase(),h(s,function(t,i){var s,o=i.re.exec(e),a=o&&i.parse(o),f=i.space||"rgba";if(a)return s=n[f](a),n[u[f].cache]=s[u[f].cache],r=n._rgba=s._rgba,!1}),r.length?(r.join()==="0,0,0,0"&&t.extend(r,c.transparent),n):c[e]}function v(e,t,n){return n=(n+1)%1,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}var r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),i=/^([\-+])=\s*(\d+\.?\d*)/,s=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1]*2.55,e[2]*2.55,e[3]*2.55,e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],o=t.Color=function(e,n,r,i){return new t.Color.fn.parse(e,n,r,i)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},a={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},f=o.support={},l=t("<p>")[0],c,h=t.each;l.style.cssText="background-color:rgba(1,1,1,.5)",f.rgba=l.style.backgroundColor.indexOf("rgba")>-1,h(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),o.fn=t.extend(o.prototype,{parse:function(r,i,s,a){if(r===n)return this._rgba=[null,null,null,null],this;if(r.jquery||r.nodeType)r=t(r).css(i),i=n;var f=this,l=t.type(r),v=this._rgba=[];i!==n&&(r=[r,i,s,a],l="array");if(l==="string")return this.parse(d(r)||c._default);if(l==="array")return h(u.rgba.props,function(e,t){v[t.idx]=p(r[t.idx],t)}),this;if(l==="object")return r instanceof o?h(u,function(e,t){r[t.cache]&&(f[t.cache]=r[t.cache].slice())}):h(u,function(t,n){var i=n.cache;h(n.props,function(e,t){if(!f[i]&&n.to){if(e==="alpha"||r[e]==null)return;f[i]=n.to(f._rgba)}f[i][t.idx]=p(r[e],t,!0)}),f[i]&&e.inArray(null,f[i].slice(0,3))<0&&(f[i][3]=1,n.from&&(f._rgba=n.from(f[i])))}),this},is:function(e){var t=o(e),n=!0,r=this;return h(u,function(e,i){var s,o=t[i.cache];return o&&(s=r[i.cache]||i.to&&i.to(r._rgba)||[],h(i.props,function(e,t){if(o[t.idx]!=null)return n=o[t.idx]===s[t.idx],n})),n}),n},_space:function(){var e=[],t=this;return h(u,function(n,r){t[r.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=o(e),r=n._space(),i=u[r],s=this.alpha()===0?o("transparent"):this,f=s[i.cache]||i.to(s._rgba),l=f.slice();return n=n[i.cache],h(i.props,function(e,r){var i=r.idx,s=f[i],o=n[i],u=a[r.type]||{};if(o===null)return;s===null?l[i]=o:(u.mod&&(o-s>u.mod/2?s+=u.mod:s-o>u.mod/2&&(s-=u.mod)),l[i]=p((o-s)*t+s,r))}),this[r](l)},blend:function(e){if(this._rgba[3]===1)return this;var n=this._rgba.slice(),r=n.pop(),i=o(e)._rgba;return o(t.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(e,t){return e==null?t>2?1:0:e});return n[3]===1&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(e,t){return e==null&&(e=t>2?1:0),t&&t<3&&(e=Math.round(e*100)+"%"),e});return n[3]===1&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),r=n.pop();return e&&n.push(~~(r*255)),"#"+t.map(n,function(e){return e=(e||0).toString(16),e.length===1?"0"+e:e}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,u.hsla.to=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=e[3],s=Math.max(t,n,r),o=Math.min(t,n,r),u=s-o,a=s+o,f=a*.5,l,c;return o===s?l=0:t===s?l=60*(n-r)/u+360:n===s?l=60*(r-t)/u+120:l=60*(t-n)/u+240,f===0||f===1?c=f:f<=.5?c=u/a:c=u/(2-a),[Math.round(l)%360,c,f,i==null?1:i]},u.hsla.from=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;return[Math.round(v(o,s,t+1/3)*255),Math.round(v(o,s,t)*255),Math.round(v(o,s,t-1/3)*255),i]},h(u,function(e,r){var s=r.props,u=r.cache,a=r.to,f=r.from;o.fn[e]=function(e){a&&!this[u]&&(this[u]=a(this._rgba));if(e===n)return this[u].slice();var r,i=t.type(e),l=i==="array"||i==="object"?e:arguments,c=this[u].slice();return h(s,function(e,t){var n=l[i==="object"?e:t.idx];n==null&&(n=c[t.idx]),c[t.idx]=p(n,t)}),f?(r=o(f(c)),r[u]=c,r):o(c)},h(s,function(n,r){if(o.fn[n])return;o.fn[n]=function(s){var o=t.type(s),u=n==="alpha"?this._hsla?"hsla":"rgba":e,a=this[u](),f=a[r.idx],l;return o==="undefined"?f:(o==="function"&&(s=s.call(this,f),o=t.type(s)),s==null&&r.empty?this:(o==="string"&&(l=i.exec(s),l&&(s=f+parseFloat(l[2])*(l[1]==="+"?1:-1))),a[r.idx]=s,this[u](a)))}})}),h(r,function(e,n){t.cssHooks[n]={set:function(e,r){var i,s,u="";if(t.type(r)!=="string"||(i=d(r))){r=o(i||r);if(!f.rgba&&r._rgba[3]!==1){s=n==="backgroundColor"?e.parentNode:e;while((u===""||u==="transparent")&&s&&s.style)try{u=t.css(s,"backgroundColor"),s=s.parentNode}catch(a){}r=r.blend(u&&u!=="transparent"?u:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=o(e.elem,n),e.end=o(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}}),t.cssHooks.borderColor={expand:function(e){var t={};return h(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e}),t}},c=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(){var t=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,n={},r,i;if(t&&t.length&&t[0]&&t[t[0]]){i=t.length;while(i--)r=t[i],typeof t[r]=="string"&&(n[e.camelCase(r)]=t[r])}else for(r in t)typeof t[r]=="string"&&(n[r]=t[r]);return n}function s(t,n){var i={},s,o;for(s in n)o=n[s],t[s]!==o&&!r[s]&&(e.fx.step[s]||!isNaN(parseFloat(o)))&&(i[s]=o);return i}var n=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){if(e.end!=="none"&&!e.setAttr||e.pos===1&&!e.setAttr)jQuery.style(e.elem,n,e.end),e.setAttr=!0}}),e.effects.animateClass=function(t,r,o,u){var a=e.speed(r,o,u);return this.queue(function(){var r=e(this),o=r.attr("class")||"",u,f=a.children?r.find("*").andSelf():r;f=f.map(function(){var t=e(this);return{el:t,start:i.call(this)}}),u=function(){e.each(n,function(e,n){t[n]&&r[n+"Class"](t[n])})},u(),f=f.map(function(){return this.end=i.call(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",o),f=f.map(function(){var t=this,n=e.Deferred(),r=jQuery.extend({},a,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,r),n.promise()}),e.when.apply(e,f.get()).done(function(){u(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(r[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{add:t},n,r,i):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{remove:t},n,r,i):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return typeof r=="boolean"||r===t?i?e.effects.animateClass.call(this,r?{add:n}:{remove:n},i,s,o):this._toggleClass(n,r):e.effects.animateClass.call(this,{toggle:n},r,i,s)},switchClass:function(t,n,r,i,s){return e.effects.animateClass.call(this,{add:n,remove:t},r,i,s)}})}(),function(){function i(t,n,r,i){e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},n==null&&(n={}),e.isFunction(n)&&(i=n,r=null,n={});if(typeof n=="number"||e.fx.speeds[n])i=r,r=n,n={};return e.isFunction(r)&&(i=r,r=null),n&&e.extend(t,n),r=r||n.duration,t.duration=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,t.complete=i||n.complete,t}function s(t){return!t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects.effect[t]?n&&e.effects[t]?!1:!0:!1}e.extend(e.effects,{version:"1.9.1",save:function(e,t){for(var n=0;n<t.length;n++)t[n]!==null&&e.data(r+t[n],e[0].style[t[n]])},restore:function(e,n){var i,s;for(s=0;s<n.length;s++)n[s]!==null&&(i=e.data(r+n[s]),i===t&&(i=""),e.css(n[s],i))},setMode:function(e,t){return t==="toggle"&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var n,r;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=e[1]/t.width}return{x:r,y:n}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},r=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},s=document.activeElement;try{s.id}catch(o){s=document.body}return t.wrap(r),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),r=t.parent(),t.css("position")==="static"?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),r.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){var s=t.cssUnit(n);s[0]>0&&(i[n]=s[0]*r+s[1])}),i}}),e.fn.extend({effect:function(){function a(n){function u(){e.isFunction(i)&&i.call(r[0]),e.isFunction(n)&&n()}var r=e(this),i=t.complete,s=t.mode;(r.is(":hidden")?s==="hide":s==="show")?u():o.call(r[0],t,u)}var t=i.apply(this,arguments),r=t.mode,s=t.queue,o=e.effects.effect[t.effect],u=!o&&n&&e.effects[t.effect];return e.fx.off||!o&&!u?r?this[r](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):o?s===!1?this.each(a):this.queue(s||"fx",a):u.call(this,{options:t,duration:t.duration,callback:t.complete,mode:t.mode})},_show:e.fn.show,show:function(e){if(s(e))return this._show.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(s(e))return this._hide.apply(this,arguments);var t=i.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(s(t)||typeof t=="boolean"||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=i.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)},cssUnit:function(t){var n=this.css(t),r=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){var t,n=4;while(e<((t=Math.pow(2,--n))-1)/11);return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(e*2)/2:1-n(e*-2+2)/2}})}()}(jQuery);(function(e,t){var n=/up|down|vertical/,r=/up|left|vertical|horizontal/;e.effects.effect.blind=function(t,i){var s=e(this),o=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(s,t.mode||"hide"),a=t.direction||"up",f=n.test(a),l=f?"height":"width",c=f?"top":"left",h=r.test(a),p={},d=u==="show",v,m,g;s.parent().is(".ui-effects-wrapper")?e.effects.save(s.parent(),o):e.effects.save(s,o),s.show(),v=e.effects.createWrapper(s).css({overflow:"hidden"}),m=v[l](),g=parseFloat(v.css(c))||0,p[l]=d?m:0,h||(s.css(f?"bottom":"right",0).css(f?"top":"left","auto").css({position:"absolute"}),p[c]=d?g:m+g),d&&(v.css(l,0),h||v.css(c,g+m)),v.animate(p,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){u==="hide"&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}})}})(jQuery);(function(e,t){e.effects.effect.bounce=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=s==="hide",u=s==="show",a=t.direction||"up",f=t.distance,l=t.times||5,c=l*2+(u||o?1:0),h=t.duration/c,p=t.easing,d=a==="up"||a==="down"?"top":"left",v=a==="up"||a==="left",m,g,y,b=r.queue(),w=b.length;(u||o)&&i.push("opacity"),e.effects.save(r,i),r.show(),e.effects.createWrapper(r),f||(f=r[d==="top"?"outerHeight":"outerWidth"]()/3),u&&(y={opacity:1},y[d]=0,r.css("opacity",0).css(d,v?-f*2:f*2).animate(y,h,p)),o&&(f/=Math.pow(2,l-1)),y={},y[d]=0;for(m=0;m<l;m++)g={},g[d]=(v?"-=":"+=")+f,r.animate(g,h,p).animate(y,h,p),f=o?f*2:f/2;o&&(g={opacity:0},g[d]=(v?"-=":"+=")+f,r.animate(g,h,p)),r.queue(function(){o&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}),w>1&&b.splice.apply(b,[1,0].concat(b.splice(w,c+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.clip=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"vertical",a=u==="vertical",f=a?"height":"width",l=a?"top":"left",c={},h,p,d;e.effects.save(r,i),r.show(),h=e.effects.createWrapper(r).css({overflow:"hidden"}),p=r[0].tagName==="IMG"?h:r,d=p[f](),o&&(p.css(f,0),p.css(l,d/2)),c[f]=o?d:0,c[l]=o?0:d/2,p.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o||r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.drop=function(t,n){var r=e(this),i=["position","top","bottom","left","right","opacity","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left"?"pos":"neg",l={opacity:o?1:0},c;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),c=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0)/2,o&&r.css("opacity",0).css(a,f==="pos"?-c:c),l[a]=(o?f==="pos"?"+=":"-=":f==="pos"?"-=":"+=")+c,r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.explode=function(t,n){function y(){c.push(this),c.length===r*i&&b()}function b(){s.css({visibility:"visible"}),e(c).remove(),u||s.hide(),n()}var r=t.pieces?Math.round(Math.sqrt(t.pieces)):3,i=r,s=e(this),o=e.effects.setMode(s,t.mode||"hide"),u=o==="show",a=s.show().css("visibility","hidden").offset(),f=Math.ceil(s.outerWidth()/i),l=Math.ceil(s.outerHeight()/r),c=[],h,p,d,v,m,g;for(h=0;h<r;h++){v=a.top+h*l,g=h-(r-1)/2;for(p=0;p<i;p++)d=a.left+p*f,m=p-(i-1)/2,s.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-p*f,top:-h*l}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:l,left:d+(u?m*f:0),top:v+(u?g*l:0),opacity:u?0:1}).animate({left:d+(u?0:m*f),top:v+(u?0:g*l),opacity:u?1:0},t.duration||500,t.easing,y)}}})(jQuery);(function(e,t){e.effects.effect.fade=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"toggle");r.animate({opacity:i},{queue:!1,duration:t.duration,easing:t.easing,complete:n})}})(jQuery);(function(e,t){e.effects.effect.fold=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=s==="hide",a=t.size||15,f=/([0-9]+)%/.exec(a),l=!!t.horizFirst,c=o!==l,h=c?["width","height"]:["height","width"],p=t.duration/2,d,v,m={},g={};e.effects.save(r,i),r.show(),d=e.effects.createWrapper(r).css({overflow:"hidden"}),v=c?[d.width(),d.height()]:[d.height(),d.width()],f&&(a=parseInt(f[1],10)/100*v[u?0:1]),o&&d.css(l?{height:0,width:a}:{height:a,width:0}),m[h[0]]=o?v[0]:a,g[h[1]]=o?v[1]:0,d.animate(m,p,t.easing).animate(g,p,t.easing,function(){u&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()})}})(jQuery);(function(e,t){e.effects.effect.highlight=function(t,n){var r=e(this),i=["backgroundImage","backgroundColor","opacity"],s=e.effects.setMode(r,t.mode||"show"),o={backgroundColor:r.css("backgroundColor")};s==="hide"&&(o.opacity=0),e.effects.save(r,i),r.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),n()}})}})(jQuery);(function(e,t){e.effects.effect.pulsate=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"show"),s=i==="show",o=i==="hide",u=s||i==="hide",a=(t.times||5)*2+(u?1:0),f=t.duration/a,l=0,c=r.queue(),h=c.length,p;if(s||!r.is(":visible"))r.css("opacity",0).show(),l=1;for(p=1;p<a;p++)r.animate({opacity:l},f,t.easing),l=1-l;r.animate({opacity:l},f,t.easing),r.queue(function(){o&&r.hide(),n()}),h>1&&c.splice.apply(c,[1,0].concat(c.splice(h,a+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.puff=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"hide"),s=i==="hide",o=parseInt(t.percent,10)||150,u=o/100,a={height:r.height(),width:r.width()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:i,complete:n,percent:s?o:100,from:s?a:{height:a.height*u,width:a.width*u}}),r.effect(t)},e.effects.effect.scale=function(t,n){var r=e(this),i=e.extend(!0,{},t),s=e.effects.setMode(r,t.mode||"effect"),o=parseInt(t.percent,10)||(parseInt(t.percent,10)===0?0:s==="hide"?0:100),u=t.direction||"both",a=t.origin,f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},l={y:u!=="horizontal"?o/100:1,x:u!=="vertical"?o/100:1};i.effect="size",i.queue=!1,i.complete=n,s!=="effect"&&(i.origin=a||["middle","center"],i.restore=!0),i.from=t.from||(s==="show"?{height:0,width:0}:f),i.to={height:f.height*l.y,width:f.width*l.x,outerHeight:f.outerHeight*l.y,outerWidth:f.outerWidth*l.x},i.fade&&(s==="show"&&(i.from.opacity=0,i.to.opacity=1),s==="hide"&&(i.from.opacity=1,i.to.opacity=0)),r.effect(i)},e.effects.effect.size=function(t,n){var r,i,s,o=e(this),u=["position","top","bottom","left","right","width","height","overflow","opacity"],a=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],l=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),d=t.restore||p!=="effect",v=t.scale||"both",m=t.origin||["middle","center"],g=o.css("position"),y=d?u:a,b={height:0,width:0};p==="show"&&o.show(),r={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},t.mode==="toggle"&&p==="show"?(o.from=t.to||b,o.to=t.from||r):(o.from=t.from||(p==="show"?b:r),o.to=t.to||(p==="hide"?b:r)),s={from:{y:o.from.height/r.height,x:o.from.width/r.width},to:{y:o.to.height/r.height,x:o.to.width/r.width}};if(v==="box"||v==="both")s.from.y!==s.to.y&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,s.from.y,o.from),o.to=e.effects.setTransition(o,c,s.to.y,o.to)),s.from.x!==s.to.x&&(y=y.concat(h),o.from=e.effects.setTransition(o,h,s.from.x,o.from),o.to=e.effects.setTransition(o,h,s.to.x,o.to));(v==="content"||v==="both")&&s.from.y!==s.to.y&&(y=y.concat(l).concat(f),o.from=e.effects.setTransition(o,l,s.from.y,o.from),o.to=e.effects.setTransition(o,l,s.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(i=e.effects.getBaseline(m,r),o.from.top=(r.outerHeight-o.outerHeight())*i.y,o.from.left=(r.outerWidth-o.outerWidth())*i.x,o.to.top=(r.outerHeight-o.to.outerHeight)*i.y,o.to.left=(r.outerWidth-o.to.outerWidth)*i.x),o.css(o.from);if(v==="content"||v==="both")c=c.concat(["marginTop","marginBottom"]).concat(l),h=h.concat(["marginLeft","marginRight"]),f=u.concat(c).concat(h),o.find("*[width]").each(function(){var n=e(this),r={height:n.height(),width:n.width()};d&&e.effects.save(n,f),n.from={height:r.height*s.from.y,width:r.width*s.from.x},n.to={height:r.height*s.to.y,width:r.width*s.to.x},s.from.y!==s.to.y&&(n.from=e.effects.setTransition(n,c,s.from.y,n.from),n.to=e.effects.setTransition(n,c,s.to.y,n.to)),s.from.x!==s.to.x&&(n.from=e.effects.setTransition(n,h,s.from.x,n.from),n.to=e.effects.setTransition(n,h,s.to.x,n.to)),n.css(n.from),n.animate(n.to,t.duration,t.easing,function(){d&&e.effects.restore(n,f)})});o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o.to.opacity===0&&o.css("opacity",o.from.opacity),p==="hide"&&o.hide(),e.effects.restore(o,y),d||(g==="static"?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,n){var r=parseInt(n,10),i=e?o.to.left:o.to.top;return n==="auto"?i+"px":r+i+"px"})})),e.effects.removeWrapper(o),n()}})}})(jQuery);(function(e,t){e.effects.effect.shake=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=t.direction||"left",u=t.distance||20,a=t.times||3,f=a*2+1,l=Math.round(t.duration/f),c=o==="up"||o==="down"?"top":"left",h=o==="up"||o==="left",p={},d={},v={},m,g=r.queue(),y=g.length;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),p[c]=(h?"-=":"+=")+u,d[c]=(h?"+=":"-=")+u*2,v[c]=(h?"-=":"+=")+u*2,r.animate(p,l,t.easing);for(m=1;m<a;m++)r.animate(d,l,t.easing).animate(v,l,t.easing);r.animate(d,l,t.easing).animate(p,l/2,t.easing).queue(function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}),y>1&&g.splice.apply(g,[1,0].concat(g.splice(y,f+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.slide=function(t,n){var r=e(this),i=["position","top","bottom","left","right","width","height"],s=e.effects.setMode(r,t.mode||"show"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left",l,c={};e.effects.save(r,i),r.show(),l=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(r).css({overflow:"hidden"}),o&&r.css(a,f?isNaN(l)?"-"+l:-l:l),c[a]=(o?f?"+=":"-=":f?"-=":"+=")+l,r.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.transfer=function(t,n){var r=e(this),i=e(t.to),s=i.css("position")==="fixed",o=e("body"),u=s?o.scrollTop():0,a=s?o.scrollLeft():0,f=i.offset(),l={top:f.top-u,left:f.left-a,height:i.innerHeight(),width:i.innerWidth()},c=r.offset(),h=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(t.className).css({top:c.top-u,left:c.left-a,height:r.innerHeight(),width:r.innerWidth(),position:s?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){h.remove(),n()})}})(jQuery);(function(e,t){var n=!1;e.widget("ui.menu",{version:"1.9.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var r=e(t.target).closest(".ui-menu-item");!n&&r.not(".ui-state-disabled").length&&(n=!0,this.select(t),r.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var n=e(t.currentTarget);n.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),n=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function a(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,r,i,s,o,u=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:u=!1,r=this.previousFilter||"",i=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),i===r?s=!0:i=r+i,o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())}),n=s&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(i=String.fromCharCode(t.keyCode),o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}u&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n=this.options.icons.submenu,r=this.element.find(this.options.menus+":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"});t=r.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),r.each(function(){var t=e(this),r=t.prev("a"),i=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);r.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",r.attr("id"))}),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var n,r;this.blur(e,e&&e.type==="focus"),this._scrollIntoView(t),this.active=t.first(),r=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&e.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=t.children(".ui-menu"),n.length&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,r,i,s,o,u;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-n-r,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),u=t.height(),i<0?this.activeMenu.scrollTop(s+i):i+u>o&&this.activeMenu.scrollTop(s+i-o+u))},blur:function(e,t){t||clearTimeout(this.timer);if(!this.active)return;this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active})},_startOpening:function(e){clearTimeout(this.timer);if(e.attr("aria-hidden")!=="true")return;this.timer=this._delay(function(){this._close(),this._open(e)},this.delay)},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element),this._close(r),this.blur(t),this.activeMenu=r},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var r;this.active&&(e==="first"||e==="last"?r=this.active[e==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):r=this.active[e+"All"](".ui-menu-item").eq(0));if(!r||!r.length||!this.active)r=this.activeMenu.children(".ui-menu-item")[t]();this.focus(n,r)},nextPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isLastItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r-i<0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())},previousPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isFirstItem())return;this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r+i>0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)}})})(jQuery);(function(e,t){e.widget("ui.progressbar",{version:"1.9.1",options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return e===t?this._value():(this._setOption("value",e),this)},_setOption:function(e,t){e==="value"&&(this.options.value=t,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(e,t)},_value:function(){var e=this.options.value;return typeof e!="number"&&(e=0),Math.min(this.options.max,Math.max(this.min,e))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var e=this.value(),t=this._percentage();this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),this.valueDiv.toggle(e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.attr("aria-valuenow",e)}})})(jQuery);(function(e,t){e.widget("ui.resizable",e.ui.mouse,{version:"1.9.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var t=this,n=this.options;this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=n.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var r=this.handles.split(",");this.handles={};for(var i=0;i<r.length;i++){var s=e.trim(r[i]),o="ui-resizable-"+s,u=e('<div class="ui-resizable-handle '+o+'"></div>');u.css({zIndex:n.zIndex}),"se"==s&&u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(u)}}this._renderAxis=function(t){t=t||this.element;for(var n in this.handles){this.handles[n].constructor==String&&(this.handles[n]=e(this.handles[n],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var r=e(this.handles[n],this.element),i=0;i=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth();var s=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");t.css(s,i),this._proportionallyResize()}if(!e(this.handles[n]).length)continue}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),n.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(n.disabled)return;e(this).removeClass("ui-resizable-autohide"),t._handles.show()}).mouseleave(function(){if(n.disabled)return;t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var n=this.element;this.originalElement.css({position:n.css("position"),width:n.outerWidth(),height:n.outerHeight(),top:n.css("top"),left:n.css("left")}).insertAfter(n),n.remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var n=!1;for(var r in this.handles)e(this.handles[r])[0]==t.target&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var r=this.options,i=this.element.position(),s=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(s.is(".ui-draggable")||/absolute/.test(s.css("position")))&&s.css({position:"absolute",top:i.top,left:i.left}),this._renderProxy();var o=n(this.helper.css("left")),u=n(this.helper.css("top"));r.containment&&(o+=e(r.containment).scrollLeft()||0,u+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:u},this.size=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalPosition={left:o,top:u},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof r.aspectRatio=="number"?r.aspectRatio:this.originalSize.width/this.originalSize.height||1;var a=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor",a=="auto"?this.axis+"-resize":a),s.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(e){var t=this.helper,n=this.options,r={},i=this,s=this.originalMousePosition,o=this.axis,u=e.pageX-s.left||0,a=e.pageY-s.top||0,f=this._change[o];if(!f)return!1;var l=f.apply(this,[e,u,a]);this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey)l=this._updateRatio(l,e);return l=this._respectSize(l,e),this._propagate("resize",e),t.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",e,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var n=this.options,r=this;if(this._helper){var i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:r.sizeDiff.height,u=s?0:r.sizeDiff.width,a={width:r.helper.width()-u,height:r.helper.height()-o},f=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,l=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;n.animate||this.element.css(e.extend(a,{top:l,left:f})),r.helper.height(r.size.height),r.helper.width(r.size.width),this._helper&&!n.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t=this.options,n,i,s,o,u;u={minWidth:r(t.minWidth)?t.minWidth:0,maxWidth:r(t.maxWidth)?t.maxWidth:Infinity,minHeight:r(t.minHeight)?t.minHeight:0,maxHeight:r(t.maxHeight)?t.maxHeight:Infinity};if(this._aspectRatio||e)n=u.minHeight*this.aspectRatio,s=u.minWidth/this.aspectRatio,i=u.maxHeight*this.aspectRatio,o=u.maxWidth/this.aspectRatio,n>u.minWidth&&(u.minWidth=n),s>u.minHeight&&(u.minHeight=s),i<u.maxWidth&&(u.maxWidth=i),o<u.maxHeight&&(u.maxHeight=o);this._vBoundaries=u},_updateCache:function(e){var t=this.options;this.offset=this.helper.offset(),r(e.left)&&(this.position.left=e.left),r(e.top)&&(this.position.top=e.top),r(e.height)&&(this.size.height=e.height),r(e.width)&&(this.size.width=e.width)},_updateRatio:function(e,t){var n=this.options,i=this.position,s=this.size,o=this.axis;return r(e.height)?e.width=e.height*this.aspectRatio:r(e.width)&&(e.height=e.width/this.aspectRatio),o=="sw"&&(e.left=i.left+(s.width-e.width),e.top=null),o=="nw"&&(e.top=i.top+(s.height-e.height),e.left=i.left+(s.width-e.width)),e},_respectSize:function(e,t){var n=this.helper,i=this._vBoundaries,s=this._aspectRatio||t.shiftKey,o=this.axis,u=r(e.width)&&i.maxWidth&&i.maxWidth<e.width,a=r(e.height)&&i.maxHeight&&i.maxHeight<e.height,f=r(e.width)&&i.minWidth&&i.minWidth>e.width,l=r(e.height)&&i.minHeight&&i.minHeight>e.height;f&&(e.width=i.minWidth),l&&(e.height=i.minHeight),u&&(e.width=i.maxWidth),a&&(e.height=i.maxHeight);var c=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,p=/sw|nw|w/.test(o),d=/nw|ne|n/.test(o);f&&p&&(e.left=c-i.minWidth),u&&p&&(e.left=c-i.maxWidth),l&&d&&(e.top=h-i.minHeight),a&&d&&(e.top=h-i.maxHeight);var v=!e.width&&!e.height;return v&&!e.left&&e.top?e.top=null:v&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){var t=this.options;if(!this._proportionallyResizeElements.length)return;var n=this.helper||this.element;for(var r=0;r<this._proportionallyResizeElements.length;r++){var i=this._proportionallyResizeElements[r];if(!this.borderDif){var s=[i.css("borderTopWidth"),i.css("borderRightWidth"),i.css("borderBottomWidth"),i.css("borderLeftWidth")],o=[i.css("paddingTop"),i.css("paddingRight"),i.css("paddingBottom"),i.css("paddingLeft")];this.borderDif=e.map(s,function(e,t){var n=parseInt(e,10)||0,r=parseInt(o[t],10)||0;return n+r})}i.css({height:n.height()-this.borderDif[0]-this.borderDif[2]||0,width:n.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,n=this.options;this.elementOffset=t.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var r=e.ui.ie6?1:0,i=e.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+i,height:this.element.outerHeight()+i,position:"absolute",left:this.elementOffset.left-r+"px",top:this.elementOffset.top-r+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t,n){return{width:this.originalSize.width+t}},w:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;return{top:s.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),t!="resize"&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","alsoResize",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};typeof i.alsoResize=="object"&&!i.alsoResize.parentNode?i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)}):s(i.alsoResize)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.originalSize,o=r.originalPosition,u={height:r.size.height-s.height||0,width:r.size.width-s.width||0,top:r.position.top-o.top||0,left:r.position.left-o.left||0},a=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("resizable-alsoresize"),s={},o=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(u[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})};typeof i.alsoResize=="object"&&!i.alsoResize.nodeType?e.each(i.alsoResize,function(e,t){a(e,t)}):a(i.alsoResize)},stop:function(t,n){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),u=o&&e.ui.hasScroll(s[0],"left")?0:r.sizeDiff.height,a=o?0:r.sizeDiff.width,f={width:r.size.width-a,height:r.size.height-u},l=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,c=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;r.element.animate(e.extend(f,c&&l?{top:c,left:l}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var n={width:parseInt(r.element.css("width"),10),height:parseInt(r.element.css("height"),10),top:parseInt(r.element.css("top"),10),left:parseInt(r.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),r._updateCache(n),r._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(t,r){var i=e(this).data("resizable"),s=i.options,o=i.element,u=s.containment,a=u instanceof e?u.get(0):/parent/.test(u)?o.parent().get(0):u;if(!a)return;i.containerElement=e(a);if(/document/.test(u)||u==document)i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var f=e(a),l=[];e(["Top","Right","Left","Bottom"]).each(function(e,t){l[e]=n(f.css("padding"+t))}),i.containerOffset=f.offset(),i.containerPosition=f.position(),i.containerSize={height:f.innerHeight()-l[3],width:f.innerWidth()-l[1]};var c=i.containerOffset,h=i.containerSize.height,p=i.containerSize.width,d=e.ui.hasScroll(a,"left")?a.scrollWidth:p,v=e.ui.hasScroll(a)?a.scrollHeight:h;i.parentData={element:a,left:c.left,top:c.top,width:d,height:v}}},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.containerSize,o=r.containerOffset,u=r.size,a=r.position,f=r._aspectRatio||t.shiftKey,l={top:0,left:0},c=r.containerElement;c[0]!=document&&/static/.test(c.css("position"))&&(l=o),a.left<(r._helper?o.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-o.left:r.position.left-l.left),f&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=i.helper?o.left:0),a.top<(r._helper?o.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-o.top:r.position.top),f&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?o.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top;var h=Math.abs((r._helper?r.offset.left-l.left:r.offset.left-l.left)+r.sizeDiff.width),p=Math.abs((r._helper?r.offset.top-l.top:r.offset.top-o.top)+r.sizeDiff.height),d=r.containerElement.get(0)==r.element.parent().get(0),v=/relative|absolute/.test(r.containerElement.css("position"));d&&v&&(h-=r.parentData.left),h+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-h,f&&(r.size.height=r.size.width/r.aspectRatio)),p+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-p,f&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.position,o=r.containerOffset,u=r.containerPosition,a=r.containerElement,f=e(r.helper),l=f.offset(),c=f.outerWidth()-r.sizeDiff.width,h=f.outerHeight()-r.sizeDiff.height;r._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h}),r._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h})}}),e.ui.plugin.add("resizable","ghost",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size;r.ghost=r.originalElement.clone(),r.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:""),r.ghost.appendTo(r.helper)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.ghost.css({position:"relative",height:r.size.height,width:r.size.width})},stop:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.helper&&r.helper.get(0).removeChild(r.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size,o=r.originalSize,u=r.originalPosition,a=r.axis,f=i._aspectRatio||t.shiftKey;i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var l=Math.round((s.width-o.width)/(i.grid[0]||1))*(i.grid[0]||1),c=Math.round((s.height-o.height)/(i.grid[1]||1))*(i.grid[1]||1);/^(se|s|e)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c):/^(ne)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c):/^(sw)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.left=u.left-l):(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c,r.position.left=u.left-l)}});var n=function(e){return parseInt(e,10)||0},r=function(e){return!isNaN(parseInt(e,10))}})(jQuery);(function(e,t){e.widget("ui.selectable",e.ui.mouse,{version:"1.9.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var n;this.refresh=function(){n=e(t.options.filter,t.element[0]),n.addClass("ui-selectee"),n.each(function(){var t=e(this),n=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=n.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var n=this;this.opos=[t.pageX,t.pageY];if(this.options.disabled)return;var r=this.options;this.selectees=e(r.filter,this.element[0]),this._trigger("start",t),e(r.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=e.data(this,"selectable-item");r.startselected=!0,!t.metaKey&&!t.ctrlKey&&(r.$element.removeClass("ui-selected"),r.selected=!1,r.$element.addClass("ui-unselecting"),r.unselecting=!0,n._trigger("unselecting",t,{unselecting:r.element}))}),e(t.target).parents().andSelf().each(function(){var r=e.data(this,"selectable-item");if(r){var i=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected");return r.$element.removeClass(i?"ui-unselecting":"ui-selected").addClass(i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",t,{selecting:r.element}):n._trigger("unselecting",t,{unselecting:r.element}),!1}})},_mouseDrag:function(t){var n=this;this.dragged=!0;if(this.options.disabled)return;var r=this.options,i=this.opos[0],s=this.opos[1],o=t.pageX,u=t.pageY;if(i>o){var a=o;o=i,i=a}if(s>u){var a=u;u=s,s=a}return this.helper.css({left:i,top:s,width:o-i,height:u-s}),this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!a||a.element==n.element[0])return;var f=!1;r.tolerance=="touch"?f=!(a.left>o||a.right<i||a.top>u||a.bottom<s):r.tolerance=="fit"&&(f=a.left>i&&a.right<o&&a.top>s&&a.bottom<u),f?(a.selected&&(a.$element.removeClass("ui-selected"),a.selected=!1),a.unselecting&&(a.$element.removeClass("ui-unselecting"),a.unselecting=!1),a.selecting||(a.$element.addClass("ui-selecting"),a.selecting=!0,n._trigger("selecting",t,{selecting:a.element}))):(a.selecting&&((t.metaKey||t.ctrlKey)&&a.startselected?(a.$element.removeClass("ui-selecting"),a.selecting=!1,a.$element.addClass("ui-selected"),a.selected=!0):(a.$element.removeClass("ui-selecting"),a.selecting=!1,a.startselected&&(a.$element.addClass("ui-unselecting"),a.unselecting=!0),n._trigger("unselecting",t,{unselecting:a.element}))),a.selected&&!t.metaKey&&!t.ctrlKey&&!a.startselected&&(a.$element.removeClass("ui-selected"),a.selected=!1,a.$element.addClass("ui-unselecting"),a.unselecting=!0,n._trigger("unselecting",t,{unselecting:a.element})))}),!1},_mouseStop:function(t){var n=this;this.dragged=!1;var r=this.options;return e(".ui-unselecting",this.element[0]).each(function(){var r=e.data(this,"selectable-item");r.$element.removeClass("ui-unselecting"),r.unselecting=!1,r.startselected=!1,n._trigger("unselected",t,{unselected:r.element})}),e(".ui-selecting",this.element[0]).each(function(){var r=e.data(this,"selectable-item");r.$element.removeClass("ui-selecting").addClass("ui-selected"),r.selecting=!1,r.selected=!0,r.startselected=!0,n._trigger("selected",t,{selected:r.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(e,t){var n=5;e.widget("ui.slider",e.ui.mouse,{version:"1.9.1",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var t,r,i=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",u=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(i.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),i.range&&(i.range===!0&&(i.values||(i.values=[this._valueMin(),this._valueMin()]),i.values.length&&i.values.length!==2&&(i.values=[i.values[0],i.values[0]])),this.range=e("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(i.range==="min"||i.range==="max"?" ui-slider-range-"+i.range:""))),r=i.values&&i.values.length||1;for(t=s.length;t<r;t++)u.push(o);this.handles=s.add(e(u.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).mouseenter(function(){i.disabled||e(this).addClass("ui-state-hover")}).mouseleave(function(){e(this).removeClass("ui-state-hover")}).focus(function(){i.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)}),this._on(this.handles,{keydown:function(t){var r,i,s,o,u=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:t.preventDefault();if(!this._keySliding){this._keySliding=!0,e(t.target).addClass("ui-state-active"),r=this._start(t,u);if(r===!1)return}}o=this.options.step,this.options.values&&this.options.values.length?i=s=this.values(u):i=s=this.value();switch(t.keyCode){case e.ui.keyCode.HOME:s=this._valueMin();break;case e.ui.keyCode.END:s=this._valueMax();break;case e.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/n);break;case e.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/n);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-o)}this._slide(t,u,s)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),e(t.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var n,r,i,s,o,u,a,f,l=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},r=this._normValueFromMouse(n),i=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var n=Math.abs(r-l.values(t));i>n&&(i=n,s=e(this),o=t)}),c.range===!0&&this.values(1)===c.min&&(o+=1,s=e(this.handles[o])),u=this._start(t,o),u===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,s.addClass("ui-state-active").focus(),a=s.offset(),f=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=f?{left:0,top:0}:{left:t.pageX-a.left-s.width()/2,top:t.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i,s;return this.orientation==="horizontal"?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),r=n/t,r>1&&(r=1),r<0&&(r=0),this.orientation==="vertical"&&(r=1-r),i=this._valueMax()-this._valueMin(),s=this._valueMin()+r*i,this._trimAlignValue(s)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var r,i,s;this.options.values&&this.options.values.length?(r=this.values(t?0:1),this.options.values.length===2&&this.options.range===!0&&(t===0&&n>r||t===1&&n<r)&&(n=r),n!==this.values(t)&&(i=this.values(),i[t]=n,s=this._trigger("slide",e,{handle:this.handles[t],value:n,values:i}),r=this.values(t?0:1),s!==!1&&this.values(t,n,!0))):n!==this.value()&&(s=this._trigger("slide",e,{handle:this.handles[t],value:n}),s!==!1&&this.value(n))},_stop:function(e,t){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("stop",e,n)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("change",e,n)}},value:function(e){if(arguments.length){this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0);return}return this._value()},values:function(t,n){var r,i,s;if(arguments.length>1){this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),this._change(null,t);return}if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();r=this.options.values,i=arguments[0];for(s=0;s<r.length;s+=1)r[s]=this._trimAlignValue(i[s]),this._change(null,s);this._refreshValue()},_setOption:function(t,n){var r,i=0;e.isArray(this.options.values)&&(i=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments);switch(t){case"disabled":n?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(r=0;r<i;r+=1)this._change(null,r);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e),e},_values:function(e){var t,n,r;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t),t;n=this.options.values.slice();for(r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(n[r]);return n},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return Math.abs(n)*2>=t&&(r+=n>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,n,r,i,s,o=this.options.range,u=this.options,a=this,f=this._animateOff?!1:u.animate,l={};this.options.values&&this.options.values.length?this.handles.each(function(r){n=(a.values(r)-a._valueMin())/(a._valueMax()-a._valueMin())*100,l[a.orientation==="horizontal"?"left":"bottom"]=n+"%",e(this).stop(1,1)[f?"animate":"css"](l,u.animate),a.options.range===!0&&(a.orientation==="horizontal"?(r===0&&a.range.stop(1,1)[f?"animate":"css"]({left:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:u.animate})):(r===0&&a.range.stop(1,1)[f?"animate":"css"]({bottom:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:u.animate}))),t=n}):(r=this.value(),i=this._valueMin(),s=this._valueMax(),n=s!==i?(r-i)/(s-i)*100:0,l[this.orientation==="horizontal"?"left":"bottom"]=n+"%",this.handle.stop(1,1)[f?"animate":"css"](l,u.animate),o==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[f?"animate":"css"]({width:n+"%"},u.animate),o==="max"&&this.orientation==="horizontal"&&this.range[f?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:u.animate}),o==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[f?"animate":"css"]({height:n+"%"},u.animate),o==="max"&&this.orientation==="vertical"&&this.range[f?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:u.animate}))}})})(jQuery);(function(e,t){e.widget("ui.sortable",e.ui.mouse,{version:"1.9.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?e.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){t==="disabled"?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(t);var i=null,s=e(t.target).parents().each(function(){if(e.data(this,r.widgetName+"-item")==r)return i=e(this),!1});e.data(t.target,r.widgetName+"-item")==r&&(i=e(t.target));if(!i)return!1;if(this.options.handle&&!n){var o=!1;e(this.options.handle,i).find("*").andSelf().each(function(){this==t.target&&(o=!0)});if(!o)return!1}return this.currentItem=i,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,r){var i=this.options;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),i.containment&&this._setContainment(),i.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",i.cursor)),i.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",i.opacity)),i.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",i.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(var s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-e(document).scrollTop()<n.scrollSensitivity?r=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(r=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed)),t.pageX-e(document).scrollLeft()<n.scrollSensitivity?r=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(r=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var i=this.items.length-1;i>=0;i--){var s=this.items[i],o=s.item[0],u=this._intersectsWithPointer(s);if(!u)continue;if(s.instance!==this.currentContainer)continue;if(o!=this.currentItem[0]&&this.placeholder[u==1?"next":"prev"]()[0]!=o&&!e.contains(this.placeholder[0],o)&&(this.options.type=="semi-dynamic"?!e.contains(this.element[0],o):!0)){this.direction=u==1?"down":"up";if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(!t)return;e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this,i=this.placeholder.offset();this.reverting=!0,e(this.helper).animate({left:i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1},cancel:function(){if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,s=e.left,o=s+e.width,u=e.top,a=u+e.height,f=this.offset.click.top,l=this.offset.click.left,c=r+f>u&&r+f<a&&t+l>s&&t+l<o;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?c:s<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<o&&u<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<a},_intersectsWithPointer:function(t){var n=this.options.axis==="x"||e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),r=this.options.axis==="y"||e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),i=n&&r,s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return i?this.floating?o&&o=="right"||s=="down"?2:1:s&&(s=="down"?2:1):!1},_intersectsWithSides:function(t){var n=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),r=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?s=="right"&&r||s=="left"&&!r:i&&(i=="down"&&n||i=="up"&&!n)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return e!=0&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return e!=0&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n=[],r=[],i=this._connectWith();if(i&&t)for(var s=i.length-1;s>=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&r.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])}}r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var s=r.length-1;s>=0;s--)r[s][0].each(function(){n.push(this)});return e(n)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++)if(t[n]==e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n=this.items,r=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],i=this._connectWith();if(i&&this.ready)for(var s=i.length-1;s>=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&(r.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a))}}for(var s=r.length-1;s>=0;s--){var f=r[s][1],l=r[s][0];for(var u=0,c=l.length;u<c;u++){var h=e(l[u]);h.data(this.widgetName+"-item",f),n.push({item:h,instance:f,width:0,height:0,left:0,top:0})}}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var n=this.items.length-1;n>=0;n--){var r=this.items[n];if(r.instance!=this.currentContainer&&this.currentContainer&&r.item[0]!=this.currentItem[0])continue;var i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;t||(r.width=i.outerWidth(),r.height=i.outerHeight());var s=i.offset();r.left=s.left,r.top=s.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var n=this.containers.length-1;n>=0;n--){var s=this.containers[n].element.offset();this.containers[n].containerCache.left=s.left,this.containers[n].containerCache.top=s.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var n=t.options;if(!n.placeholder||n.placeholder.constructor==String){var r=n.placeholder;n.placeholder={element:function(){var n=e(document.createElement(t.currentItem[0].nodeName)).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(n.style.visibility="hidden"),n},update:function(e,i){if(r&&!n.forcePlaceholderSize)return;i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10))}}}t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var n=null,r=null;for(var i=this.containers.length-1;i>=0;i--){if(e.contains(this.currentItem[0],this.containers[i].element[0]))continue;if(this._intersectsWith(this.containers[i].containerCache)){if(n&&e.contains(this.containers[i].element[0],n.element[0]))continue;n=this.containers[i],r=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0)}if(!n)return;if(this.containers.length===1)this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1;else{var s=1e4,o=null,u=this.containers[r].floating?"left":"top",a=this.containers[r].floating?"width":"height",f=this.positionAbs[u]+this.offset.click[u];for(var l=this.items.length-1;l>=0;l--){if(!e.contains(this.containers[r].element[0],this.items[l].item[0]))continue;if(this.items[l].item[0]==this.currentItem[0])continue;var c=this.items[l].item.offset()[u],h=!1;Math.abs(c-f)>Math.abs(c+this.items[l][a]-f)&&(h=!0,c+=this.items[l][a]),Math.abs(c-f)<s&&(s=Math.abs(c-f),o=this.items[l],this.direction=h?"up":"down")}if(!o&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[r],o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[r].element,!0),this._trigger("change",t,this._uiHash()),this.containers[r]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):n.helper=="clone"?this.currentItem.clone():this.currentItem;return r.parents("body").length||e(n.appendTo!="parent"?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(r[0].style.width==""||n.forceHelperSize)&&r.width(this.currentItem.width()),(r[0].style.height==""||n.forceHelperSize)&&r.height(this.currentItem.height()),r},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)){var n=e(t.containment)[0],r=e(t.containment).offset(),i=e(n).css("overflow")!="hidden";this.containment=[r.left+(parseInt(e(n).css("borderLeftWidth"),10)||0)+(parseInt(e(n).css("paddingLeft"),10)||0)-this.margins.left,r.top+(parseInt(e(n).css("borderTopWidth"),10)||0)+(parseInt(e(n).css("paddingTop"),10)||0)-this.margins.top,r.left+(i?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(e(n).css("borderLeftWidth"),10)||0)-(parseInt(e(n).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,r.top+(i?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(e(n).css("borderTopWidth"),10)||0)-(parseInt(e(n).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var s=t.pageX,o=t.pageY;if(this.originalPosition){this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top));if(n.grid){var u=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1];o=this.containment?u-this.offset.click.top<this.containment[1]||u-this.offset.click.top>this.containment[3]?u-this.offset.click.top<this.containment[1]?u+n.grid[1]:u-n.grid[1]:u:u;var a=this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0];s=this.containment?a-this.offset.click.left<this.containment[0]||a-this.offset.click.left>this.containment[2]?a-this.offset.click.left<this.containment[0]?a+n.grid[0]:a-n.grid[0]:a:a}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay(function(){i==this.counter&&this.refreshPositions(!r)})},_clear:function(t,n){this.reverting=!1;var r=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS)if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static")this._storedCSS[i]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!n&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!n&&r.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(n||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))));for(var i=this.containers.length-1;i>=0;i--)n||r.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!n){this._trigger("beforeStop",t,this._uiHash());for(var i=0;i<r.length;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}n||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null;if(!n){for(var i=0;i<r.length;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})})(jQuery);(function(e){function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.widget("ui.spinner",{version:"1.9.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},n=this.element;return e.each(["min","max","step"],function(e,r){var i=n.attr(r);i!==undefined&&i.length&&(t[r]=i)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e)},mousewheel:function(e,t){if(!t)return;if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()},"mousedown .ui-spinner-button":function(t){function r(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),r.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,r.call(this)});if(this._start(t)===!1)return;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(!e(t.currentTarget).hasClass("ui-state-active"))return;if(this._start(t)===!1)return!1;this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(e.height()*.5)&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var n=this.options,r=e.ui.keyCode;switch(t.keyCode){case r.UP:return this._repeat(null,1,t),!0;case r.DOWN:return this._repeat(null,-1,t),!0;case r.PAGE_UP:return this._repeat(null,n.page,t),!0;case r.PAGE_DOWN:return this._repeat(null,-n.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>▼</span>"+"</a>"},_start:function(e){return!this.spinning&&this._trigger("start",e)===!1?!1:(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter));if(!this.spinning||this._trigger("spin",t,{value:n})!==!1)this._value(n),this.counter++},_increment:function(t){var n=this.options.incremental;return n?e.isFunction(n)?n(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return this.options.min!==null&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return n===-1?0:t.length-n-1},_adjustValue:function(e){var t,n,r=this.options;return t=r.min!==null?r.min:0,n=e-t,n=Math.round(n/r.step)*r.step,e=t+n,e=parseFloat(e.toFixed(this._precision())),r.max!==null&&e>r.max?r.max:r.min!==null&&e<r.min?r.min:e},_stop:function(e){if(!this.spinning)return;clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e)},_setOption:function(e,t){if(e==="culture"||e==="numberFormat"){var n=this._parse(this.element.val());this.options[e]=t,this.element.val(this._format(n));return}(e==="max"||e==="min"||e==="step")&&typeof t=="string"&&(t=this._parse(t)),this._super(e,t),e==="disabled"&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(e){this._super(e),this._value(this.element.val())}),_parse:function(e){return typeof e=="string"&&e!==""&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),e===""||isNaN(e)?null:e},_format:function(e){return e===""?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(e,t){var n;e!==""&&(n=this._parse(e),n!==null&&(t||(n=this._adjustValue(n)),e=this._format(n))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:t(function(e){this._stepUp(e)}),_stepUp:function(e){this._spin((e||1)*this.options.step)},stepDown:t(function(e){this._stepDown(e)}),_stepDown:function(e){this._spin((e||1)*-this.options.step)},pageUp:t(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:t(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());t(this._value).call(this,e)},widget:function(){return this.uiSpinner}})})(jQuery);(function(e,t){function i(){return++n}function s(e){return e.hash.length>1&&e.href.replace(r,"")===location.href.replace(r,"")}var n=0,r=/#.*$/;e.widget("ui.tabs",{version:"1.9.1",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var t=this,n=this.options,r=n.active,i=location.hash.substring(1);this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",n.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs();if(r===null){i&&this.tabs.each(function(t,n){if(e(n).attr("aria-controls")===i)return r=t,!1}),r===null&&(r=this.tabs.index(this.tabs.filter(".ui-tabs-active")));if(r===null||r===-1)r=this.tabs.length?0:!1}r!==!1&&(r=this.tabs.index(this.tabs.eq(r)),r===-1&&(r=n.collapsible?!1:0)),n.active=r,!n.collapsible&&n.active===!1&&this.anchors.length&&(n.active=0),e.isArray(n.disabled)&&(n.disabled=e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(this.options.active):this.active=e(),this._refresh(),this.active.length&&this.load(n.active)},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var n=e(this.document[0].activeElement).closest("li"),r=this.tabs.index(n),i=!0;if(this._handlePageNav(t))return;switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:r++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:i=!1,r--;break;case e.ui.keyCode.END:r=this.anchors.length-1;break;case e.ui.keyCode.HOME:r=0;break;case e.ui.keyCode.SPACE:t.preventDefault(),clearTimeout(this.activating),this._activate(r);return;case e.ui.keyCode.ENTER:t.preventDefault(),clearTimeout(this.activating),this._activate(r===this.options.active?!1:r);return;default:return}t.preventDefault(),clearTimeout(this.activating),r=this._focusNextTab(r,i),t.ctrlKey||(n.attr("aria-selected","false"),this.tabs.eq(r).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",r)},this.delay))},_panelKeydown:function(t){if(this._handlePageNav(t))return;t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(t,n){function i(){return t>r&&(t=0),t<0&&(t=r),t}var r=this.tabs.length-1;while(e.inArray(i(),this.options.disabled)!==-1)t=n?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){if(e==="active"){this._activate(t);return}if(e==="disabled"){this._setupDisabled(t);return}this._super(e,t),e==="collapsible"&&(this.element.toggleClass("ui-tabs-collapsible",t),!t&&this.options.active===!1&&this._activate(0)),e==="event"&&this._setupEvents(t),e==="heightStyle"&&this._setupHeightStyle(t)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,n=this.tablist.children(":has(a[href])");t.disabled=e.map(n.filter(".ui-state-disabled"),function(e){return n.index(e)}),this._processTabs(),t.active===!1||!this.anchors.length?(t.active=!1,this.active=e()):this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(n,r){var i,o,u,a=e(r).uniqueId().attr("id"),f=e(r).closest("li"),l=f.attr("aria-controls");s(r)?(i=r.hash,o=t.element.find(t._sanitizeSelector(i))):(u=t._tabId(f),i="#"+u,o=t.element.find(i),o.length||(o=t._createPanel(u),o.insertAfter(t.panels[n-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),l&&f.data("ui-tabs-aria-controls",l),f.attr({"aria-controls":i.substring(1),"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var n=0,r;r=this.tabs[n];n++)t===!0||e.inArray(n,t)!==-1?e(r).addClass("ui-state-disabled").attr("aria-disabled","true"):e(r).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var n={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,r,i=this.element.parent();t==="fill"?(e.support.minHeight||(r=i.css("overflow"),i.css("overflow","hidden")),n=i.height(),this.element.siblings(":visible").each(function(){var t=e(this),r=t.css("position");if(r==="absolute"||r==="fixed")return;n-=t.outerHeight(!0)}),r&&i.css("overflow",r),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):t==="auto"&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i.closest("li"),o=s[0]===r[0],u=o&&n.collapsible,a=u?e():this._getPanelForTab(s),f=r.length?this._getPanelForTab(r):e(),l={oldTab:r,oldPanel:f,newTab:u?e():s,newPanel:a};t.preventDefault();if(s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||this._trigger("beforeActivate",t,l)===!1)return;n.active=u?!1:this.tabs.index(s),this.active=o?e():s,this.xhr&&this.xhr.abort(),!f.length&&!a.length&&e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,l)},_toggle:function(t,n){function o(){r.running=!1,r._trigger("activate",t,n)}function u(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),i.length&&r.options.show?r._show(i,r.options.show,o):(i.show(),o())}var r=this,i=n.newPanel,s=n.oldPanel;this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),u()),s.attr({"aria-expanded":"false","aria-hidden":"true"}),n.oldTab.attr("aria-selected","false"),i.length&&s.length?n.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}),n.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var n,r=this._findActive(t);if(r[0]===this.active[0])return;r.length||(r=this.active),n=r.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return typeof e=="string"&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n):t.removeAttr("aria-controls")}),this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(n){var r=this.options.disabled;if(r===!1)return;n===t?r=!1:(n=this._getIndex(n),e.isArray(r)?r=e.map(r,function(e){return e!==n?e:null}):r=e.map(this.tabs,function(e,t){return t!==n?t:null})),this._setupDisabled(r)},disable:function(n){var r=this.options.disabled;if(r===!0)return;if(n===t)r=!0;else{n=this._getIndex(n);if(e.inArray(n,r)!==-1)return;e.isArray(r)?r=e.merge([n],r).sort():r=[n]}this._setupDisabled(r)},load:function(t,n){t=this._getIndex(t);var r=this,i=this.tabs.eq(t),o=i.find(".ui-tabs-anchor"),u=this._getPanelForTab(i),a={tab:i,panel:u};if(s(o[0]))return;this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&this.xhr.statusText!=="canceled"&&(i.addClass("ui-tabs-loading"),u.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){u.html(e),r._trigger("load",n,a)},1)}).complete(function(e,t){setTimeout(function(){t==="abort"&&r.panels.stop(!1,!0),i.removeClass("ui-tabs-loading"),u.removeAttr("aria-busy"),e===r.xhr&&delete r.xhr},1)}))},_ajaxSettings:function(t,n,r){var i=this;return{url:t.attr("href"),beforeSend:function(t,s){return i._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:s},r))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),e.uiBackCompat!==!1&&(e.ui.tabs.prototype._ui=function(e,t){return{tab:e,panel:t,index:this.anchors.index(e)}},e.widget("ui.tabs",e.ui.tabs,{url:function(e,t){this.anchors.eq(e).attr("href",t)}}),e.widget("ui.tabs",e.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var t=this;this._on({tabsbeforeload:function(n,r){if(e.data(r.tab[0],"cache.tabs")){n.preventDefault();return}r.jqXHR.success(function(){t.options.cache&&e.data(r.tab[0],"cache.tabs",!0)})}})},_ajaxSettings:function(t,n,r){var i=this.options.ajaxOptions;return e.extend({},i,{error:function(e,t){try{i.error(e,t,r.tab.closest("li").index(),r.tab[0])}catch(n){}}},this._superApply(arguments))},_setOption:function(e,t){e==="cache"&&t===!1&&this.anchors.removeData("cache.tabs"),this._super(e,t)},_destroy:function(){this.anchors.removeData("cache.tabs"),this._super()},url:function(e){this.anchors.eq(e).removeData("cache.tabs"),this._superApply(arguments)}}),e.widget("ui.tabs",e.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),e.widget("ui.tabs",e.ui.tabs,{options:{spinner:"<em>Loading…</em>"},_create:function(){this._super(),this._on({tabsbeforeload:function(e,t){if(e.target!==this.element[0]||!this.options.spinner)return;var n=t.tab.find("span"),r=n.html();n.html(this.options.spinner),t.jqXHR.complete(function(){n.html(r)})}})}}),e.widget("ui.tabs",e.ui.tabs,{options:{enable:null,disable:null},enable:function(t){var n=this.options,r;if(t&&n.disabled===!0||e.isArray(n.disabled)&&e.inArray(t,n.disabled)!==-1)r=!0;this._superApply(arguments),r&&this._trigger("enable",null,this._ui(this.anchors[t],this.panels[t]))},disable:function(t){var n=this.options,r;if(t&&n.disabled===!1||e.isArray(n.disabled)&&e.inArray(t,n.disabled)===-1)r=!0;this._superApply(arguments),r&&this._trigger("disable",null,this._ui(this.anchors[t],this.panels[t]))}}),e.widget("ui.tabs",e.ui.tabs,{options:{add:null,remove:null,tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},add:function(n,r,i){i===t&&(i=this.anchors.length);var s,o,u=this.options,a=e(u.tabTemplate.replace(/#\{href\}/g,n).replace(/#\{label\}/g,r)),f=n.indexOf("#")?this._tabId(a):n.replace("#","");return a.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0),a.attr("aria-controls",f),s=i>=this.tabs.length,o=this.element.find("#"+f),o.length||(o=this._createPanel(f),s?i>0?o.insertAfter(this.panels.eq(-1)):o.appendTo(this.element):o.insertBefore(this.panels[i])),o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),s?a.appendTo(this.tablist):a.insertBefore(this.tabs[i]),u.disabled=e.map(u.disabled,function(e){return e>=i?++e:e}),this.refresh(),this.tabs.length===1&&u.active===!1&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[i],this.panels[i])),this},remove:function(t){t=this._getIndex(t);var n=this.options,r=this.tabs.eq(t).remove(),i=this._getPanelForTab(r).remove();return r.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(t+(t+1<this.anchors.length?1:-1)),n.disabled=e.map(e.grep(n.disabled,function(e){return e!==t}),function(e){return e>=t?--e:e}),this.refresh(),this._trigger("remove",null,this._ui(r.find("a")[0],i[0])),this}}),e.widget("ui.tabs",e.ui.tabs,{length:function(){return this.anchors.length}}),e.widget("ui.tabs",e.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(t){var n=t.is("li")?t.find("a[href]"):t;return n=n[0],e(n).closest("li").attr("aria-controls")||n.title&&n.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+i()}}),e.widget("ui.tabs",e.ui.tabs,{options:{panelTemplate:"<div></div>"},_createPanel:function(t){return e(this.options.panelTemplate).attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),e.widget("ui.tabs",e.ui.tabs,{_create:function(){var e=this.options;e.active===null&&e.selected!==t&&(e.active=e.selected===-1?!1:e.selected),this._super(),e.selected=e.active,e.selected===!1&&(e.selected=-1)},_setOption:function(e,t){if(e!=="selected")return this._super(e,t);var n=this.options;this._super("active",t===-1?!1:t),n.selected=n.active,n.selected===!1&&(n.selected=-1)},_eventHandler:function(){this._superApply(arguments),this.options.selected=this.options.active,this.options.selected===!1&&(this.options.selected=-1)}}),e.widget("ui.tabs",e.ui.tabs,{options:{show:null,select:null},_create:function(){this._super(),this.options.active!==!1&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(e,t,n){var r=this._superApply(arguments);return r?(e==="beforeActivate"&&n.newTab.length?r=this._super("select",t,{tab:n.newTab.find(".ui-tabs-anchor")[0],panel:n.newPanel[0],index:n.newTab.closest("li").index()}):e==="activate"&&n.newTab.length&&(r=this._super("show",t,{tab:n.newTab.find(".ui-tabs-anchor")[0],panel:n.newPanel[0],index:n.newTab.closest("li").index()})),r):!1}}),e.widget("ui.tabs",e.ui.tabs,{select:function(e){e=this._getIndex(e);if(e===-1){if(!this.options.collapsible||this.options.selected===-1)return;e=this.options.selected}this.anchors.eq(e).trigger(this.options.event+this.eventNamespace)}}),function(){var t=0;e.widget("ui.tabs",e.ui.tabs,{options:{cookie:null},_create:function(){var e=this.options,t;e.active==null&&e.cookie&&(t=parseInt(this._cookie(),10),t===-1&&(t=!1),e.active=t),this._super()},_cookie:function(n){var r=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++t)];return arguments.length&&(r.push(n===!1?-1:n),r.push(this.options.cookie)),e.cookie.apply(null,r)},_refresh:function(){this._super(),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super(),this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),e.widget("ui.tabs",e.ui.tabs,{_trigger:function(t,n,r){var i=e.extend({},r);return t==="load"&&(i.panel=i.panel[0],i.tab=i.tab.find(".ui-tabs-anchor")[0]),this._super(t,n,i)}}),e.widget("ui.tabs",e.ui.tabs,{options:{fx:null},_getFx:function(){var t,n,r=this.options.fx;return r&&(e.isArray(r)?(t=r[0],n=r[1]):t=n=r),r?{show:n,hide:t}:null},_toggle:function(e,t){function o(){n.running=!1,n._trigger("activate",e,t)}function u(){t.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&s.show?r.animate(s.show,s.show.duration,function(){o()}):(r.show(),o())}var n=this,r=t.newPanel,i=t.oldPanel,s=this._getFx();if(!s)return this._super(e,t);n.running=!0,i.length&&s.hide?i.animate(s.hide,s.hide.duration,function(){t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),i.hide(),u())}}))})(jQuery);(function(e){function n(t,n){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(r.join(" ")))}function r(t){var n=t.data("ui-tooltip-id"),r=(t.attr("aria-describedby")||"").split(/\s+/),i=e.inArray(n,r);i!==-1&&r.splice(i,1),t.removeData("ui-tooltip-id"),r=e.trim(r.join(" ")),r?t.attr("aria-describedby",r):t.removeAttr("aria-describedby")}var t=0;e.widget("ui.tooltip",{version:"1.9.1",options:{content:function(){return e(this).attr("title")},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flipfit"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,n){var r=this;if(t==="disabled"){this[n?"_disable":"_enable"](),this.options[t]=n;return}this._super(t,n),t==="content"&&e.each(this.tooltips,function(e,t){r._updateContent(t)})},_disable:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0)}),this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var n=this,r=e(t?t.target:this.element).closest(this.options.items);if(!r.length)return;if(this.options.track&&r.data("ui-tooltip-id")){this._find(r).position(e.extend({of:r},this.options.position)),this._off(this.document,"mousemove");return}r.attr("title")&&r.data("ui-tooltip-title",r.attr("title")),r.data("tooltip-open",!0),t&&t.type==="mouseover"&&r.parents().each(function(){var t;e(this).data("tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,n.close(t,!0)),this.title&&(e(this).uniqueId(),n.parents[this.id]={element:this,title:this.title},this.title="")}),this._updateContent(r,t)},_updateContent:function(e,t){var n,r=this.options.content,i=this;if(typeof r=="string")return this._open(t,e,r);n=r.call(e[0],function(n){if(!e.data("tooltip-open"))return;i._delay(function(){this._open(t,e,n)})}),n&&this._open(t,e,n)},_open:function(t,r,i){function f(e){a.of=e;if(s.is(":hidden"))return;s.position(a)}var s,o,u,a=e.extend({},this.options.position);if(!i)return;s=this._find(r);if(s.length){s.find(".ui-tooltip-content").html(i);return}r.is("[title]")&&(t&&t.type==="mouseover"?r.attr("title",""):r.removeAttr("title")),s=this._tooltip(r),n(r,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.options.track&&t&&/^mouse/.test(t.originalEvent.type)?(this._on(this.document,{mousemove:f}),f(t)):s.position(e.extend({of:r},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(u=setInterval(function(){s.is(":visible")&&(f(a.of),clearInterval(u))},e.fx.interval)),this._trigger("open",t,{tooltip:s}),o={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=r[0],this.close(n,!0)}},remove:function(){this._removeTooltip(s)}};if(!t||t.type==="mouseover")o.mouseleave="close";if(!t||t.type==="focusin")o.focusout="close";this._on(r,o)},close:function(t){var n=this,i=e(t?t.currentTarget:this.element),s=this._find(i);if(this.closing)return;i.data("ui-tooltip-title")&&i.attr("title",i.data("ui-tooltip-title")),r(i),s.stop(!0),this._hide(s,this.options.hide,function(){n._removeTooltip(e(this))}),i.removeData("tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&t.type==="mouseleave"&&e.each(this.parents,function(e,t){t.element.title=t.title,delete n.parents[e]}),this.closing=!0,this._trigger("close",t,{tooltip:s}),this.closing=!1},_tooltip:function(n){var r="ui-tooltip-"+t++,i=e("<div>").attr({id:r,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),e.fn.bgiframe&&i.bgiframe(),this.tooltips[r]=n,i},_find:function(t){var n=t.data("ui-tooltip-id");return n?e("#"+n):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0),e("#"+n).remove(),r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})})(jQuery);
\ No newline at end of file diff --git a/plugins/jqueryui/js/jquery-ui-1.9.2.custom.min.js b/plugins/jqueryui/js/jquery-ui-1.9.2.custom.min.js new file mode 100755 index 000000000..fdc765ef3 --- /dev/null +++ b/plugins/jqueryui/js/jquery-ui-1.9.2.custom.min.js @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.9.2 - 2014-01-19 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +(function(e,t){function i(t,i){var s,n,r,o=t.nodeName.toLowerCase();return"area"===o?(s=t.parentNode,n=s.name,t.href&&n&&"map"===s.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&a(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&a(t)}function a(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.ui.version||(e.extend(e.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({_focus:e.fn.focus,focus:function(t,i){return"number"==typeof t?this.each(function(){var a=this;setTimeout(function(){e(a).focus(),i&&i.call(a)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var a,s,n=e(this[0]);n.length&&n[0]!==document;){if(a=n.css("position"),("absolute"===a||"relative"===a||"fixed"===a)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,a){return!!e.data(t,a[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var a=e.attr(t,"tabindex"),s=isNaN(a);return(s||a>=0)&&i(t,!s)}}),e(function(){var t=document.body,i=t.appendChild(i=document.createElement("div"));i.offsetHeight,e.extend(i.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=100===i.offsetHeight,e.support.selectstart="onselectstart"in i,t.removeChild(i).style.display="none"}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,a){function s(t,i,a,s){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,a&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===a?["Left","Right"]:["Top","Bottom"],r=a.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+a]=function(i){return i===t?o["inner"+a].call(this):this.each(function(){e(this).css(r,s(this,i)+"px")})},e.fn["outer"+a]=function(t,i){return"number"!=typeof t?o["outer"+a].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=6===parseFloat(t[1],10)}(),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,a){var s,n=e.ui[t].prototype;for(s in a)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([i,a[s]])},call:function(e,t,i){var a,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(a=0;s.length>a;a++)e.options[s[a][0]]&&s[a][1].apply(e.element,i)}},contains:e.contains,hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var a=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[a]>0?!0:(t[a]=1,s=t[a]>0,t[a]=0,s)},isOverAxis:function(e,t,i){return e>t&&t+i>e},isOver:function(t,i,a,s,n,r){return e.ui.isOverAxis(t,a,n)&&e.ui.isOverAxis(i,s,r)}}))})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,a=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(n){}a(t)},e.widget=function(i,s,a){var n,r,o,h,l=i.split(".")[0];i=i.split(".")[1],n=l+"-"+i,a||(a=s,s=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},r=e[l][i],o=e[l][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:a.version,_proto:e.extend({},a),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(a,function(t,i){e.isFunction(i)&&(a[t]=function(){var e=function(){return s.prototype[t].apply(this,arguments)},a=function(e){return s.prototype[t].apply(this,e)};return function(){var t,s=this._super,n=this._superApply;return this._super=e,this._superApply=a,t=i.apply(this,arguments),this._super=s,this._superApply=n,t}}())}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},a,{constructor:o,namespace:l,widgetName:i,widgetBaseClass:n,widgetFullName:n}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var a,n,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(a in r[o])n=r[o][a],r[o].hasOwnProperty(a)&&n!==t&&(i[a]=e.isPlainObject(n)?e.isPlainObject(i[a])?e.widget.extend({},i[a],n):e.widget.extend({},n):n);return i},e.widget.bridge=function(i,a){var n=a.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,a=e.data(this,n);return a?e.isFunction(a[r])&&"_"!==r.charAt(0)?(s=a[r].apply(a,h),s!==a&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,n);t?t.option(r||{})._init():e.data(this,n,new a(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetName,this),e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var a,n,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},a=i.split("."),i=a.shift(),a.length){for(n=o[i]=e.widget.extend({},this.options[i]),r=0;a.length-1>r;r++)n[a[r]]=n[a[r]]||{},n=n[a[r]];if(i=a.pop(),s===t)return n[i]===t?null:n[i];n[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,a){var n,r=this;"boolean"!=typeof i&&(a=s,s=i,i=!1),a?(s=n=e(s),this.bindings=this.bindings.add(s)):(a=s,s=this.element,n=this.widget()),e.each(a,function(a,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=a.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?n.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var a,n,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(a in n)a in i||(i[a]=n[a]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,a,n){"string"==typeof a&&(a={effect:a});var r,o=a?a===!0||"number"==typeof a?i:a.effect||i:t;a=a||{},"number"==typeof a&&(a={duration:a}),r=!e.isEmptyObject(a),a.complete=n,a.delay&&s.delay(a.delay),r&&e.effects&&(e.effects.effect[o]||e.uiBackCompat!==!1&&e.effects[o])?s[t](a):o!==t&&s[o]?s[o](a.duration,a.easing,n):s.queue(function(i){e(this)[t](),n&&n.call(s[0]),i()})}}),e.uiBackCompat!==!1&&(e.Widget.prototype._getCreateOptions=function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,a=1===i.which,n="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return a&&!n&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return!e.ui.ie||document.documentMode>=9||t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(e,t){function i(e,t,i){return[parseInt(e[0],10)*(d.test(e[0])?t/100:1),parseInt(e[1],10)*(d.test(e[1])?i/100:1)]}function s(t,i){return parseInt(e.css(t,i),10)||0}e.ui=e.ui||{};var a,n=Math.max,r=Math.abs,o=Math.round,l=/left|center|right/,h=/top|center|bottom/,u=/[\+\-]\d+%?/,c=/^\w+/,d=/%$/,p=e.fn.position;e.position={scrollbarWidth:function(){if(a!==t)return a;var i,s,n=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=n.children()[0];return e("body").append(n),i=r.offsetWidth,n.css("overflow","scroll"),s=r.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(t){var i=t.isWindow?"":t.element.css("overflow-x"),s=t.isWindow?"":t.element.css("overflow-y"),a="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,n="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return p.apply(this,arguments);t=e.extend({},t);var a,d,f,m,g,v=e(t.of),y=e.position.getWithinInfo(t.within),b=e.position.getScrollInfo(y),_=v[0],x=(t.collision||"flip").split(" "),k={};return 9===_.nodeType?(d=v.width(),f=v.height(),m={top:0,left:0}):e.isWindow(_)?(d=v.width(),f=v.height(),m={top:v.scrollTop(),left:v.scrollLeft()}):_.preventDefault?(t.at="left top",d=f=0,m={top:_.pageY,left:_.pageX}):(d=v.outerWidth(),f=v.outerHeight(),m=v.offset()),g=e.extend({},m),e.each(["my","at"],function(){var e,i,s=(t[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):h.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=h.test(s[1])?s[1]:"center",e=u.exec(s[0]),i=u.exec(s[1]),k[this]=[e?e[0]:0,i?i[0]:0],t[this]=[c.exec(s[0])[0],c.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===t.at[0]?g.left+=d:"center"===t.at[0]&&(g.left+=d/2),"bottom"===t.at[1]?g.top+=f:"center"===t.at[1]&&(g.top+=f/2),a=i(k.at,d,f),g.left+=a[0],g.top+=a[1],this.each(function(){var l,h,u=e(this),c=u.outerWidth(),p=u.outerHeight(),_=s(this,"marginLeft"),w=s(this,"marginTop"),D=c+_+s(this,"marginRight")+b.width,T=p+w+s(this,"marginBottom")+b.height,S=e.extend({},g),M=i(k.my,u.outerWidth(),u.outerHeight());"right"===t.my[0]?S.left-=c:"center"===t.my[0]&&(S.left-=c/2),"bottom"===t.my[1]?S.top-=p:"center"===t.my[1]&&(S.top-=p/2),S.left+=M[0],S.top+=M[1],e.support.offsetFractions||(S.left=o(S.left),S.top=o(S.top)),l={marginLeft:_,marginTop:w},e.each(["left","top"],function(i,s){e.ui.position[x[i]]&&e.ui.position[x[i]][s](S,{targetWidth:d,targetHeight:f,elemWidth:c,elemHeight:p,collisionPosition:l,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:t.my,at:t.at,within:y,elem:u})}),e.fn.bgiframe&&u.bgiframe(),t.using&&(h=function(e){var i=m.left-S.left,s=i+d-c,a=m.top-S.top,o=a+f-p,l={target:{element:v,left:m.left,top:m.top,width:d,height:f},element:{element:u,left:S.left,top:S.top,width:c,height:p},horizontal:0>s?"left":i>0?"right":"center",vertical:0>o?"top":a>0?"bottom":"middle"};c>d&&d>r(i+s)&&(l.horizontal="center"),p>f&&f>r(a+o)&&(l.vertical="middle"),l.important=n(r(i),r(s))>n(r(a),r(o))?"horizontal":"vertical",t.using.call(this,e,l)}),u.offset(e.extend(S,{using:h}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,a=s.isWindow?s.scrollLeft:s.offset.left,r=s.width,o=e.left-t.collisionPosition.marginLeft,l=a-o,h=o+t.collisionWidth-r-a;t.collisionWidth>r?l>0&&0>=h?(i=e.left+l+t.collisionWidth-r-a,e.left+=l-i):e.left=h>0&&0>=l?a:l>h?a+r-t.collisionWidth:a:l>0?e.left+=l:h>0?e.left-=h:e.left=n(e.left-o,e.left)},top:function(e,t){var i,s=t.within,a=s.isWindow?s.scrollTop:s.offset.top,r=t.within.height,o=e.top-t.collisionPosition.marginTop,l=a-o,h=o+t.collisionHeight-r-a;t.collisionHeight>r?l>0&&0>=h?(i=e.top+l+t.collisionHeight-r-a,e.top+=l-i):e.top=h>0&&0>=l?a:l>h?a+r-t.collisionHeight:a:l>0?e.top+=l:h>0?e.top-=h:e.top=n(e.top-o,e.top)}},flip:{left:function(e,t){var i,s,a=t.within,n=a.offset.left+a.scrollLeft,o=a.width,l=a.isWindow?a.scrollLeft:a.offset.left,h=e.left-t.collisionPosition.marginLeft,u=h-l,c=h+t.collisionWidth-o-l,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+d+p+f+t.collisionWidth-o-n,(0>i||r(u)>i)&&(e.left+=d+p+f)):c>0&&(s=e.left-t.collisionPosition.marginLeft+d+p+f-l,(s>0||c>r(s))&&(e.left+=d+p+f))},top:function(e,t){var i,s,a=t.within,n=a.offset.top+a.scrollTop,o=a.height,l=a.isWindow?a.scrollTop:a.offset.top,h=e.top-t.collisionPosition.marginTop,u=h-l,c=h+t.collisionHeight-o-l,d="top"===t.my[1],p=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-n,e.top+p+f+m>u&&(0>s||r(u)>s)&&(e.top+=p+f+m)):c>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-l,e.top+p+f+m>c&&(i>0||c>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,a,n,r=document.getElementsByTagName("body")[0],o=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(n in s)t.style[n]=s[n];t.appendChild(o),i=r||document.documentElement,i.insertBefore(t,i.firstChild),o.style.cssText="position: absolute; left: 10.7432222px;",a=e(o).offset().left,e.support.offsetFractions=a>10&&11>a,t.innerHTML="",i.removeChild(t)}(),e.uiBackCompat!==!1&&function(e){var i=e.fn.position;e.fn.position=function(s){if(!s||!s.offset)return i.call(this,s);var a=s.offset.split(" "),n=s.at.split(" ");return 1===a.length&&(a[1]=a[0]),/^\d/.test(a[0])&&(a[0]="+"+a[0]),/^\d/.test(a[1])&&(a[1]="+"+a[1]),1===n.length&&(/left|center|right/.test(n[0])?n[1]="center":(n[1]=n[0],n[0]="center")),i.call(this,e.extend(s,{at:n[0]+a[0]+" "+n[1]+a[1],offset:t}))}}(jQuery)})(jQuery);(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){"original"!=this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var a=this._uiHash();if(this._trigger("drag",t,a)===!1)return this._mouseUp({}),!1;this.position=a.position}return this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(i=e.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1);for(var a=this.element[0],s=!1;a&&(a=a.parentNode);)a==document&&(s=!0);if(!s&&"original"===this.options.helper)return!1;if("invalid"==this.options.revert&&!i||"valid"==this.options.revert&&i||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)){var n=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",t)!==!1&&n._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var i=this.options.handle&&e(this.options.handle,this.element).length?!1:!0;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(i=!0)}),i},_createHelper:function(t){var i=this.options,a=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"==i.helper?this.element.clone().removeAttr("id"):this.element;return a.parents("body").length||a.appendTo("parent"==i.appendTo?this.element[0].parentNode:i.appendTo),a[0]==this.element[0]||/(fixed|absolute)/.test(a.css("position"))||a.css("position","absolute"),a},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;if("parent"==t.containment&&(t.containment=this.helper[0].parentNode),("document"==t.containment||"window"==t.containment)&&(this.containment=["document"==t.containment?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==t.containment?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==t.containment?0:e(window).scrollLeft())+e("document"==t.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==t.containment?0:e(window).scrollTop())+(e("document"==t.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(t.containment)||t.containment.constructor==Array)t.containment.constructor==Array&&(this.containment=t.containment);else{var i=e(t.containment),a=i[0];if(!a)return;i.offset();var s="hidden"!=e(a).css("overflow");this.containment=[(parseInt(e(a).css("borderLeftWidth"),10)||0)+(parseInt(e(a).css("paddingLeft"),10)||0),(parseInt(e(a).css("borderTopWidth"),10)||0)+(parseInt(e(a).css("paddingTop"),10)||0),(s?Math.max(a.scrollWidth,a.offsetWidth):a.offsetWidth)-(parseInt(e(a).css("borderLeftWidth"),10)||0)-(parseInt(e(a).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(a.scrollHeight,a.offsetHeight):a.offsetHeight)-(parseInt(e(a).css("borderTopWidth"),10)||0)-(parseInt(e(a).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(t,i){i||(i=this.position);var a="absolute"==t?1:-1,s=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),n=/(html|body)/i.test(s[0].tagName);return{top:i.top+this.offset.relative.top*a+this.offset.parent.top*a-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():n?0:s.scrollTop())*a,left:i.left+this.offset.relative.left*a+this.offset.parent.left*a-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():n?0:s.scrollLeft())*a}},_generatePosition:function(t){var i=this.options,a="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(a[0].tagName),n=t.pageX,r=t.pageY;if(this.originalPosition){var o;if(this.containment){if(this.relative_container){var l=this.relative_container.offset();o=[this.containment[0]+l.left,this.containment[1]+l.top,this.containment[2]+l.left,this.containment[3]+l.top]}else o=this.containment;t.pageX-this.offset.click.left<o[0]&&(n=o[0]+this.offset.click.left),t.pageY-this.offset.click.top<o[1]&&(r=o[1]+this.offset.click.top),t.pageX-this.offset.click.left>o[2]&&(n=o[2]+this.offset.click.left),t.pageY-this.offset.click.top>o[3]&&(r=o[3]+this.offset.click.top)}if(i.grid){var h=i.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1]:this.originalPageY;r=o?h-this.offset.click.top<o[1]||h-this.offset.click.top>o[3]?h-this.offset.click.top<o[1]?h+i.grid[1]:h-i.grid[1]:h:h;var u=i.grid[0]?this.originalPageX+Math.round((n-this.originalPageX)/i.grid[0])*i.grid[0]:this.originalPageX;n=o?u-this.offset.click.left<o[0]||u-this.offset.click.left>o[2]?u-this.offset.click.left<o[0]?u+i.grid[0]:u-i.grid[0]:u:u}}return{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():s?0:a.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():s?0:a.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]==this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,a){return a=a||this._uiHash(),e.ui.plugin.call(this,t,[i,a]),"drag"==t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,a)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var a=e(this).data("draggable"),s=a.options,n=e.extend({},i,{item:a.element});a.sortables=[],e(s.connectToSortable).each(function(){var i=e.data(this,"sortable");i&&!i.options.disabled&&(a.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,n))})},stop:function(t,i){var a=e(this).data("draggable"),s=e.extend({},i,{item:a.element});e.each(a.sortables,function(){this.instance.isOver?(this.instance.isOver=0,a.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"==a.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,s))})},drag:function(t,i){var a=e(this).data("draggable"),s=this;e.each(a.sortables,function(){var n=!1,r=this;this.instance.positionAbs=a.positionAbs,this.instance.helperProportions=a.helperProportions,this.instance.offset.click=a.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(n=!0,e.each(a.sortables,function(){return this.instance.positionAbs=a.positionAbs,this.instance.helperProportions=a.helperProportions,this.instance.offset.click=a.offset.click,this!=r&&this.instance._intersectsWith(this.instance.containerCache)&&e.ui.contains(r.instance.element[0],this.instance.element[0])&&(n=!1),n})),n?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(s).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=a.offset.click.top,this.instance.offset.click.left=a.offset.click.left,this.instance.offset.parent.left-=a.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=a.offset.parent.top-this.instance.offset.parent.top,a._trigger("toSortable",t),a.dropped=this.instance.element,a.currentItem=a.element,this.instance.fromOutside=a),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),a._trigger("fromSortable",t),a.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var a=e(i.helper),s=e(this).data("draggable").options;a.css("opacity")&&(s._opacity=a.css("opacity")),a.css("opacity",s.opacity)},stop:function(t,i){var a=e(this).data("draggable").options;a._opacity&&e(i.helper).css("opacity",a._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("draggable");t.scrollParent[0]!=document&&"HTML"!=t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("draggable"),a=i.options,s=!1;i.scrollParent[0]!=document&&"HTML"!=i.scrollParent[0].tagName?(a.axis&&"x"==a.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<a.scrollSensitivity?i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop+a.scrollSpeed:t.pageY-i.overflowOffset.top<a.scrollSensitivity&&(i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop-a.scrollSpeed)),a.axis&&"y"==a.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<a.scrollSensitivity?i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft+a.scrollSpeed:t.pageX-i.overflowOffset.left<a.scrollSensitivity&&(i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft-a.scrollSpeed))):(a.axis&&"x"==a.axis||(t.pageY-e(document).scrollTop()<a.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-a.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<a.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+a.scrollSpeed))),a.axis&&"y"==a.axis||(t.pageX-e(document).scrollLeft()<a.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-a.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<a.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+a.scrollSpeed)))),s!==!1&&e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!=String?i.snap.items||":data(draggable)":i.snap).each(function(){var i=e(this),a=i.offset();this!=t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:a.top,left:a.left})})},drag:function(t,i){for(var a=e(this).data("draggable"),s=a.options,n=s.snapTolerance,r=i.offset.left,o=r+a.helperProportions.width,l=i.offset.top,h=l+a.helperProportions.height,u=a.snapElements.length-1;u>=0;u--){var d=a.snapElements[u].left,c=d+a.snapElements[u].width,p=a.snapElements[u].top,m=p+a.snapElements[u].height;if(r>d-n&&c+n>r&&l>p-n&&m+n>l||r>d-n&&c+n>r&&h>p-n&&m+n>h||o>d-n&&c+n>o&&l>p-n&&m+n>l||o>d-n&&c+n>o&&h>p-n&&m+n>h){if("inner"!=s.snapMode){var f=n>=Math.abs(p-h),g=n>=Math.abs(m-l),v=n>=Math.abs(d-o),y=n>=Math.abs(c-r);f&&(i.position.top=a._convertPositionTo("relative",{top:p-a.helperProportions.height,left:0}).top-a.margins.top),g&&(i.position.top=a._convertPositionTo("relative",{top:m,left:0}).top-a.margins.top),v&&(i.position.left=a._convertPositionTo("relative",{top:0,left:d-a.helperProportions.width}).left-a.margins.left),y&&(i.position.left=a._convertPositionTo("relative",{top:0,left:c}).left-a.margins.left)}var b=f||g||v||y;if("outer"!=s.snapMode){var f=n>=Math.abs(p-l),g=n>=Math.abs(m-h),v=n>=Math.abs(d-r),y=n>=Math.abs(c-o);f&&(i.position.top=a._convertPositionTo("relative",{top:p,left:0}).top-a.margins.top),g&&(i.position.top=a._convertPositionTo("relative",{top:m-a.helperProportions.height,left:0}).top-a.margins.top),v&&(i.position.left=a._convertPositionTo("relative",{top:0,left:d}).left-a.margins.left),y&&(i.position.left=a._convertPositionTo("relative",{top:0,left:c-a.helperProportions.width}).left-a.margins.left)}!a.snapElements[u].snapping&&(f||g||v||y||b)&&a.options.snap.snap&&a.options.snap.snap.call(a.element,t,e.extend(a._uiHash(),{snapItem:a.snapElements[u].item})),a.snapElements[u].snapping=f||g||v||y||b}else a.snapElements[u].snapping&&a.options.snap.release&&a.options.snap.release.call(a.element,t,e.extend(a._uiHash(),{snapItem:a.snapElements[u].item})),a.snapElements[u].snapping=!1}}}),e.ui.plugin.add("draggable","stack",{start:function(){var t=e(this).data("draggable").options,i=e.makeArray(e(t.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});if(i.length){var a=parseInt(i[0].style.zIndex)||0;e(i).each(function(e){this.style.zIndex=a+e}),this[0].style.zIndex=a+i.length}}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var a=e(i.helper),s=e(this).data("draggable").options;a.css("zIndex")&&(s._zIndex=a.css("zIndex")),a.css("zIndex",s.zIndex)},stop:function(t,i){var a=e(this).data("draggable").options;a._zIndex&&e(i.helper).css("zIndex",a._zIndex)}})})(jQuery);(function(e){e.widget("ui.droppable",{version:"1.9.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var t=this.options,i=t.accept;this.isover=0,this.isout=1,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=e.ui.ddmanager.droppables[this.options.scope],i=0;t.length>i;i++)t[i]==this&&t.splice(i,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"==t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!=this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!=this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var a=i||e.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0])return!1;var s=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope==a.options.scope&&t.accept.call(t.element[0],a.currentItem||a.element)&&e.ui.intersect(a,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(s=!0,!1):undefined}),s?!1:this.accept.call(this.element[0],a.currentItem||a.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(a)),this.element):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(t,i,a){if(!i.offset)return!1;var s=(t.positionAbs||t.position.absolute).left,n=s+t.helperProportions.width,r=(t.positionAbs||t.position.absolute).top,o=r+t.helperProportions.height,l=i.offset.left,h=l+i.proportions.width,u=i.offset.top,d=u+i.proportions.height;switch(a){case"fit":return s>=l&&h>=n&&r>=u&&d>=o;case"intersect":return s+t.helperProportions.width/2>l&&h>n-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&d>o-t.helperProportions.height/2;case"pointer":var c=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,p=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,m=e.ui.isOver(p,c,u,l,i.proportions.height,i.proportions.width);return m;case"touch":return(r>=u&&d>=r||o>=u&&d>=o||u>r&&o>d)&&(s>=l&&h>=s||n>=l&&h>=n||l>s&&n>h);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var a=e.ui.ddmanager.droppables[t.options.scope]||[],s=i?i.type:null,n=(t.currentItem||t.element).find(":data(droppable)").andSelf();e:for(var r=0;a.length>r;r++)if(!(a[r].options.disabled||t&&!a[r].accept.call(a[r].element[0],t.currentItem||t.element))){for(var o=0;n.length>o;o++)if(n[o]==a[r].element[0]){a[r].proportions.height=0;continue e}a[r].visible="none"!=a[r].element.css("display"),a[r].visible&&("mousedown"==s&&a[r]._activate.call(a[r],i),a[r].offset=a[r].element.offset(),a[r].proportions={width:a[r].element[0].offsetWidth,height:a[r].element[0].offsetHeight})}},drop:function(t,i){var a=!1;return e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(a=this._drop.call(this,i)||a),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,i)))}),a},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var a=e.ui.intersect(t,this,this.options.tolerance),s=a||1!=this.isover?a&&0==this.isover?"isover":null:"isout";if(s){var n;if(this.options.greedy){var r=this.options.scope,o=this.element.parents(":data(droppable)").filter(function(){return e.data(this,"droppable").options.scope===r});o.length&&(n=e.data(o[0],"droppable"),n.greedyChild="isover"==s?1:0)}n&&"isover"==s&&(n.isover=0,n.isout=1,n._out.call(n,i)),this[s]=1,this["isout"==s?"isover":"isout"]=0,this["isover"==s?"_over":"_out"].call(this,i),n&&"isout"==s&&(n.isout=0,n.isover=1,n._over.call(n,i))}}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}})(jQuery);(function(e){e.widget("ui.resizable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var t=this,i=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=i.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor==String){"all"==this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var s=this.handles.split(",");this.handles={};for(var a=0;s.length>a;a++){var n=e.trim(s[a]),r="ui-resizable-"+n,o=e('<div class="ui-resizable-handle '+r+'"></div>');o.css({zIndex:i.zIndex}),"se"==n&&o.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(o)}}this._renderAxis=function(t){t=t||this.element;for(var i in this.handles){if(this.handles[i].constructor==String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var s=e(this.handles[i],this.element),a=0;a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth();var n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");t.css(n,a),this._proportionallyResize()}e(this.handles[i]).length}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),i.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){i.disabled||(e(this).removeClass("ui-resizable-autohide"),t._handles.show())}).mouseleave(function(){i.disabled||t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var i=this.element;this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")}).insertAfter(i),i.remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var i=!1;for(var s in this.handles)e(this.handles[s])[0]==t.target&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(i){var s=this.options,a=this.element.position(),n=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(n.is(".ui-draggable")||/absolute/.test(n.css("position")))&&n.css({position:"absolute",top:a.top,left:a.left}),this._renderProxy();var r=t(this.helper.css("left")),o=t(this.helper.css("top"));s.containment&&(r+=e(s.containment).scrollLeft()||0,o+=e(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:r,top:o},this.size=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.originalPosition={left:r,top:o},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1;var h=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor","auto"==h?this.axis+"-resize":h),n.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var t=this.helper,i=(this.options,this.originalMousePosition),s=this.axis,a=e.pageX-i.left||0,n=e.pageY-i.top||0,r=this._change[s];if(!r)return!1;var o=r.apply(this,[e,a,n]);return this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(o=this._updateRatio(o,e)),o=this._respectSize(o,e),this._propagate("resize",e),t.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(o),this._trigger("resize",e,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var i=this.options,s=this;if(this._helper){var a=this._proportionallyResizeElements,n=a.length&&/textarea/i.test(a[0].nodeName),r=n&&e.ui.hasScroll(a[0],"left")?0:s.sizeDiff.height,o=n?0:s.sizeDiff.width,h={width:s.helper.width()-o,height:s.helper.height()-r},l=parseInt(s.element.css("left"),10)+(s.position.left-s.originalPosition.left)||null,u=parseInt(s.element.css("top"),10)+(s.position.top-s.originalPosition.top)||null;i.animate||this.element.css(e.extend(h,{top:u,left:l})),s.helper.height(s.size.height),s.helper.width(s.size.width),this._helper&&!i.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,a,n,r,o=this.options;r={minWidth:i(o.minWidth)?o.minWidth:0,maxWidth:i(o.maxWidth)?o.maxWidth:1/0,minHeight:i(o.minHeight)?o.minHeight:0,maxHeight:i(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=r.minHeight*this.aspectRatio,a=r.minWidth/this.aspectRatio,s=r.maxHeight*this.aspectRatio,n=r.maxWidth/this.aspectRatio,t>r.minWidth&&(r.minWidth=t),a>r.minHeight&&(r.minHeight=a),r.maxWidth>s&&(r.maxWidth=s),r.maxHeight>n&&(r.maxHeight=n)),this._vBoundaries=r},_updateCache:function(e){this.options,this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=(this.options,this.position),s=this.size,a=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"==a&&(e.left=t.left+(s.width-e.width),e.top=null),"nw"==a&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e,t){var s=(this.helper,this._vBoundaries),a=(this._aspectRatio||t.shiftKey,this.axis),n=i(e.width)&&s.maxWidth&&s.maxWidth<e.width,r=i(e.height)&&s.maxHeight&&s.maxHeight<e.height,o=i(e.width)&&s.minWidth&&s.minWidth>e.width,h=i(e.height)&&s.minHeight&&s.minHeight>e.height;o&&(e.width=s.minWidth),h&&(e.height=s.minHeight),n&&(e.width=s.maxWidth),r&&(e.height=s.maxHeight);var l=this.originalPosition.left+this.originalSize.width,u=this.position.top+this.size.height,d=/sw|nw|w/.test(a),c=/nw|ne|n/.test(a);o&&d&&(e.left=l-s.minWidth),n&&d&&(e.left=l-s.maxWidth),h&&c&&(e.top=u-s.minHeight),r&&c&&(e.top=u-s.maxHeight);var p=!e.width&&!e.height;return p&&!e.left&&e.top?e.top=null:p&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){if(this.options,this._proportionallyResizeElements.length)for(var t=this.helper||this.element,i=0;this._proportionallyResizeElements.length>i;i++){var s=this._proportionallyResizeElements[i];if(!this.borderDif){var a=[s.css("borderTopWidth"),s.css("borderRightWidth"),s.css("borderBottomWidth"),s.css("borderLeftWidth")],n=[s.css("paddingTop"),s.css("paddingRight"),s.css("paddingBottom"),s.css("paddingLeft")];this.borderDif=e.map(a,function(e,t){var i=parseInt(e,10)||0,s=parseInt(n[t],10)||0;return i+s})}s.css({height:t.height()-this.borderDif[0]-this.borderDif[2]||0,width:t.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,i=this.options;if(this.elementOffset=t.offset(),this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var s=e.ui.ie6?1:0,a=e.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-s+"px",top:this.elementOffset.top-s+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=(this.options,this.originalSize),s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=(this.options,this.originalSize),a=this.originalPosition;return{top:a.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!=t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("resizable"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data("resizable"),a=s.options,n=s.originalSize,r=s.originalPosition,o={height:s.size.height-n.height||0,width:s.size.width-n.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0},h=function(t,s){e(t).each(function(){var t=e(this),a=e(this).data("resizable-alsoresize"),n={},r=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(e,t){var i=(a[t]||0)+(o[t]||0);i&&i>=0&&(n[t]=i||null)}),t.css(n)})};"object"!=typeof a.alsoResize||a.alsoResize.nodeType?h(a.alsoResize):e.each(a.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("resizable"),s=i.options,a=i._proportionallyResizeElements,n=a.length&&/textarea/i.test(a[0].nodeName),r=n&&e.ui.hasScroll(a[0],"left")?0:i.sizeDiff.height,o=n?0:i.sizeDiff.width,h={width:i.size.width-o,height:i.size.height-r},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};a&&a.length&&e(a[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i=e(this).data("resizable"),s=i.options,a=i.element,n=s.containment,r=n instanceof e?n.get(0):/parent/.test(n)?a.parent().get(0):n;if(r)if(i.containerElement=e(r),/document/.test(n)||n==document)i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var o=e(r),h=[];e(["Top","Right","Left","Bottom"]).each(function(e,i){h[e]=t(o.css("padding"+i))}),i.containerOffset=o.offset(),i.containerPosition=o.position(),i.containerSize={height:o.innerHeight()-h[3],width:o.innerWidth()-h[1]};var l=i.containerOffset,u=i.containerSize.height,d=i.containerSize.width,c=e.ui.hasScroll(r,"left")?r.scrollWidth:d,p=e.ui.hasScroll(r)?r.scrollHeight:u;i.parentData={element:r,left:l.left,top:l.top,width:c,height:p}}},resize:function(t){var i=e(this).data("resizable"),s=i.options,a=(i.containerSize,i.containerOffset),n=(i.size,i.position),r=i._aspectRatio||t.shiftKey,o={top:0,left:0},h=i.containerElement;h[0]!=document&&/static/.test(h.css("position"))&&(o=a),n.left<(i._helper?a.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-a.left:i.position.left-o.left),r&&(i.size.height=i.size.width/i.aspectRatio),i.position.left=s.helper?a.left:0),n.top<(i._helper?a.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-a.top:i.position.top),r&&(i.size.width=i.size.height*i.aspectRatio),i.position.top=i._helper?a.top:0),i.offset.left=i.parentData.left+i.position.left,i.offset.top=i.parentData.top+i.position.top;var l=Math.abs((i._helper?i.offset.left-o.left:i.offset.left-o.left)+i.sizeDiff.width),u=Math.abs((i._helper?i.offset.top-o.top:i.offset.top-a.top)+i.sizeDiff.height),d=i.containerElement.get(0)==i.element.parent().get(0),c=/relative|absolute/.test(i.containerElement.css("position"));d&&c&&(l-=i.parentData.left),l+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-l,r&&(i.size.height=i.size.width/i.aspectRatio)),u+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-u,r&&(i.size.width=i.size.height*i.aspectRatio))},stop:function(){var t=e(this).data("resizable"),i=t.options,s=(t.position,t.containerOffset),a=t.containerPosition,n=t.containerElement,r=e(t.helper),o=r.offset(),h=r.outerWidth()-t.sizeDiff.width,l=r.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(n.css("position"))&&e(this).css({left:o.left-a.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(n.css("position"))&&e(this).css({left:o.left-a.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("resizable"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("resizable");t.options,t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("resizable");t.options,t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t){var i=e(this).data("resizable"),s=i.options,a=i.size,n=i.originalSize,r=i.originalPosition,o=i.axis;s._aspectRatio||t.shiftKey,s.grid="number"==typeof s.grid?[s.grid,s.grid]:s.grid;var h=Math.round((a.width-n.width)/(s.grid[0]||1))*(s.grid[0]||1),l=Math.round((a.height-n.height)/(s.grid[1]||1))*(s.grid[1]||1);/^(se|s|e)$/.test(o)?(i.size.width=n.width+h,i.size.height=n.height+l):/^(ne)$/.test(o)?(i.size.width=n.width+h,i.size.height=n.height+l,i.position.top=r.top-l):/^(sw)$/.test(o)?(i.size.width=n.width+h,i.size.height=n.height+l,i.position.left=r.left-h):(i.size.width=n.width+h,i.size.height=n.height+l,i.position.top=r.top-l,i.position.left=r.left-h)}});var t=function(e){return parseInt(e,10)||0},i=function(e){return!isNaN(parseInt(e,10))}})(jQuery);(function(e){e.widget("ui.selectable",e.ui.mouse,{version:"1.9.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var i;this.refresh=function(){i=e(t.options.filter,t.element[0]),i.addClass("ui-selectee"),i.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=i.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this;if(this.opos=[t.pageX,t.pageY],!this.options.disabled){var s=this.options;this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().andSelf().each(function(){var s=e.data(this,"selectable-item");if(s){var a=!t.metaKey&&!t.ctrlKey||!s.$element.hasClass("ui-selected");return s.$element.removeClass(a?"ui-unselecting":"ui-selected").addClass(a?"ui-selecting":"ui-unselecting"),s.unselecting=!a,s.selecting=a,s.selected=a,a?i._trigger("selecting",t,{selecting:s.element}):i._trigger("unselecting",t,{unselecting:s.element}),!1}})}},_mouseDrag:function(t){var i=this;if(this.dragged=!0,!this.options.disabled){var s=this.options,a=this.opos[0],n=this.opos[1],r=t.pageX,o=t.pageY;if(a>r){var h=r;r=a,a=h}if(n>o){var h=o;o=n,n=h}return this.helper.css({left:a,top:n,width:r-a,height:o-n}),this.selectees.each(function(){var h=e.data(this,"selectable-item");if(h&&h.element!=i.element[0]){var l=!1;"touch"==s.tolerance?l=!(h.left>r||a>h.right||h.top>o||n>h.bottom):"fit"==s.tolerance&&(l=h.left>a&&r>h.right&&h.top>n&&o>h.bottom),l?(h.selected&&(h.$element.removeClass("ui-selected"),h.selected=!1),h.unselecting&&(h.$element.removeClass("ui-unselecting"),h.unselecting=!1),h.selecting||(h.$element.addClass("ui-selecting"),h.selecting=!0,i._trigger("selecting",t,{selecting:h.element}))):(h.selecting&&((t.metaKey||t.ctrlKey)&&h.startselected?(h.$element.removeClass("ui-selecting"),h.selecting=!1,h.$element.addClass("ui-selected"),h.selected=!0):(h.$element.removeClass("ui-selecting"),h.selecting=!1,h.startselected&&(h.$element.addClass("ui-unselecting"),h.unselecting=!0),i._trigger("unselecting",t,{unselecting:h.element}))),h.selected&&(t.metaKey||t.ctrlKey||h.startselected||(h.$element.removeClass("ui-selected"),h.selected=!1,h.$element.addClass("ui-unselecting"),h.unselecting=!0,i._trigger("unselecting",t,{unselecting:h.element}))))}}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,this.options,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(e){e.widget("ui.sortable",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,i){"disabled"===t?(this.options[t]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,i){var s=this;if(this.reverting)return!1;if(this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(t);var a=null;if(e(t.target).parents().each(function(){return e.data(this,s.widgetName+"-item")==s?(a=e(this),!1):undefined}),e.data(t.target,s.widgetName+"-item")==s&&(a=e(t.target)),!a)return!1;if(this.options.handle&&!i){var n=!1;if(e(this.options.handle,a).find("*").andSelf().each(function(){this==t.target&&(n=!0)}),!n)return!1}return this.currentItem=a,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,i,s){var a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",a.cursor)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(var n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll){var i=this.options,s=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-this.overflowOffset.top<i.scrollSensitivity&&(this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop-i.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-this.overflowOffset.left<i.scrollSensitivity&&(this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft-i.scrollSpeed)):(t.pageY-e(document).scrollTop()<i.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-i.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<i.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+i.scrollSpeed)),t.pageX-e(document).scrollLeft()<i.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-i.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<i.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+i.scrollSpeed))),s!==!1&&e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(var a=this.items.length-1;a>=0;a--){var n=this.items[a],r=n.item[0],o=this._intersectsWithPointer(n);if(o&&n.instance===this.currentContainer&&r!=this.currentItem[0]&&this.placeholder[1==o?"next":"prev"]()[0]!=r&&!e.contains(this.placeholder[0],r)&&("semi-dynamic"==this.options.type?!e.contains(this.element[0],r):!0)){if(this.direction=1==o?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,a=this.placeholder.offset();this.reverting=!0,e(this.helper).animate({left:a.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:a.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,a=s+this.helperProportions.height,n=e.left,r=n+e.width,o=e.top,h=o+e.height,l=this.offset.click.top,u=this.offset.click.left,c=s+l>o&&h>s+l&&t+u>n&&r>t+u;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?c:t+this.helperProportions.width/2>n&&r>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>o&&h>a-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),a=i&&s,n=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return a?this.floating?r&&"right"==r||"down"==n?2:1:n&&("down"==n?2:1):!1},_intersectsWithSides:function(t){var i=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),a=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"==n&&s||"left"==n&&!s:a&&("down"==a&&i||"up"==a&&!i)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!=e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!=e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var i=[],s=[],a=this._connectWith();if(a&&t)for(var n=a.length-1;n>=0;n--)for(var r=e(a[n]),o=r.length-1;o>=0;o--){var h=e.data(r[o],this.widgetName);h&&h!=this&&!h.options.disabled&&s.push([e.isFunction(h.options.items)?h.options.items.call(h.element):e(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}s.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var n=s.length-1;n>=0;n--)s[n][0].each(function(){i.push(this)});return e(i)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]==e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i=this.items,s=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],a=this._connectWith();if(a&&this.ready)for(var n=a.length-1;n>=0;n--)for(var r=e(a[n]),o=r.length-1;o>=0;o--){var h=e.data(r[o],this.widgetName);h&&h!=this&&!h.options.disabled&&(s.push([e.isFunction(h.options.items)?h.options.items.call(h.element[0],t,{item:this.currentItem}):e(h.options.items,h.element),h]),this.containers.push(h))}for(var n=s.length-1;n>=0;n--)for(var l=s[n][1],u=s[n][0],o=0,c=u.length;c>o;o++){var d=e(u[o]);d.data(this.widgetName+"-item",l),i.push({item:d,instance:l,width:0,height:0,left:0,top:0})}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var i=this.items.length-1;i>=0;i--){var s=this.items[i];if(s.instance==this.currentContainer||!this.currentContainer||s.item[0]==this.currentItem[0]){var a=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item;t||(s.width=a.outerWidth(),s.height=a.outerHeight());var n=a.offset();s.left=n.left,s.top=n.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var i=this.containers.length-1;i>=0;i--){var n=this.containers[i].element.offset();this.containers[i].containerCache.left=n.left,this.containers[i].containerCache.top=n.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var i=t.options;if(!i.placeholder||i.placeholder.constructor==String){var s=i.placeholder;i.placeholder={element:function(){var i=e(document.createElement(t.currentItem[0].nodeName)).addClass(s||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return s||(i.style.visibility="hidden"),i},update:function(e,a){(!s||i.forcePlaceholderSize)&&(a.height()||a.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),a.width()||a.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}}t.placeholder=e(i.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),i.placeholder.update(t,t.placeholder)},_contactContainers:function(t){for(var i=null,s=null,a=this.containers.length-1;a>=0;a--)if(!e.contains(this.currentItem[0],this.containers[a].element[0]))if(this._intersectsWith(this.containers[a].containerCache)){if(i&&e.contains(this.containers[a].element[0],i.element[0]))continue;i=this.containers[a],s=a}else this.containers[a].containerCache.over&&(this.containers[a]._trigger("out",t,this._uiHash(this)),this.containers[a].containerCache.over=0);if(i)if(1===this.containers.length)this.containers[s]._trigger("over",t,this._uiHash(this)),this.containers[s].containerCache.over=1;else{for(var n=1e4,r=null,o=this.containers[s].floating?"left":"top",h=this.containers[s].floating?"width":"height",l=this.positionAbs[o]+this.offset.click[o],u=this.items.length-1;u>=0;u--)if(e.contains(this.containers[s].element[0],this.items[u].item[0])&&this.items[u].item[0]!=this.currentItem[0]){var c=this.items[u].item.offset()[o],d=!1;Math.abs(c-l)>Math.abs(c+this.items[u][h]-l)&&(d=!0,c+=this.items[u][h]),n>Math.abs(c-l)&&(n=Math.abs(c-l),r=this.items[u],this.direction=d?"up":"down")}if(!r&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[s],r?this._rearrange(t,r,null,!0):this._rearrange(t,null,this.containers[s].element,!0),this._trigger("change",t,this._uiHash()),this.containers[s]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[s]._trigger("over",t,this._uiHash(this)),this.containers[s].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"==i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!=i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(""==s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(""==s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;if("parent"==t.containment&&(t.containment=this.helper[0].parentNode),("document"==t.containment||"window"==t.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"==t.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"==t.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(t.containment)){var i=e(t.containment)[0],s=e(t.containment).offset(),a="hidden"!=e(i).css("overflow");this.containment=[s.left+(parseInt(e(i).css("borderLeftWidth"),10)||0)+(parseInt(e(i).css("paddingLeft"),10)||0)-this.margins.left,s.top+(parseInt(e(i).css("borderTopWidth"),10)||0)+(parseInt(e(i).css("paddingTop"),10)||0)-this.margins.top,s.left+(a?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e(i).css("borderLeftWidth"),10)||0)-(parseInt(e(i).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,s.top+(a?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e(i).css("borderTopWidth"),10)||0)-(parseInt(e(i).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"==t?1:-1,a=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),n=/(html|body)/i.test(a[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"==this.cssPosition?-this.scrollParent.scrollTop():n?0:a.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():n?0:a.scrollLeft())*s}},_generatePosition:function(t){var i=this.options,s="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(s[0].tagName);"relative"!=this.cssPosition||this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());var n=t.pageX,r=t.pageY;if(this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(n=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(n=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),i.grid)){var o=this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1];r=this.containment?o-this.offset.click.top<this.containment[1]||o-this.offset.click.top>this.containment[3]?o-this.offset.click.top<this.containment[1]?o+i.grid[1]:o-i.grid[1]:o:o;var h=this.originalPageX+Math.round((n-this.originalPageX)/i.grid[0])*i.grid[0];n=this.containment?h-this.offset.click.left<this.containment[0]||h-this.offset.click.left>this.containment[2]?h-this.offset.click.left<this.containment[0]?h+i.grid[0]:h-i.grid[0]:h:h}return{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"==this.cssPosition?-this.scrollParent.scrollTop():a?0:s.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():a?0:s.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"==this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var a=this.counter;this._delay(function(){a==this.counter&&this.refreshPositions(!s)})},_clear:function(t,i){this.reverting=!1;var s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]==this.currentItem[0]){for(var a in this._storedCSS)("auto"==this._storedCSS[a]||"static"==this._storedCSS[a])&&(this._storedCSS[a]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!i&&s.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev==this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent==this.currentItem.parent()[0]||i||s.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(i||(s.push(function(e){this._trigger("remove",e,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))));for(var a=this.containers.length-1;a>=0;a--)i||s.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[a])),this.containers[a].containerCache.over&&(s.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[a])),this.containers[a].containerCache.over=0);if(this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!i){this._trigger("beforeStop",t,this._uiHash());for(var a=0;s.length>a;a++)s[a].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(i||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null,!i){for(var a=0;s.length>a;a++)s[a].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})})(jQuery);(function(e){var t=0,i={},a={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.9.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var i=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t),a=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset"),this.headers=this.element.find(a.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this._hoverable(this.headers),this._focusable(this.headers),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(),a.collapsible||a.active!==!1&&null!=a.active||(a.active=0),0>a.active&&(a.active+=this.headers.length),this.active=this._findActive(a.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top"),this.active.next().addClass("ui-accordion-content-active").show(),this._createIcons(),this.refresh(),this.element.attr("role","tablist"),this.headers.attr("role","tab").each(function(t){var a=e(this),s=a.attr("id"),n=a.next(),r=n.attr("id");s||(s=i+"-header-"+t,a.attr("id",s)),r||(r=i+"-panel-"+t,n.attr("id",r)),a.attr("aria-controls",r),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._on(this.headers,{keydown:"_keydown"}),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._setupEvents(a.event)},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,a=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:n=this.headers[(s+1)%a];break;case i.LEFT:case i.UP:n=this.headers[(s-1+a)%a];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:n=this.headers[0];break;case i.END:n=this.headers[a-1]}n&&(e(t.target).attr("tabIndex",-1),e(n).attr("tabIndex",0),n.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t,i,a=this.options.heightStyle,s=this.element.parent();"fill"===a?(e.support.minHeight||(i=s.css("overflow"),s.css("overflow","hidden")),t=s.height(),this.element.siblings(":visible").each(function(){var i=e(this),a=i.css("position");"absolute"!==a&&"fixed"!==a&&(t-=i.outerHeight(!0))}),i&&s.css("overflow",i),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===a&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={};t&&(e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._on(this.headers,i))},_eventHandler:function(t){var i=this.options,a=this.active,s=e(t.currentTarget),n=s[0]===a[0],r=n&&i.collapsible,o=r?e():s.next(),h=a.next(),l={oldHeader:a,oldPanel:h,newHeader:r?e():s,newPanel:o};t.preventDefault(),n&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=r?!1:this.headers.index(s),this.active=n?e():s,this._toggle(l),a.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&a.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),n||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,a=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=a,this.options.animate?this._animate(i,a,t):(a.hide(),i.show(),this._toggleComplete(t)),a.attr({"aria-expanded":"false","aria-hidden":"true"}),a.prev().attr("aria-selected","false"),i.length&&a.length?a.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(e,t,s){var n,r,o,h=this,l=0,u=e.length&&(!t.length||e.index()<t.index()),d=this.options.animate||{},c=u&&d.down||d,p=function(){h._toggleComplete(s)};return"number"==typeof c&&(o=c),"string"==typeof c&&(r=c),r=r||c.easing||d.easing,o=o||c.duration||d.duration,t.length?e.length?(n=e.show().outerHeight(),t.animate(i,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(a,{duration:o,easing:r,complete:p,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(n-t.outerHeight()-l),l=0)}}),undefined):t.animate(i,o,r,p):e.animate(a,o,r,p)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.uiBackCompat!==!1&&(function(e,t){e.extend(t.options,{navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}});var i=t._create;t._create=function(){if(this.options.navigation){var t=this,a=this.element.find(this.options.header),s=a.next(),n=a.add(s).find("a").filter(this.options.navigationFilter)[0];n&&a.add(s).each(function(i){return e.contains(this,n)?(t.options.active=Math.floor(i/2),!1):undefined})}i.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options,{heightStyle:null,autoHeight:!0,clearStyle:!1,fillSpace:!1});var i=t._create,a=t._setOption;e.extend(t,{_create:function(){this.options.heightStyle=this.options.heightStyle||this._mergeHeightStyle(),i.call(this)},_setOption:function(e){("autoHeight"===e||"clearStyle"===e||"fillSpace"===e)&&(this.options.heightStyle=this._mergeHeightStyle()),a.apply(this,arguments)},_mergeHeightStyle:function(){var e=this.options;return e.fillSpace?"fill":e.clearStyle?"content":e.autoHeight?"auto":undefined}})}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options.icons,{activeHeader:null,headerSelected:"ui-icon-triangle-1-s"});var i=t._createIcons;t._createIcons=function(){this.options.icons&&(this.options.icons.activeHeader=this.options.icons.activeHeader||this.options.icons.headerSelected),i.call(this)}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){t.activate=t._activate;var i=t._findActive;t._findActive=function(e){return-1===e&&(e=!1),e&&"number"!=typeof e&&(e=this.headers.index(this.headers.filter(e)),-1===e&&(e=!1)),i.call(this,e)}}(jQuery,jQuery.ui.accordion.prototype),jQuery.ui.accordion.prototype.resize=jQuery.ui.accordion.prototype.refresh,function(e,t){e.extend(t.options,{change:null,changestart:null});var i=t._trigger;t._trigger=function(e,t,a){var s=i.apply(this,arguments);return s?("beforeActivate"===e?s=i.call(this,"changestart",t,{oldHeader:a.oldHeader,oldContent:a.oldPanel,newHeader:a.newHeader,newContent:a.newPanel}):"activate"===e&&(s=i.call(this,"change",t,{oldHeader:a.oldHeader,oldContent:a.oldPanel,newHeader:a.newHeader,newContent:a.newPanel})),s):!1}}(jQuery,jQuery.ui.accordion.prototype),function(e,t){e.extend(t.options,{animate:null,animated:"slide"});var i=t._create;t._create=function(){var e=this.options;null===e.animate&&(e.animate=e.animated?"slide"===e.animated?300:"bounceslide"===e.animated?{duration:200,down:{easing:"easeOutBounce",duration:1e3}}:e.animated:!1),i.call(this)}}(jQuery,jQuery.ui.accordion.prototype))})(jQuery);(function(e){var t=0;e.widget("ui.autocomplete",{version:"1.9.2",defaultElement:"<input>",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,i,a;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,a=!0,i=!0,undefined;t=!1,a=!1,i=!1;var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:t=!0,this._move("previousPage",s);break;case n.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case n.UP:t=!0,this._keyEvent("previous",s);break;case n.DOWN:t=!0,this._keyEvent("next",s);break;case n.ENTER:case n.NUMPAD_ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case n.TAB:this.menu.active&&this.menu.select(s);break;case n.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(a){if(t)return t=!1,a.preventDefault(),undefined;if(!i){var s=e.ui.keyCode;switch(a.keyCode){case s.PAGE_UP:this._move("previousPage",a);break;case s.PAGE_DOWN:this._move("nextPage",a);break;case s.UP:this._keyEvent("previous",a);break;case s.DOWN:this._keyEvent("next",a)}}},input:function(e){return a?(a=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(a){a.target===t.element[0]||a.target===i||e.contains(i,a.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var a=i.item.data("ui-autocomplete-item")||i.item.data("item.autocomplete");!1!==this._trigger("focus",t,{item:a})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(a.value):this.liveRegion.text(a.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item")||t.item.data("item.autocomplete"),a=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=a,this._delay(function(){this.previous=a,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this.document.find(t||"body")[0]),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isMultiLine:function(){return this.element.is("textarea")?!0:this.element.is("input")?!1:this.element.prop("isContentEditable")},_initSource:function(){var t,i,a=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,a){a(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){a.xhr&&a.xhr.abort(),a.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):undefined},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=this,i=++t;return function(a){i===t&&e.__response(a),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(i,t),this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var a=this;e.each(i,function(e,i){a._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var a=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return a.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){var t,i,a,s,n="ui-button ui-widget ui-state-default ui-corner-all",r="ui-state-hover ui-state-active ",o="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var t=e(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},l=function(t){var i=t.name,a=t.form,s=e([]);return i&&(s=a?e(a).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.9.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var r=this,o=this.options,u="checkbox"===this.type||"radio"===this.type,d=u?"":"ui-state-active",c="ui-state-focus";null===o.label&&(o.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(n).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){o.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){o.disabled||e(this).removeClass(d)}).bind("click"+this.eventNamespace,function(e){o.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){r.buttonElement.addClass(c)}).bind("blur"+this.eventNamespace,function(){r.buttonElement.removeClass(c)}),u&&(this.element.bind("change"+this.eventNamespace,function(){s||r.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(e){o.disabled||(s=!1,i=e.pageX,a=e.pageY)}).bind("mouseup"+this.eventNamespace,function(e){o.disabled||(i!==e.pageX||a!==e.pageY)&&(s=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return o.disabled||s?!1:(e(this).toggleClass("ui-state-active"),r.buttonElement.attr("aria-pressed",r.element[0].checked),undefined)}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled||s)return!1;e(this).addClass("ui-state-active"),r.buttonElement.attr("aria-pressed","true");var t=r.element[0];l(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return o.disabled?!1:(e(this).addClass("ui-state-active"),t=this,r.document.one("mouseup",function(){t=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return o.disabled?!1:(e(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(t){return o.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",o.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(n+" "+r+" "+o).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(t?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?l(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var t=this.buttonElement.removeClass(o),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),a=this.options.icons,s=a.primary&&a.secondary,n=[];a.primary||a.secondary?(this.options.text&&n.push("ui-button-text-icon"+(s?"s":a.primary?"-primary":"-secondary")),a.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+a.primary+"'></span>"),a.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+a.secondary+"'></span>"),this.options.text||(n.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):n.push("ui-button-text-only"),t.addClass(n.join(" "))}}),e.widget("ui.buttonset",{version:"1.9.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){$(this).removeClass("ui-state-hover"),-1!=this.className.indexOf("ui-datepicker-prev")&&$(this).removeClass("ui-datepicker-prev-hover"),-1!=this.className.indexOf("ui-datepicker-next")&&$(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",function(){$.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])||($(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),$(this).addClass("ui-state-hover"),-1!=this.className.indexOf("ui-datepicker-prev")&&$(this).addClass("ui-datepicker-prev-hover"),-1!=this.className.indexOf("ui-datepicker-next")&&$(this).addClass("ui-datepicker-next-hover"))})}function extendRemove(e,t){$.extend(e,t);for(var i in t)(null==t[i]||t[i]==undefined)&&(e[i]=t[i]);return e}$.extend($.ui,{datepicker:{version:"1.9.2"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline="div"==nodeName||"span"==nodeName;target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),"input"==nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(e,t){var i=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:i,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(e,t){var i=$(e);t.append=$([]),t.trigger=$([]),i.hasClass(this.markerClassName)||(this._attachments(i,t),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,i,a){t.settings[i]=a}).bind("getData.datepicker",function(e,i){return this._get(t,i)}),this._autoSize(t),$.data(e,PROP_NAME,t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var i=this._get(t,"appendText"),a=this._get(t,"isRTL");t.append&&t.append.remove(),i&&(t.append=$('<span class="'+this._appendClass+'">'+i+"</span>"),e[a?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove();var s=this._get(t,"showOn");if(("focus"==s||"both"==s)&&e.focus(this._showDatepicker),"button"==s||"both"==s){var n=this._get(t,"buttonText"),r=this._get(t,"buttonImage");t.trigger=$(this._get(t,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:r,alt:n,title:n}):$('<button type="button"></button>').addClass(this._triggerClass).html(""==r?n:$("<img/>").attr({src:r,alt:n,title:n}))),e[a?"before":"after"](t.trigger),t.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==e[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=e[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(e[0])):$.datepicker._showDatepicker(e[0]),!1})}},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,11,20),i=this._get(e,"dateFormat");if(i.match(/[DM]/)){var a=function(e){for(var t=0,i=0,a=0;e.length>a;a++)e[a].length>t&&(t=e[a].length,i=a);return i};t.setMonth(a(this._get(e,i.match(/MM/)?"monthNames":"monthNamesShort"))),t.setDate(a(this._get(e,i.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())}e.input.attr("size",this._formatDate(e,t).length)}},_inlineDatepicker:function(e,t){var i=$(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,i,a){t.settings[i]=a}).bind("getData.datepicker",function(e,i){return this._get(t,i)}),$.data(e,PROP_NAME,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,i,a,s){var n=this._dialogInst;if(!n){this.uuid+=1;var r="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+r+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),n=this._dialogInst=this._newInst(this._dialogInput,!1),n.settings={},$.data(this._dialogInput[0],PROP_NAME,n)}if(extendRemove(n.settings,a||{}),t=t&&t.constructor==Date?this._formatDate(n,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,!this._pos){var o=document.documentElement.clientWidth,h=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[o/2-100+l,h/2-150+u]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),n.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,n),this},_destroyDatepicker:function(e){var t=$(e),i=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var a=e.nodeName.toLowerCase();$.removeData(e,PROP_NAME),"input"==a?(i.append.remove(),i.trigger.remove(),t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"==a||"span"==a)&&t.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(e){var t=$(e),i=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var a=e.nodeName.toLowerCase();if("input"==a)e.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"==a||"span"==a){var s=t.children("."+this._inlineClass);s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t})}},_disableDatepicker:function(e){var t=$(e),i=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var a=e.nodeName.toLowerCase();if("input"==a)e.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"==a||"span"==a){var s=t.children("."+this._inlineClass);s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t}),this._disabledInputs[this._disabledInputs.length]=e}},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]==e)return!0;return!1},_getInst:function(e){try{return $.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,i){var a=this._getInst(e);if(2==arguments.length&&"string"==typeof t)return"defaults"==t?$.extend({},$.datepicker._defaults):a?"all"==t?$.extend({},a.settings):this._get(a,t):null;var s=t||{};if("string"==typeof t&&(s={},s[t]=i),a){this._curInst==a&&this._hideDatepicker();var n=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");extendRemove(a.settings,s),null!==r&&s.dateFormat!==undefined&&s.minDate===undefined&&(a.settings.minDate=this._formatDate(a,r)),null!==o&&s.dateFormat!==undefined&&s.maxDate===undefined&&(a.settings.maxDate=this._formatDate(a,o)),this._attachments($(e),a),this._autoSize(a),this._setDate(a,n),this._updateAlternate(a),this._updateDatepicker(a)}},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(e){var t=$.datepicker._getInst(e.target),i=!0,a=t.dpDiv.is(".ui-datepicker-rtl");if(t._keyEvent=!0,$.datepicker._datepickerShowing)switch(e.keyCode){case 9:$.datepicker._hideDatepicker(),i=!1;break;case 13:var s=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",t.dpDiv);s[0]&&$.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,s[0]);var n=$.datepicker._get(t,"onSelect");if(n){var r=$.datepicker._formatDate(t);n.apply(t.input?t.input[0]:null,[r,t])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&$.datepicker._clearDate(e.target),i=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&$.datepicker._gotoToday(e.target),i=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,a?1:-1,"D"),i=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,-7,"D"),i=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,a?-1:1,"D"),i=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,7,"D"),i=e.ctrlKey||e.metaKey;break;default:i=!1}else 36==e.keyCode&&e.ctrlKey?$.datepicker._showDatepicker(this):i=!1;i&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t=$.datepicker._getInst(e.target);if($.datepicker._get(t,"constrainInput")){var i=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),a=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||e.metaKey||" ">a||!i||i.indexOf(a)>-1}},_doKeyUp:function(e){var t=$.datepicker._getInst(e.target);if(t.input.val()!=t.lastVal)try{var i=$.datepicker.parseDate($.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,$.datepicker._getFormatConfig(t));i&&($.datepicker._setDateFromField(t),$.datepicker._updateAlternate(t),$.datepicker._updateDatepicker(t))}catch(a){$.datepicker.log(a)}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!=e.nodeName.toLowerCase()&&(e=$("input",e.parentNode)[0]),!$.datepicker._isDisabledDatepicker(e)&&$.datepicker._lastInput!=e){var t=$.datepicker._getInst(e);$.datepicker._curInst&&$.datepicker._curInst!=t&&($.datepicker._curInst.dpDiv.stop(!0,!0),t&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var i=$.datepicker._get(t,"beforeShow"),a=i?i.apply(e,[e,t]):{};if(a!==!1){extendRemove(t.settings,a),t.lastVal=null,$.datepicker._lastInput=e,$.datepicker._setDateFromField(t),$.datepicker._inDialog&&(e.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(e),$.datepicker._pos[1]+=e.offsetHeight);var s=!1;$(e).parents().each(function(){return s|="fixed"==$(this).css("position"),!s});var n={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};if($.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(t),n=$.datepicker._checkOffset(t,n,s),t.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":s?"fixed":"absolute",display:"none",left:n.left+"px",top:n.top+"px"}),!t.inline){var r=$.datepicker._get(t,"showAnim"),o=$.datepicker._get(t,"duration"),h=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");if(e.length){var i=$.datepicker._getBorders(t.dpDiv);e.css({left:-i[0],top:-i[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})}};t.dpDiv.zIndex($(e).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&($.effects.effect[r]||$.effects[r])?t.dpDiv.show(r,$.datepicker._get(t,"showOptions"),o,h):t.dpDiv[r||"show"](r?o:null,h),r&&o||h(),t.input.is(":visible")&&!t.input.is(":disabled")&&t.input.focus(),$.datepicker._curInst=t}}}},_updateDatepicker:function(e){this.maxRows=4;var t=$.datepicker._getBorders(e.dpDiv);instActive=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i=e.dpDiv.find("iframe.ui-datepicker-cover");i.length&&i.css({left:-t[0],top:-t[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()}),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var a=this._getNumberOfMonths(e),s=a[1],n=17;if(e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",n*s+"em"),e.dpDiv[(1!=a[0]||1!=a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e==$.datepicker._curInst&&$.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement&&e.input.focus(),e.yearshtml){var r=e.yearshtml;setTimeout(function(){r===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),r=e.yearshtml=null},0)}},_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]},_checkOffset:function(e,t,i){var a=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),n=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,o=document.documentElement.clientWidth+(i?0:$(document).scrollLeft()),h=document.documentElement.clientHeight+(i?0:$(document).scrollTop());return t.left-=this._get(e,"isRTL")?a-n:0,t.left-=i&&t.left==e.input.offset().left?$(document).scrollLeft():0,t.top-=i&&t.top==e.input.offset().top+r?$(document).scrollTop():0,t.left-=Math.min(t.left,t.left+a>o&&o>a?Math.abs(t.left+a-o):0),t.top-=Math.min(t.top,t.top+s>h&&h>s?Math.abs(s+r):0),t},_findPos:function(e){for(var t=this._getInst(e),i=this._get(t,"isRTL");e&&("hidden"==e.type||1!=e.nodeType||$.expr.filters.hidden(e));)e=e[i?"previousSibling":"nextSibling"];var a=$(e).offset();return[a.left,a.top]},_hideDatepicker:function(e){var t=this._curInst;if(t&&(!e||t==$.data(e,PROP_NAME))&&this._datepickerShowing){var i=this._get(t,"showAnim"),a=this._get(t,"duration"),s=function(){$.datepicker._tidyDialog(t)};$.effects&&($.effects.effect[i]||$.effects[i])?t.dpDiv.hide(i,$.datepicker._get(t,"showOptions"),a,s):t.dpDiv["slideDown"==i?"slideUp":"fadeIn"==i?"fadeOut":"hide"](i?a:null,s),i||s(),this._datepickerShowing=!1;var n=this._get(t,"onClose");n&&n.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if($.datepicker._curInst){var t=$(e.target),i=$.datepicker._getInst(t[0]);(t[0].id!=$.datepicker._mainDivId&&0==t.parents("#"+$.datepicker._mainDivId).length&&!t.hasClass($.datepicker.markerClassName)&&!t.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||t.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=i)&&$.datepicker._hideDatepicker()}},_adjustDate:function(e,t,i){var a=$(e),s=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(s,t+("M"==i?this._get(s,"showCurrentAtPos"):0),i),this._updateDatepicker(s))},_gotoToday:function(e){var t=$(e),i=this._getInst(t[0]);if(this._get(i,"gotoCurrent")&&i.currentDay)i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear;else{var a=new Date;i.selectedDay=a.getDate(),i.drawMonth=i.selectedMonth=a.getMonth(),i.drawYear=i.selectedYear=a.getFullYear()}this._notifyChange(i),this._adjustDate(t)},_selectMonthYear:function(e,t,i){var a=$(e),s=this._getInst(a[0]);s["selected"+("M"==i?"Month":"Year")]=s["draw"+("M"==i?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(a)},_selectDay:function(e,t,i,a){var s=$(e);if(!$(a).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(s[0])){var n=this._getInst(s[0]);n.selectedDay=n.currentDay=$("a",a).html(),n.selectedMonth=n.currentMonth=t,n.selectedYear=n.currentYear=i,this._selectDate(e,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear))}},_clearDate:function(e){var t=$(e);this._getInst(t[0]),this._selectDate(t,"")},_selectDate:function(e,t){var i=$(e),a=this._getInst(i[0]);t=null!=t?t:this._formatDate(a),a.input&&a.input.val(t),this._updateAlternate(a);var s=this._get(a,"onSelect");s?s.apply(a.input?a.input[0]:null,[t,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var t=this._get(e,"altField");if(t){var i=this._get(e,"altFormat")||this._get(e,"dateFormat"),a=this._getDate(e),s=this.formatDate(i,a,this._getFormatConfig(e));$(t).each(function(){$(this).val(s)})}},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var i=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((i-t)/864e5)/7)+1},parseDate:function(e,t,i){if(null==e||null==t)throw"Invalid arguments";if(t="object"==typeof t?""+t:t+"",""==t)return null;var a=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff;a="string"!=typeof a?a:(new Date).getFullYear()%100+parseInt(a,10);for(var s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,n=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,h=-1,l=-1,u=-1,d=-1,c=!1,p=function(t){var i=e.length>y+1&&e.charAt(y+1)==t;return i&&y++,i},m=function(e){var i=p(e),a="@"==e?14:"!"==e?20:"y"==e&&i?4:"o"==e?3:2,s=RegExp("^\\d{1,"+a+"}"),n=t.substring(v).match(s);if(!n)throw"Missing number at position "+v;return v+=n[0].length,parseInt(n[0],10)},f=function(e,i,a){var s=$.map(p(e)?a:i,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)}),n=-1;if($.each(s,function(e,i){var a=i[1];return t.substr(v,a.length).toLowerCase()==a.toLowerCase()?(n=i[0],v+=a.length,!1):undefined}),-1!=n)return n+1;throw"Unknown name at position "+v},g=function(){if(t.charAt(v)!=e.charAt(y))throw"Unexpected literal at position "+v;v++},v=0,y=0;e.length>y;y++)if(c)"'"!=e.charAt(y)||p("'")?g():c=!1;else switch(e.charAt(y)){case"d":u=m("d");break;case"D":f("D",s,n);break;case"o":d=m("o");break;case"m":l=m("m");break;case"M":l=f("M",r,o);break;case"y":h=m("y");break;case"@":var b=new Date(m("@"));h=b.getFullYear(),l=b.getMonth()+1,u=b.getDate();break;case"!":var b=new Date((m("!")-this._ticksTo1970)/1e4);h=b.getFullYear(),l=b.getMonth()+1,u=b.getDate();break;case"'":p("'")?g():c=!0;break;default:g()}if(t.length>v){var _=t.substr(v);if(!/^\s+/.test(_))throw"Extra/unparsed characters found in date: "+_}if(-1==h?h=(new Date).getFullYear():100>h&&(h+=(new Date).getFullYear()-(new Date).getFullYear()%100+(a>=h?0:-100)),d>-1)for(l=1,u=d;;){var k=this._getDaysInMonth(h,l-1);if(k>=u)break;l++,u-=k}var b=this._daylightSavingAdjust(new Date(h,l-1,u));if(b.getFullYear()!=h||b.getMonth()+1!=l||b.getDate()!=u)throw"Invalid date";return b},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var a=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,s=(i?i.dayNames:null)||this._defaults.dayNames,n=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,o=function(t){var i=e.length>c+1&&e.charAt(c+1)==t;return i&&c++,i},h=function(e,t,i){var a=""+t;if(o(e))for(;i>a.length;)a="0"+a;return a},l=function(e,t,i,a){return o(e)?a[t]:i[t]},u="",d=!1;if(t)for(var c=0;e.length>c;c++)if(d)"'"!=e.charAt(c)||o("'")?u+=e.charAt(c):d=!1;else switch(e.charAt(c)){case"d":u+=h("d",t.getDate(),2);break;case"D":u+=l("D",t.getDay(),a,s);break;case"o":u+=h("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",t.getMonth()+1,2);break;case"M":u+=l("M",t.getMonth(),n,r);break;case"y":u+=o("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":o("'")?u+="'":d=!0;break;default:u+=e.charAt(c)}return u},_possibleChars:function(e){for(var t="",i=!1,a=function(t){var i=e.length>s+1&&e.charAt(s+1)==t;return i&&s++,i},s=0;e.length>s;s++)if(i)"'"!=e.charAt(s)||a("'")?t+=e.charAt(s):i=!1;else switch(e.charAt(s)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":a("'")?t+="'":i=!0;break;default:t+=e.charAt(s)}return t},_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!=e.lastVal){var i,a,s=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null;i=a=this._getDefaultDate(e);var r=this._getFormatConfig(e);try{i=this.parseDate(s,n,r)||a}catch(o){this.log(o),n=t?"":n}e.selectedDay=i.getDate(),e.drawMonth=e.selectedMonth=i.getMonth(),e.drawYear=e.selectedYear=i.getFullYear(),e.currentDay=n?i.getDate():0,e.currentMonth=n?i.getMonth():0,e.currentYear=n?i.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(e,t,i){var a=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},s=function(t){try{return $.datepicker.parseDate($.datepicker._get(e,"dateFormat"),t,$.datepicker._getFormatConfig(e))}catch(i){}for(var a=(t.toLowerCase().match(/^c/)?$.datepicker._getDate(e):null)||new Date,s=a.getFullYear(),n=a.getMonth(),r=a.getDate(),o=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=o.exec(t);h;){switch(h[2]||"d"){case"d":case"D":r+=parseInt(h[1],10);break;case"w":case"W":r+=7*parseInt(h[1],10);break;case"m":case"M":n+=parseInt(h[1],10),r=Math.min(r,$.datepicker._getDaysInMonth(s,n));break;case"y":case"Y":s+=parseInt(h[1],10),r=Math.min(r,$.datepicker._getDaysInMonth(s,n))}h=o.exec(t)}return new Date(s,n,r)},n=null==t||""===t?i:"string"==typeof t?s(t):"number"==typeof t?isNaN(t)?i:a(t):new Date(t.getTime());return n=n&&"Invalid Date"==""+n?i:n,n&&(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0)),this._daylightSavingAdjust(n)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,s=e.selectedMonth,n=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s==e.selectedMonth&&n==e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""==e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),i="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(i,-t,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(i,+t,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(i)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(i,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t=new Date;t=this._daylightSavingAdjust(new Date(t.getFullYear(),t.getMonth(),t.getDate()));var i=this._get(e,"isRTL"),a=this._get(e,"showButtonPanel"),s=this._get(e,"hideIfNoPrevNext"),n=this._get(e,"navigationAsDateFormat"),r=this._getNumberOfMonths(e),o=this._get(e,"showCurrentAtPos"),h=this._get(e,"stepMonths"),l=1!=r[0]||1!=r[1],u=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),d=this._getMinMaxDate(e,"min"),c=this._getMinMaxDate(e,"max"),p=e.drawMonth-o,m=e.drawYear;if(0>p&&(p+=12,m--),c){var f=this._daylightSavingAdjust(new Date(c.getFullYear(),c.getMonth()-r[0]*r[1]+1,c.getDate()));for(f=d&&d>f?d:f;this._daylightSavingAdjust(new Date(m,p,1))>f;)p--,0>p&&(p=11,m--)}e.drawMonth=p,e.drawYear=m;var g=this._get(e,"prevText");g=n?this.formatDate(g,this._daylightSavingAdjust(new Date(m,p-h,1)),this._getFormatConfig(e)):g;var v=this._canAdjustMonth(e,-1,m,p)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+g+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"e":"w")+'">'+g+"</span></a>":s?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+g+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"e":"w")+'">'+g+"</span></a>",y=this._get(e,"nextText");y=n?this.formatDate(y,this._daylightSavingAdjust(new Date(m,p+h,1)),this._getFormatConfig(e)):y;var b=this._canAdjustMonth(e,1,m,p)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"w":"e")+'">'+y+"</span></a>":s?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"w":"e")+'">'+y+"</span></a>",_=this._get(e,"currentText"),k=this._get(e,"gotoCurrent")&&e.currentDay?u:t;_=n?this.formatDate(_,k,this._getFormatConfig(e)):_;var x=e.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(e,"closeText")+"</button>",D=a?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(i?x:"")+(this._isInRange(e,k)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+_+"</button>":"")+(i?"":x)+"</div>":"",w=parseInt(this._get(e,"firstDay"),10);w=isNaN(w)?0:w;var T=this._get(e,"showWeek"),S=this._get(e,"dayNames");this._get(e,"dayNamesShort");var M=this._get(e,"dayNamesMin"),N=this._get(e,"monthNames"),C=this._get(e,"monthNamesShort"),A=this._get(e,"beforeShowDay"),P=this._get(e,"showOtherMonths"),j=this._get(e,"selectOtherMonths");this._get(e,"calculateWeek")||this.iso8601Week;for(var I=this._getDefaultDate(e),F="",H=0;r[0]>H;H++){var E="";this.maxRows=4;for(var z=0;r[1]>z;z++){var L=this._daylightSavingAdjust(new Date(m,p,e.selectedDay)),O=" ui-corner-all",R="";if(l){if(R+='<div class="ui-datepicker-group',r[1]>1)switch(z){case 0:R+=" ui-datepicker-group-first",O=" ui-corner-"+(i?"right":"left");break;case r[1]-1:R+=" ui-datepicker-group-last",O=" ui-corner-"+(i?"left":"right");break;default:R+=" ui-datepicker-group-middle",O=""}R+='">'}R+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+O+'">'+(/all|left/.test(O)&&0==H?i?b:v:"")+(/all|right/.test(O)&&0==H?i?v:b:"")+this._generateMonthYearHeader(e,p,m,d,c,H>0||z>0,N,C)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";for(var W=T?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"",Y=0;7>Y;Y++){var J=(Y+w)%7;W+="<th"+((Y+w+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+S[J]+'">'+M[J]+"</span></th>"}R+=W+"</tr></thead><tbody>";var Q=this._getDaysInMonth(m,p);m==e.selectedYear&&p==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,Q));var B=(this._getFirstDayOfMonth(m,p)-w+7)%7,K=Math.ceil((B+Q)/7),V=l?this.maxRows>K?this.maxRows:K:K;this.maxRows=V;for(var U=this._daylightSavingAdjust(new Date(m,p,1-B)),G=0;V>G;G++){R+="<tr>";for(var q=T?'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(U)+"</td>":"",Y=0;7>Y;Y++){var X=A?A.apply(e.input?e.input[0]:null,[U]):[!0,""],Z=U.getMonth()!=p,et=Z&&!j||!X[0]||d&&d>U||c&&U>c;q+='<td class="'+((Y+w+6)%7>=5?" ui-datepicker-week-end":"")+(Z?" ui-datepicker-other-month":"")+(U.getTime()==L.getTime()&&p==e.selectedMonth&&e._keyEvent||I.getTime()==U.getTime()&&I.getTime()==L.getTime()?" "+this._dayOverClass:"")+(et?" "+this._unselectableClass+" ui-state-disabled":"")+(Z&&!P?"":" "+X[1]+(U.getTime()==u.getTime()?" "+this._currentClass:"")+(U.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+(Z&&!P||!X[2]?"":' title="'+X[2]+'"')+(et?"":' data-handler="selectDay" data-event="click" data-month="'+U.getMonth()+'" data-year="'+U.getFullYear()+'"')+">"+(Z&&!P?" ":et?'<span class="ui-state-default">'+U.getDate()+"</span>":'<a class="ui-state-default'+(U.getTime()==t.getTime()?" ui-state-highlight":"")+(U.getTime()==u.getTime()?" ui-state-active":"")+(Z?" ui-priority-secondary":"")+'" href="#">'+U.getDate()+"</a>")+"</td>",U.setDate(U.getDate()+1),U=this._daylightSavingAdjust(U) +}R+=q+"</tr>"}p++,p>11&&(p=0,m++),R+="</tbody></table>"+(l?"</div>"+(r[0]>0&&z==r[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),E+=R}F+=E}return F+=D+($.ui.ie6&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),e._keyEvent=!1,F},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var h=this._get(e,"changeMonth"),l=this._get(e,"changeYear"),u=this._get(e,"showMonthAfterYear"),d='<div class="ui-datepicker-title">',c="";if(n||!h)c+='<span class="ui-datepicker-month">'+r[t]+"</span>";else{var p=a&&a.getFullYear()==i,m=s&&s.getFullYear()==i;c+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var f=0;12>f;f++)(!p||f>=a.getMonth())&&(!m||s.getMonth()>=f)&&(c+='<option value="'+f+'"'+(f==t?' selected="selected"':"")+">"+o[f]+"</option>");c+="</select>"}if(u||(d+=c+(!n&&h&&l?"":" ")),!e.yearshtml)if(e.yearshtml="",n||!l)d+='<span class="ui-datepicker-year">'+i+"</span>";else{var g=this._get(e,"yearRange").split(":"),v=(new Date).getFullYear(),y=function(e){var t=e.match(/c[+-].*/)?i+parseInt(e.substring(1),10):e.match(/[+-].*/)?v+parseInt(e,10):parseInt(e,10);return isNaN(t)?v:t},b=y(g[0]),_=Math.max(b,y(g[1]||""));for(b=a?Math.max(b,a.getFullYear()):b,_=s?Math.min(_,s.getFullYear()):_,e.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';_>=b;b++)e.yearshtml+='<option value="'+b+'"'+(b==i?' selected="selected"':"")+">"+b+"</option>";e.yearshtml+="</select>",d+=e.yearshtml,e.yearshtml=null}return d+=this._get(e,"yearSuffix"),u&&(d+=(!n&&h&&l?"":" ")+c),d+="</div>"},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"==i?t:0),s=e.drawMonth+("M"==i?t:0),n=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"==i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,n)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"==i||"Y"==i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return s=a&&s>a?a:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var s=this._getNumberOfMonths(e),n=this._daylightSavingAdjust(new Date(i,a+(0>t?t:s[0]*s[1]),1));return 0>t&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(e,n)},_isInRange:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max");return(!i||t.getTime()>=i.getTime())&&(!a||t.getTime()<=a.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!=e&&"getDate"!=e&&"widget"!=e?"option"==e&&2==arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.2",window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(e,t){var i="ui-dialog ui-widget ui-widget-content ui-corner-all ",a={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},s={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.9.2",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),"string"!=typeof this.originalTitle&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var a,s,n,r,o,h=this,l=this.options,u=l.title||" ";a=(this.uiDialog=e("<div>")).addClass(i+l.dialogClass).css({display:"none",outline:0,zIndex:l.zIndex}).attr("tabIndex",-1).keydown(function(t){l.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE&&(h.close(t),t.preventDefault())}).mousedown(function(e){h.moveToTop(!1,e)}).appendTo("body"),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(a),s=(this.uiDialogTitlebar=e("<div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").bind("mousedown",function(){a.focus()}).prependTo(a),n=e("<a href='#'></a>").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(e){e.preventDefault(),h.close(e)}).appendTo(s),(this.uiDialogTitlebarCloseText=e("<span>")).addClass("ui-icon ui-icon-closethick").text(l.closeText).appendTo(n),r=e("<span>").uniqueId().addClass("ui-dialog-title").html(u).prependTo(s),o=(this.uiDialogButtonPane=e("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),(this.uiButtonSet=e("<div>")).addClass("ui-dialog-buttonset").appendTo(o),a.attr({role:"dialog","aria-labelledby":r.attr("id")}),s.find("*").add(s).disableSelection(),this._hoverable(n),this._focusable(n),l.draggable&&e.fn.draggable&&this._makeDraggable(),l.resizable&&e.fn.resizable&&this._makeResizable(),this._createButtons(l.buttons),this._isOpen=!1,e.fn.bgiframe&&a.bgiframe(),this._on(a,{keydown:function(i){if(l.modal&&i.keyCode===e.ui.keyCode.TAB){var s=e(":tabbable",a),n=s.filter(":first"),r=s.filter(":last");return i.target!==r[0]||i.shiftKey?i.target===n[0]&&i.shiftKey?(r.focus(1),!1):t:(n.focus(1),!1)}}})},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var e,t=this.oldPosition;this.overlay&&this.overlay.destroy(),this.uiDialog.hide(),this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(t){var i,a,s=this;if(this._isOpen&&!1!==this._trigger("beforeClose",t))return this._isOpen=!1,this.overlay&&this.overlay.destroy(),this.options.hide?this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",t)}):(this.uiDialog.hide(),this._trigger("close",t)),e.ui.dialog.overlay.resize(),this.options.modal&&(i=0,e(".ui-dialog").each(function(){this!==s.uiDialog[0]&&(a=e(this).css("z-index"),isNaN(a)||(i=Math.max(i,a)))}),e.ui.dialog.maxZ=i),this},isOpen:function(){return this._isOpen},moveToTop:function(t,i){var a,s=this.options;return s.modal&&!t||!s.stack&&!s.modal?this._trigger("focus",i):(s.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=s.zIndex),this.overlay&&(e.ui.dialog.maxZ+=1,e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ,this.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ)),a={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()},e.ui.dialog.maxZ+=1,this.uiDialog.css("z-index",e.ui.dialog.maxZ),this.element.attr(a),this._trigger("focus",i),this)},open:function(){if(!this._isOpen){var t,i=this.options,a=this.uiDialog;return this._size(),this._position(i.position),a.show(i.show),this.overlay=i.modal?new e.ui.dialog.overlay(this):null,this.moveToTop(!0),t=this.element.find(":tabbable"),t.length||(t=this.uiDialogButtonPane.find(":tabbable"),t.length||(t=a)),t.eq(0).focus(),this._isOpen=!0,this._trigger("open"),this}},_createButtons:function(t){var i=this,a=!1;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),"object"==typeof t&&null!==t&&e.each(t,function(){return!(a=!0)}),a?(e.each(t,function(t,a){var s,n;a=e.isFunction(a)?{click:a,text:t}:a,a=e.extend({type:"button"},a),n=a.click,a.click=function(){n.apply(i.element[0],arguments)},s=e("<button></button>",a).appendTo(i.uiButtonSet),e.fn.button&&s.button()}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)):this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,s){e(this).addClass("ui-dialog-dragging"),i._trigger("dragStart",a,t(s))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(s,n){a.position=[n.position.left-i.document.scrollLeft(),n.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._trigger("dragStop",s,t(n)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(i){function a(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}i=i===t?this.options.resizable:i;var s=this,n=this.options,r=this.uiDialog.css("position"),o="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:o,start:function(t,i){e(this).addClass("ui-dialog-resizing"),s._trigger("resizeStart",t,a(i))},resize:function(e,t){s._trigger("resize",e,a(t))},stop:function(t,i){e(this).removeClass("ui-dialog-resizing"),n.height=e(this).height(),n.width=e(this).width(),s._trigger("resizeStop",t,a(i)),e.ui.dialog.overlay.resize()}}).css("position",r).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var i,a=[],s=[0,0];t?(("string"==typeof t||"object"==typeof t&&"0"in t)&&(a=t.split?t.split(" "):[t[0],t[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(s[e]=a[e],a[e]=t)}),t={my:a[0]+(0>s[0]?s[0]:"+"+s[0])+" "+a[1]+(0>s[1]?s[1]:"+"+s[1]),at:a.join(" ")}),t=e.extend({},e.ui.dialog.prototype.options.position,t)):t=e.ui.dialog.prototype.options.position,i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.position(t),i||this.uiDialog.hide()},_setOptions:function(t){var i=this,n={},r=!1;e.each(t,function(e,t){i._setOption(e,t),e in a&&(r=!0),e in s&&(n[e]=t)}),r&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,a){var s,n,r=this.uiDialog;switch(t){case"buttons":this._createButtons(a);break;case"closeText":this.uiDialogTitlebarCloseText.text(""+a);break;case"dialogClass":r.removeClass(this.options.dialogClass).addClass(i+a);break;case"disabled":a?r.addClass("ui-dialog-disabled"):r.removeClass("ui-dialog-disabled");break;case"draggable":s=r.is(":data(draggable)"),s&&!a&&r.draggable("destroy"),!s&&a&&this._makeDraggable();break;case"position":this._position(a);break;case"resizable":n=r.is(":data(resizable)"),n&&!a&&r.resizable("destroy"),n&&"string"==typeof a&&r.resizable("option","handles",a),n||a===!1||this._makeResizable(a);break;case"title":e(".ui-dialog-title",this.uiDialogTitlebar).html(""+(a||" "))}this._super(t,a)},_size:function(){var t,i,a,s=this.options,n=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),i=Math.max(0,s.minHeight-t),"auto"===s.height?e.support.minHeight?this.element.css({minHeight:i,height:"auto"}):(this.uiDialog.show(),a=this.element.css("height","auto").height(),n||this.uiDialog.hide(),this.element.height(Math.max(a,i))):this.element.height(Math.max(s.height-t,0)),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(i){0===this.instances.length&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(i){return e(i.target).zIndex()<e.ui.dialog.overlay.maxZ?!1:t})},1),e(window).bind("resize.dialog-overlay",e.ui.dialog.overlay.resize));var a=this.oldInstances.pop()||e("<div>").addClass("ui-widget-overlay");return e(document).bind("keydown.dialog-overlay",function(t){var s=e.ui.dialog.overlay.instances;0!==s.length&&s[s.length-1]===a&&i.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE&&(i.close(t),t.preventDefault())}),a.appendTo(document.body).css({width:this.width(),height:this.height()}),e.fn.bgiframe&&a.bgiframe(),this.instances.push(a),a},destroy:function(t){var i=e.inArray(t,this.instances),a=0;-1!==i&&this.oldInstances.push(this.instances.splice(i,1)[0]),0===this.instances.length&&e([document,window]).unbind(".dialog-overlay"),t.height(0).width(0).remove(),e.each(this.instances,function(){a=Math.max(a,this.css("z-index"))}),this.maxZ=a},height:function(){var t,i;return e.ui.ie?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),i=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),i>t?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,i;return e.ui.ie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),i>t?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.css({width:0,height:0}).css({width:e.ui.dialog.overlay.width(),height:e.ui.dialog.overlay.height()})}}),e.extend(e.ui.dialog.overlay.prototype,{destroy:function(){e.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(e){var t=!1;e.widget("ui.menu",{version:"1.9.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(i){var s=e(i.target).closest(".ui-menu-item");!t&&s.not(".ui-state-disabled").length&&(t=!0,this.select(i),s.has(".ui-menu").length?this.expand(i):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(i){e(i.target).closest(".ui-menu").length||this.collapseAll(i),t=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,a,n,r,o,h=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:h=!1,a=this.previousFilter||"",n=String.fromCharCode(t.keyCode),r=!1,clearTimeout(this.filterTimer),n===a?r=!0:n=a+n,o=RegExp("^"+i(n),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())}),s=r&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(n=String.fromCharCode(t.keyCode),o=RegExp("^"+i(n),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())})),s.length?(this.focus(t,s),s.length>1?(this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),s=t.prev("a"),a=e("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(a),t.attr("aria-labelledby",s.attr("id"))}),t=s.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,a,n,r,o;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,a=t.offset().top-this.activeMenu.offset().top-i-s,n=this.activeMenu.scrollTop(),r=this.activeMenu.height(),o=t.height(),0>a?this.activeMenu.scrollTop(n+a):a+o>r&&this.activeMenu.scrollTop(n+a-r+o))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(i,s)},nextPage:function(t){var i,s,a;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,a=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-a}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(t),undefined)},previousPage:function(t){var i,s,a;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,a=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+a>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(t),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)}})})(jQuery);(function(e,t){e.widget("ui.progressbar",{version:"1.9.2",options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return e===t?this._value():(this._setOption("value",e),this)},_setOption:function(e,t){"value"===e&&(this.options.value=t,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(e,t)},_value:function(){var e=this.options.value;return"number"!=typeof e&&(e=0),Math.min(this.options.max,Math.max(this.min,e))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var e=this.value(),t=this._percentage();this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),this.valueDiv.toggle(e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.attr("aria-valuenow",e)}})})(jQuery);(function(e){var t=5;e.widget("ui.slider",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var i,s,a=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),r="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(a.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),a.range&&(a.range===!0&&(a.values||(a.values=[this._valueMin(),this._valueMin()]),a.values.length&&2!==a.values.length&&(a.values=[a.values[0],a.values[0]])),this.range=e("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===a.range||"max"===a.range?" ui-slider-range-"+a.range:""))),s=a.values&&a.values.length||1,i=n.length;s>i;i++)o.push(r);this.handles=n.add(e(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).mouseenter(function(){a.disabled||e(this).addClass("ui-state-hover")}).mouseleave(function(){e(this).removeClass("ui-state-hover")}).focus(function(){a.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)}),this._on(this.handles,{keydown:function(i){var s,a,n,r,o=e(i.target).data("ui-slider-handle-index");switch(i.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(i.target).addClass("ui-state-active"),s=this._start(i,o),s===!1))return}switch(r=this.options.step,a=n=this.options.values&&this.options.values.length?this.values(o):this.value(),i.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(a+(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(a-(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(a===this._valueMax())return;n=this._trimAlignValue(a+r);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(a===this._valueMin())return;n=this._trimAlignValue(a-r)}this._slide(i,o,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,a,n,r,o,h,l,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),a=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));a>i&&(a=i,n=e(this),r=t)}),d.range===!0&&this.values(1)===d.min&&(r+=1,n=e(this.handles[r])),o=this._start(t,r),o===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,n.addClass("ui-state-active").focus(),h=n.offset(),l=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-n.width()/2,top:t.pageY-h.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,a,n;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),a=this._valueMax()-this._valueMin(),n=this._valueMin()+s*a,this._trimAlignValue(n)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,a,n;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(a=this.values(),a[t]=i,n=this._trigger("slide",e,{handle:this.handles[t],value:i,values:a}),s=this.values(t?0:1),n!==!1&&this.values(t,i,!0))):i!==this.value()&&(n=this._trigger("slide",e,{handle:this.handles[t],value:i}),n!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(t,i){var s,a,n;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),undefined;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,a=arguments[0],n=0;s.length>n;n+=1)s[n]=this._trimAlignValue(a[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,i){var s,a=0;switch(e.isArray(this.options.values)&&(a=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"disabled":i?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;a>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,s,a,n,r=this.options.range,o=this.options,h=this,l=this._animateOff?!1:o.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,o.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:o.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:o.animate}))),t=i}):(s=this.value(),a=this._valueMin(),n=this._valueMax(),i=n!==a?100*((s-a)/(n-a)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,o.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},o.animate),"max"===r&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:o.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},o.animate),"max"===r&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:o.animate}))}})})(jQuery);(function(e){function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.widget("ui.spinner",{version:"1.9.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,s){var a=i.attr(s);void 0!==a&&a.length&&(t[s]=a)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>▼</span>"+"</a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),this._super(e,t),"disabled"===e&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(e){this._super(e),this._value(this.element.val())}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:t(function(e){this._stepUp(e)}),_stepUp:function(e){this._spin((e||1)*this.options.step)},stepDown:t(function(e){this._stepDown(e)}),_stepDown:function(e){this._spin((e||1)*-this.options.step)},pageUp:t(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:t(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(t(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(e,t){function i(){return++a}function s(e){return e.hash.length>1&&e.href.replace(n,"")===location.href.replace(n,"").replace(/\s/g,"%20")}var a=0,n=/#.*$/;e.widget("ui.tabs",{version:"1.9.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var i=this,s=this.options,a=s.active,n=location.hash.substring(1);this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",s.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),null===a&&(n&&this.tabs.each(function(i,s){return e(s).attr("aria-controls")===n?(a=i,!1):t}),null===a&&(a=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===a||-1===a)&&(a=this.tabs.length?0:!1)),a!==!1&&(a=this.tabs.index(this.tabs.eq(a)),-1===a&&(a=s.collapsible?!1:0)),s.active=a,!s.collapsible&&s.active===!1&&this.anchors.length&&(s.active=0),e.isArray(s.disabled)&&(s.disabled=e.unique(s.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return i.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(this.options.active):e(),this._refresh(),this.active.length&&this.load(s.active)},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(i){var s=e(this.document[0].activeElement).closest("li"),a=this.tabs.index(s),n=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:a++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,a--;break;case e.ui.keyCode.END:a=this.anchors.length-1;break;case e.ui.keyCode.HOME:a=0;break;case e.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(a),t;case e.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(a===this.options.active?!1:a),t;default:return}i.preventDefault(),clearTimeout(this.activating),a=this._focusNextTab(a,n),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(a).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",a)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):t},_findNextTab:function(t,i){function s(){return t>a&&(t=0),0>t&&(t=a),t}for(var a=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,i){return"active"===e?(this._activate(i),t):"disabled"===e?(this._setupDisabled(i),t):(this._super(e,i),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(i),"heightStyle"===e&&this._setupHeightStyle(i),t)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,a){var n,r,o,h=e(a).uniqueId().attr("id"),l=e(a).closest("li"),u=l.attr("aria-controls");s(a)?(n=a.hash,r=t.element.find(t._sanitizeSelector(n))):(o=t._tabId(l),n="#"+o,r=t.element.find(n),r.length||(r=t._createPanel(o),r.insertAfter(t.panels[i-1]||t.tablist)),r.attr("aria-live","polite")),r.length&&(t.panels=t.panels.add(r)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":n.substring(1),"aria-labelledby":h}),r.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s,a=this.element.parent();"fill"===t?(e.support.minHeight||(s=a.css("overflow"),a.css("overflow","hidden")),i=a.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),s&&a.css("overflow",s),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,a=e(t.currentTarget),n=a.closest("li"),r=n[0]===s[0],o=r&&i.collapsible,h=o?e():this._getPanelForTab(n),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:o?e():n,newPanel:h};t.preventDefault(),n.hasClass("ui-state-disabled")||n.hasClass("ui-tabs-loading")||this.running||r&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=o?!1:this.tabs.index(n),this.active=r?e():n,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(n),t),this._toggle(t,u))},_toggle:function(t,i){function s(){n.running=!1,n._trigger("activate",t,i)}function a(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&n.options.show?n._show(r,n.options.show,s):(r.show(),s())}var n=this,r=i.newPanel,o=i.oldPanel;this.running=!0,o.length&&this.options.hide?this._hide(o,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),o.hide(),a()),o.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),r.length&&o.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===t?s=!1:(i=this._getIndex(i),s=e.isArray(s)?e.map(s,function(e){return e!==i?e:null}):e.map(this.tabs,function(e,t){return t!==i?t:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===t)s=!0;else{if(i=this._getIndex(i),-1!==e.inArray(i,s))return;s=e.isArray(s)?e.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(t,i){t=this._getIndex(t);var a=this,n=this.tabs.eq(t),r=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),h={tab:n,panel:o};s(r[0])||(this.xhr=e.ajax(this._ajaxSettings(r,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){o.html(e),a._trigger("load",i,h)},1)}).complete(function(e,t){setTimeout(function(){"abort"===t&&a.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===a.xhr&&delete a.xhr},1)})))},_ajaxSettings:function(t,i,s){var a=this;return{url:t.attr("href"),beforeSend:function(t,n){return a._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:n},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.uiBackCompat!==!1&&(e.ui.tabs.prototype._ui=function(e,t){return{tab:e,panel:t,index:this.anchors.index(e)}},e.widget("ui.tabs",e.ui.tabs,{url:function(e,t){this.anchors.eq(e).attr("href",t)}}),e.widget("ui.tabs",e.ui.tabs,{options:{ajaxOptions:null,cache:!1},_create:function(){this._super();var i=this;this._on({tabsbeforeload:function(s,a){return e.data(a.tab[0],"cache.tabs")?(s.preventDefault(),t):(a.jqXHR.success(function(){i.options.cache&&e.data(a.tab[0],"cache.tabs",!0)}),t)}})},_ajaxSettings:function(t,i,s){var a=this.options.ajaxOptions;return e.extend({},a,{error:function(e,t){try{a.error(e,t,s.tab.closest("li").index(),s.tab[0])}catch(i){}}},this._superApply(arguments))},_setOption:function(e,t){"cache"===e&&t===!1&&this.anchors.removeData("cache.tabs"),this._super(e,t)},_destroy:function(){this.anchors.removeData("cache.tabs"),this._super()},url:function(e){this.anchors.eq(e).removeData("cache.tabs"),this._superApply(arguments)}}),e.widget("ui.tabs",e.ui.tabs,{abort:function(){this.xhr&&this.xhr.abort()}}),e.widget("ui.tabs",e.ui.tabs,{options:{spinner:"<em>Loading…</em>"},_create:function(){this._super(),this._on({tabsbeforeload:function(e,t){if(e.target===this.element[0]&&this.options.spinner){var i=t.tab.find("span"),s=i.html();i.html(this.options.spinner),t.jqXHR.complete(function(){i.html(s)})}}})}}),e.widget("ui.tabs",e.ui.tabs,{options:{enable:null,disable:null},enable:function(t){var i,s=this.options;(t&&s.disabled===!0||e.isArray(s.disabled)&&-1!==e.inArray(t,s.disabled))&&(i=!0),this._superApply(arguments),i&&this._trigger("enable",null,this._ui(this.anchors[t],this.panels[t]))},disable:function(t){var i,s=this.options;(t&&s.disabled===!1||e.isArray(s.disabled)&&-1===e.inArray(t,s.disabled))&&(i=!0),this._superApply(arguments),i&&this._trigger("disable",null,this._ui(this.anchors[t],this.panels[t]))}}),e.widget("ui.tabs",e.ui.tabs,{options:{add:null,remove:null,tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},add:function(i,s,a){a===t&&(a=this.anchors.length);var n,r,o=this.options,h=e(o.tabTemplate.replace(/#\{href\}/g,i).replace(/#\{label\}/g,s)),l=i.indexOf("#")?this._tabId(h):i.replace("#","");return h.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy",!0),h.attr("aria-controls",l),n=a>=this.tabs.length,r=this.element.find("#"+l),r.length||(r=this._createPanel(l),n?a>0?r.insertAfter(this.panels.eq(-1)):r.appendTo(this.element):r.insertBefore(this.panels[a])),r.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(),n?h.appendTo(this.tablist):h.insertBefore(this.tabs[a]),o.disabled=e.map(o.disabled,function(e){return e>=a?++e:e}),this.refresh(),1===this.tabs.length&&o.active===!1&&this.option("active",0),this._trigger("add",null,this._ui(this.anchors[a],this.panels[a])),this},remove:function(t){t=this._getIndex(t);var i=this.options,s=this.tabs.eq(t).remove(),a=this._getPanelForTab(s).remove();return s.hasClass("ui-tabs-active")&&this.anchors.length>2&&this._activate(t+(this.anchors.length>t+1?1:-1)),i.disabled=e.map(e.grep(i.disabled,function(e){return e!==t}),function(e){return e>=t?--e:e}),this.refresh(),this._trigger("remove",null,this._ui(s.find("a")[0],a[0])),this}}),e.widget("ui.tabs",e.ui.tabs,{length:function(){return this.anchors.length}}),e.widget("ui.tabs",e.ui.tabs,{options:{idPrefix:"ui-tabs-"},_tabId:function(t){var s=t.is("li")?t.find("a[href]"):t;return s=s[0],e(s).closest("li").attr("aria-controls")||s.title&&s.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF\-]/g,"")||this.options.idPrefix+i()}}),e.widget("ui.tabs",e.ui.tabs,{options:{panelTemplate:"<div></div>"},_createPanel:function(t){return e(this.options.panelTemplate).attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)}}),e.widget("ui.tabs",e.ui.tabs,{_create:function(){var e=this.options;null===e.active&&e.selected!==t&&(e.active=-1===e.selected?!1:e.selected),this._super(),e.selected=e.active,e.selected===!1&&(e.selected=-1)},_setOption:function(e,t){if("selected"!==e)return this._super(e,t);var i=this.options;this._super("active",-1===t?!1:t),i.selected=i.active,i.selected===!1&&(i.selected=-1)},_eventHandler:function(){this._superApply(arguments),this.options.selected=this.options.active,this.options.selected===!1&&(this.options.selected=-1)}}),e.widget("ui.tabs",e.ui.tabs,{options:{show:null,select:null},_create:function(){this._super(),this.options.active!==!1&&this._trigger("show",null,this._ui(this.active.find(".ui-tabs-anchor")[0],this._getPanelForTab(this.active)[0]))},_trigger:function(e,t,i){var s,a,n=this._superApply(arguments);return n?("beforeActivate"===e?(s=i.newTab.length?i.newTab:i.oldTab,a=i.newPanel.length?i.newPanel:i.oldPanel,n=this._super("select",t,{tab:s.find(".ui-tabs-anchor")[0],panel:a[0],index:s.closest("li").index()})):"activate"===e&&i.newTab.length&&(n=this._super("show",t,{tab:i.newTab.find(".ui-tabs-anchor")[0],panel:i.newPanel[0],index:i.newTab.closest("li").index()})),n):!1}}),e.widget("ui.tabs",e.ui.tabs,{select:function(e){if(e=this._getIndex(e),-1===e){if(!this.options.collapsible||-1===this.options.selected)return;e=this.options.selected}this.anchors.eq(e).trigger(this.options.event+this.eventNamespace)}}),function(){var t=0;e.widget("ui.tabs",e.ui.tabs,{options:{cookie:null},_create:function(){var e,t=this.options;null==t.active&&t.cookie&&(e=parseInt(this._cookie(),10),-1===e&&(e=!1),t.active=e),this._super()},_cookie:function(i){var s=[this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++t)];return arguments.length&&(s.push(i===!1?-1:i),s.push(this.options.cookie)),e.cookie.apply(null,s)},_refresh:function(){this._super(),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_eventHandler:function(){this._superApply(arguments),this.options.cookie&&this._cookie(this.options.active,this.options.cookie)},_destroy:function(){this._super(),this.options.cookie&&this._cookie(null,this.options.cookie)}})}(),e.widget("ui.tabs",e.ui.tabs,{_trigger:function(t,i,s){var a=e.extend({},s);return"load"===t&&(a.panel=a.panel[0],a.tab=a.tab.find(".ui-tabs-anchor")[0]),this._super(t,i,a)}}),e.widget("ui.tabs",e.ui.tabs,{options:{fx:null},_getFx:function(){var t,i,s=this.options.fx;return s&&(e.isArray(s)?(t=s[0],i=s[1]):t=i=s),s?{show:i,hide:t}:null},_toggle:function(e,i){function s(){n.running=!1,n._trigger("activate",e,i)}function a(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&h.show?r.animate(h.show,h.show.duration,function(){s()}):(r.show(),s())}var n=this,r=i.newPanel,o=i.oldPanel,h=this._getFx();return h?(n.running=!0,o.length&&h.hide?o.animate(h.hide,h.hide.duration,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),o.hide(),a()),t):this._super(e,i)}}))})(jQuery);(function(e){function t(t,i){var s=(t.attr("aria-describedby")||"").split(/\s+/);s.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(s.join(" ")))}function i(t){var i=t.data("ui-tooltip-id"),s=(t.attr("aria-describedby")||"").split(/\s+/),a=e.inArray(i,s);-1!==a&&s.splice(a,1),t.removeData("ui-tooltip-id"),s=e.trim(s.join(" ")),s?t.attr("aria-describedby",s):t.removeAttr("aria-describedby")}var s=0;e.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return e(this).attr("title")},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,i){var s=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var a=e.Event("blur");a.target=a.currentTarget=s[0],t.close(a,!0)}),this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&s.parents().each(function(){var t,s=e(this);s.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,a=this,n=t?t.type:null;return"string"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){e.data("ui-tooltip-open")&&a._delay(function(){t&&(t.type=n),this._open(t,e,i)})}),i&&this._open(t,e,i),void 0)},_open:function(i,s,a){function n(e){l.of=e,r.is(":hidden")||r.position(l)}var r,o,h,l=e.extend({},this.options.position);if(a){if(r=this._find(s),r.length)return r.find(".ui-tooltip-content").html(a),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),r=this._tooltip(s),t(s,r.attr("id")),r.find(".ui-tooltip-content").html(a),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:n}),n(i)):r.position(e.extend({of:s},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(h=setInterval(function(){r.is(":visible")&&(n(l.of),clearInterval(h))},e.fx.interval)),this._trigger("open",i,{tooltip:r}),o={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var i=e.Event(t);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(r)}},i&&"mouseover"!==i.type||(o.mouseleave="close"),i&&"focusin"!==i.type||(o.focusout="close"),this._on(!0,s,o)}},close:function(t){var s=this,a=e(t?t.currentTarget:this.element),n=this._find(a);this.closing||(a.data("ui-tooltip-title")&&a.attr("title",a.data("ui-tooltip-title")),i(a),n.stop(!0),this._hide(n,this.options.hide,function(){s._removeTooltip(e(this))}),a.removeData("ui-tooltip-open"),this._off(a,"mouseleave focusout keyup"),a[0]!==this.element[0]&&this._off(a,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete s.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:n}),this.closing=!1)},_tooltip:function(t){var i="ui-tooltip-"+s++,a=e("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("<div>").addClass("ui-tooltip-content").appendTo(a),a.appendTo(this.document[0].body),e.fn.bgiframe&&a.bgiframe(),this.tooltips[i]=t,a},_find:function(t){var i=t.data("ui-tooltip-id");return i?e("#"+i):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var a=e.Event("blur");a.target=a.currentTarget=s[0],t.close(a,!0),e("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);jQuery.effects||function(e,t){var i=e.uiBackCompat!==!1,a="ui-effects-";e.effects={effect:{}},function(t,i){function a(e,t,i){var a=c[t.type]||{};return null==e?i||!t.def?null:t.def:(e=a.floor?~~e:parseFloat(e),isNaN(e)?t.def:a.mod?(e+a.mod)%a.mod:0>e?0:e>a.max?a.max:e)}function s(e){var a=u(),s=a._rgba=[];return e=e.toLowerCase(),m(l,function(t,n){var r,o=n.re.exec(e),h=o&&n.parse(o),l=n.space||"rgba";return h?(r=a[l](h),a[d[l].cache]=r[d[l].cache],s=a._rgba=r._rgba,!1):i}),s.length?("0,0,0,0"===s.join()&&t.extend(s,r.transparent),a):r[e]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var r,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),h=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],u=t.Color=function(e,i,a,s){return new t.Color.fn.parse(e,i,a,s)},d={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},c={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},p=u.support={},f=t("<p>")[0],m=t.each;f.style.cssText="background-color:rgba(1,1,1,.5)",p.rgba=f.style.backgroundColor.indexOf("rgba")>-1,m(d,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),u.fn=t.extend(u.prototype,{parse:function(n,o,h,l){if(n===i)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=i);var c=this,p=t.type(n),f=this._rgba=[];return o!==i&&(n=[n,o,h,l],p="array"),"string"===p?this.parse(s(n)||r._default):"array"===p?(m(d.rgba.props,function(e,t){f[t.idx]=a(n[t.idx],t)}),this):"object"===p?(n instanceof u?m(d,function(e,t){n[t.cache]&&(c[t.cache]=n[t.cache].slice())}):m(d,function(t,i){var s=i.cache;m(i.props,function(e,t){if(!c[s]&&i.to){if("alpha"===e||null==n[e])return;c[s]=i.to(c._rgba)}c[s][t.idx]=a(n[e],t,!0)}),c[s]&&0>e.inArray(null,c[s].slice(0,3))&&(c[s][3]=1,i.from&&(c._rgba=i.from(c[s])))}),this):i},is:function(e){var t=u(e),a=!0,s=this;return m(d,function(e,n){var r,o=t[n.cache];return o&&(r=s[n.cache]||n.to&&n.to(s._rgba)||[],m(n.props,function(e,t){return null!=o[t.idx]?a=o[t.idx]===r[t.idx]:i})),a}),a},_space:function(){var e=[],t=this;return m(d,function(i,a){t[a.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var i=u(e),s=i._space(),n=d[s],r=0===this.alpha()?u("transparent"):this,o=r[n.cache]||n.to(r._rgba),h=o.slice();return i=i[n.cache],m(n.props,function(e,s){var n=s.idx,r=o[n],l=i[n],u=c[s.type]||{};null!==l&&(null===r?h[n]=l:(u.mod&&(l-r>u.mod/2?r+=u.mod:r-l>u.mod/2&&(r-=u.mod)),h[n]=a((l-r)*t+r,s)))}),this[s](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),a=i.pop(),s=u(e)._rgba;return u(t.map(i,function(e,t){return(1-a)*s[t]+a*e}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),a=i.pop();return e&&i.push(~~(255*a)),"#"+t.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,d.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,a=e[0]/255,s=e[1]/255,n=e[2]/255,r=e[3],o=Math.max(a,s,n),h=Math.min(a,s,n),l=o-h,u=o+h,d=.5*u;return t=h===o?0:a===o?60*(s-n)/l+360:s===o?60*(n-a)/l+120:60*(a-s)/l+240,i=0===d||1===d?d:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==r?1:r]},d.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],a=e[2],s=e[3],r=.5>=a?a*(1+i):a+i-a*i,o=2*a-r;return[Math.round(255*n(o,r,t+1/3)),Math.round(255*n(o,r,t)),Math.round(255*n(o,r,t-1/3)),s]},m(d,function(e,s){var n=s.props,r=s.cache,o=s.to,l=s.from;u.fn[e]=function(e){if(o&&!this[r]&&(this[r]=o(this._rgba)),e===i)return this[r].slice();var s,h=t.type(e),d="array"===h||"object"===h?e:arguments,c=this[r].slice();return m(n,function(e,t){var i=d["object"===h?e:t.idx];null==i&&(i=c[t.idx]),c[t.idx]=a(i,t)}),l?(s=u(l(c)),s[r]=c,s):u(c)},m(n,function(i,a){u.fn[i]||(u.fn[i]=function(s){var n,r=t.type(s),o="alpha"===i?this._hsla?"hsla":"rgba":e,l=this[o](),u=l[a.idx];return"undefined"===r?u:("function"===r&&(s=s.call(this,u),r=t.type(s)),null==s&&a.empty?this:("string"===r&&(n=h.exec(s),n&&(s=u+parseFloat(n[2])*("+"===n[1]?1:-1))),l[a.idx]=s,this[o](l)))})})}),m(o,function(e,i){t.cssHooks[i]={set:function(e,a){var n,r,o="";if("string"!==t.type(a)||(n=s(a))){if(a=u(n||a),!p.rgba&&1!==a._rgba[3]){for(r="backgroundColor"===i?e.parentNode:e;(""===o||"transparent"===o)&&r&&r.style;)try{o=t.css(r,"backgroundColor"),r=r.parentNode}catch(h){}a=a.blend(o&&"transparent"!==o?o:"_default")}a=a.toRgbaString()}try{e.style[i]=a}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=u(e.elem,i),e.end=u(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}}),t.cssHooks.borderColor={expand:function(e){var t={};return m(["Top","Right","Bottom","Left"],function(i,a){t["border"+a+"Color"]=e}),t}},r=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(){var t,i,a=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,s={};if(a&&a.length&&a[0]&&a[a[0]])for(i=a.length;i--;)t=a[i],"string"==typeof a[t]&&(s[e.camelCase(t)]=a[t]);else for(t in a)"string"==typeof a[t]&&(s[t]=a[t]);return s}function a(t,i){var a,s,r={};for(a in i)s=i[a],t[a]!==s&&(n[a]||(e.fx.step[a]||!isNaN(parseFloat(s)))&&(r[a]=s));return r}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(jQuery.style(e.elem,i,e.end),e.setAttr=!0)}}),e.effects.animateClass=function(t,n,r,o){var h=e.speed(n,r,o);return this.queue(function(){var n,r=e(this),o=r.attr("class")||"",l=h.children?r.find("*").andSelf():r;l=l.map(function(){var t=e(this);return{el:t,start:i.call(this)}}),n=function(){e.each(s,function(e,i){t[i]&&r[i+"Class"](t[i])})},n(),l=l.map(function(){return this.end=i.call(this.el[0]),this.diff=a(this.start,this.end),this}),r.attr("class",o),l=l.map(function(){var t=this,i=e.Deferred(),a=jQuery.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,a),i.promise()}),e.when.apply(e,l.get()).done(function(){n(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(r[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,i,a,s){return i?e.effects.animateClass.call(this,{add:t},i,a,s):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,i,a,s){return i?e.effects.animateClass.call(this,{remove:t},i,a,s):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(i,a,s,n,r){return"boolean"==typeof a||a===t?s?e.effects.animateClass.call(this,a?{add:i}:{remove:i},s,n,r):this._toggleClass(i,a):e.effects.animateClass.call(this,{toggle:i},a,s,n)},switchClass:function(t,i,a,s,n){return e.effects.animateClass.call(this,{add:i,remove:t},a,s,n)}})}(),function(){function s(t,i,a,s){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(s=i,a=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(s=a,a=i,i={}),e.isFunction(a)&&(s=a,a=null),i&&e.extend(t,i),a=a||i.duration,t.duration=e.fx.off?0:"number"==typeof a?a:a in e.fx.speeds?e.fx.speeds[a]:e.fx.speeds._default,t.complete=s||i.complete,t}function n(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?!1:i&&e.effects[t]?!1:!0}e.extend(e.effects,{version:"1.9.2",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(a+t[i],e[0].style[t[i]])},restore:function(e,i){var s,n;for(n=0;i.length>n;n++)null!==i[n]&&(s=e.data(a+i[n]),s===t&&(s=""),e.css(i[n],s))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,a;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":a=0;break;case"center":a=.5;break;case"right":a=1;break;default:a=e[1]/t.width}return{x:a,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},a=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:t.width(),height:t.height()},n=document.activeElement;try{n.id}catch(r){n=document.body}return t.wrap(a),(t[0]===n||e.contains(t[0],n))&&e(n).focus(),a=t.parent(),"static"===t.css("position")?(a.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,a){i[a]=t.css(a),isNaN(parseInt(i[a],10))&&(i[a]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(s),a.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,a,s){return s=s||{},e.each(i,function(e,i){var n=t.cssUnit(i);n[0]>0&&(s[i]=n[0]*a+n[1])}),s}}),e.fn.extend({effect:function(){function t(t){function i(){e.isFunction(n)&&n.call(s[0]),e.isFunction(t)&&t()}var s=e(this),n=a.complete,r=a.mode;(s.is(":hidden")?"hide"===r:"show"===r)?i():o.call(s[0],a,i)}var a=s.apply(this,arguments),n=a.mode,r=a.queue,o=e.effects.effect[a.effect],h=!o&&i&&e.effects[a.effect];return e.fx.off||!o&&!h?n?this[n](a.duration,a.complete):this.each(function(){a.complete&&a.complete.call(this)}):o?r===!1?this.each(t):this.queue(r||"fx",t):h.call(this,{options:a,duration:a.duration,callback:a.complete,mode:a.mode})},_show:e.fn.show,show:function(e){if(n(e))return this._show.apply(this,arguments);var t=s.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(n(e))return this._hide.apply(this,arguments);var t=s.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(n(t)||"boolean"==typeof t||e.isFunction(t))return this.__toggle.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)},cssUnit:function(t){var i=this.css(t),a=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(a=[parseFloat(i),t])}),a}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}()}(jQuery);(function(e){var t=/up|down|vertical/,i=/up|left|vertical|horizontal/;e.effects.effect.blind=function(a,s){var n,r,o,l=e(this),h=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(l,a.mode||"hide"),d=a.direction||"up",c=t.test(d),p=c?"height":"width",m=c?"top":"left",f=i.test(d),g={},v="show"===u;l.parent().is(".ui-effects-wrapper")?e.effects.save(l.parent(),h):e.effects.save(l,h),l.show(),n=e.effects.createWrapper(l).css({overflow:"hidden"}),r=n[p](),o=parseFloat(n.css(m))||0,g[p]=v?r:0,f||(l.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),g[m]=v?o:r+o),v&&(n.css(p,0),f||n.css(m,o+r)),n.animate(g,{duration:a.duration,easing:a.easing,queue:!1,complete:function(){"hide"===u&&l.hide(),e.effects.restore(l,h),e.effects.removeWrapper(l),s()}})}})(jQuery);(function(e){e.effects.effect.bounce=function(t,i){var a,s,n,r=e(this),o=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(r,t.mode||"effect"),h="hide"===l,u="show"===l,d=t.direction||"up",c=t.distance,p=t.times||5,m=2*p+(u||h?1:0),f=t.duration/m,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=r.queue(),_=b.length;for((u||h)&&o.push("opacity"),e.effects.save(r,o),r.show(),e.effects.createWrapper(r),c||(c=r["top"===v?"outerHeight":"outerWidth"]()/3),u&&(n={opacity:1},n[v]=0,r.css("opacity",0).css(v,y?2*-c:2*c).animate(n,f,g)),h&&(c/=Math.pow(2,p-1)),n={},n[v]=0,a=0;p>a;a++)s={},s[v]=(y?"-=":"+=")+c,r.animate(s,f,g).animate(n,f,g),c=h?2*c:c/2;h&&(s={opacity:0},s[v]=(y?"-=":"+=")+c,r.animate(s,f,g)),r.queue(function(){h&&r.hide(),e.effects.restore(r,o),e.effects.removeWrapper(r),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,m+1))),r.dequeue()}})(jQuery);(function(e){e.effects.effect.clip=function(t,i){var a,s,n,r=e(this),o=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(r,t.mode||"hide"),h="show"===l,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",m={};e.effects.save(r,o),r.show(),a=e.effects.createWrapper(r).css({overflow:"hidden"}),s="IMG"===r[0].tagName?a:r,n=s[c](),h&&(s.css(c,0),s.css(p,n/2)),m[c]=h?n:0,m[p]=h?0:n/2,s.animate(m,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){h||r.hide(),e.effects.restore(r,o),e.effects.removeWrapper(r),i()}})}})(jQuery);(function(e){e.effects.effect.drop=function(t,i){var a,s=e(this),n=["position","top","bottom","left","right","opacity","height","width"],r=e.effects.setMode(s,t.mode||"hide"),o="show"===r,l=t.direction||"left",h="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l?"pos":"neg",d={opacity:o?1:0};e.effects.save(s,n),s.show(),e.effects.createWrapper(s),a=t.distance||s["top"===h?"outerHeight":"outerWidth"](!0)/2,o&&s.css("opacity",0).css(h,"pos"===u?-a:a),d[h]=(o?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+a,s.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&s.hide(),e.effects.restore(s,n),e.effects.removeWrapper(s),i()}})}})(jQuery);(function(e){e.effects.effect.explode=function(t,i){function a(){b.push(this),b.length===d*c&&s()}function s(){p.css({visibility:"visible"}),e(b).remove(),f||p.hide(),i()}var n,r,o,l,h,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),m=e.effects.setMode(p,t.mode||"hide"),f="show"===m,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(n=0;d>n;n++)for(l=g.top+n*y,u=n-(d-1)/2,r=0;c>r;r++)o=g.left+r*v,h=r-(c-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*v,top:-n*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:o+(f?h*v:0),top:l+(f?u*y:0),opacity:f?0:1}).animate({left:o+(f?0:h*v),top:l+(f?0:u*y),opacity:f?1:0},t.duration||500,t.easing,a)}})(jQuery);(function(e){e.effects.effect.fade=function(t,i){var a=e(this),s=e.effects.setMode(a,t.mode||"toggle");a.animate({opacity:s},{queue:!1,duration:t.duration,easing:t.easing,complete:i})}})(jQuery);(function(e){e.effects.effect.fold=function(t,i){var a,s,n=e(this),r=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(n,t.mode||"hide"),l="show"===o,h="hide"===o,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=l!==c,m=p?["width","height"]:["height","width"],f=t.duration/2,g={},v={};e.effects.save(n,r),n.show(),a=e.effects.createWrapper(n).css({overflow:"hidden"}),s=p?[a.width(),a.height()]:[a.height(),a.width()],d&&(u=parseInt(d[1],10)/100*s[h?0:1]),l&&a.css(c?{height:0,width:u}:{height:u,width:0}),g[m[0]]=l?s[0]:u,v[m[1]]=l?s[1]:0,a.animate(g,f,t.easing).animate(v,f,t.easing,function(){h&&n.hide(),e.effects.restore(n,r),e.effects.removeWrapper(n),i()})}})(jQuery);(function(e){e.effects.effect.highlight=function(t,i){var a=e(this),s=["backgroundImage","backgroundColor","opacity"],n=e.effects.setMode(a,t.mode||"show"),r={backgroundColor:a.css("backgroundColor")};"hide"===n&&(r.opacity=0),e.effects.save(a,s),a.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===n&&a.hide(),e.effects.restore(a,s),i()}})}})(jQuery);(function(e){e.effects.effect.pulsate=function(t,i){var a,s=e(this),n=e.effects.setMode(s,t.mode||"show"),r="show"===n,o="hide"===n,l=r||"hide"===n,h=2*(t.times||5)+(l?1:0),u=t.duration/h,d=0,c=s.queue(),p=c.length;for((r||!s.is(":visible"))&&(s.css("opacity",0).show(),d=1),a=1;h>a;a++)s.animate({opacity:d},u,t.easing),d=1-d;s.animate({opacity:d},u,t.easing),s.queue(function(){o&&s.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,h+1))),s.dequeue()}})(jQuery);(function(e){e.effects.effect.puff=function(t,i){var a=e(this),s=e.effects.setMode(a,t.mode||"hide"),n="hide"===s,r=parseInt(t.percent,10)||150,o=r/100,h={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:s,complete:i,percent:n?r:100,from:n?h:{height:h.height*o,width:h.width*o,outerHeight:h.outerHeight*o,outerWidth:h.outerWidth*o}}),a.effect(t)},e.effects.effect.scale=function(t,i){var a=e(this),s=e.extend(!0,{},t),n=e.effects.setMode(a,t.mode||"effect"),r=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===n?0:100),o=t.direction||"both",h=t.origin,l={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},u={y:"horizontal"!==o?r/100:1,x:"vertical"!==o?r/100:1};s.effect="size",s.queue=!1,s.complete=i,"effect"!==n&&(s.origin=h||["middle","center"],s.restore=!0),s.from=t.from||("show"===n?{height:0,width:0,outerHeight:0,outerWidth:0}:l),s.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},s.fade&&("show"===n&&(s.from.opacity=0,s.to.opacity=1),"hide"===n&&(s.from.opacity=1,s.to.opacity=0)),a.effect(s)},e.effects.effect.size=function(t,i){var a,s,n,r=e(this),o=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(r,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=r.css("position"),y=f?o:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&r.show(),a={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},"toggle"===t.mode&&"show"===p?(r.from=t.to||b,r.to=t.from||a):(r.from=t.from||("show"===p?b:a),r.to=t.to||("hide"===p?b:a)),n={from:{y:r.from.height/a.height,x:r.from.width/a.width},to:{y:r.to.height/a.height,x:r.to.width/a.width}},("box"===m||"both"===m)&&(n.from.y!==n.to.y&&(y=y.concat(d),r.from=e.effects.setTransition(r,d,n.from.y,r.from),r.to=e.effects.setTransition(r,d,n.to.y,r.to)),n.from.x!==n.to.x&&(y=y.concat(c),r.from=e.effects.setTransition(r,c,n.from.x,r.from),r.to=e.effects.setTransition(r,c,n.to.x,r.to))),("content"===m||"both"===m)&&n.from.y!==n.to.y&&(y=y.concat(u).concat(l),r.from=e.effects.setTransition(r,u,n.from.y,r.from),r.to=e.effects.setTransition(r,u,n.to.y,r.to)),e.effects.save(r,y),r.show(),e.effects.createWrapper(r),r.css("overflow","hidden").css(r.from),g&&(s=e.effects.getBaseline(g,a),r.from.top=(a.outerHeight-r.outerHeight())*s.y,r.from.left=(a.outerWidth-r.outerWidth())*s.x,r.to.top=(a.outerHeight-r.to.outerHeight)*s.y,r.to.left=(a.outerWidth-r.to.outerWidth)*s.x),r.css(r.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),c=c.concat(["marginLeft","marginRight"]),l=o.concat(d).concat(c),r.find("*[width]").each(function(){var i=e(this),a={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&e.effects.save(i,l),i.from={height:a.height*n.from.y,width:a.width*n.from.x,outerHeight:a.outerHeight*n.from.y,outerWidth:a.outerWidth*n.from.x},i.to={height:a.height*n.to.y,width:a.width*n.to.x,outerHeight:a.height*n.to.y,outerWidth:a.width*n.to.x},n.from.y!==n.to.y&&(i.from=e.effects.setTransition(i,d,n.from.y,i.from),i.to=e.effects.setTransition(i,d,n.to.y,i.to)),n.from.x!==n.to.x&&(i.from=e.effects.setTransition(i,c,n.from.x,i.from),i.to=e.effects.setTransition(i,c,n.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),r.animate(r.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity),"hide"===p&&r.hide(),e.effects.restore(r,y),f||("static"===v?r.css({position:"relative",top:r.to.top,left:r.to.left}):e.each(["top","left"],function(e,t){r.css(t,function(t,i){var a=parseInt(i,10),s=e?r.to.left:r.to.top;return"auto"===i?s+"px":a+s+"px"})})),e.effects.removeWrapper(r),i()}})}})(jQuery);(function(e){e.effects.effect.shake=function(t,i){var a,s=e(this),n=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(s,t.mode||"effect"),o=t.direction||"left",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c="up"===o||"down"===o?"top":"left",p="up"===o||"left"===o,f={},m={},g={},v=s.queue(),y=v.length;for(e.effects.save(s,n),s.show(),e.effects.createWrapper(s),f[c]=(p?"-=":"+=")+h,m[c]=(p?"+=":"-=")+2*h,g[c]=(p?"-=":"+=")+2*h,s.animate(f,d,t.easing),a=1;l>a;a++)s.animate(m,d,t.easing).animate(g,d,t.easing);s.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===r&&s.hide(),e.effects.restore(s,n),e.effects.removeWrapper(s),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),s.dequeue()}})(jQuery);(function(e){e.effects.effect.slide=function(t,i){var a,s=e(this),n=["position","top","bottom","left","right","width","height"],r=e.effects.setMode(s,t.mode||"show"),o="show"===r,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h,d={};e.effects.save(s,n),s.show(),a=t.distance||s["top"===l?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(s).css({overflow:"hidden"}),o&&s.css(l,u?isNaN(a)?"-"+a:-a:a),d[l]=(o?u?"+=":"-=":u?"-=":"+=")+a,s.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&s.hide(),e.effects.restore(s,n),e.effects.removeWrapper(s),i()}})}})(jQuery);(function(e){e.effects.effect.transfer=function(t,i){var a=e(this),s=e(t.to),n="fixed"===s.css("position"),r=e("body"),o=n?r.scrollTop():0,h=n?r.scrollLeft():0,l=s.offset(),u={top:l.top-o,left:l.left-h,height:s.innerHeight(),width:s.innerWidth()},d=a.offset(),c=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(t.className).css({top:d.top-o,left:d.left-h,height:a.innerHeight(),width:a.innerWidth(),position:n?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})}})(jQuery);
\ No newline at end of file diff --git a/plugins/jqueryui/themes/classic/jquery-ui-1.9.1.custom.css b/plugins/jqueryui/themes/classic/jquery-ui-1.9.2.custom.css index 1002a95fe..1002a95fe 100755 --- a/plugins/jqueryui/themes/classic/jquery-ui-1.9.1.custom.css +++ b/plugins/jqueryui/themes/classic/jquery-ui-1.9.2.custom.css diff --git a/plugins/jqueryui/themes/larry/images/ui-icons-datepicker.png b/plugins/jqueryui/themes/larry/images/ui-icons-datepicker.png Binary files differindex 1c036f3de..144ecfe77 100644 --- a/plugins/jqueryui/themes/larry/images/ui-icons-datepicker.png +++ b/plugins/jqueryui/themes/larry/images/ui-icons-datepicker.png diff --git a/plugins/jqueryui/themes/larry/jquery-ui-1.9.1.custom.css b/plugins/jqueryui/themes/larry/jquery-ui-1.9.2.custom.css index 01afcac0d..3062bbb62 100755 --- a/plugins/jqueryui/themes/larry/jquery-ui-1.9.1.custom.css +++ b/plugins/jqueryui/themes/larry/jquery-ui-1.9.2.custom.css @@ -598,7 +598,34 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } .ui-datepicker select.ui-datepicker-month-year {width: 100%;} .ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker select.ui-datepicker-year { + border: 0; + background: #3a3a3a; + outline: none; + color: #fff; + font-weight: bold; + width: auto; + margin-right: 4px; + padding-right: 4px; +} +.ui-datepicker .ui-datepicker-title select::-ms-expand { display: none; } +.ie10 .ui-datepicker .ui-datepicker-title select, +.webkit .ui-datepicker .ui-datepicker-title select, +.mozilla .ui-datepicker .ui-datepicker-title select { + background-image: url(images/ui-icons-datepicker.png); + background-position: right -18px; + background-repeat: no-repeat; + padding-right: 14px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +.mozilla .ui-datepicker .ui-datepicker-title select { + background-position: right -17px; + text-indent: 0.01px; + text-overflow: ''; + padding-right: 0; +} .ui-datepicker table { width: 100%; border-collapse: collapse; margin:0; border-spacing: 0; } .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; color: #666; } .ui-datepicker td { border: 1px solid #bbb; padding: 0; } @@ -611,6 +638,8 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + + /* with multiple calendars */ .ui-datepicker.ui-datepicker-multi { width:auto; } .ui-datepicker-multi .ui-datepicker-group { float:left; } diff --git a/plugins/jqueryui/themes/redmond/jquery-ui-1.9.1.custom.css b/plugins/jqueryui/themes/redmond/jquery-ui-1.9.2.custom.css index 614420add..614420add 100755 --- a/plugins/jqueryui/themes/redmond/jquery-ui-1.9.1.custom.css +++ b/plugins/jqueryui/themes/redmond/jquery-ui-1.9.2.custom.css diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index 115aec14f..8d40f1931 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,8 +1,16 @@ -- lib/Net Sieve.php moved to Roundcube /lib directory +- Nicely handle server-side modification of script names (#1489412) +- Add Filters tab/section using plugin API hook +- Fix issue where folder selector wasn't visible on new filter form +- Fix issue where multi-select fields were not visible in new filter action rows (#1489600) + +* version 7.1 [2013-11-22] +----------------------------------------------------------- +- lib/Net_Sieve.php moved to Roundcube /lib directory - Added managesieve_domains option to limit redirect destinations - Fix bug where at least one additional address of vacation message was required (#1489345) - Fix so i;ascii-numeric comparator is not forced as default for :count and :value operators - Fix date/currentdate related form issues and comparators handling (#1489346) +- Fix a bug where deleted filter was not removed from the list * version 7.0 [2013-09-09] ----------------------------------------------------------- diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php index 6c9f8048a..22268942c 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php @@ -53,7 +53,7 @@ class rcube_sieve_engine "x-beenthere", ); - const VERSION = '7.0'; + const VERSION = '7.1'; const PROGNAME = 'Roundcube (Managesieve)'; const PORT = 4190; @@ -132,6 +132,11 @@ class rcube_sieve_engine // Get list of scripts $list = $this->list_scripts(); + // reset current script when entering filters UI (#1489412) + if ($this->rc->action == 'plugin.managesieve') { + $this->rc->session->remove('managesieve_current'); + } + if (!empty($_GET['_set']) || !empty($_POST['_set'])) { $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true); } @@ -179,15 +184,20 @@ class rcube_sieve_engine case SIEVE_ERROR_CONNECTION: case SIEVE_ERROR_LOGIN: $this->rc->output->show_message('managesieve.filterconnerror', 'error'); + rcube::raise_error(array('code' => 403, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Unable to connect to managesieve on $host:$port"), true, false); break; + default: $this->rc->output->show_message('managesieve.filterunknownerror', 'error'); break; } - rcube::raise_error(array('code' => 403, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Unable to connect to managesieve on $host:$port"), true, false); + // reload interface in case of possible error when specified script wasn't found (#1489412) + if ($script_name !== null && !empty($list) && !in_array($script_name, $list)) { + $this->rc->output->command('reload', 500); + } // to disable 'Add filter' button set env variable $this->rc->output->set_env('filterconnerror', true); @@ -1778,7 +1788,7 @@ class rcube_sieve_engine 'maxlength' => 100, 'id' => 'action_mailbox' . $id, 'name' => "_action_mailbox[$id]", - 'style' => 'display:'.(!isset($action) || $action['type']=='fileinto' ? 'inline' : 'none') + 'style' => 'display:'.(empty($action['type']) || $action['type'] == 'fileinto' ? 'inline' : 'none') )); $out .= $select->show($mailbox); $out .= '</td>'; diff --git a/plugins/managesieve/localization/az_AZ.inc b/plugins/managesieve/localization/az_AZ.inc index e9c60e493..d692b9620 100644 --- a/plugins/managesieve/localization/az_AZ.inc +++ b/plugins/managesieve/localization/az_AZ.inc @@ -47,12 +47,14 @@ $labels['messagesendcopy'] = 'MÉ™ktubun kopyasını göndÉ™r'; $labels['messagereply'] = 'MÉ™ktubla cavab ver'; $labels['messagedelete'] = 'Sil'; $labels['messagediscard'] = 'MÉ™ktubla rÉ™dd et'; +$labels['messagekeep'] = 'MÉ™ktubu gÉ™lÉ™nlÉ™rdÉ™ saxla'; $labels['messagesrules'] = 'Daxil olan mÉ™ktub üçün:'; $labels['messagesactions'] = '...növbÉ™ti hÉ™rÉ™kÉ™ti yerinÉ™ yetir:'; $labels['add'] = 'ÆlavÉ™ et'; $labels['del'] = 'Sil'; $labels['sender'] = 'GöndÉ™rÉ™n'; $labels['recipient'] = 'QÉ™bul edÉ™n'; +$labels['vacationaddr'] = 'MÉ™nim É™lavÉ™ e-poçt ünvan(lar)ım: '; $labels['vacationdays'] = 'MÉ™ktub neçə müddÉ™tdÉ™n bir göndÉ™rilsin (gündÉ™):'; $labels['vacationinterval'] = 'MÉ™ktublar nÉ™ qÉ™dÉ™r sıx göndÉ™rilsin:'; $labels['days'] = 'günlÉ™r'; @@ -80,11 +82,13 @@ $labels['countisgreaterthanequal'] = 'say çox vÉ™ ya bÉ™rabÉ™rdir'; $labels['countislessthan'] = 'say buradan azdır'; $labels['countislessthanequal'] = 'say azdır vÉ™ ya bÉ™rabÉ™rdir'; $labels['countequals'] = 'say bÉ™rabÉ™rdir'; +$labels['countnotequals'] = 'say bÉ™rabÉ™r deyil'; $labels['valueisgreaterthan'] = 'dÉ™yÉ™r buradan daha böyükdür'; $labels['valueisgreaterthanequal'] = 'dÉ™yÉ™r çoxdur vÉ™ ya bÉ™rabÉ™rdir'; $labels['valueislessthan'] = 'dÉ™yÉ™r buradan azdır'; $labels['valueislessthanequal'] = 'dÉ™yÉ™r azdır vÉ™ ya bÉ™rabÉ™rdir'; $labels['valueequals'] = 'dÉ™yÉ™r bÉ™rabÉ™rdir'; +$labels['valuenotequals'] = 'dÉ™yÉ™r bÉ™rabÉ™r deyil'; $labels['setflags'] = 'MÉ™ktublara flaq quraÅŸdır'; $labels['addflags'] = 'MÉ™ktuba flaq É™lavÉ™ et'; $labels['removeflags'] = 'MÉ™ktubdan flaqları sil'; @@ -116,6 +120,22 @@ $labels['filtercreate'] = 'SüzgÉ™c yarat'; $labels['usedata'] = 'SüzgÉ™cdÉ™ bu mÉ™lumatları istifadÉ™ et:'; $labels['nextstep'] = 'Sonrakı'; $labels['...'] = '...'; +$labels['currdate'] = 'Ä°ndiki tarix'; +$labels['datetest'] = 'Tarix'; +$labels['dateheader'] = 'baÅŸlıq:'; +$labels['year'] = 'il'; +$labels['month'] = 'ay'; +$labels['day'] = 'gün'; +$labels['date'] = 'tarix (iiii-aa-gg)'; +$labels['julian'] = 'tarix (yulian)'; +$labels['hour'] = 'saat'; +$labels['minute'] = 'dÉ™qiqÉ™'; +$labels['second'] = 'saniyÉ™'; +$labels['time'] = 'saat (sa:dd:sn)'; +$labels['iso8601'] = 'tarix (ISO8601)'; +$labels['std11'] = 'tarix (RFC2822)'; +$labels['zone'] = 'saat-zona'; +$labels['weekday'] = 'hÉ™ftÉ™nin günü (0-6)'; $labels['advancedopts'] = 'ÆlavÉ™ ayarlar'; $labels['body'] = 'MÉ™zmun'; $labels['address'] = 'ünvan'; @@ -135,26 +155,38 @@ $labels['default'] = 'ön qurÄŸulu'; $labels['octet'] = 'ciddi (oktet)'; $labels['asciicasemap'] = 'qeydiyyat üzrÉ™ müstÉ™qil (ascii-casemap)'; $labels['asciinumeric'] = 'É™dÉ™di (ascii-numeric)'; +$labels['index'] = 'indeks:'; +$labels['indexlast'] = 'arxaya'; $messages['filterunknownerror'] = 'Serverin namÉ™lum xÉ™tası.'; $messages['filterconnerror'] = 'ServerÉ™ qoÅŸulmaq alınmır'; +$messages['filterdeleteerror'] = 'SüzgÉ™ci silmÉ™k mümkün deyil. Server xÉ™tası.'; $messages['filterdeleted'] = 'SüzgÉ™c uÄŸurla silindi.'; $messages['filtersaved'] = 'SüzgÉ™c uÄŸurla saxlanıldı.'; +$messages['filtersaveerror'] = 'SüzgÉ™ci saxlamaq mümkün deyil. Server xÉ™tası.'; $messages['filterdeleteconfirm'] = 'Siz hÉ™qiqÉ™tÉ™n süzgÉ™ci silmÉ™k istÉ™yirsiniz?'; $messages['ruledeleteconfirm'] = 'Bu qaydanı silmÉ™kdÉ™ É™minsiniz?'; $messages['actiondeleteconfirm'] = 'Bu hÉ™rÉ™kÉ™ti silmÉ™kdÉ™ É™minsiniz?'; $messages['forbiddenchars'] = 'SahÉ™dÉ™ qadaÄŸan edilÉ™n iÅŸarÉ™lÉ™r.'; $messages['cannotbeempty'] = 'SahÉ™ boÅŸ ola bilmÉ™z.'; $messages['ruleexist'] = 'Bu adla süzgÉ™c artıq mövcuddur.'; +$messages['setactivateerror'] = 'SeçilmiÅŸ süzgÉ™clÉ™ri aktiv etmÉ™k mümkün deyil. Server xÉ™tası.'; +$messages['setdeactivateerror'] = 'SeçilmiÅŸ süzgÉ™clÉ™ri deaktiv mümkün deyil. Server xÉ™tası.'; +$messages['setdeleteerror'] = 'SeçilmiÅŸ süzgÉ™clÉ™ri silmÉ™k mümkün deyil. Server xÉ™tası.'; $messages['setactivated'] = 'SüzgÉ™c dÉ™sti yandırıldı.'; $messages['setdeactivated'] = 'SüzgÉ™c dÉ™sti söndürüldü.'; $messages['setdeleted'] = 'SüzgÉ™c dÉ™sti silindi.'; $messages['setdeleteconfirm'] = 'Bu süzgÉ™c dÉ™stini silmÉ™kdÉ™ É™minsiniz?'; +$messages['setcreateerror'] = 'SüzgÉ™clÉ™ri yaratmaq mümkün deyil. Server xÉ™tası.'; $messages['setcreated'] = 'SüzgÉ™c dÉ™sti uÄŸurla yaradıldı.'; +$messages['activateerror'] = 'SeçilmiÅŸ süzgÉ™c(lÉ™r)i yandırmaq mümkün deyil. Server xÉ™tası.'; +$messages['deactivateerror'] = 'SeçilmiÅŸ süzgÉ™c(lÉ™r)i söndürmÉ™k mümkün deyil. Server xÉ™tası.'; $messages['deactivated'] = 'SüzgÉ™c(lÉ™r) uÄŸurla yandırıldı.'; $messages['activated'] = 'SüzgÉ™c(lÉ™r) uÄŸurla söndürüldü.'; $messages['moved'] = 'SüzgÉ™c uÄŸurla köçürüldü.'; +$messages['moveerror'] = 'SüzgÉ™ci köçürmÉ™k mümkün deyil. Server xÉ™tası.'; $messages['nametoolong'] = 'SüzgÉ™c dÉ™stini yaratmaq mümkün deyil. Ad çox uzundur.'; $messages['namereserved'] = 'Rezerv edilmiÅŸ ad.'; $messages['setexist'] = 'DÉ™st artıq mövcuddur.'; $messages['nodata'] = 'Heç olmasa bir mövqe tutmaq lazımdır!'; +$messages['invaliddateformat'] = 'Tarix vÉ™ ya tarix formatının bir hissÉ™si sÉ™hvdir'; ?> diff --git a/plugins/managesieve/localization/bg_BG.inc b/plugins/managesieve/localization/bg_BG.inc index a9a77d5df..c9d06d2fd 100644 --- a/plugins/managesieve/localization/bg_BG.inc +++ b/plugins/managesieve/localization/bg_BG.inc @@ -159,22 +159,31 @@ $labels['index'] = 'индекÑ:'; $labels['indexlast'] = 'наобратно'; $messages['filterunknownerror'] = 'ÐеизвеÑтна Ñървърна грешка.'; $messages['filterconnerror'] = 'ÐеуÑпешно Ñвързване Ñ managesieve Ñървъра.'; +$messages['filterdeleteerror'] = 'Ðевъзможно изтриване на филтъра. Възникна Ñървърна грешка.'; $messages['filterdeleted'] = 'Филтърът е изтрит уÑпешно.'; $messages['filtersaved'] = 'Филтърът е запиÑан уÑпешно.'; +$messages['filtersaveerror'] = 'Ðевъзможно запиÑване на филтъра. Възникна Ñървърна грешка.'; $messages['filterdeleteconfirm'] = 'ÐаиÑтина ли желаете да изтриете Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ñ„Ð¸Ð»Ñ‚ÑŠÑ€?'; $messages['ruledeleteconfirm'] = 'Сигурни ли Ñте, че желаете да изтриете избраното уÑловие?'; $messages['actiondeleteconfirm'] = 'Сигурни ли Ñте, че желаете да изтриете избраното дейÑтвие?'; $messages['forbiddenchars'] = 'Забранени Ñимволи в полето.'; $messages['cannotbeempty'] = 'Полето не може да бъде празно.'; $messages['ruleexist'] = 'Вече има филтър Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð¾Ñ‚Ð¾ име.'; +$messages['setactivateerror'] = 'Ðевъзможно активиране на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð½Ð°Ð±Ð¾Ñ€ от филтри. Възникна Ñървърна грешка.'; +$messages['setdeactivateerror'] = 'Ðевъзможно деактивиране на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð½Ð°Ð±Ð¾Ñ€ от филтри. Възникна Ñървърна грешка.'; +$messages['setdeleteerror'] = 'Ðевъзможно изтриване на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð½Ð°Ð±Ð¾Ñ€ от филтри. Възникна Ñървърна грешка.'; $messages['setactivated'] = 'Ðаборът от филтри е активиран уÑпешно.'; $messages['setdeactivated'] = 'Ðаборът от филтри е деактивиран уÑпешно.'; $messages['setdeleted'] = 'Ðаборът от филтри е изтрит уÑпешно.'; $messages['setdeleteconfirm'] = 'Сигурни ли Ñте, че желаете да изтриете Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð½Ð°Ð±Ð¾Ñ€ от филтри?'; +$messages['setcreateerror'] = 'Ðевъзможно Ñъздаване на набор от филтри. Възникна Ñървърна грешка.'; $messages['setcreated'] = 'Ðаборът от филтри е Ñъздаден уÑпешно.'; +$messages['activateerror'] = 'Ðевъзможно включване на филтъра. Възникна Ñървърна грешка.'; +$messages['deactivateerror'] = 'Ðевъзможно изключване на филтъра. Възникна Ñървърна грешка.'; $messages['deactivated'] = 'Филтърът е изключен уÑпешно.'; $messages['activated'] = 'Филтърът е включен уÑпешно.'; $messages['moved'] = 'Филтърът е премеÑтен уÑпешно.'; +$messages['moveerror'] = 'Ðевъзможно премеÑтване на филтъра. Възникна Ñървърна грешка.'; $messages['nametoolong'] = 'Името е прекалено дълго.'; $messages['namereserved'] = 'Резервирано име.'; $messages['setexist'] = 'Вече има такъв набор филтри.'; diff --git a/plugins/managesieve/localization/bs_BA.inc b/plugins/managesieve/localization/bs_BA.inc index f4b5ebb22..0667db33c 100644 --- a/plugins/managesieve/localization/bs_BA.inc +++ b/plugins/managesieve/localization/bs_BA.inc @@ -159,22 +159,31 @@ $labels['index'] = 'indeks:'; $labels['indexlast'] = 'unazad'; $messages['filterunknownerror'] = 'Nepoznata serverska greÅ¡ka.'; $messages['filterconnerror'] = 'Nije se moguće povezati na server.'; +$messages['filterdeleteerror'] = 'Nije moguće obrisati filter. Desila se serverska greÅ¡ka.'; $messages['filterdeleted'] = 'Filter je uspjeÅ¡no obrisan.'; $messages['filtersaved'] = 'Filter je uspjeÅ¡no saÄuvan.'; +$messages['filtersaveerror'] = 'Nije moguće saÄuvati filter. Desila se serverska greÅ¡ka.'; $messages['filterdeleteconfirm'] = 'Da li zaista želite obrisati oznaÄeni filter?'; $messages['ruledeleteconfirm'] = 'Jeste li sigurni da želite obrisati oznaÄeno pravilo?'; $messages['actiondeleteconfirm'] = 'Jeste li sigurni da želite obrisati oznaÄenu akciju?'; $messages['forbiddenchars'] = 'U polje su uneseni nedozvoljeni znakovi.'; $messages['cannotbeempty'] = 'Polje ne može biti prazno.'; $messages['ruleexist'] = 'Filter s tim imenom već postoji.'; +$messages['setactivateerror'] = 'Nije moguće aktivirati oznaÄeni set filtera. Desila se serverska greÅ¡ka.'; +$messages['setdeactivateerror'] = 'Nije moguće deaktivirati oznaÄeni set filtera. Desila se serverska greÅ¡ka.'; +$messages['setdeleteerror'] = 'Nije moguće obrisati oznaÄeni set filtera. Desila se serverska greÅ¡ka.'; $messages['setactivated'] = 'Set filtera je uspjeÅ¡no aktiviran.'; $messages['setdeactivated'] = 'Set filtera je uspjeÅ¡no deaktiviran.'; $messages['setdeleted'] = 'Set filtera je uspjeÅ¡no obrisan.'; $messages['setdeleteconfirm'] = 'Jeste li sigurni da želite obrisati oznaÄeni set filtera?'; +$messages['setcreateerror'] = 'Nije moguće kreirati set filtera. Desila se serverska greÅ¡ka.'; $messages['setcreated'] = 'Set filtera je uspjeÅ¡no kreiran.'; +$messages['activateerror'] = 'Nije moguće omogućiti oznaÄene filtere. Desila se serverska greÅ¡ka.'; +$messages['deactivateerror'] = 'Nije moguće onemogućiti oznaÄene filtere. Desila se serverska greÅ¡ka.'; $messages['deactivated'] = 'Filteri su uspjeÅ¡no omogućeni.'; $messages['activated'] = 'Filteri su uspjeÅ¡no onemogućeni.'; $messages['moved'] = 'Filteri su uspjeÅ¡no premjeÅ¡teni.'; +$messages['moveerror'] = 'Nije moguće premjestiti oznaÄeni filter. Desila se serverska greÅ¡ka.'; $messages['nametoolong'] = 'Ime je predugo.'; $messages['namereserved'] = 'Ime je rezervisano.'; $messages['setexist'] = 'Set već postoji.'; diff --git a/plugins/managesieve/localization/ca_ES.inc b/plugins/managesieve/localization/ca_ES.inc index cf5117f6a..5e54c6a7b 100644 --- a/plugins/managesieve/localization/ca_ES.inc +++ b/plugins/managesieve/localization/ca_ES.inc @@ -39,7 +39,7 @@ $labels['filternotregex'] = 'no coincideix amb l\'expressió regular'; $labels['filterunder'] = 'sota'; $labels['filterover'] = 'sobre'; $labels['addrule'] = 'Afegeix una regla'; -$labels['delrule'] = 'Suprimeix regla'; +$labels['delrule'] = 'Suprimeix una regla'; $labels['messagemoveto'] = 'Mou el missatge a'; $labels['messageredirect'] = 'Redirigeix el missatge cap a'; $labels['messagecopyto'] = 'Copia el missatge a'; @@ -53,18 +53,19 @@ $labels['messagesactions'] = '..executa les següents accions:'; $labels['add'] = 'Afegeix'; $labels['del'] = 'Suprimeix'; $labels['sender'] = 'Remitent'; -$labels['recipient'] = 'Destinatari/a'; +$labels['recipient'] = 'Destinatari'; +$labels['vacationaddr'] = 'Les meves adreces de correu addicionals:'; $labels['vacationdays'] = 'Cada quan enviar un missatge (en dies):'; -$labels['vacationinterval'] = 'Amb quina freqüència enviar missatges:'; +$labels['vacationinterval'] = 'Amb quina freqüència s\'han d\'enviar els missatges:'; $labels['days'] = 'dies'; $labels['seconds'] = 'segons'; -$labels['vacationreason'] = 'Cos del missatge (raó de les vacances):'; +$labels['vacationreason'] = 'Cos del missatge (raó de l\'absència):'; $labels['vacationsubject'] = 'Assumpte del missatge:'; $labels['rulestop'] = 'Deixa d\'avaluar regles'; -$labels['enable'] = 'Habilita/deshabilita'; +$labels['enable'] = 'Habilita/Deshabilita'; $labels['filterset'] = 'Conjunt de filtres'; $labels['filtersets'] = 'Conjunts de filtres'; -$labels['filtersetadd'] = 'Afegeix conjunts de filtres'; +$labels['filtersetadd'] = 'Afegeix un conjunt de filtres'; $labels['filtersetdel'] = 'Suprimeix el conjunt de filtres actual'; $labels['filtersetact'] = 'Activa el conjunt de filtres actual'; $labels['filtersetdeact'] = 'Desactiva el conjunt de filtres actual'; @@ -76,17 +77,17 @@ $labels['none'] = 'cap'; $labels['fromset'] = 'des del conjunt'; $labels['fromfile'] = 'des del fitxer'; $labels['filterdisabled'] = 'Filtre deshabilitat'; -$labels['countisgreaterthan'] = 'el recompte és major que'; -$labels['countisgreaterthanequal'] = 'el recompte és major o igual que'; -$labels['countislessthan'] = 'el recompte és menor que'; -$labels['countislessthanequal'] = 'el recompte és menor o igual que'; +$labels['countisgreaterthan'] = 'el recompte és més gran de'; +$labels['countisgreaterthanequal'] = 'el recompte és més gran o igual a'; +$labels['countislessthan'] = 'el recompte és menor de'; +$labels['countislessthanequal'] = 'el recompte és menor o igual a'; $labels['countequals'] = 'el recompte és igual que'; $labels['countnotequals'] = 'el recompte és diferent de'; -$labels['valueisgreaterthan'] = 'el valor és major que'; +$labels['valueisgreaterthan'] = 'el valor és més gran de'; $labels['valueisgreaterthanequal'] = 'el valor és major o igual que'; $labels['valueislessthan'] = 'el valor és menor que'; -$labels['valueislessthanequal'] = 'el valor és menor o igual que'; -$labels['valueequals'] = 'el valor és igual que'; +$labels['valueislessthanequal'] = 'el valor és menor o igual de'; +$labels['valueequals'] = 'el valor és igual a'; $labels['valuenotequals'] = 'el valor és diferent de'; $labels['setflags'] = 'Posa indicadors al missatge'; $labels['addflags'] = 'Afegeix indicadors al missatge'; @@ -102,16 +103,16 @@ $labels['setvarvalue'] = 'Valor de la variable:'; $labels['setvarmodifiers'] = 'Modificadors:'; $labels['varlower'] = 'minúscules'; $labels['varupper'] = 'majúscules'; -$labels['varlowerfirst'] = 'el primer carà cter és minúscul'; -$labels['varupperfirst'] = 'el primer carà cter és majúscul'; +$labels['varlowerfirst'] = 'el primer carà cter en minúscula'; +$labels['varupperfirst'] = 'el primer carà cter en majúscula'; $labels['varquotewildcard'] = 'engloba els carà cters especials amb cometes'; $labels['varlength'] = 'llargada'; $labels['notify'] = 'Envia notificació'; -$labels['notifyaddress'] = 'Per a adreça de correu electrònic:'; -$labels['notifybody'] = 'Cos de la notificació'; -$labels['notifysubject'] = 'Tema de la notificació:'; +$labels['notifyaddress'] = 'A l\'adreça de correu electrònic:'; +$labels['notifybody'] = 'Cos de la notificació:'; +$labels['notifysubject'] = 'Assumpte de la notificació:'; $labels['notifyfrom'] = 'Remitent de la notificació:'; -$labels['notifyimportance'] = 'Importà nica:'; +$labels['notifyimportance'] = 'Importà ncia:'; $labels['notifyimportancelow'] = 'baixa'; $labels['notifyimportancenormal'] = 'normal'; $labels['notifyimportancehigh'] = 'alta'; @@ -133,7 +134,7 @@ $labels['second'] = 'segon'; $labels['time'] = 'hora (hh:mm:ss)'; $labels['iso8601'] = 'data (ISO8601)'; $labels['std11'] = 'data (RFC2822)'; -$labels['zone'] = 'Fus horari'; +$labels['zone'] = 'fus horari'; $labels['weekday'] = 'dia de la setmana (0-6)'; $labels['advancedopts'] = 'Opcions avançades'; $labels['body'] = 'Cos'; @@ -142,15 +143,15 @@ $labels['envelope'] = 'sobre'; $labels['modifier'] = 'modificador:'; $labels['text'] = 'text'; $labels['undecoded'] = 'descodificat (en brut)'; -$labels['contenttype'] = 'tipus de contigut'; +$labels['contenttype'] = 'tipus de contingut'; $labels['modtype'] = 'tipus:'; $labels['allparts'] = 'tots'; $labels['domain'] = 'domini'; $labels['localpart'] = 'part local'; -$labels['user'] = 'usuari/a'; +$labels['user'] = 'usuari'; $labels['detail'] = 'detall'; $labels['comparator'] = 'comparador:'; -$labels['default'] = 'per omissió'; +$labels['default'] = 'per defecte'; $labels['octet'] = 'estricte (octet)'; $labels['asciicasemap'] = 'No distingeix entre majúscules i minúscules (ascii-casemap)'; $labels['asciinumeric'] = 'numèric (ascii-numeric)'; @@ -158,22 +159,31 @@ $labels['index'] = 'Ãndex:'; $labels['indexlast'] = 'cap enrere'; $messages['filterunknownerror'] = 'Error desconegut al servidor.'; $messages['filterconnerror'] = 'No s\'ha pogut connectar al servidor.'; +$messages['filterdeleteerror'] = 'No s\'ha pogut suprimir el filtre. Hi ha hagut un error al servidor.'; $messages['filterdeleted'] = 'El filtre s\'ha suprimit correctament.'; -$messages['filtersaved'] = 'Filtre desat correctament.'; -$messages['filterdeleteconfirm'] = 'Realment voleu suprimit el filtre seleccionat?'; -$messages['ruledeleteconfirm'] = 'Esteu segur que voleu suprimir la norma seleccionada?'; -$messages['actiondeleteconfirm'] = 'Esteu segur que voleu suprimir l\'acció seleccionada?'; +$messages['filtersaved'] = 'El filtre s\'ha desat correctament.'; +$messages['filtersaveerror'] = 'No s\'ha pogut desar el filtre. Hi ha hagut un error al servidor.'; +$messages['filterdeleteconfirm'] = 'Esteu segurs de voler suprimir el filtre seleccionat?'; +$messages['ruledeleteconfirm'] = 'Esteu segurs que voleu suprimir la regla seleccionada?'; +$messages['actiondeleteconfirm'] = 'Esteu segurs que voleu suprimir l\'acció seleccionada?'; $messages['forbiddenchars'] = 'El camp conté carà cters prohibits.'; $messages['cannotbeempty'] = 'El camp no pot estar buit.'; -$messages['ruleexist'] = 'Ja existeix un filtre amb aquest nom'; +$messages['ruleexist'] = 'Ja existeix un filtre amb aquest nom.'; +$messages['setactivateerror'] = 'No s\'ha pogut activar el conjunt de filtres seleccionat. Hi ha hagut un error al servidor.'; +$messages['setdeactivateerror'] = 'No s\'ha pogut desactivar el conjunt de filtres seleccionat. Hi ha hagut un error al servidor.'; +$messages['setdeleteerror'] = 'No s\'ha pogut suprimir el conjunt de filtres seleccionat. Hi ha hagut un error al servidor.'; $messages['setactivated'] = 'El conjunt de filtres s\'ha activat correctament.'; $messages['setdeactivated'] = 'El conjunt de filtres s\'ha desactivat correctament.'; $messages['setdeleted'] = 'El conjunt de filtres s\'ha suprimit correctament.'; $messages['setdeleteconfirm'] = 'Esteu segurs que voleu suprimir el conjunt de filtres seleccionats?'; +$messages['setcreateerror'] = 'No s\'ha pogut crear el conjunt de filtres. Hi ha hagut un error al servidor.'; $messages['setcreated'] = 'S\'ha creat correctament el conjunt de filtres.'; -$messages['deactivated'] = 'Filtre(s) habilitat(s) correctament.'; -$messages['activated'] = 'Filtre(s) deshabilitat(s) correctament.'; +$messages['activateerror'] = 'No s\'ha pogut habilitar el(s) filtre(s) seleccionat(s). Hi ha hagut un error al servidor.'; +$messages['deactivateerror'] = 'No s\'ha pogut deshabilitar el(s) filtre(s) seleccionat(s). Hi ha hagut un error al servidor.'; +$messages['deactivated'] = 'Filtre(s) deshabilitat(s) correctament.'; +$messages['activated'] = 'Filtre(s) habilitat(s) correctament.'; $messages['moved'] = 'S\'ha mogut correctament el filtre.'; +$messages['moveerror'] = 'No s\'ha pogut moure el filtre seleccionat. Hi ha hagut un error al servidor.'; $messages['nametoolong'] = 'El nom és massa llarg.'; $messages['namereserved'] = 'Nom reservat.'; $messages['setexist'] = 'El conjunt ja existeix.'; diff --git a/plugins/managesieve/localization/cs_CZ.inc b/plugins/managesieve/localization/cs_CZ.inc index f14b13287..d304da61e 100644 --- a/plugins/managesieve/localization/cs_CZ.inc +++ b/plugins/managesieve/localization/cs_CZ.inc @@ -67,7 +67,7 @@ $labels['filterset'] = 'Sada filtrů'; $labels['filtersets'] = 'Sady filtrů'; $labels['filtersetadd'] = 'PÅ™idat sadu filtrů'; $labels['filtersetdel'] = 'Odebrat tuto sadu filtrů'; -$labels['filtersetact'] = 'Zapnout tuto sadu filtrů'; +$labels['filtersetact'] = 'Activate current filters set'; $labels['filtersetdeact'] = 'Vypnout tuto sadu filtrů'; $labels['filterdef'] = 'Definice filtru'; $labels['filtersetname'] = 'Nastavit název sady filtrů'; @@ -180,8 +180,8 @@ $messages['setcreateerror'] = 'Nelze vytvoÅ™it sadu filtrů. DoÅ¡lo k chybÄ› ser $messages['setcreated'] = 'Sada filtrů úspěšnÄ› vytvoÅ™ena.'; $messages['activateerror'] = 'Nelze zapnout vybrané filtr/y. DoÅ¡lo k chybÄ› serveru.'; $messages['deactivateerror'] = 'Nelze vypnout vybrané filtr/y. DoÅ¡lo k chybÄ› serveru.'; -$messages['deactivated'] = 'Filtr/y úspěšnÄ› zapnuty.'; -$messages['activated'] = 'Filtr/y úspěšne vypnuty.'; +$messages['deactivated'] = 'Filtr/y úspěšne vypnuty.'; +$messages['activated'] = 'Filtr/y úspěšnÄ› zapnuty.'; $messages['moved'] = 'Filtr byl úspěšnÄ› pÅ™esunut.'; $messages['moveerror'] = 'Nelze pÅ™esunout vybraný filtr. DoÅ¡lo k chybÄ› serveru.'; $messages['nametoolong'] = 'PÅ™ÃliÅ¡ dlouhý název.'; diff --git a/plugins/managesieve/localization/cy_GB.inc b/plugins/managesieve/localization/cy_GB.inc index 806a49dde..a10205d09 100644 --- a/plugins/managesieve/localization/cy_GB.inc +++ b/plugins/managesieve/localization/cy_GB.inc @@ -159,22 +159,31 @@ $labels['index'] = 'mynegai:'; $labels['indexlast'] = 'o chwith'; $messages['filterunknownerror'] = 'Gwall gweinydd anhysbys.'; $messages['filterconnerror'] = 'Methwyd cysylltu a\'r gweinydd.'; +$messages['filterdeleteerror'] = 'Methwyd dileu hidlydd. Cafwydd gwall gweinydd.'; $messages['filterdeleted'] = 'Dilëuwyd hidlydd yn llwyddiannus.'; $messages['filtersaved'] = 'Cadwyd hidlydd yn llwyddiannus.'; +$messages['filtersaveerror'] = 'Methwyd cadw hidlydd. Cafwyd gwall gweinydd.'; $messages['filterdeleteconfirm'] = 'Ydych chi wir am ddileu yr hidlydd ddewiswyd?'; $messages['ruledeleteconfirm'] = 'Ydych chi\'n siwr eich bod am ddileu\'r rheol ddewiswyd?'; $messages['actiondeleteconfirm'] = 'Ydych chi\'n siwr eich bod am ddileu\'r weithred ddewiswyd?'; $messages['forbiddenchars'] = 'Llythrennau gwaharddedig yn y maes.'; $messages['cannotbeempty'] = 'Ni all y maes fod yn wag.'; $messages['ruleexist'] = 'Mae hidlydd gyda\'r enw yma yn bodoli\'n barod.'; +$messages['setactivateerror'] = 'Methwyd galluogi y hidlyddion dewiswyd. Cafwyd gwall gweinydd.'; +$messages['setdeactivateerror'] = 'Methwyd analluogi y hidlyddion dewiswyd. Cafwyd gwall gweinydd.'; +$messages['setdeleteerror'] = 'Methwyd dileu y set hidlyddion ddewiswyd. Cafwyd gwall gweinydd.'; $messages['setactivated'] = 'Bywiogwyd y set hidlydd yn llwyddiannus.'; $messages['setdeactivated'] = 'Dadfywiogwyd y set hidlydd yn llwyddiannus.'; $messages['setdeleted'] = 'Dilëuwyd y set hidlydd yn llwyddiannus.'; $messages['setdeleteconfirm'] = 'Ydych chi\'n siwr eich bod am ddileu\'r set hidlydd ddewiswyd?'; +$messages['setcreateerror'] = 'Methwyd creu set hidlydd. Cafwyd gwall gweinydd.'; $messages['setcreated'] = 'Crëuwyd y set hidlydd yn llwyddiannus.'; +$messages['activateerror'] = 'Methwyd galluogi y hidlydd(ion) dewiswyd. Cafwyd gwall gweinydd.'; +$messages['deactivateerror'] = 'Methwyd analluogi y hidlydd(ion) dewiswyd. Cafwyd gwall gweinydd.'; $messages['deactivated'] = 'Galluogwyd y hidlydd(ion) yn llwyddiannus.'; $messages['activated'] = 'Analluogwyd y hidlydd(ion) yn llwyddiannus.'; $messages['moved'] = 'Symudwyd y hidlydd yn llwyddiannus.'; +$messages['moveerror'] = 'Methwyd symud y hidlydd dewiswyd. Cafwyd gwall gweinydd.'; $messages['nametoolong'] = 'Enw yn rhy hir.'; $messages['namereserved'] = 'Enw neilltuedig.'; $messages['setexist'] = 'Mae\'r set yn bodoli\'n barod.'; diff --git a/plugins/managesieve/localization/da_DK.inc b/plugins/managesieve/localization/da_DK.inc index 863dc1ecf..b240741dc 100644 --- a/plugins/managesieve/localization/da_DK.inc +++ b/plugins/managesieve/localization/da_DK.inc @@ -47,12 +47,14 @@ $labels['messagesendcopy'] = 'Send kopi af besked til'; $labels['messagereply'] = 'Svar med besked'; $labels['messagedelete'] = 'Slet besked'; $labels['messagediscard'] = 'Slet med besked'; +$labels['messagekeep'] = 'Behold besked i Inbox'; $labels['messagesrules'] = 'For indkomne besked:'; $labels['messagesactions'] = '...udfør følgende aktioner:'; $labels['add'] = 'Tilføje'; $labels['del'] = 'Fjern'; $labels['sender'] = 'Afsender'; $labels['recipient'] = 'Modtager'; +$labels['vacationaddr'] = 'Min(e) yderligere email-adresse(r):'; $labels['vacationdays'] = 'Hvor tit skal besked sendes (i dage):'; $labels['vacationinterval'] = 'Hvor tit skal besked sendes:'; $labels['days'] = 'dage'; @@ -157,22 +159,31 @@ $labels['index'] = 'indeks:'; $labels['indexlast'] = 'baglends'; $messages['filterunknownerror'] = 'Ukendt server fejl.'; $messages['filterconnerror'] = 'Kan ikke forbinde til server.'; +$messages['filterdeleteerror'] = 'Kunne ikke slette filter. Serverfejl opstod.'; $messages['filterdeleted'] = 'Filter slettet.'; $messages['filtersaved'] = 'Filter gemt.'; +$messages['filtersaveerror'] = 'Kunne ikke gemme filter. Serverfejl.'; $messages['filterdeleteconfirm'] = 'Vil du slette det valgte filter?'; $messages['ruledeleteconfirm'] = 'Er du sikker pÃ¥ at du vil slette den valgte regel?'; $messages['actiondeleteconfirm'] = 'Er du sikker pÃ¥ du vil slette den valgte handling?'; $messages['forbiddenchars'] = 'Ulovlige tegn i feltet'; $messages['cannotbeempty'] = 'Feltet kan ikke være tomt.'; $messages['ruleexist'] = 'Filter med dette navn eksisterer allerede.'; +$messages['setactivateerror'] = 'Kan ikke aktiverer valgt filter sæt. Server fejl.'; +$messages['setdeactivateerror'] = 'Kan ikke deaktivere valgt filter sæt. Server fejl.'; +$messages['setdeleteerror'] = 'Kan ikke slette valgt filter sæt. Server fejl.'; $messages['setactivated'] = 'Filter sæt aktiveret.'; $messages['setdeactivated'] = 'Filter sæt deaktiveret.'; $messages['setdeleted'] = 'Filter sæt slettet.'; $messages['setdeleteconfirm'] = 'Er du sikker pÃ¥ du vil slette valgt filter sæt?'; +$messages['setcreateerror'] = 'Kan ikke oprette filter sæt. Server fejl.'; $messages['setcreated'] = 'Filter sæt oprettet.'; +$messages['activateerror'] = 'Kan ikke aktivere valgt filter sæt. Server fejl.'; +$messages['deactivateerror'] = 'Kan ikke deaktivere valgt filter sæt. Server fejl.'; $messages['deactivated'] = 'Filter(filtre) aktiveret.'; $messages['activated'] = 'Filter(filtre) deaktiveret.'; $messages['moved'] = 'Filter flyttet.'; +$messages['moveerror'] = 'Kan ikke flytte valgt filter. Server fejl.'; $messages['nametoolong'] = 'Navn er for langt.'; $messages['namereserved'] = 'Reserveret navn.'; $messages['setexist'] = 'Filterv sæt eksisterer allerede'; diff --git a/plugins/managesieve/localization/de_CH.inc b/plugins/managesieve/localization/de_CH.inc index f3559fa89..234f31315 100644 --- a/plugins/managesieve/localization/de_CH.inc +++ b/plugins/managesieve/localization/de_CH.inc @@ -159,22 +159,31 @@ $labels['index'] = 'Index:'; $labels['indexlast'] = 'rückwärts'; $messages['filterunknownerror'] = 'Unbekannter Serverfehler'; $messages['filterconnerror'] = 'Kann nicht zum Sieve-Server verbinden'; +$messages['filterdeleteerror'] = 'Serverfehler beim Löschen des Filters.'; $messages['filterdeleted'] = 'Filter erfolgreich gelöscht'; $messages['filtersaved'] = 'Filter gespeichert'; +$messages['filtersaveerror'] = 'Serverfehler beim Speichern des Filters.'; $messages['filterdeleteconfirm'] = 'Möchten Sie den Filter löschen ?'; $messages['ruledeleteconfirm'] = 'Sicher, dass Sie die Regel löschen wollen?'; $messages['actiondeleteconfirm'] = 'Sicher, dass Sie die ausgewaehlte Aktion löschen wollen?'; $messages['forbiddenchars'] = 'Unerlaubte Zeichen im Feld'; $messages['cannotbeempty'] = 'Feld darf nicht leer sein'; $messages['ruleexist'] = 'Ein Filter mit dem angegebenen Namen existiert bereits.'; +$messages['setactivateerror'] = 'Serverfehler beim Aktivieren des gewählten Filtersatzes.'; +$messages['setdeactivateerror'] = 'Serverfehler beim Deaktivieren des gewählten Filtersatzes.'; +$messages['setdeleteerror'] = 'Serverfehler beim Löschen des gewählten Filtersatzes.'; $messages['setactivated'] = 'Filtersatz erfolgreich aktiviert.'; $messages['setdeactivated'] = 'Filtersatz erfolgreich deaktiviert.'; $messages['setdeleted'] = 'Filtersatz erfolgreich gelöscht.'; $messages['setdeleteconfirm'] = 'Sind Sie sicher, dass Sie den ausgewählten Filtersatz löschen möchten?'; +$messages['setcreateerror'] = 'Serverfehler beim Erstellen des Filtersatzes.'; $messages['setcreated'] = 'Filter erfolgreich erstellt.'; +$messages['activateerror'] = 'Serverfehler beim Aktivieren des/der gewählten Filter(s).'; +$messages['deactivateerror'] = 'Serverfehler beim Deaktivieren des/der gewählten Filter(s).'; $messages['deactivated'] = 'Filter erfolgreich aktiviert.'; $messages['activated'] = 'Filter erfolgreich deaktiviert.'; $messages['moved'] = 'Filter erfolgreich verschoben.'; +$messages['moveerror'] = 'Serverfehler beim Verschieben des gewählten Filters.'; $messages['nametoolong'] = 'Filtersatz kann nicht erstellt werden. Name zu lang.'; $messages['namereserved'] = 'Reservierter Name.'; $messages['setexist'] = 'Filtersatz existiert bereits.'; diff --git a/plugins/managesieve/localization/de_DE.inc b/plugins/managesieve/localization/de_DE.inc index ac81ccd75..2eaa21580 100644 --- a/plugins/managesieve/localization/de_DE.inc +++ b/plugins/managesieve/localization/de_DE.inc @@ -54,6 +54,7 @@ $labels['add'] = 'Hinzufügen'; $labels['del'] = 'Löschen'; $labels['sender'] = 'Absender'; $labels['recipient'] = 'Empfänger'; +$labels['vacationaddr'] = 'Meine zusätzliche E-Mail-Adresse(n):'; $labels['vacationdays'] = 'Wie oft sollen Nachrichten gesendet werden (in Tagen):'; $labels['vacationinterval'] = 'Wie oft sollen Nachrichten gesendet werden:'; $labels['days'] = 'Tage'; @@ -158,22 +159,31 @@ $labels['index'] = 'index:'; $labels['indexlast'] = 'rückwärts'; $messages['filterunknownerror'] = 'Unbekannter Serverfehler'; $messages['filterconnerror'] = 'Kann keine Verbindung mit Managesieve-Server herstellen'; +$messages['filterdeleteerror'] = 'Filter kann nicht gelöscht werden. Ein Serverfehler ist aufgetreten.'; $messages['filterdeleted'] = 'Filter erfolgreich gelöscht'; $messages['filtersaved'] = 'Filter erfolgreich gespeichert'; +$messages['filtersaveerror'] = 'Filter kann nicht gespeichert werden. Ein Serverfehler ist aufgetreten.'; $messages['filterdeleteconfirm'] = 'Möchten Sie den ausgewählten Filter wirklich löschen?'; $messages['ruledeleteconfirm'] = 'Sind Sie sicher, dass Sie die ausgewählte Regel löschen möchten?'; $messages['actiondeleteconfirm'] = 'Sind Sie sicher, dass Sie die ausgewählte Aktion löschen möchten?'; $messages['forbiddenchars'] = 'Unzulässige Zeichen im Eingabefeld'; $messages['cannotbeempty'] = 'Eingabefeld darf nicht leer sein'; $messages['ruleexist'] = 'Ein Filter mit dem angegebenen Namen existiert bereits.'; +$messages['setactivateerror'] = 'Kann ausgewählten Filtersatz nicht aktivieren. Serverfehler'; +$messages['setdeactivateerror'] = 'Kann ausgewählten Filtersatz nicht deaktivieren. Serverfehler'; +$messages['setdeleteerror'] = 'Kann ausgewählten Filtersatz nicht löschen. Serverfehler'; $messages['setactivated'] = 'Filtersatz wurde erfolgreich aktiviert'; $messages['setdeactivated'] = 'Filtersatz wurde erfolgreich deaktiviert'; $messages['setdeleted'] = 'Filtersatz wurde erfolgreich gelöscht'; $messages['setdeleteconfirm'] = 'Sind Sie sicher, dass Sie den ausgewählten Filtersatz löschen möchten?'; +$messages['setcreateerror'] = 'Erstellen von Filter Sätzen nicht möglich. Es ist ein Serverfehler aufgetreten.'; $messages['setcreated'] = 'Filtersatz wurde erfolgreich erstellt'; +$messages['activateerror'] = 'Filter kann nicht aktiviert werden. Serverfehler.'; +$messages['deactivateerror'] = 'Filter kann nicht deaktiviert werden. Serverfehler.'; $messages['deactivated'] = 'Filter erfolgreich deaktiviert.'; $messages['activated'] = 'Filter erfolgreich aktiviert.'; $messages['moved'] = 'Filter erfolgreich verschoben.'; +$messages['moveerror'] = 'Filter kann nicht verschoben werden. Serverfehler.'; $messages['nametoolong'] = 'Kann Filtersatz nicht erstellen. Name zu lang'; $messages['namereserved'] = 'Reservierter Name.'; $messages['setexist'] = 'Filtersatz existiert bereits.'; diff --git a/plugins/managesieve/localization/en_CA.inc b/plugins/managesieve/localization/en_CA.inc new file mode 100644 index 000000000..311e5953e --- /dev/null +++ b/plugins/managesieve/localization/en_CA.inc @@ -0,0 +1,192 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/managesieve/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Managesieve plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/ +*/ +$labels['filters'] = 'Filters'; +$labels['managefilters'] = 'Manage incoming mail filters'; +$labels['filtername'] = 'Filter name'; +$labels['newfilter'] = 'New filter'; +$labels['filteradd'] = 'Add filter'; +$labels['filterdel'] = 'Delete filter'; +$labels['moveup'] = 'Move up'; +$labels['movedown'] = 'Move down'; +$labels['filterallof'] = 'matching all of the following rules'; +$labels['filteranyof'] = 'matching any of the following rules'; +$labels['filterany'] = 'all messages'; +$labels['filtercontains'] = 'contains'; +$labels['filternotcontains'] = 'not contains'; +$labels['filteris'] = 'is equal to'; +$labels['filterisnot'] = 'is not equal to'; +$labels['filterexists'] = 'exists'; +$labels['filternotexists'] = 'not exists'; +$labels['filtermatches'] = 'matches expression'; +$labels['filternotmatches'] = 'not matches expression'; +$labels['filterregex'] = 'matches regular expression'; +$labels['filternotregex'] = 'not matches regular expression'; +$labels['filterunder'] = 'under'; +$labels['filterover'] = 'over'; +$labels['addrule'] = 'Add rule'; +$labels['delrule'] = 'Delete rule'; +$labels['messagemoveto'] = 'Move message to'; +$labels['messageredirect'] = 'Redirect message to'; +$labels['messagecopyto'] = 'Copy message to'; +$labels['messagesendcopy'] = 'Send message copy to'; +$labels['messagereply'] = 'Reply with message'; +$labels['messagedelete'] = 'Delete message'; +$labels['messagediscard'] = 'Discard with message'; +$labels['messagekeep'] = 'Keep message in Inbox'; +$labels['messagesrules'] = 'For incoming mail:'; +$labels['messagesactions'] = '...execute the following actions:'; +$labels['add'] = 'Add'; +$labels['del'] = 'Delete'; +$labels['sender'] = 'Sender'; +$labels['recipient'] = 'Recipient'; +$labels['vacationaddr'] = 'My additional e-mail address(es):'; +$labels['vacationdays'] = 'How often send messages (in days):'; +$labels['vacationinterval'] = 'How often send messages:'; +$labels['days'] = 'days'; +$labels['seconds'] = 'seconds'; +$labels['vacationreason'] = 'Message body (vacation reason):'; +$labels['vacationsubject'] = 'Message subject:'; +$labels['rulestop'] = 'Stop evaluating rules'; +$labels['enable'] = 'Enable/Disable'; +$labels['filterset'] = 'Filters set'; +$labels['filtersets'] = 'Filter sets'; +$labels['filtersetadd'] = 'Add filters set'; +$labels['filtersetdel'] = 'Delete current filters set'; +$labels['filtersetact'] = 'Activate current filters set'; +$labels['filtersetdeact'] = 'Deactivate current filters set'; +$labels['filterdef'] = 'Filter definition'; +$labels['filtersetname'] = 'Filters set name'; +$labels['newfilterset'] = 'New filters set'; +$labels['active'] = 'active'; +$labels['none'] = 'none'; +$labels['fromset'] = 'from set'; +$labels['fromfile'] = 'from file'; +$labels['filterdisabled'] = 'Filter disabled'; +$labels['countisgreaterthan'] = 'count is greater than'; +$labels['countisgreaterthanequal'] = 'count is greater than or equal to'; +$labels['countislessthan'] = 'count is less than'; +$labels['countislessthanequal'] = 'count is less than or equal to'; +$labels['countequals'] = 'count is equal to'; +$labels['countnotequals'] = 'count is not equal to'; +$labels['valueisgreaterthan'] = 'value is greater than'; +$labels['valueisgreaterthanequal'] = 'value is greater than or equal to'; +$labels['valueislessthan'] = 'value is less than'; +$labels['valueislessthanequal'] = 'value is less than or equal to'; +$labels['valueequals'] = 'value is equal to'; +$labels['valuenotequals'] = 'value is not equal to'; +$labels['setflags'] = 'Set flags to the message'; +$labels['addflags'] = 'Add flags to the message'; +$labels['removeflags'] = 'Remove flags from the message'; +$labels['flagread'] = 'Read'; +$labels['flagdeleted'] = 'Deleted'; +$labels['flaganswered'] = 'Answered'; +$labels['flagflagged'] = 'Flagged'; +$labels['flagdraft'] = 'Draft'; +$labels['setvariable'] = 'Set variable'; +$labels['setvarname'] = 'Variable name:'; +$labels['setvarvalue'] = 'Variable value:'; +$labels['setvarmodifiers'] = 'Modifiers:'; +$labels['varlower'] = 'lower-case'; +$labels['varupper'] = 'upper-case'; +$labels['varlowerfirst'] = 'first character lower-case'; +$labels['varupperfirst'] = 'first character upper-case'; +$labels['varquotewildcard'] = 'quote special characters'; +$labels['varlength'] = 'length'; +$labels['notify'] = 'Send notification'; +$labels['notifyaddress'] = 'To e-mail address:'; +$labels['notifybody'] = 'Notification body:'; +$labels['notifysubject'] = 'Notification subject:'; +$labels['notifyfrom'] = 'Notification sender:'; +$labels['notifyimportance'] = 'Importance:'; +$labels['notifyimportancelow'] = 'low'; +$labels['notifyimportancenormal'] = 'normal'; +$labels['notifyimportancehigh'] = 'high'; +$labels['filtercreate'] = 'Create filter'; +$labels['usedata'] = 'Use following data in the filter:'; +$labels['nextstep'] = 'Next Step'; +$labels['...'] = '...'; +$labels['currdate'] = 'Current date'; +$labels['datetest'] = 'Date'; +$labels['dateheader'] = 'header:'; +$labels['year'] = 'year'; +$labels['month'] = 'month'; +$labels['day'] = 'day'; +$labels['date'] = 'date (yyyy-mm-dd)'; +$labels['julian'] = 'date (julian)'; +$labels['hour'] = 'hour'; +$labels['minute'] = 'minute'; +$labels['second'] = 'second'; +$labels['time'] = 'time (hh:mm:ss)'; +$labels['iso8601'] = 'date (ISO8601)'; +$labels['std11'] = 'date (RFC2822)'; +$labels['zone'] = 'time-zone'; +$labels['weekday'] = 'weekday (0-6)'; +$labels['advancedopts'] = 'Advanced options'; +$labels['body'] = 'Body'; +$labels['address'] = 'address'; +$labels['envelope'] = 'envelope'; +$labels['modifier'] = 'modifier:'; +$labels['text'] = 'text'; +$labels['undecoded'] = 'undecoded (raw)'; +$labels['contenttype'] = 'content type'; +$labels['modtype'] = 'type:'; +$labels['allparts'] = 'all'; +$labels['domain'] = 'domain'; +$labels['localpart'] = 'local part'; +$labels['user'] = 'user'; +$labels['detail'] = 'detail'; +$labels['comparator'] = 'comparator:'; +$labels['default'] = 'default'; +$labels['octet'] = 'strict (octet)'; +$labels['asciicasemap'] = 'case insensitive (ascii-casemap)'; +$labels['asciinumeric'] = 'numeric (ascii-numeric)'; +$labels['index'] = 'index:'; +$labels['indexlast'] = 'backwards'; +$messages['filterunknownerror'] = 'Unknown server error.'; +$messages['filterconnerror'] = 'Unable to connect to server.'; +$messages['filterdeleteerror'] = 'Unable to delete filter. Server error occurred.'; +$messages['filterdeleted'] = 'Filter deleted successfully.'; +$messages['filtersaved'] = 'Filter saved successfully.'; +$messages['filtersaveerror'] = 'Unable to save filter. Server error occurred.'; +$messages['filterdeleteconfirm'] = 'Do you really want to delete selected filter?'; +$messages['ruledeleteconfirm'] = 'Are you sure, you want to delete selected rule?'; +$messages['actiondeleteconfirm'] = 'Are you sure, you want to delete selected action?'; +$messages['forbiddenchars'] = 'Forbidden characters in field.'; +$messages['cannotbeempty'] = 'Field cannot be empty.'; +$messages['ruleexist'] = 'Filter with specified name already exists.'; +$messages['setactivateerror'] = 'Unable to activate selected filters set. Server error occurred.'; +$messages['setdeactivateerror'] = 'Unable to deactivate selected filters set. Server error occurred.'; +$messages['setdeleteerror'] = 'Unable to delete selected filters set. Server error occurred.'; +$messages['setactivated'] = 'Filters set activated successfully.'; +$messages['setdeactivated'] = 'Filters set deactivated successfully.'; +$messages['setdeleted'] = 'Filters set deleted successfully.'; +$messages['setdeleteconfirm'] = 'Are you sure, you want to delete selected filters set?'; +$messages['setcreateerror'] = 'Unable to create filters set. Server error occurred.'; +$messages['setcreated'] = 'Filters set created successfully.'; +$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occurred.'; +$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occurred.'; +$messages['deactivated'] = 'Filter(s) disabled successfully.'; +$messages['activated'] = 'Filter(s) enabled successfully.'; +$messages['moved'] = 'Filter moved successfully.'; +$messages['moveerror'] = 'Unable to move selected filter. Server error occurred.'; +$messages['nametoolong'] = 'Name too long.'; +$messages['namereserved'] = 'Reserved name.'; +$messages['setexist'] = 'Set already exists.'; +$messages['nodata'] = 'At least one position must be selected!'; +$messages['invaliddateformat'] = 'Invalid date or date part format'; +?> diff --git a/plugins/managesieve/localization/en_GB.inc b/plugins/managesieve/localization/en_GB.inc index 63006144a..f899e60fe 100644 --- a/plugins/managesieve/localization/en_GB.inc +++ b/plugins/managesieve/localization/en_GB.inc @@ -47,13 +47,18 @@ $labels['messagesendcopy'] = 'Send message copy to'; $labels['messagereply'] = 'Reply with message'; $labels['messagedelete'] = 'Delete message'; $labels['messagediscard'] = 'Discard with message'; +$labels['messagekeep'] = 'Keep message in Inbox'; $labels['messagesrules'] = 'For incoming mail:'; $labels['messagesactions'] = '...execute the following actions:'; $labels['add'] = 'Add'; $labels['del'] = 'Delete'; $labels['sender'] = 'Sender'; $labels['recipient'] = 'Recipient'; +$labels['vacationaddr'] = 'My additional e-mail address(es):'; $labels['vacationdays'] = 'How often send messages (in days):'; +$labels['vacationinterval'] = 'How often send messages:'; +$labels['days'] = 'days'; +$labels['seconds'] = 'seconds'; $labels['vacationreason'] = 'Message body (vacation reason):'; $labels['vacationsubject'] = 'Message subject:'; $labels['rulestop'] = 'Stop evaluating rules'; @@ -77,11 +82,13 @@ $labels['countisgreaterthanequal'] = 'count is greater than or equal to'; $labels['countislessthan'] = 'count is less than'; $labels['countislessthanequal'] = 'count is less than or equal to'; $labels['countequals'] = 'count is equal to'; +$labels['countnotequals'] = 'count is not equal to'; $labels['valueisgreaterthan'] = 'value is greater than'; $labels['valueisgreaterthanequal'] = 'value is greater than or equal to'; $labels['valueislessthan'] = 'value is less than'; $labels['valueislessthanequal'] = 'value is less than or equal to'; $labels['valueequals'] = 'value is equal to'; +$labels['valuenotequals'] = 'value is not equal to'; $labels['setflags'] = 'Set flags to the message'; $labels['addflags'] = 'Add flags to the message'; $labels['removeflags'] = 'Remove flags from the message'; @@ -90,10 +97,45 @@ $labels['flagdeleted'] = 'Deleted'; $labels['flaganswered'] = 'Answered'; $labels['flagflagged'] = 'Flagged'; $labels['flagdraft'] = 'Draft'; +$labels['setvariable'] = 'Set variable'; +$labels['setvarname'] = 'Variable name:'; +$labels['setvarvalue'] = 'Variable value:'; +$labels['setvarmodifiers'] = 'Modifiers:'; +$labels['varlower'] = 'lower-case'; +$labels['varupper'] = 'upper-case'; +$labels['varlowerfirst'] = 'first character lower-case'; +$labels['varupperfirst'] = 'first character upper-case'; +$labels['varquotewildcard'] = 'quote special characters'; +$labels['varlength'] = 'length'; +$labels['notify'] = 'Send notification'; +$labels['notifyaddress'] = 'To e-mail address:'; +$labels['notifybody'] = 'Notification body:'; +$labels['notifysubject'] = 'Notification subject:'; +$labels['notifyfrom'] = 'Notification sender:'; +$labels['notifyimportance'] = 'Importance:'; +$labels['notifyimportancelow'] = 'low'; +$labels['notifyimportancenormal'] = 'normal'; +$labels['notifyimportancehigh'] = 'high'; $labels['filtercreate'] = 'Create filter'; $labels['usedata'] = 'Use following data in the filter:'; $labels['nextstep'] = 'Next Step'; $labels['...'] = '...'; +$labels['currdate'] = 'Current date'; +$labels['datetest'] = 'Date'; +$labels['dateheader'] = 'header:'; +$labels['year'] = 'year'; +$labels['month'] = 'month'; +$labels['day'] = 'day'; +$labels['date'] = 'date (yyyy-mm-dd)'; +$labels['julian'] = 'date (julian)'; +$labels['hour'] = 'hour'; +$labels['minute'] = 'minute'; +$labels['second'] = 'second'; +$labels['time'] = 'time (hh:mm:ss)'; +$labels['iso8601'] = 'date (ISO8601)'; +$labels['std11'] = 'date (RFC2822)'; +$labels['zone'] = 'time-zone'; +$labels['weekday'] = 'weekday (0-6)'; $labels['advancedopts'] = 'Advanced options'; $labels['body'] = 'Body'; $labels['address'] = 'address'; @@ -113,26 +155,38 @@ $labels['default'] = 'default'; $labels['octet'] = 'strict (octet)'; $labels['asciicasemap'] = 'case insensitive (ascii-casemap)'; $labels['asciinumeric'] = 'numeric (ascii-numeric)'; +$labels['index'] = 'index:'; +$labels['indexlast'] = 'backwards'; $messages['filterunknownerror'] = 'Unknown server error'; $messages['filterconnerror'] = 'Unable to connect to managesieve server'; +$messages['filterdeleteerror'] = 'Unable to delete filter. Server error occurred.'; $messages['filterdeleted'] = 'Filter deleted successfully'; $messages['filtersaved'] = 'Filter saved successfully'; +$messages['filtersaveerror'] = 'Unable to save filter. Server error occurred.'; $messages['filterdeleteconfirm'] = 'Do you really want to delete selected filter?'; $messages['ruledeleteconfirm'] = 'Are you sure, you want to delete selected rule?'; $messages['actiondeleteconfirm'] = 'Are you sure, you want to delete selected action?'; $messages['forbiddenchars'] = 'Forbidden characters in field'; $messages['cannotbeempty'] = 'Field cannot be empty'; $messages['ruleexist'] = 'Filter with specified name already exists.'; +$messages['setactivateerror'] = 'Unable to activate selected filters set. Server error occurred.'; +$messages['setdeactivateerror'] = 'Unable to deactivate selected filters set. Server error occurred.'; +$messages['setdeleteerror'] = 'Unable to delete selected filters set. Server error occurred.'; $messages['setactivated'] = 'Filters set activated successfully.'; $messages['setdeactivated'] = 'Filters set deactivated successfully.'; $messages['setdeleted'] = 'Filters set deleted successfully.'; $messages['setdeleteconfirm'] = 'Are you sure, you want to delete selected filters set?'; +$messages['setcreateerror'] = 'Unable to create filters set. Server error occurred.'; $messages['setcreated'] = 'Filters set created successfully.'; +$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occurred.'; +$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occurred.'; $messages['deactivated'] = 'Filter(s) disabled successfully.'; $messages['activated'] = 'Filter(s) enabled successfully.'; $messages['moved'] = 'Filter moved successfully.'; +$messages['moveerror'] = 'Unable to move selected filter. Server error occurred.'; $messages['nametoolong'] = 'Name too long.'; $messages['namereserved'] = 'Reserved name.'; $messages['setexist'] = 'Set already exists.'; $messages['nodata'] = 'At least one position must be selected!'; +$messages['invaliddateformat'] = 'Invalid date or date part format'; ?> diff --git a/plugins/managesieve/localization/es_419.inc b/plugins/managesieve/localization/es_419.inc new file mode 100644 index 000000000..f459bdb67 --- /dev/null +++ b/plugins/managesieve/localization/es_419.inc @@ -0,0 +1,153 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/managesieve/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Managesieve plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/ +*/ +$labels['filters'] = 'Filtros'; +$labels['managefilters'] = 'Administrar filtros de correos entrantes'; +$labels['filtername'] = 'Nombre del filtro'; +$labels['newfilter'] = 'Filtro nuevo'; +$labels['filteradd'] = 'Agregar filtro'; +$labels['filterdel'] = 'Eliminar filtro'; +$labels['moveup'] = 'Mover hacia arriba'; +$labels['movedown'] = 'Mover hacia abajo'; +$labels['filterallof'] = 'coincide con todas las reglas siguientes'; +$labels['filteranyof'] = 'coincide con cualquiera de las reglas siguientes'; +$labels['filterany'] = 'todos los mensajes'; +$labels['filtercontains'] = 'contiene'; +$labels['filternotcontains'] = 'no contiene'; +$labels['filteris'] = 'es igual a'; +$labels['filterisnot'] = 'no es igual a'; +$labels['filterexists'] = 'existe'; +$labels['filternotexists'] = 'no existe'; +$labels['filtermatches'] = 'coincide con la expresión'; +$labels['filternotmatches'] = 'no coincide con la expresión'; +$labels['filterregex'] = 'coincide con la expresión regular'; +$labels['filternotregex'] = 'no coincide con la expresión regular'; +$labels['filterunder'] = 'bajo'; +$labels['filterover'] = 'sobre'; +$labels['addrule'] = 'Agregar regla'; +$labels['delrule'] = 'Eliminar regla'; +$labels['messagemoveto'] = 'Mover mensaje a'; +$labels['messageredirect'] = 'Redireccionar mensaje a'; +$labels['messagecopyto'] = 'Copiar mensaje a'; +$labels['messagesendcopy'] = 'Enviar una copia del mensaje a '; +$labels['messagereply'] = 'Responder con el mensaje'; +$labels['messagedelete'] = 'Eliminar mensaje'; +$labels['messagediscard'] = 'Descartar el mensaje'; +$labels['messagekeep'] = 'Mantener mensaje en la bandeja de entrada'; +$labels['messagesrules'] = 'Para correo entrante:'; +$labels['messagesactions'] = '... ejecutar las siguientes acciones:'; +$labels['add'] = 'Agregar'; +$labels['del'] = 'Eliminar'; +$labels['sender'] = 'Remitente'; +$labels['recipient'] = 'Destinatario'; +$labels['vacationdays'] = '¿Cada cuánto enviar mensajes (en dÃas)?'; +$labels['vacationinterval'] = '¿Con que frecuencia enviar mensajes?'; +$labels['days'] = 'dÃas'; +$labels['seconds'] = 'segundos'; +$labels['vacationreason'] = 'Cuerpo del mensaje (motivo de las vacaciones):'; +$labels['vacationsubject'] = 'TÃtulo del mensaje:'; +$labels['rulestop'] = 'Detener la evaluación de reglas'; +$labels['enable'] = 'Habilitar/Deshabilitar'; +$labels['filterdef'] = 'Definición del filtro'; +$labels['active'] = 'activo'; +$labels['none'] = 'ninguno'; +$labels['fromfile'] = 'desde archivo'; +$labels['filterdisabled'] = 'filtro deshabilitado'; +$labels['countisgreaterthan'] = 'la cuenta es mayor a'; +$labels['countisgreaterthanequal'] = 'la cuenta es mayor o igual a '; +$labels['countislessthan'] = 'la cuenta es menor que'; +$labels['countislessthanequal'] = 'la cuenta es menor o igual que'; +$labels['countequals'] = 'la cuenta es igual a '; +$labels['valueisgreaterthan'] = 'el valor es mayor que'; +$labels['valueisgreaterthanequal'] = 'el balor es mayor o igual que '; +$labels['valueislessthan'] = 'el valor es menor que '; +$labels['valueislessthanequal'] = 'el valor es menor o igual que '; +$labels['valueequals'] = 'el valor es igual a '; +$labels['flagread'] = 'Leido'; +$labels['flagdeleted'] = 'Eliminado'; +$labels['flaganswered'] = 'Respondido'; +$labels['flagdraft'] = 'Borrador'; +$labels['setvarname'] = 'Nombre de la variable:'; +$labels['setvarvalue'] = 'Valor de la variable:'; +$labels['setvarmodifiers'] = 'Modificadores:'; +$labels['varlower'] = 'minúscula'; +$labels['varupper'] = 'mayúscula'; +$labels['varlowerfirst'] = 'primer carácter en minúscula'; +$labels['varupperfirst'] = 'primer carácter en mayúscula'; +$labels['varquotewildcard'] = 'citar carácteres especiales'; +$labels['varlength'] = 'largo'; +$labels['notify'] = 'Enviar notificación'; +$labels['notifyaddress'] = 'A la direccion de correo:'; +$labels['notifybody'] = 'Cuerpo de la notificación:'; +$labels['notifysubject'] = 'Tema de la notificación:'; +$labels['notifyfrom'] = 'Remitente de la notificación: '; +$labels['notifyimportance'] = 'Importantcia:'; +$labels['notifyimportancelow'] = 'baja'; +$labels['notifyimportancenormal'] = 'normal'; +$labels['notifyimportancehigh'] = 'alta'; +$labels['filtercreate'] = 'Crear filtro'; +$labels['usedata'] = 'Usar los datos siguientes en el filtro:'; +$labels['nextstep'] = 'Paso siguiente'; +$labels['...'] = '...'; +$labels['currdate'] = 'Fecha actual'; +$labels['datetest'] = 'Fecha'; +$labels['year'] = 'Año'; +$labels['month'] = 'mes'; +$labels['day'] = 'dÃa'; +$labels['date'] = 'fecha(aaaa-mm-dd)'; +$labels['hour'] = 'hora'; +$labels['minute'] = 'minuto'; +$labels['second'] = 'segundo'; +$labels['time'] = 'hora (hh:mm:ss)'; +$labels['iso8601'] = 'fecha (ISO8601)'; +$labels['std11'] = 'fecha (RFC2822)'; +$labels['weekday'] = 'dÃa de la semana (0-6)'; +$labels['advancedopts'] = 'Opciones avanzadas'; +$labels['body'] = 'Cuerpo'; +$labels['address'] = 'dirección'; +$labels['envelope'] = 'sobre'; +$labels['modifier'] = 'modificador:'; +$labels['text'] = 'texto'; +$labels['undecoded'] = 'decodificado (crudo)'; +$labels['contenttype'] = 'tipo de contenido'; +$labels['modtype'] = 'tipo:'; +$labels['allparts'] = 'todo'; +$labels['domain'] = 'dominio'; +$labels['localpart'] = 'parte local'; +$labels['user'] = 'usuario'; +$labels['detail'] = 'detalle'; +$labels['comparator'] = 'comparador:'; +$labels['default'] = 'predeterminado'; +$labels['octet'] = 'estricto'; +$labels['asciinumeric'] = 'numérico (ascii-numeric)'; +$messages['filterunknownerror'] = 'Error del servidor desconocido.'; +$messages['filterconnerror'] = 'Incapaz de conectarse al servidor.'; +$messages['filterdeleted'] = 'Filtro eliminado exitosamente.'; +$messages['filtersaved'] = 'Filtro guardado exitosamente.'; +$messages['filterdeleteconfirm'] = '¿Estás seguro que quieres eliminar el filtro seleccionado?'; +$messages['ruledeleteconfirm'] = '¿Estás seguro que quieres eliminar la regla seleccionada?'; +$messages['actiondeleteconfirm'] = '¿Estás seguro que queires eliminar la acción seleccionada?'; +$messages['forbiddenchars'] = 'Carácteres ilegales en el campo.'; +$messages['cannotbeempty'] = 'El campo no puede estar vacio.'; +$messages['ruleexist'] = 'Ya existe un filtro con el nombre especificado.'; +$messages['deactivated'] = 'Filtro(s) deshabilitado(s) exitosamente.'; +$messages['activated'] = 'Filtro(s) habilitado(s) exitosamente.'; +$messages['moved'] = 'Filtro movido exitosamente.'; +$messages['nametoolong'] = 'Nombre demasiado largo.'; +$messages['namereserved'] = 'Nombre reservado.'; +$messages['nodata'] = 'Debes seleccionar al menos una posición.'; +?> diff --git a/plugins/managesieve/localization/es_ES.inc b/plugins/managesieve/localization/es_ES.inc index 208477a96..91602ee7b 100644 --- a/plugins/managesieve/localization/es_ES.inc +++ b/plugins/managesieve/localization/es_ES.inc @@ -157,25 +157,34 @@ $labels['asciicasemap'] = 'no sensible a mayúsculas (ascii-casemap)'; $labels['asciinumeric'] = 'numerico (ascii-numeric)'; $labels['index'] = 'Ãndice:'; $labels['indexlast'] = 'hacia atrás'; -$messages['filterunknownerror'] = 'Error desconocido de servidor.'; -$messages['filterconnerror'] = 'Imposible conectar con el servidor managesieve.'; +$messages['filterunknownerror'] = 'Error desconocido en el servidor.'; +$messages['filterconnerror'] = 'No se ha podido conectar con el servidor managesieve.'; +$messages['filterdeleteerror'] = 'No se ha podido borrar el filtro. Ha ocurrido un error en el servidor.'; $messages['filterdeleted'] = 'Filtro borrado satisfactoriamente.'; $messages['filtersaved'] = 'Filtro guardado satisfactoriamente.'; +$messages['filtersaveerror'] = 'No se ha podido guardar el filtro. Ha ocurrido un error en el servidor.'; $messages['filterdeleteconfirm'] = '¿Realmente desea borrar el filtro seleccionado?'; $messages['ruledeleteconfirm'] = '¿Está seguro de que desea borrar la regla seleccionada?'; $messages['actiondeleteconfirm'] = '¿Está seguro de que desea borrar la acción seleccionada?'; $messages['forbiddenchars'] = 'Caracteres prohibidos en el campo.'; $messages['cannotbeempty'] = 'El campo no puede estar vacÃo.'; $messages['ruleexist'] = 'Ya existe un filtro con el nombre especificado.'; +$messages['setactivateerror'] = 'No se ha podido activar el conjunto de filtros seleccionado. Ha ocurrido un error en el servidor.'; +$messages['setdeactivateerror'] = 'No se ha podido desactivar el conjunto de filtros seleccionado. Ha ocurrido un error en el servidor.'; +$messages['setdeleteerror'] = 'No se ha podido borrar el conjunto de filtros seleccionado. Ha ocurrido un error en el servidor.'; $messages['setactivated'] = 'Conjunto de filtros activado satisfactoriamente.'; $messages['setdeactivated'] = 'Conjunto de filtros desactivado satisfactoriamente.'; $messages['setdeleted'] = 'Conjunto de filtros borrado satisfactoriamente.'; $messages['setdeleteconfirm'] = '¿Está seguro de que desea borrar el conjunto de filtros seleccionado?'; +$messages['setcreateerror'] = 'No se ha podido crear el conjunto de filtros. Ha ocurrido un error en el servidor.'; $messages['setcreated'] = 'Conjunto de filtros creado satisfactoriamente.'; +$messages['activateerror'] = 'No se han podido habilitar los filtros seleccionados. Ha ocurrido un error en el servidor.'; +$messages['deactivateerror'] = 'No se han podido deshabilitar los filtros seleccionados. Ha ocurrido un error en el servidor.'; $messages['deactivated'] = 'Filtro(s) deshabilitado(s) correctamente.'; $messages['activated'] = 'Filtro(s) habilitado(s) correctamente.'; $messages['moved'] = 'Filtro movido correctamente.'; -$messages['nametoolong'] = 'Imposible crear el conjunto de filtros. Nombre demasiado largo'; +$messages['moveerror'] = 'No se ha podido mover el filtro seleccionado. Ha ocurrido un error en el servidor.'; +$messages['nametoolong'] = 'Nombre demasiado largo.'; $messages['namereserved'] = 'Nombre reservado.'; $messages['setexist'] = 'El conjunto ya existe.'; $messages['nodata'] = '¡Al menos una posición debe ser seleccionada!'; diff --git a/plugins/managesieve/localization/eu_ES.inc b/plugins/managesieve/localization/eu_ES.inc index fde8f919d..fe29e5859 100644 --- a/plugins/managesieve/localization/eu_ES.inc +++ b/plugins/managesieve/localization/eu_ES.inc @@ -16,15 +16,15 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/ */ $labels['filters'] = 'Iragazkiak'; -$labels['managefilters'] = 'Administratu postaren sarrera-iragazkiak'; +$labels['managefilters'] = 'Kudeatu sarrerako posta-iragazkiak'; $labels['filtername'] = 'Iragazkiaren izena'; $labels['newfilter'] = 'Iragazki berria'; $labels['filteradd'] = 'Gehitu iragazkia'; $labels['filterdel'] = 'Ezabatu iragazkia'; $labels['moveup'] = 'Mugitu gora'; $labels['movedown'] = 'Mugitu behera'; -$labels['filterallof'] = 'alderatu datozen arau guztiak'; -$labels['filteranyof'] = 'alderatu datozen arauetako batzuk'; +$labels['filterallof'] = 'datozen arau guztiak parekatzen'; +$labels['filteranyof'] = 'datozen arauetako batzuk parekatzen'; $labels['filterany'] = 'mezu guztiak'; $labels['filtercontains'] = 'badu'; $labels['filternotcontains'] = 'ez du'; @@ -32,10 +32,10 @@ $labels['filteris'] = 'honen berdina da'; $labels['filterisnot'] = 'ez da honen berdina'; $labels['filterexists'] = 'badago'; $labels['filternotexists'] = 'ez dago'; -$labels['filtermatches'] = 'bat datozen adierazpenak'; -$labels['filternotmatches'] = 'bat ez datozen adierazpenak'; +$labels['filtermatches'] = 'bat datorren espresio'; +$labels['filternotmatches'] = 'bat ez datorren espresio'; $labels['filterregex'] = 'bat datozen adierazpen erregularrak'; -$labels['filternotregex'] = 'bat ez datozen adierazpen erregularrak'; +$labels['filternotregex'] = 'bat ez datorren espresio erregularrak'; $labels['filterunder'] = 'azpian'; $labels['filterover'] = 'gainean'; $labels['addrule'] = 'Gehitu araua'; @@ -47,12 +47,14 @@ $labels['messagesendcopy'] = 'Bidali mezuaren kopia hona'; $labels['messagereply'] = 'Erantzun mezuarekin'; $labels['messagedelete'] = 'Ezabatu mezua'; $labels['messagediscard'] = 'Baztertu mezuarekin'; +$labels['messagekeep'] = 'Mantendu mezua Sarrera-ontzian'; $labels['messagesrules'] = 'Sarrerako postarako:'; $labels['messagesactions'] = '...exekutatu datozen ekintzak:'; $labels['add'] = 'Gehitu'; $labels['del'] = 'Ezabatu'; $labels['sender'] = 'Bidaltzailea'; $labels['recipient'] = 'Hartzailea'; +$labels['vacationaddr'] = 'Nire helbide elektroniko osagarria(k):'; $labels['vacationdays'] = 'Zer maiztasunarekin bidaltzen ditu mezuak (egunak)'; $labels['vacationinterval'] = 'Zenbatero bidali mezuak:'; $labels['days'] = 'egun'; @@ -62,7 +64,7 @@ $labels['vacationsubject'] = 'Mezuaren izenburua:'; $labels['rulestop'] = 'Gelditu arauak ebaluatzen'; $labels['enable'] = 'Gaitu/Ezgaitu'; $labels['filterset'] = 'Iragazki-paketea'; -$labels['filtersets'] = 'Iragazki paketeak'; +$labels['filtersets'] = 'Iragazki-paketeak'; $labels['filtersetadd'] = 'Gehitu iragazki-paketea'; $labels['filtersetdel'] = 'Ezabatu uneko iragazki-paketea'; $labels['filtersetact'] = 'Gaitu uneko iragazki-paketea'; @@ -70,7 +72,7 @@ $labels['filtersetdeact'] = 'Ezgaitu uneko iragazki-paketea'; $labels['filterdef'] = 'Iragazkiaren definizioa'; $labels['filtersetname'] = 'Iragazki-paketearen izena'; $labels['newfilterset'] = 'Iragazki-pakete berria'; -$labels['active'] = 'gaitua'; +$labels['active'] = 'aktiboa'; $labels['none'] = 'Bat ere ez'; $labels['fromset'] = 'paketetik'; $labels['fromfile'] = 'fitxategitik'; @@ -157,22 +159,31 @@ $labels['index'] = 'indexatu:'; $labels['indexlast'] = 'atzeraka'; $messages['filterunknownerror'] = 'Zerbitzari ezezaguna errorea'; $messages['filterconnerror'] = 'Ezin da konektatu zerbitzariarekin.'; +$messages['filterdeleteerror'] = 'Ezin da ezabatu iragazkia. Errore bat gertatu da zerbitzarian.'; $messages['filterdeleted'] = 'Iragazkia ongi ezabatu da.'; $messages['filtersaved'] = 'Iragazkia ongi ezabatu da.'; +$messages['filtersaveerror'] = 'Ezin da gorde iragazkia. Zerbitzarian errore bat gertatu da.'; $messages['filterdeleteconfirm'] = 'Seguru zaude hautatutako iragazkiak ezabatu nahi dituzula?'; $messages['ruledeleteconfirm'] = 'Seguru zaude hautatutako arauak ezabatu nahi dituzula?'; $messages['actiondeleteconfirm'] = 'Seguru zaude hautatutako ekintzak ezabatu nahi dituzula?'; $messages['forbiddenchars'] = 'Debekatutako karaktereak eremuan.'; $messages['cannotbeempty'] = 'Eremua ezin da hutsik egon.'; $messages['ruleexist'] = 'Lehendik badago izen hori duen iragazki bat.'; +$messages['setactivateerror'] = 'Ezin da aktibatu hautatutako iragazki paketea. Zerbitzarian errore bat gertatu da.'; +$messages['setdeactivateerror'] = 'Ezin da ezgaitu hautatutako iragazki-paketea. Zerbitzarian errore bat gertatu da.'; +$messages['setdeleteerror'] = 'Ezin da ezabatu hautatutako iragazki-paketea. Zerbitzarian errore bat gertatu da.'; $messages['setactivated'] = 'Iragazki paketea ongi aktibatu da.'; $messages['setdeactivated'] = 'Iragazki paketea ongi desaktibatu da.'; $messages['setdeleted'] = 'Iragazki paketea ongi ezabatu da.'; $messages['setdeleteconfirm'] = 'Seguru zaude hautatutako iragazki paketea ezabatu nahi duzula?'; +$messages['setcreateerror'] = 'Ezin da iragazki-paketea sortu. Zerbitzarian errore bat gertatu da.'; $messages['setcreated'] = 'Iragazki paketea ongi sortu da.'; +$messages['activateerror'] = 'Ezin da gaitu hautatutako iragazkia(k). Zerbitzarian errore bat gertatu da.'; +$messages['deactivateerror'] = 'Ezin da ezgaitu hautatutako iragazkia(k). Zerbitzarian errore bat gertatu da.'; $messages['deactivated'] = 'Iragazkia(k) ongi ezgaitu da.'; $messages['activated'] = 'Iragazkia(k) ongi gaitu da.'; $messages['moved'] = 'Iragazkia ongi mugitu da.'; +$messages['moveerror'] = 'Ezin da mugitu hautatutako iragazkia. Zerbitzarian errore bat gertatu da.'; $messages['nametoolong'] = 'Izen luzeegia.'; $messages['namereserved'] = 'Izen erreserbatua.'; $messages['setexist'] = 'Lehendik badago pakete hori.'; diff --git a/plugins/managesieve/localization/fa_IR.inc b/plugins/managesieve/localization/fa_IR.inc index 8aeb51711..b938c5850 100644 --- a/plugins/managesieve/localization/fa_IR.inc +++ b/plugins/managesieve/localization/fa_IR.inc @@ -54,6 +54,7 @@ $labels['add'] = 'اÙزودن'; $labels['del'] = 'ØØ°Ù'; $labels['sender'] = 'Ùرستنده'; $labels['recipient'] = 'گیرنده'; +$labels['vacationaddr'] = 'آدرس(های) ایمیل اضاÙÛŒ من:'; $labels['vacationdays'] = 'پیغام ها در Ú†Ù‡ مواقعی Ùرستاده شدند (در روزهای):'; $labels['vacationinterval'] = 'مواقعی Ú©Ù‡ پیغام‌ها ارسال می‌شوند:'; $labels['days'] = 'روزها'; @@ -158,22 +159,31 @@ $labels['index'] = 'Ùهرست:'; $labels['indexlast'] = 'به عقب'; $messages['filterunknownerror'] = 'خطای سرور نامعلوم.'; $messages['filterconnerror'] = 'ناتوانی در اتصال به سرور.'; +$messages['filterdeleteerror'] = 'ناتوانی در Øذ٠صاÙÛŒ. خطای سرور رخ داد.'; $messages['filterdeleted'] = 'صاÙÛŒ با موÙقیت Øذ٠شد.'; $messages['filtersaved'] = 'صاÙÛŒ با موÙقیت ذخیره شد.'; +$messages['filtersaveerror'] = 'ناتوانی در ذخیره Ùیلتر. خطای سرور رخ داد.'; $messages['filterdeleteconfirm'] = 'آیا مطمئن به Øذ٠صاÙÛŒ انتخاب شده هستید؟'; $messages['ruledeleteconfirm'] = 'آیا مطمئن هستید Ú©Ù‡ Ù…ÛŒ خواهید قانون انتخاب شده را Øذ٠کنید؟'; $messages['actiondeleteconfirm'] = 'آیا مطمئن هستید Ú©Ù‡ Ù…ÛŒ خواهید عمل انتخاب شده را Øذ٠کنید.'; $messages['forbiddenchars'] = 'Øرو٠ممنوعه در Ùیلد.'; $messages['cannotbeempty'] = 'Ùیلد نمی تواند خالی باشد.'; $messages['ruleexist'] = 'صاÙÛŒ با این نام مشخص وجود دارد.'; +$messages['setactivateerror'] = 'ناتوان در Ùعال کردن مجموعه صاÙی‌ها انتخاب شده. خطای سرور رخ داد.'; +$messages['setdeactivateerror'] = 'ناتوان در غیرÙعال کردن مجموعه صاÙی‌ها انتخاب شده. خطای سرور رخ داد.'; +$messages['setdeleteerror'] = 'ناتوان در Øذ٠مجموعه صاÙی‌ها انتخاب شده. خطای سرور رخ داد.'; $messages['setactivated'] = 'مجموعه صاÙی‌ها با موÙقیت Ùعال شد.'; $messages['setdeactivated'] = 'مجموعه صاÙی‌ها با موÙقیت غیرÙعال شد.'; $messages['setdeleted'] = 'مجموعه صاÙی‌ها با موÙقیت Øذ٠شد.'; $messages['setdeleteconfirm'] = 'آیا مطمئن هستید Ú©Ù‡ می‌خواهید مجموعه صاÙی‌ها انتخاب شده را Øذ٠کنید؟'; +$messages['setcreateerror'] = 'ناتوانی در ایجاد مجموعه صاÙی‌ها. خطای سرور رخ داد.'; $messages['setcreated'] = 'مجموعه صاÙی‌ها با موÙقیت ایجاد شد.'; +$messages['activateerror'] = 'ناتوانی در Ùعال کردن صاÙÛŒ(های) انتخاب شده. خطای سرور رخ داد.'; +$messages['deactivateerror'] = 'ناتوانی در غیرÙعال کردن صاÙÛŒ(های) انتخاب شده. خطای سرور رخ داد.'; $messages['deactivated'] = 'صاÙÛŒ(ها) با موÙقیت Ùعال شدند.'; $messages['activated'] = 'صاÙÛŒ(ها) با موÙقیت غیرÙعال شدند.'; $messages['moved'] = 'صاÙÛŒ با موÙقیت منتقل شد.'; +$messages['moveerror'] = 'ناتوانی در انتقال صاÙÛŒ انتخاب شده. خطای سرور رخ داد.'; $messages['nametoolong'] = 'نام خیلی بلند.'; $messages['namereserved'] = 'نام رزرو شده.'; $messages['setexist'] = 'مجموعه در Øال Øاضر موجود است.'; diff --git a/plugins/managesieve/localization/fr_FR.inc b/plugins/managesieve/localization/fr_FR.inc index 0e9549b58..67a73a9aa 100644 --- a/plugins/managesieve/localization/fr_FR.inc +++ b/plugins/managesieve/localization/fr_FR.inc @@ -159,22 +159,31 @@ $labels['index'] = 'index:'; $labels['indexlast'] = 'retour arrière'; $messages['filterunknownerror'] = 'Erreur du serveur inconnue'; $messages['filterconnerror'] = 'Connexion au serveur Managesieve impossible'; +$messages['filterdeleteerror'] = 'Impossible de supprimer le filtre. Une erreur serveur est survenue.'; $messages['filterdeleted'] = 'Le filtre a bien été supprimé'; $messages['filtersaved'] = 'Le filtre a bien été enregistré'; +$messages['filtersaveerror'] = 'Impossible de sauvegarder le filtre. Une erreur serveur est survenue.'; $messages['filterdeleteconfirm'] = 'Voulez-vous vraiment supprimer le filtre sélectionné?'; $messages['ruledeleteconfirm'] = 'Voulez-vous vraiment supprimer la règle sélectionnée?'; $messages['actiondeleteconfirm'] = 'Voulez-vous vraiment supprimer l\'action sélectionnée?'; $messages['forbiddenchars'] = 'Caractères interdits dans le champ'; $messages['cannotbeempty'] = 'Le champ ne peut pas être vide'; $messages['ruleexist'] = 'Un filtre existe déjà avec ce nom.'; +$messages['setactivateerror'] = 'Impossible d\'activer le set de filtres sélectionné. Une erreur serveur est survenue.'; +$messages['setdeactivateerror'] = 'Impossible de désactiver le set de filtres sélectionné. Une erreur serveur est survenue.'; +$messages['setdeleteerror'] = 'Impossible de supprimer les set de filtres sélectionné. Une erreur serveur est survenue.'; $messages['setactivated'] = 'Le groupe de filtres a bien été activé.'; $messages['setdeactivated'] = 'Le groupe de filtres a bien été désactivé.'; $messages['setdeleted'] = 'Le groupe de filtres a bien été supprimé.'; $messages['setdeleteconfirm'] = 'Voulez vous vraiment supprimer le groupe de filtres sélectionné ?'; +$messages['setcreateerror'] = 'Impossible de créer un set de filtres. Une erreur serveur est survenue.'; $messages['setcreated'] = 'Le groupe de filtres a bien été créé.'; +$messages['activateerror'] = 'Impossible d\'activer le ou les filtres sélectionné(s). Une erreur serveur est survenue.'; +$messages['deactivateerror'] = 'Impossible de désactiver le ou les filtres sélectionné(s). Une erreur serveur est survenue.'; $messages['deactivated'] = 'Filtre(s) désactivé(s) avec succès.'; $messages['activated'] = 'Filtre(s) activé(s) avec succès.'; $messages['moved'] = 'Filtre déplacé avec succès.'; +$messages['moveerror'] = 'Impossible de déplacer le filtre sélectionné. Une erreur serveur est survenue.'; $messages['nametoolong'] = 'Nom trop long.'; $messages['namereserved'] = 'Nom réservé.'; $messages['setexist'] = 'Ce groupe existe déjà .'; diff --git a/plugins/managesieve/localization/gl_ES.inc b/plugins/managesieve/localization/gl_ES.inc index e588ef571..f1f9d2faa 100644 --- a/plugins/managesieve/localization/gl_ES.inc +++ b/plugins/managesieve/localization/gl_ES.inc @@ -23,9 +23,9 @@ $labels['filteradd'] = 'Engadir filtro'; $labels['filterdel'] = 'Eliminar filtro'; $labels['moveup'] = 'Mover arriba'; $labels['movedown'] = 'Mover abaixo'; -$labels['filterallof'] = 'coincidir con tódalas regras siguientes'; +$labels['filterallof'] = 'coincidir con todas as regras seguintes'; $labels['filteranyof'] = 'coincidir con algunha das regras seguintes'; -$labels['filterany'] = 'tódalas mensaxes'; +$labels['filterany'] = 'todas as mensaxes'; $labels['filtercontains'] = 'contén'; $labels['filternotcontains'] = 'non contén'; $labels['filteris'] = 'é igual a'; @@ -47,17 +47,19 @@ $labels['messagesendcopy'] = 'Enviar copia da mensaxe a'; $labels['messagereply'] = 'Respostar con unha mensaxe'; $labels['messagedelete'] = 'Eliminar a mensaxe'; $labels['messagediscard'] = 'Descartar con unha mensaxe'; +$labels['messagekeep'] = 'Manter mensaxe na caixa de entrada'; $labels['messagesrules'] = 'Para o correo entrante:'; $labels['messagesactions'] = '... executar as seguintes accións:'; $labels['add'] = 'Engadir'; $labels['del'] = 'Eliminar'; -$labels['sender'] = 'Remitente'; -$labels['recipient'] = 'Destinatario'; +$labels['sender'] = 'Remite'; +$labels['recipient'] = 'Persoa destinataria'; +$labels['vacationaddr'] = 'O(s) meu(s) outro (s) enderezo(s) de correo:'; $labels['vacationdays'] = 'Cada canto enviar mensaxes (en dÃas):'; -$labels['vacationinterval'] = 'Con qué frecuencia vanse enviar mensaxes:'; +$labels['vacationinterval'] = 'Con que frecuencia se van enviar mensaxes:'; $labels['days'] = 'dÃas'; $labels['seconds'] = 'segundos'; -$labels['vacationreason'] = 'Corpo da mensaxe (razón de vacacións):'; +$labels['vacationreason'] = 'Corpo da mensaxe (por vacacións):'; $labels['vacationsubject'] = 'Asunto da mensaxe:'; $labels['rulestop'] = 'Parar de avaliar regras'; $labels['enable'] = 'Activar/Desactivar'; @@ -75,14 +77,14 @@ $labels['none'] = 'ningún'; $labels['fromset'] = 'de conxunto'; $labels['fromfile'] = 'de arquivo'; $labels['filterdisabled'] = 'Filtro desactivado'; -$labels['countisgreaterthan'] = 'a conta é meirande que'; -$labels['countisgreaterthanequal'] = 'a conta é meirande ou igual a'; +$labels['countisgreaterthan'] = 'a conta é maior que'; +$labels['countisgreaterthanequal'] = 'a conta é maior ou igual a'; $labels['countislessthan'] = 'a conta é menor que'; $labels['countislessthanequal'] = 'a conta é menor ou igual a'; $labels['countequals'] = 'a conta é igual a'; $labels['countnotequals'] = 'a conta non é igual a'; $labels['valueisgreaterthan'] = 'o valor é meirande que '; -$labels['valueisgreaterthanequal'] = 'o valor é meirande ou igual a'; +$labels['valueisgreaterthanequal'] = 'o valor é maior ou igual a'; $labels['valueislessthan'] = 'o valor é menor que'; $labels['valueislessthanequal'] = 'o valor é menor ou igual a'; $labels['valueequals'] = 'o valor é igual a'; @@ -95,9 +97,9 @@ $labels['flagdeleted'] = 'Eliminadas'; $labels['flaganswered'] = 'Respostadas'; $labels['flagflagged'] = 'Marcadas'; $labels['flagdraft'] = 'Borrador'; -$labels['setvariable'] = 'Establecer variable'; -$labels['setvarname'] = 'Nome da variable:'; -$labels['setvarvalue'] = 'Valor da variable:'; +$labels['setvariable'] = 'Estabelecer variábel'; +$labels['setvarname'] = 'Nome da variábel:'; +$labels['setvarvalue'] = 'Valor da variábel:'; $labels['setvarmodifiers'] = 'Modificadores:'; $labels['varlower'] = 'minúscula'; $labels['varupper'] = 'maiúscula'; @@ -106,10 +108,10 @@ $labels['varupperfirst'] = 'primeira letra maiúscula'; $labels['varquotewildcard'] = 'poñer entre aspas caracteres especiais'; $labels['varlength'] = 'lonxitude'; $labels['notify'] = 'Enviar notificación'; -$labels['notifyaddress'] = 'Destinatario:'; +$labels['notifyaddress'] = 'A este enderezo de correo:'; $labels['notifybody'] = 'Corpo da notificación:'; $labels['notifysubject'] = 'Asunto da notificación:'; -$labels['notifyfrom'] = 'Remitente da notificación:'; +$labels['notifyfrom'] = 'Remite da notificación:'; $labels['notifyimportance'] = 'Importancia:'; $labels['notifyimportancelow'] = 'baixa'; $labels['notifyimportancenormal'] = 'normal'; @@ -146,36 +148,45 @@ $labels['modtype'] = 'tipo:'; $labels['allparts'] = 'todos'; $labels['domain'] = 'dominio'; $labels['localpart'] = 'parte local'; -$labels['user'] = 'usuario'; +$labels['user'] = 'utente'; $labels['detail'] = 'detalle'; -$labels['comparator'] = 'comparador'; -$labels['default'] = 'defecto'; +$labels['comparator'] = 'comparador:'; +$labels['default'] = 'predeterminado'; $labels['octet'] = 'estricto (octeto)'; -$labels['asciicasemap'] = 'non sensible a maiúsculas/minúsculas (ascii-casemap)'; +$labels['asciicasemap'] = 'non sensÃbel a maiúsculas/minúsculas (ascii-casemap)'; $labels['asciinumeric'] = 'numérico (ascii-numerico)'; $labels['index'] = 'Ãndice:'; -$labels['indexlast'] = 'cara atrás'; -$messages['filterunknownerror'] = 'Erro descoñecido servidor'; -$messages['filterconnerror'] = 'Imposible conectar co servidor managesieve'; +$labels['indexlast'] = 'atrás'; +$messages['filterunknownerror'] = 'Erro descoñecido do servidor'; +$messages['filterconnerror'] = 'ImposÃbel conectar co servidor.'; +$messages['filterdeleteerror'] = 'Non se pode eliminar filtro. Produciuse un erro de servidor.'; $messages['filterdeleted'] = 'Filtro borrado con éxito'; $messages['filtersaved'] = 'Filtro gardado con éxito'; -$messages['filterdeleteconfirm'] = 'Realmente desexa eliminar o filtro seleccionado?'; -$messages['ruledeleteconfirm'] = 'Está seguro de que desexa eliminar a regra seleccionada?'; -$messages['actiondeleteconfirm'] = 'Está seguro de que desexa eliminar a acción seleccionada?'; +$messages['filtersaveerror'] = 'Non se puido gardar filtro. Produciuse un erro de servidor.'; +$messages['filterdeleteconfirm'] = 'Realmente queres eliminar o filtro seleccionado?'; +$messages['ruledeleteconfirm'] = 'Seguro que queres eliminar a regra seleccionada?'; +$messages['actiondeleteconfirm'] = 'Seguro que queres eliminar a acción seleccionada?'; $messages['forbiddenchars'] = 'Caracteres non permitidos no campo'; $messages['cannotbeempty'] = 'O campo non pode estar baleiro'; -$messages['ruleexist'] = 'Xa existe un filtro con nome especificado.'; +$messages['ruleexist'] = 'Xa existe un filtro co nome especificado.'; +$messages['setactivateerror'] = 'Non se poden activar os filtros seleccionados. Produciuse un erro de servidor.'; +$messages['setdeactivateerror'] = 'Non foi posÃbel desactivar os filtros seleccionados. Produciuse un erro de servidor.'; +$messages['setdeleteerror'] = 'Non é posÃbel eliminar os filtros seleccionados. Produciuse un erro de servidor.'; $messages['setactivated'] = 'O conxunto de filtros activouse con éxito'; $messages['setdeactivated'] = 'O conxunto de filtros desactivouse con éxito'; $messages['setdeleted'] = 'O Conxunto de filtros borrouse con éxito'; -$messages['setdeleteconfirm'] = 'Está seguro de que desexa eliminar o conxunto de filtros seleccionado?'; +$messages['setdeleteconfirm'] = 'Seguro que queres eliminar o conxunto de filtros seleccionado?'; +$messages['setcreateerror'] = 'Non é posÃbel crear filtros. Produciuse un erro de servidor.'; $messages['setcreated'] = 'Conxunto de filtros creado con éxito'; +$messages['activateerror'] = 'Non é posÃbel activar o(s) filtro(s) seleccionado(s). Produciuse un erro de servidor.'; +$messages['deactivateerror'] = 'Incapaz de desactivar filtro(s) seleccionado(s). Produciuse un erro de servidor.'; $messages['deactivated'] = 'Desactiváronse os filtros correctamente.'; $messages['activated'] = 'Activáronse os filtros correctamente'; $messages['moved'] = 'Moveuse correctamente o filtro.'; -$messages['nametoolong'] = 'Imposible crear o conxunto de filtros. O nome é longo de máis'; +$messages['moveerror'] = 'Non se pode mover o filtro seleccionado. Produciuse un erro de servidor.'; +$messages['nametoolong'] = 'ImposÃbel crear o conxunto de filtros. O nome é longo de máis'; $messages['namereserved'] = 'Nome reservado'; $messages['setexist'] = 'Xa existe o conxunto'; $messages['nodata'] = 'É preciso seleccionar polo menos unha posición!'; -$messages['invaliddateformat'] = 'Formato de data ou parte dos datos inválidos'; +$messages['invaliddateformat'] = 'Formato de data ou parte dos datos non válidos'; ?> diff --git a/plugins/managesieve/localization/he_IL.inc b/plugins/managesieve/localization/he_IL.inc index 7c2ff29ce..f347d945d 100644 --- a/plugins/managesieve/localization/he_IL.inc +++ b/plugins/managesieve/localization/he_IL.inc @@ -54,6 +54,7 @@ $labels['add'] = 'הוספה'; $labels['del'] = 'מחיקה'; $labels['sender'] = 'השולח'; $labels['recipient'] = '×”× ×ž×¢×Ÿ'; +$labels['vacationaddr'] = 'כתובות דו×"ל × ×•×¡×¤×•×ª:'; $labels['vacationdays'] = 'ב×יזו תדירות ( ×‘×™×ž×™× ) לשלוח הודעות:'; $labels['vacationinterval'] = 'ב×יזו תדירות לשלוח ההודעה'; $labels['days'] = 'ימי×'; @@ -158,22 +159,31 @@ $labels['index'] = '××™× ×“×§×¡:'; $labels['indexlast'] = 'בחזרה'; $messages['filterunknownerror'] = 'שגי×ת שרת בלתי מוכרת.'; $messages['filterconnerror'] = '×œ× × ×™×ª×Ÿ להתחבר לשרת.'; +$messages['filterdeleteerror'] = '×œ× × ×™×ª×Ÿ למחוק ×¡×™× ×•×Ÿ. שגי×ת שרת.'; $messages['filterdeleted'] = '×”×ž×¡× ×Ÿ × ×ž×—×§ בהצלחה.'; $messages['filtersaved'] = '×”×ž×¡× ×Ÿ × ×©×ž×¨ בהצלחה.'; +$messages['filtersaveerror'] = '×œ× × ×™×ª×Ÿ לשמור ×¡×™× ×•×Ÿ. שגי×ת שרת.'; $messages['filterdeleteconfirm'] = '×”×× ×כן ×‘×¨×¦×•× ×š למחוק ×ת ×”×ž×¡× ×Ÿ ×”× ×‘×—×¨?'; $messages['ruledeleteconfirm'] = '×”×× ×כן ×‘×¨×¦×•× ×š למחוק ×ת הכלל ×”× ×‘×—×¨?'; $messages['actiondeleteconfirm'] = '×”×× ×כן ×‘×¨×¦×•× ×š למחוק ×ת הפעולה ×”× ×‘×—×¨×ª?'; $messages['forbiddenchars'] = '×ª×•×•×™× ××¡×•×¨×™× ×‘×©×“×”.'; $messages['cannotbeempty'] = 'השדה ×œ× ×™×›×•×œ להיש×ר ריק.'; $messages['ruleexist'] = 'כבר ×§×™×™× ×ž×¡× ×Ÿ ×‘×©× ×›×–×”.'; +$messages['setactivateerror'] = '×œ× × ×™×ª×Ÿ להפעיל ×ת ערכת ×”×ž×¡× × ×™× ×”× ×‘×—×¨×ª. ×ירעה שגי××” בצד השרת.'; +$messages['setdeactivateerror'] = '×œ× × ×™×ª×Ÿ להשבית רשימת ×ž×¡× × ×™× ×©× ×‘×—×¨×”. שגי×ת שרת.'; +$messages['setdeleteerror'] = '×œ× × ×™×ª×Ÿ למחוק רשימת ×ž×¡× × ×™× ×©× ×‘×—×¨×”. שגי×ת שרת.'; $messages['setactivated'] = 'ערכת ×”×ž×¡× × ×™× ×”×•×¤×¢×œ×” בהצלחה.'; $messages['setdeactivated'] = 'ערכת ×”×ž×¡× × ×™× × ×•×˜×¨×œ×” בהצלחה.'; $messages['setdeleted'] = 'ערכת ×”×ž×¡× × ×™× × ×ž×—×§×” בהצלחה.'; $messages['setdeleteconfirm'] = '×”×× ×כן ×‘×¨×¦×•× ×š למחוק ×ת ערכת ×”×ž×¡× × ×™× ×”× ×‘×—×¨×ª?'; +$messages['setcreateerror'] = '×œ× × ×™×ª×Ÿ ליצור ערכת ×ž×¡× × ×™×. ×ירעה שגי××” בצד השרת.'; $messages['setcreated'] = 'ערכת ×”×ž×¡× × ×™× × ×•×¦×¨×” בהצלחה.'; +$messages['activateerror'] = '×œ× × ×™×ª×Ÿ להפעיל ×ת ×”×ž×¡× × ×™× ×”× ×‘×—×¨×™×. ×ירעה שגי××” בצד השרת.'; +$messages['deactivateerror'] = '×œ× × ×™×ª×Ÿ ×œ× ×˜×¨×œ ×ת ×”×ž×¡× × ×™× ×”× ×‘×—×¨×™×. ×ירעה שגי××” בצד השרת.'; $messages['deactivated'] = '×”×ž×¡× × ×™× ×”×•×¤×¢×œ×• בהצלחה.'; $messages['activated'] = '×”×ž×¡× × ×™× × ×•×˜×¨×œ×• בהצלחה.'; $messages['moved'] = '×”×ž×¡× ×Ÿ הועבר בהצלחה.'; +$messages['moveerror'] = '×œ× × ×™×ª×Ÿ להעביר ×ת ×”×ž×¡× ×Ÿ ×”× ×‘×—×¨. ×ירעה שגי××” בצד השרת.'; $messages['nametoolong'] = '×”×©× ×רוך מדי.'; $messages['namereserved'] = '×”×©× ×”×–×” שמור.'; $messages['setexist'] = 'הערכה כבר קיימת.'; diff --git a/plugins/managesieve/localization/hr_HR.inc b/plugins/managesieve/localization/hr_HR.inc index eadbfcc0f..b3192abe5 100644 --- a/plugins/managesieve/localization/hr_HR.inc +++ b/plugins/managesieve/localization/hr_HR.inc @@ -47,13 +47,18 @@ $labels['messagesendcopy'] = 'PoÅ¡alji kopiju poruke na'; $labels['messagereply'] = 'Odgovori sa porukom'; $labels['messagedelete'] = 'ObriÅ¡i poruku'; $labels['messagediscard'] = 'Otkaži sa porukom'; +$labels['messagekeep'] = 'Zadrži poruku u mapi Inbox'; $labels['messagesrules'] = 'Za pristigle poruke:'; $labels['messagesactions'] = '...primijeni sljedeće akcije:'; $labels['add'] = 'Dodaj'; $labels['del'] = 'ObriÅ¡i'; $labels['sender'] = 'PoÅ¡iljatelj'; $labels['recipient'] = 'Primatelj'; +$labels['vacationaddr'] = 'Dodatna e-mail adresa(e):'; $labels['vacationdays'] = 'Koliko Äesto slati poruku (u danima):'; +$labels['vacationinterval'] = 'Koliko Äesto slati poruku:'; +$labels['days'] = 'dana'; +$labels['seconds'] = 'sekundi'; $labels['vacationreason'] = 'Tijelo poruke (razlog odmora):'; $labels['vacationsubject'] = 'Naslov poruke:'; $labels['rulestop'] = 'Prekini izvoÄ‘enje filtera'; @@ -77,11 +82,13 @@ $labels['countisgreaterthanequal'] = 'brojaÄ je veći ili jednak od'; $labels['countislessthan'] = 'brojaÄ je manji od'; $labels['countislessthanequal'] = 'brojaÄ je manji ili jednak od'; $labels['countequals'] = 'brojaÄ je jednak'; +$labels['countnotequals'] = 'brojaÄ nije jednak'; $labels['valueisgreaterthan'] = 'vrijednost je veća od'; $labels['valueisgreaterthanequal'] = 'vrijednost je veća ili jednaka od'; $labels['valueislessthan'] = 'vrijednost je manja od'; $labels['valueislessthanequal'] = 'vrijednost je manja ili jednaka od'; $labels['valueequals'] = 'vrijednost je jednaka'; +$labels['valuenotequals'] = 'vrijednost nije jednaka'; $labels['setflags'] = 'Postavi oznake na poruku'; $labels['addflags'] = 'Dodaj oznake na poruku'; $labels['removeflags'] = 'Ukloni oznake sa poruke'; @@ -90,10 +97,45 @@ $labels['flagdeleted'] = 'Obrisana'; $labels['flaganswered'] = 'Odgovorena'; $labels['flagflagged'] = 'OznaÄena'; $labels['flagdraft'] = 'Predložak'; +$labels['setvariable'] = 'Postavi varijablu'; +$labels['setvarname'] = 'Ime varijable:'; +$labels['setvarvalue'] = 'Vrijednost varijable:'; +$labels['setvarmodifiers'] = 'Modifikatori:'; +$labels['varlower'] = 'mala slova'; +$labels['varupper'] = 'velika slova'; +$labels['varlowerfirst'] = 'prvo slovo malo'; +$labels['varupperfirst'] = 'prvo slovo veliko'; +$labels['varquotewildcard'] = 'Citiraj specijalne znakove'; +$labels['varlength'] = 'duljina'; +$labels['notify'] = 'PoÅ¡alji obavijest'; +$labels['notifyaddress'] = 'Na e-mail adresu:'; +$labels['notifybody'] = 'Tekst obavijesti:'; +$labels['notifysubject'] = 'Naslov obavijesti:'; +$labels['notifyfrom'] = 'PoÅ¡iljatelj obavijesti:'; +$labels['notifyimportance'] = 'Važnost:'; +$labels['notifyimportancelow'] = 'niska'; +$labels['notifyimportancenormal'] = 'normalna'; +$labels['notifyimportancehigh'] = 'visoka'; $labels['filtercreate'] = 'Stvori filter'; $labels['usedata'] = 'Koristi podatke za filter:'; $labels['nextstep'] = 'Idući korak'; $labels['...'] = '…'; +$labels['currdate'] = 'DanaÅ¡nji datum'; +$labels['datetest'] = 'Datum'; +$labels['dateheader'] = 'zaglavlje:'; +$labels['year'] = 'godina'; +$labels['month'] = 'mjesec'; +$labels['day'] = 'dan'; +$labels['date'] = 'datum (yyyy-mm-dd)'; +$labels['julian'] = 'datum (julijanski)'; +$labels['hour'] = 'sat'; +$labels['minute'] = 'minute'; +$labels['second'] = 'sekunde'; +$labels['time'] = 'vrijeme (hh:mm:ss)'; +$labels['iso8601'] = 'datum (ISO8601)'; +$labels['std11'] = 'datum (RFC2822)'; +$labels['zone'] = 'vremenska zona'; +$labels['weekday'] = 'dan u tjednu (0-6)'; $labels['advancedopts'] = 'Napredne postavke'; $labels['body'] = 'Tijelo poruke'; $labels['address'] = 'adresa'; @@ -113,26 +155,38 @@ $labels['default'] = 'preddefinirano'; $labels['octet'] = 'strogo (oktet)'; $labels['asciicasemap'] = 'neosjetljivo na veliÄinu slova (ascii-casemap)'; $labels['asciinumeric'] = 'numeriÄki (ascii-numeric)'; +$labels['index'] = 'indeks:'; +$labels['indexlast'] = 'unatrag'; $messages['filterunknownerror'] = 'Nepoznata greÅ¡ka na poslužitelju'; $messages['filterconnerror'] = 'Nemoguće spajanje na poslužitelj (managesieve)'; +$messages['filterdeleteerror'] = 'Nemoguće brisanje filtera. GreÅ¡ka na poslužitelju.'; $messages['filterdeleted'] = 'Filter je uspjeÅ¡no obrisan'; $messages['filtersaved'] = 'Filter je uspjeÅ¡no spremljen'; +$messages['filtersaveerror'] = 'Nemoguće spremiti filter. GreÅ¡ka na poslužitelju.'; $messages['filterdeleteconfirm'] = 'Sigurno želite obrisati odabrani filter?'; $messages['ruledeleteconfirm'] = 'Jeste li sigurni da želite obrisati odabrana pravila?'; $messages['actiondeleteconfirm'] = 'Jeste li sigurni da želite obrisati odabrane akcije?'; $messages['forbiddenchars'] = 'Nedozvoljeni znakovi u polju'; $messages['cannotbeempty'] = 'Polje nesmije biti prazno'; $messages['ruleexist'] = 'Filter sa zadanim imenom već postoji.'; +$messages['setactivateerror'] = 'Nemoguće aktivirati odabranu grupu filtera. GreÅ¡ka na poslužitelju.'; +$messages['setdeactivateerror'] = 'Nemoguće deaktivirati odabranu grupu filtera. GreÅ¡ka na poslužitelju.'; +$messages['setdeleteerror'] = 'Nemoguće obrisati odabranu grupu filtera. GreÅ¡ka na poslužitelju.'; $messages['setactivated'] = 'Grupa filtera je uspjeÅ¡no aktivirana'; $messages['setdeactivated'] = 'Grupa filtera je uspjeÅ¡no deaktivirana'; $messages['setdeleted'] = 'Grupa filtera je uspjeÅ¡no obrisana'; $messages['setdeleteconfirm'] = 'Jeste li sigurni da želite obrisati odabranu grupu filtera?'; +$messages['setcreateerror'] = 'Nemoguće stvoriti grupu filtera. GreÅ¡ka na poslužitelju.'; $messages['setcreated'] = 'Grupa filtera je uspjeÅ¡no stvorena'; +$messages['activateerror'] = 'Nije moguće omogućiti odabrani filter(e). GreÅ¡ka poslužitelja.'; +$messages['deactivateerror'] = 'Nije moguće onemogućiti odabrane filter(e). GreÅ¡ka poslužitelja.'; $messages['deactivated'] = 'Filter(i) omogućen(i) uspjeÅ¡no.'; $messages['activated'] = 'Filter(i) onemogućen(i) uspjeÅ¡no.'; $messages['moved'] = 'Filter uspjeÅ¡no premjeÅ¡ten.'; +$messages['moveerror'] = 'Nije moguće premjestiti odabrani filter. GreÅ¡ka poslužitelja.'; $messages['nametoolong'] = 'Nemoguće napraviti grupu filtera. Naziv je predugaÄak'; $messages['namereserved'] = 'Rezervirano ime.'; $messages['setexist'] = 'Skup već postoji.'; $messages['nodata'] = 'Barem jedan pozicija mora biti odabrana!'; +$messages['invaliddateformat'] = 'Neispravan datum ili dio datuma'; ?> diff --git a/plugins/managesieve/localization/hu_HU.inc b/plugins/managesieve/localization/hu_HU.inc index 862c32b94..afab3f3a6 100644 --- a/plugins/managesieve/localization/hu_HU.inc +++ b/plugins/managesieve/localization/hu_HU.inc @@ -159,22 +159,31 @@ $labels['index'] = 'index:'; $labels['indexlast'] = 'visszafelé'; $messages['filterunknownerror'] = 'Ismeretlen szerverhiba'; $messages['filterconnerror'] = 'Nem tudok a szűrÅ‘szerverhez kapcsolódni'; +$messages['filterdeleteerror'] = 'A szűrÅ‘t nem lehet törölni. Szerverhiba történt'; $messages['filterdeleted'] = 'A szűrÅ‘ törlése sikeres'; $messages['filtersaved'] = 'A szűrÅ‘ mentése sikeres'; +$messages['filtersaveerror'] = 'A szűrÅ‘ mentése sikertelen. Szerverhiba történt'; $messages['filterdeleteconfirm'] = 'Biztosan törli ezt a szűrÅ‘t?'; $messages['ruledeleteconfirm'] = 'Biztosan törli ezt a szabályt?'; $messages['actiondeleteconfirm'] = 'Biztosan törli ezt a műveletet?'; $messages['forbiddenchars'] = 'Érvénytelen karakter a mezÅ‘ben'; $messages['cannotbeempty'] = 'A mezÅ‘ nem lehet üres'; $messages['ruleexist'] = 'Már van ilyen névvel elmentett szűrÅ‘.'; +$messages['setactivateerror'] = 'A kiválasztott szűrÅ‘ készletet nem sikerült engedélyezni. Szerver hiba történt.'; +$messages['setdeactivateerror'] = 'A kiválasztott szűrÅ‘ készletet nem sikerült tiltani. Szerver hiba történt.'; +$messages['setdeleteerror'] = 'Nem sikerült a kiválasztott szűrÅ‘ készletet törölni. Szerver hiba történt.'; $messages['setactivated'] = 'A filter készlet engedélyezése sikeresen végrehajtódott.'; $messages['setdeactivated'] = 'A filter készlet tiltása sikeresen végrehajtódott.'; $messages['setdeleted'] = 'A filter készlet törlése sikeresen végrehajtódott.'; $messages['setdeleteconfirm'] = 'Biztosan törölni szeretnéd a kiválasztott szűrÅ‘ készleteket?'; +$messages['setcreateerror'] = 'Nem sikerült létrehozni a szűrÅ‘ készletet. Szerver hiba történt.'; $messages['setcreated'] = 'A szűrÅ‘ készlet sikeresen létrejött.'; +$messages['activateerror'] = 'Nem sikerült engedélyezni a kiválasztott szűrö(k)et. Szerver hiba történt.'; +$messages['deactivateerror'] = 'Nem sikerült kikapcsolni a kiválasztott szűrÅ‘(ke)t. Szerver hiba történt.'; $messages['deactivated'] = 'SzűrÅ‘(k) sikeresen bekapcsolva.'; $messages['activated'] = 'SzűrÅ‘(k) sikeresen kikapcsolva.'; $messages['moved'] = 'A szűrÅ‘ sikeresen áthelyezve.'; +$messages['moveerror'] = 'Az áthelyezés nem sikerült. Szerver hiba történt.'; $messages['nametoolong'] = 'Túll hosszu név'; $messages['namereserved'] = 'Nem használható (foglalt) név-'; $messages['setexist'] = 'A készlet már létezik.'; diff --git a/plugins/managesieve/localization/it_IT.inc b/plugins/managesieve/localization/it_IT.inc index 9de758fa5..b7fc970e5 100644 --- a/plugins/managesieve/localization/it_IT.inc +++ b/plugins/managesieve/localization/it_IT.inc @@ -159,22 +159,31 @@ $labels['index'] = 'indice:'; $labels['indexlast'] = 'indietro'; $messages['filterunknownerror'] = 'Errore sconosciuto del server'; $messages['filterconnerror'] = 'Collegamento al server managesieve fallito'; +$messages['filterdeleteerror'] = 'Eliminazione del filtro fallita. Si è verificato un errore nel server.'; $messages['filterdeleted'] = 'Filtro eliminato con successo'; $messages['filtersaved'] = 'Filtro salvato con successo'; +$messages['filtersaveerror'] = 'Salvataggio del filtro fallito. Si è verificato un errore nel server.'; $messages['filterdeleteconfirm'] = 'Vuoi veramente eliminare il filtro selezionato?'; $messages['ruledeleteconfirm'] = 'Sei sicuro di voler eliminare la regola selezionata?'; $messages['actiondeleteconfirm'] = 'Sei sicuro di voler eliminare l\'azione selezionata?'; $messages['forbiddenchars'] = 'Caratteri non consentiti nel campo'; $messages['cannotbeempty'] = 'Il campo non può essere vuoto'; $messages['ruleexist'] = 'Esiste già un filtro con questo nome'; +$messages['setactivateerror'] = 'Impossibile attivare il filtro. Errore del server.'; +$messages['setdeactivateerror'] = 'Impossibile disattivare i filtri selezionati. Errore del server.'; +$messages['setdeleteerror'] = 'Impossibile cancellare i filtri selezionati. Errore del server.'; $messages['setactivated'] = 'Filtro attivato'; $messages['setdeactivated'] = 'Filtro disattivato'; $messages['setdeleted'] = 'Filtro cancellato'; $messages['setdeleteconfirm'] = 'Sei sicuro di voler cancellare il gruppo di filtri'; +$messages['setcreateerror'] = 'Impossibile creare il gruppo di filtri. Errore del server.'; $messages['setcreated'] = 'Gruppo di filtri creato'; +$messages['activateerror'] = 'Impossibile abilitare i filtri selzionati. Errore del server.'; +$messages['deactivateerror'] = 'impossibile disabilitare i filtri selezionati. Errore del server.'; $messages['deactivated'] = 'filtro abilitato'; $messages['activated'] = 'filtro disabilitato'; $messages['moved'] = 'filtro spostato'; +$messages['moveerror'] = 'impossibile spostare il filtro selezionato. Errore del server.'; $messages['nametoolong'] = 'Impossibile creare il gruppo: Nome troppo lungo'; $messages['namereserved'] = 'nome riservato'; $messages['setexist'] = 'Il gruppo esiste già '; diff --git a/plugins/managesieve/localization/km_KH.inc b/plugins/managesieve/localization/km_KH.inc new file mode 100644 index 000000000..a6094be55 --- /dev/null +++ b/plugins/managesieve/localization/km_KH.inc @@ -0,0 +1,119 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/managesieve/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Managesieve plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/ +*/ +$labels['filters'] = 'ážáž˜áŸ’ážšáž„'; +$labels['managefilters'] = 'គ្រប់គ្រង​ážáž˜áŸ’រប​សំបុážáŸ’រ​ចូល'; +$labels['filtername'] = 'ឈ្មោះ​ážáž˜áŸ’ážšáž„'; +$labels['newfilter'] = 'ážáž˜áŸ’រង​ážáŸ’មី'; +$labels['filteradd'] = 'បន្ážáŸ‚ម​ážáž˜áŸ’ážšáž„'; +$labels['filterdel'] = 'លុប​ážáž˜áŸ’ážšáž„'; +$labels['moveup'] = 'រុញ​ទៅ​លើ'; +$labels['movedown'] = 'រុញ​ចុះ​ក្រោម'; +$labels['filterallof'] = 'ážáŸ’រូវ​គ្នា​ទៅ​នឹង​លក្ážážážŽáŸ’ឌ​ទាំង​នáŸáŸ‡'; +$labels['filteranyof'] = 'ážáŸ’រូវ​គ្នា​ទៅ​នឹង​លក្ážážážŽáŸ’ឌ​ណាមួយ'; +$labels['filterany'] = 'សារ​ទាំង​អស់'; +$labels['filtercontains'] = 'មាន​ផ្ទុក'; +$labels['filternotcontains'] = 'មិន​មាន'; +$labels['filteris'] = 'ស្មើ​នឹង'; +$labels['filterisnot'] = 'មិន​ស្មើ​នឹង'; +$labels['filterexists'] = 'មាន'; +$labels['filternotexists'] = 'មិន​មាន'; +$labels['filtermatches'] = 'សញ្ញាណ​ដែល​ážáŸ’រូវ'; +$labels['filterunder'] = 'ក្រោម'; +$labels['filterover'] = 'លើ'; +$labels['addrule'] = 'បន្ážáŸ‚ម​លក្ážážážŽáŸ’ឌ'; +$labels['delrule'] = 'លុប​លក្ážážážŽáŸ’ឌ'; +$labels['messagemoveto'] = 'ផ្លាស់​ទី​សារ​ទៅ'; +$labels['messageredirect'] = 'ប្ដូរ​ទិសដៅ​សារ​ទៅ'; +$labels['messagecopyto'] = 'ចម្លង​សារ​ទៅ'; +$labels['messagesendcopy'] = 'ផ្ញើ​ការ​ចម្លង​សារ​ទៅ'; +$labels['messagereply'] = 'ឆ្លើយ​ážáž”​ជាមួយ​សារ'; +$labels['messagedelete'] = 'លុប​សារ'; +$labels['messagediscard'] = 'បោះបង់​ជាមួយ​នឹង​សារ'; +$labels['messagesrules'] = 'សម្រាប់​សំបុážáŸ’រ​ចូល៖'; +$labels['messagesactions'] = '...ប្រážáž·áž”ážáŸ’ážáž·â€‹ážŸáž€áž˜áŸ’មភាព​ទាំង​នáŸáŸ‡áŸ–'; +$labels['add'] = 'បន្ážáŸ‚ម'; +$labels['del'] = 'លុប'; +$labels['sender'] = 'អ្នក​ផ្ញើ'; +$labels['recipient'] = 'អ្នក​ទទួល'; +$labels['vacationdays'] = 'ážáž¾â€‹áž•áŸ’ញើ​សារ​ញឹកញាប់​ប៉ុណ្ណា (ក្នុង​មួយ​ážáŸ’ងៃ)៖'; +$labels['days'] = 'ážáŸ’ងៃ'; +$labels['seconds'] = 'វិនាទី'; +$labels['vacationreason'] = 'ážáž½â€‹ážŸáž¶ážš (áž áŸážáž»áž•áž›â€‹ážœáž·ážŸáŸ’សមកាល)៖'; +$labels['vacationsubject'] = 'ប្រធានបទ​សារ៖'; +$labels['rulestop'] = 'ឈប់​គិážâ€‹áž‘ៅ​លើ​លក្ážážážŽáŸ’ឌ'; +$labels['enable'] = 'បើក/បិទ'; +$labels['filterdef'] = 'អážáŸ’ážáž“áŸáž™â€‹ážáž˜áŸ’ážšáž„'; +$labels['active'] = 'សកម្ម'; +$labels['none'] = 'គ្មាន'; +$labels['fromfile'] = 'ពី​ឯកសារ'; +$labels['valuenotequals'] = 'ážáž˜áŸ’លៃ​មិន​ស្មើ​នឹង'; +$labels['flagread'] = 'បាន​អាន'; +$labels['flagdeleted'] = 'បាន​លុប'; +$labels['flaganswered'] = 'បាន​ឆ្លើយ'; +$labels['flagflagged'] = 'បាន​ដាក់​ទង់'; +$labels['flagdraft'] = 'ការ​ព្រាង'; +$labels['setvariable'] = 'កំណážáŸ‹â€‹áž¢ážáŸážš'; +$labels['setvarname'] = 'ឈ្មោះ​អážáŸážšáŸ–'; +$labels['setvarvalue'] = 'ážáž˜áŸ’លៃ​អážáŸážšáŸ–'; +$labels['varlower'] = 'អក្សរ​ážáž¼áž…'; +$labels['varupper'] = 'អក្សរ​ធំ'; +$labels['varlength'] = 'ប្រវែង'; +$labels['notify'] = 'ផ្ញើ​ការ​ជូន​ដំណឹង'; +$labels['notifyaddress'] = 'ទៅ​អាសយដ្ឋាន​អ៊ីមែល៖'; +$labels['notifybody'] = 'ážáž½â€‹áž€áž¶ážšâ€‹áž‡áž¼áž“​ដំណឹង៖'; +$labels['notifysubject'] = 'ប្រធានបទ​ការ​ជូន​ដំណឹង៖'; +$labels['notifyfrom'] = 'អ្នក​ផ្ញើ​ការ​ជូន​ដំណឹង៖'; +$labels['notifyimportance'] = 'សំážáž¶áž“់៖'; +$labels['notifyimportancelow'] = 'ទាប'; +$labels['notifyimportancenormal'] = 'ធម្មážáž¶'; +$labels['notifyimportancehigh'] = 'ážáŸ’ពស់'; +$labels['filtercreate'] = 'បង្កើážâ€‹ážáž˜áŸ’ážšáž„'; +$labels['usedata'] = 'ប្រើ​ទិន្ននáŸáž™â€‹áž‘ាំង​នáŸáŸ‡â€‹áž€áŸ’នុង​ážáž˜áŸ’រង៖'; +$labels['nextstep'] = 'ជំហាន​បន្ទាប់'; +$labels['...'] = '...'; +$labels['currdate'] = 'កាលបរិច្ឆáŸáž‘​បច្ចុប្បន្ន'; +$labels['datetest'] = 'កាលបរិច្ឆáŸáž‘'; +$labels['dateheader'] = 'ក្បាល៖'; +$labels['year'] = 'ឆ្នាំ'; +$labels['month'] = 'ážáŸ‚'; +$labels['day'] = 'ážáŸ’ងៃ'; +$labels['date'] = 'កាល​បរិច្ឆáŸáž‘ (yyyy-mm-dd)'; +$labels['julian'] = 'កាល​បរិច្ឆáŸáž‘ (julian)'; +$labels['hour'] = 'ម៉ោង'; +$labels['minute'] = 'នាទី'; +$labels['second'] = 'វិនាទី'; +$labels['time'] = 'ម៉ោង (hh:mm:ss)'; +$labels['iso8601'] = 'កាល​បរិច្ឆáŸáž‘ (ISO8601)'; +$labels['std11'] = 'កាល​បរិច្ឆáŸáž‘ (RFC2822)'; +$labels['zone'] = 'ážáŸ†áž”ន់​ម៉ោង'; +$labels['weekday'] = 'ážáŸ’ងៃ​សប្ដាហ០(0-6)'; +$labels['advancedopts'] = 'ជម្រើស​កម្រិážâ€‹ážáŸ’ពស់'; +$labels['body'] = 'ážáž½'; +$labels['address'] = 'អាសយដ្ឋាន'; +$labels['envelope'] = 'ស្រោម​សំបុážáŸ’ážš'; +$labels['text'] = 'អážáŸ’ážáž”áž‘'; +$labels['contenttype'] = 'ប្រភáŸáž‘​មាážáž·áž€áž¶'; +$labels['modtype'] = 'ប្រភáŸáž‘៖'; +$labels['allparts'] = 'ទាំងអស់'; +$labels['domain'] = 'ដូមáŸáž“'; +$labels['localpart'] = 'ផ្នែក​មូលដ្ឋាន'; +$labels['user'] = 'អ្នកប្រើ'; +$labels['detail'] = 'លម្អិáž'; +$labels['index'] = 'លិបិក្រម៖'; +$labels['indexlast'] = 'បកក្រោយ'; +?> diff --git a/plugins/managesieve/localization/lv_LV.inc b/plugins/managesieve/localization/lv_LV.inc index 73aa76573..111f3b4f6 100644 --- a/plugins/managesieve/localization/lv_LV.inc +++ b/plugins/managesieve/localization/lv_LV.inc @@ -47,13 +47,15 @@ $labels['messagesendcopy'] = 'PÄrsÅ«tÄ«t vÄ“stules kopiju uz'; $labels['messagereply'] = 'AtbildÄ“t ar vÄ“stuli'; $labels['messagedelete'] = 'DzÄ“st vÄ“stuli'; $labels['messagediscard'] = 'DzÄ“st vÄ“stuli un atbildÄ“t'; +$labels['messagekeep'] = 'PaturÄ“t ziņu IesÅ«tnÄ“'; $labels['messagesrules'] = 'IenÄkoÅ¡ajÄm vÄ“stulÄ“m:'; $labels['messagesactions'] = '...izpildÄ«t sekojoÅ¡Äs darbÄ«bas:'; $labels['add'] = 'Pievienot'; $labels['del'] = 'DzÄ“st'; $labels['sender'] = 'SÅ«tÄ«tÄjs'; $labels['recipient'] = 'SaņēmÄ“js'; -$labels['vacationdays'] = 'Cik dienu laikÄ vienam un tam paÅ¡am sÅ«tÄ«tÄjam neatbildÄ“t atkÄrtoti (piem., 7):'; +$labels['vacationaddr'] = 'Mana(s) papildus e-pasta adrese(s):'; +$labels['vacationdays'] = 'Cik bieži sÅ«tÄ« ziņojumus (dienÄs):'; $labels['vacationinterval'] = 'Cik bieži sÅ«tÄ«t vÄ“stules:'; $labels['days'] = 'dienas'; $labels['seconds'] = 'sekundes'; @@ -154,25 +156,34 @@ $labels['octet'] = 'precÄ«zs (oktets)'; $labels['asciicasemap'] = 'reÄ£istrnejutÄ«gs (ascii tabula)'; $labels['asciinumeric'] = 'skaitļu (ascii skaitļu)'; $labels['index'] = 'indekss:'; -$labels['indexlast'] = '"backwards"'; +$labels['indexlast'] = 'atpakaļ'; $messages['filterunknownerror'] = 'NezinÄma servera kļūda.'; $messages['filterconnerror'] = 'NeizdevÄs pieslÄ“gties ManageSieve serverim.'; +$messages['filterdeleteerror'] = 'NeizdevÄs izdzÄ“st filtru - atgadÄ«jÄs servera iekÅ¡Ä“jÄ kļūda.'; $messages['filterdeleted'] = 'Filtrs veiksmÄ«gi izdzÄ“sts.'; $messages['filtersaved'] = 'Filtrs veiksmÄ«gi saglabÄts.'; +$messages['filtersaveerror'] = 'NeizdevÄs saglabÄt filtru - atgadÄ«jÄs servera iekÅ¡Ä“jÄ kļūda.'; $messages['filterdeleteconfirm'] = 'Vai JÅ«s tieÅ¡Äm vÄ“laties dzÄ“st atzÄ«mÄ“to filtru?'; $messages['ruledeleteconfirm'] = 'Vai JÅ«s tieÅ¡Äm vÄ“laties dzÄ“st atzÄ«mÄ“to nosacÄ«jumu?'; $messages['actiondeleteconfirm'] = 'Vai JÅ«s tieÅ¡Äm vÄ“laties dzÄ“st atzÄ«mÄ“to darbÄ«bu?'; $messages['forbiddenchars'] = 'Lauks satur aizliegtus simbolus.'; $messages['cannotbeempty'] = 'Lauks nedrÄ«kst bÅ«t tukÅ¡s.'; $messages['ruleexist'] = 'Filtrs ar tÄdu nosaukumu jau pastÄv.'; +$messages['setactivateerror'] = 'NeizdevÄs aktivizÄ“t atzÄ«mÄ“to filtru kopu - atgadÄ«jÄs servera iekÅ¡Ä“jÄ kļūda.'; +$messages['setdeactivateerror'] = 'NeizdevÄs deaktivizÄ“t atzÄ«mÄ“to filtru kopu - atgadÄ«jÄs servera iekÅ¡Ä“jÄ kļūda.'; +$messages['setdeleteerror'] = 'NeizdevÄs izdzÄ“st atzÄ«mÄ“to filtru kopu - atgadÄ«jÄs servera ieksÄ“jÄ kļūda.'; $messages['setactivated'] = 'Filtru kopa veiksmÄ«gi aktivizÄ“ta.'; $messages['setdeactivated'] = 'Filtru kopa veiksmÄ«gi deaktivizÄ“ta.'; $messages['setdeleted'] = 'Filtru kopa veiksmÄ«gi izdzÄ“sta.'; $messages['setdeleteconfirm'] = 'Vai tieÅ¡Äm JÅ«s vÄ“laties dzÄ“st atzÄ«mÄ“to filtru kopu?'; +$messages['setcreateerror'] = 'NeizdevÄs izveidot filtru kopu - atgadÄ«jÄs servera iekÅ¡Ä“jÄ kļūda.'; $messages['setcreated'] = 'Filtru kopa veiksmÄ«gi izveidota.'; +$messages['activateerror'] = 'Nav iespÄ“jams ieslÄ“gt izvÄ“lÄ“to(s) filtru(s) - atgadÄ«jÄs servera iekÅ¡Ä“jÄ kļūda.'; +$messages['deactivateerror'] = 'Nav iespÄ“jams atslÄ“gt izvÄ“lÄ“to(s) filtru(s) - atgadÄ«jÄs servera iekÅ¡Ä“jÄ kļūda.'; $messages['deactivated'] = 'Filtrs(i) veiksmÄ«gi atslÄ“gts(i).'; $messages['activated'] = 'Filtrs(i) veiksmÄ«gi ieslÄ“gts(i).'; $messages['moved'] = 'Filtrs veiksmÄ«gi pÄrvietots.'; +$messages['moveerror'] = 'Nav iespÄ“jams pÄrvietot izvÄ“lÄ“to filtru - atgadÄ«jÄs servera iekÅ¡Ä“jÄ kļūda.'; $messages['nametoolong'] = 'NeizdevÄs izveidot filtru kopu. PÄrÄk garÅ¡ kopas nosaukums.'; $messages['namereserved'] = 'RezervÄ“tais nosaukums.'; $messages['setexist'] = 'Kopa jau eksistÄ“.'; diff --git a/plugins/managesieve/localization/pt_BR.inc b/plugins/managesieve/localization/pt_BR.inc index 9b245e7d8..063c60c5f 100644 --- a/plugins/managesieve/localization/pt_BR.inc +++ b/plugins/managesieve/localization/pt_BR.inc @@ -159,22 +159,31 @@ $labels['index'] = 'Ãndice:'; $labels['indexlast'] = 'retroceder'; $messages['filterunknownerror'] = 'Erro desconhecido de servidor'; $messages['filterconnerror'] = 'Não foi possÃvel conectar ao servidor managesieve'; +$messages['filterdeleteerror'] = 'ImpossÃvel excluir o filtro. Ocorreu um erro no servidor.'; $messages['filterdeleted'] = 'Filtro excluÃdo com sucesso'; $messages['filtersaved'] = 'Filtro gravado com sucesso'; +$messages['filtersaveerror'] = 'ImpossÃvel salvar o filtro. Ocorreu um erro no servidor.'; $messages['filterdeleteconfirm'] = 'Deseja realmente excluir o filtro selecionado?'; $messages['ruledeleteconfirm'] = 'Deseja realmente excluir a regra selecionada?'; $messages['actiondeleteconfirm'] = 'Deseja realmente excluir a ação selecionada?'; $messages['forbiddenchars'] = 'Caracteres não permitidos no campo'; $messages['cannotbeempty'] = 'Campo não pode ficar em branco'; $messages['ruleexist'] = 'O filtro com o nome especificado já existe.'; +$messages['setactivateerror'] = 'ImpossÃvel ativar o conjunto de filtros selecionados. Ocorreu um erro no servidor.'; +$messages['setdeactivateerror'] = 'ImpossÃvel desativar o conjunto de filtros selecionados. Ocorreu um erro no servidor.'; +$messages['setdeleteerror'] = 'ImpossÃvel excluir o conjunto de filtros selecionados. Ocorreu um erro no servidor.'; $messages['setactivated'] = 'Conjunto de filtros ativados com sucesso.'; $messages['setdeactivated'] = 'Conjunto de filtros desativados com sucesso.'; $messages['setdeleted'] = 'Conjunto de filtros excluÃdos com sucesso.'; $messages['setdeleteconfirm'] = 'Você está certo que deseja excluir o conjunto de filtros selecionados?'; +$messages['setcreateerror'] = 'ImpossÃvel criar o conjunto de filtros. Ocorreu um erro no servidor.'; $messages['setcreated'] = 'Conjunto de filtros criado com sucesso.'; +$messages['activateerror'] = 'ImpossÃvel habilitar o(s) filtro(s) selecionado(s). Ocorreu um erro no servidor.'; +$messages['deactivateerror'] = 'ImpossÃvel desabilitar o(s) filtro(s) selecionado(s). Ocorreu um erro no servidor.'; $messages['deactivated'] = 'Filtro(s) habilitado(s) com sucesso.'; $messages['activated'] = 'Filtro(s) desabilitado(s) com sucesso.'; $messages['moved'] = 'Filtro movido com sucesso.'; +$messages['moveerror'] = 'ImpossÃvel mover o filtro selecionado. Ocorreu um erro no servidor.'; $messages['nametoolong'] = 'Nome muito longo.'; $messages['namereserved'] = 'Nome reservado.'; $messages['setexist'] = 'Conjunto já existe.'; diff --git a/plugins/managesieve/localization/sk_SK.inc b/plugins/managesieve/localization/sk_SK.inc index 5e7bfb3b5..9a75586fa 100644 --- a/plugins/managesieve/localization/sk_SK.inc +++ b/plugins/managesieve/localization/sk_SK.inc @@ -16,20 +16,20 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/ */ $labels['filters'] = 'Filtre'; -$labels['managefilters'] = 'Správa filtrov prÃchádzajúcej poÅ¡ty'; +$labels['managefilters'] = 'Správa filtrov prichádzajúcej poÅ¡ty'; $labels['filtername'] = 'Názov filtra'; $labels['newfilter'] = 'Nový filter'; -$labels['filteradd'] = 'Pridaj filter'; -$labels['filterdel'] = 'Zmaž filter'; -$labels['moveup'] = 'Presuň vyÅ¡Å¡ie'; -$labels['movedown'] = 'Presuň nižšie'; +$labels['filteradd'] = 'PridaÅ¥ filter'; +$labels['filterdel'] = 'VymazaÅ¥ filter'; +$labels['moveup'] = 'Presunúť nahor'; +$labels['movedown'] = 'Presunúť nadol'; $labels['filterallof'] = 'vyhovujúca vÅ¡etkým z nasledujúcich pravidiel'; $labels['filteranyof'] = 'vyhovujúca ľubovoľnému z nasledujúcich pravidiel'; $labels['filterany'] = 'vÅ¡etky správy'; $labels['filtercontains'] = 'obsahuje'; $labels['filternotcontains'] = 'neobsahuje'; -$labels['filteris'] = 'rovná sa'; -$labels['filterisnot'] = 'nerovná sa'; +$labels['filteris'] = 'sa rovná'; +$labels['filterisnot'] = 'sa nerovná'; $labels['filterexists'] = 'existuje'; $labels['filternotexists'] = 'neexistuje'; $labels['filtermatches'] = 'vyhovuje výrazu'; @@ -38,45 +38,45 @@ $labels['filterregex'] = 'vyhovuje regulárnemu výrazu'; $labels['filternotregex'] = 'nevyhovuje regulárnemu výrazu'; $labels['filterunder'] = 'pod'; $labels['filterover'] = 'nad'; -$labels['addrule'] = 'Pridaj pravidlo'; -$labels['delrule'] = 'Zmaž pravidlo'; -$labels['messagemoveto'] = 'Presuň správu do'; -$labels['messageredirect'] = 'Presmeruj správu na'; +$labels['addrule'] = 'PridaÅ¥ pravidlo'; +$labels['delrule'] = 'VymazaÅ¥ pravidlo'; +$labels['messagemoveto'] = 'Presunúť správu do'; +$labels['messageredirect'] = 'PresmerovaÅ¥ správu na'; $labels['messagecopyto'] = 'KopÃrovaÅ¥ správu do'; -$labels['messagesendcopy'] = 'PoslaÅ¥ kópiu správy'; -$labels['messagereply'] = 'PoÅ¡li automatickú odpoveÄ'; -$labels['messagedelete'] = 'Zmaž správu'; -$labels['messagediscard'] = 'Zmaž a poÅ¡li správu na'; -$labels['messagekeep'] = 'PonechaÅ¥ správy v DoruÄenej poÅ¡te'; -$labels['messagesrules'] = 'Pre prichádzajúcu poÅ¡tu'; -$labels['messagesactions'] = 'vykonaj nasledovné akcie'; -$labels['add'] = 'Pridaj'; -$labels['del'] = 'Zmaž'; +$labels['messagesendcopy'] = 'PoslaÅ¥ kópiu správy na adresu'; +$labels['messagereply'] = 'OdpovedaÅ¥ správou'; +$labels['messagedelete'] = 'VymazaÅ¥ správu'; +$labels['messagediscard'] = 'VymazaÅ¥ a poslaÅ¥ správu na'; +$labels['messagekeep'] = 'PonechaÅ¥ správu v DoruÄenej poÅ¡te'; +$labels['messagesrules'] = 'Pre prichádzajúcu poÅ¡tu:'; +$labels['messagesactions'] = '...vykonaÅ¥ tieto akcie:'; +$labels['add'] = 'PridaÅ¥'; +$labels['del'] = 'VymazaÅ¥'; $labels['sender'] = 'Odosielateľ'; -$labels['recipient'] = 'Adresát'; +$labels['recipient'] = 'PrÃjemca'; $labels['vacationaddr'] = 'Iná moja e-mailová adresa (adresy):'; -$labels['vacationdays'] = 'PoÄet dnà medzi odoslanÃm správy:'; +$labels['vacationdays'] = 'Ako Äasto odosielaÅ¥ správy (v dňoch):'; $labels['vacationinterval'] = 'Ako Äasto odosielaÅ¥ správy:'; $labels['days'] = 'dnÃ'; $labels['seconds'] = 'sekúnd'; -$labels['vacationreason'] = 'Dôvod neprÃtomnosti:'; +$labels['vacationreason'] = 'Telo správy (dôvod neprÃtomnosti):'; $labels['vacationsubject'] = 'Predmet správy:'; $labels['rulestop'] = 'Koniec pravidiel'; -$labels['enable'] = 'PovoliÅ¥/ZakázaÅ¥'; -$labels['filterset'] = 'Sada filtrov'; -$labels['filtersets'] = 'Množiny filtrov'; -$labels['filtersetadd'] = 'Pridaj sadu filtrov'; -$labels['filtersetdel'] = 'Zmaž túto sadu filtrov'; -$labels['filtersetact'] = 'Aktivuj túto sadu filtrov'; -$labels['filtersetdeact'] = 'Deaktivuj túto sadu filtrov'; +$labels['enable'] = 'Zapnúť/vypnúť'; +$labels['filterset'] = 'Súprava filtrov'; +$labels['filtersets'] = 'Súpravy filtrov'; +$labels['filtersetadd'] = 'PridaÅ¥ súpravu filtrov'; +$labels['filtersetdel'] = 'VymazaÅ¥ aktuálnu súpravu filtrov'; +$labels['filtersetact'] = 'AktivovaÅ¥ aktuálnu súpravu filtrov'; +$labels['filtersetdeact'] = 'DeaktivovaÅ¥ aktuálnu súpravu filtrov'; $labels['filterdef'] = 'DefinÃcia filtra'; -$labels['filtersetname'] = 'Názov sady filtrov'; -$labels['newfilterset'] = 'Nová sada filtrov'; +$labels['filtersetname'] = 'Názov súpravy filtrov'; +$labels['newfilterset'] = 'Nová súprava filtrov'; $labels['active'] = 'aktÃvna'; $labels['none'] = 'žiadne'; -$labels['fromset'] = 'zo sady'; +$labels['fromset'] = 'zo súpravy'; $labels['fromfile'] = 'zo súboru'; -$labels['filterdisabled'] = 'Filter zakázaný'; +$labels['filterdisabled'] = 'Filter vypnutý'; $labels['countisgreaterthan'] = 'poÄet je väÄÅ¡Ã ako'; $labels['countisgreaterthanequal'] = 'poÄet je väÄÅ¡Ã alebo rovný ako'; $labels['countislessthan'] = 'poÄet je menÅ¡Ã ako'; @@ -86,16 +86,16 @@ $labels['countnotequals'] = 'poÄet sa nerovná'; $labels['valueisgreaterthan'] = 'hodnota je väÄÅ¡ia ako'; $labels['valueisgreaterthanequal'] = 'hodnota je väÄÅ¡ia alebo rovná ako'; $labels['valueislessthan'] = 'hodnota je menÅ¡ia ako'; -$labels['valueislessthanequal'] = 'hodnota je menÅ¡ia alebo rovná'; -$labels['valueequals'] = 'hodnota je rovná'; +$labels['valueislessthanequal'] = 'hodnota je menÅ¡ia alebo rovná ako'; +$labels['valueequals'] = 'hodnota je rovná ako'; $labels['valuenotequals'] = 'hodnota sa nerovná'; $labels['setflags'] = 'NastaviÅ¥ prÃznaky správy'; -$labels['addflags'] = 'PridaÅ¥ prÃznak správy'; -$labels['removeflags'] = 'odstrániÅ¥ prÃznaky zo správy'; -$labels['flagread'] = 'PreÄÃtaný'; -$labels['flagdeleted'] = 'Zmazané'; +$labels['addflags'] = 'PridaÅ¥ prÃznaky správy'; +$labels['removeflags'] = 'OdstrániÅ¥ prÃznaky zo správy'; +$labels['flagread'] = 'PreÄÃtané'; +$labels['flagdeleted'] = 'Vymazané'; $labels['flaganswered'] = 'Odpovedané'; -$labels['flagflagged'] = 'OznaÄené'; +$labels['flagflagged'] = 'OznaÄené prÃznakom'; $labels['flagdraft'] = 'Koncept'; $labels['setvariable'] = 'NastaviÅ¥ premennú'; $labels['setvarname'] = 'Názov premennej:'; @@ -148,36 +148,45 @@ $labels['modtype'] = 'typ:'; $labels['allparts'] = 'vÅ¡etko'; $labels['domain'] = 'doména'; $labels['localpart'] = 'lokálna ÄasÅ¥'; -$labels['user'] = 'užÃvateľ'; +$labels['user'] = 'použÃvateľ'; $labels['detail'] = 'detail'; $labels['comparator'] = 'porovnávaÄ:'; $labels['default'] = 'predvolené'; -$labels['octet'] = 'striktný (osmiÄkovo)'; +$labels['octet'] = 'striktný (osmiÄkový)'; $labels['asciicasemap'] = 'nerozliÅ¡uje veľké a malé pÃsmená (ascii tabuľka znakov)'; $labels['asciinumeric'] = 'numerické (ascii ÄÃsla)'; $labels['index'] = 'index:'; $labels['indexlast'] = 'dozadu'; -$messages['filterunknownerror'] = 'Neznáma chyba serveru'; -$messages['filterconnerror'] = 'Nepodarilo sa pripojiÅ¥ k managesieve serveru'; -$messages['filterdeleted'] = 'Filter bol zmazaný'; -$messages['filtersaved'] = 'Filter bol uložený'; -$messages['filterdeleteconfirm'] = 'Naozaj si prajete zmazaÅ¥ tento filter?'; -$messages['ruledeleteconfirm'] = 'Naozaj si prajete zamzaÅ¥ toto pravidlo?'; -$messages['actiondeleteconfirm'] = 'Naozaj si prajete zmazaÅ¥ túto akciu?'; -$messages['forbiddenchars'] = 'Pole obsahuje nepovolené znaky'; -$messages['cannotbeempty'] = 'Pole nemôže byÅ¥ prázdne'; -$messages['ruleexist'] = 'Filter so zadaným menom už existuje.'; -$messages['setactivated'] = 'Sada filtrov bola aktivovaná'; -$messages['setdeactivated'] = 'Sada filtrov bola deaktivovaná'; -$messages['setdeleted'] = 'Sada filtrov bola zmazaná'; -$messages['setdeleteconfirm'] = 'Naozaj si prajete zmazaÅ¥ túto sadu filtrov?'; -$messages['setcreated'] = 'Sada filtrov bola vytvorená'; -$messages['deactivated'] = 'Filter(e) povolený.'; -$messages['activated'] = 'Filter(e) úspeÅ¡ne vypnutý.'; -$messages['moved'] = 'Filter presunutý.'; -$messages['nametoolong'] = 'Názov sady filtrov je prÃliÅ¡ dlhý'; +$messages['filterunknownerror'] = 'Neznáma chyba servera.'; +$messages['filterconnerror'] = 'Nepodarilo sa pripojiÅ¥ k serveru.'; +$messages['filterdeleteerror'] = 'Nemožno vymazaÅ¥ filter. Nastala chyba servera.'; +$messages['filterdeleted'] = 'Filter bol úspeÅ¡ne vymazaný.'; +$messages['filtersaved'] = 'Filter bol úspeÅ¡ne uložený.'; +$messages['filtersaveerror'] = 'Nemožno uložiÅ¥ filter. Nastala chyba servera.'; +$messages['filterdeleteconfirm'] = 'Naozaj chcete vymazaÅ¥ vybraný filter?'; +$messages['ruledeleteconfirm'] = 'Naozaj chcete vymazaÅ¥ vybrané pravidlo?'; +$messages['actiondeleteconfirm'] = 'Naozaj chcete vymazaÅ¥ vybranú akciu?'; +$messages['forbiddenchars'] = 'Pole obsahuje nepovolené znaky.'; +$messages['cannotbeempty'] = 'Pole nemôže byÅ¥ prázdne.'; +$messages['ruleexist'] = 'Filter so zadaným názvom už existuje.'; +$messages['setactivateerror'] = 'Nemožno aktivovaÅ¥ vybranú súpravu filtrov. Nastala chyba servera.'; +$messages['setdeactivateerror'] = 'Nemožno deaktivovaÅ¥ vybranú súpravu filtrov. Nastala chyba servera.'; +$messages['setdeleteerror'] = 'Nemožno vymazaÅ¥ vybranú súpravu filtrov. Nastala chyba servera.'; +$messages['setactivated'] = 'Súprava filtrov bola úspeÅ¡ne aktivovaná.'; +$messages['setdeactivated'] = 'Súprava filtrov bola úspeÅ¡ne deaktivovaná.'; +$messages['setdeleted'] = 'Súprava filtrov bola úspeÅ¡ne vymazaná.'; +$messages['setdeleteconfirm'] = 'Naozaj chcete vymazaÅ¥ vybranú súpravu filtrov?'; +$messages['setcreateerror'] = 'Nemožno vytvoriÅ¥ súpravu filtrov. Nastala chyba servera.'; +$messages['setcreated'] = 'Súprava filtrov bola úspeÅ¡ne vytvorená.'; +$messages['activateerror'] = 'Nemožno aktivovaÅ¥ vybraný filter (vybrané filtre). Nastala chyba servera.'; +$messages['deactivateerror'] = 'Nemožno vypnúť vybraný filter (vybrané filtre). Nastala chyba servera.'; +$messages['deactivated'] = 'Filtre boli úspeÅ¡ne vypnuté.'; +$messages['activated'] = 'Filtre boli úspeÅ¡ne zapnuté.'; +$messages['moved'] = 'Filter bol úspeÅ¡ne presunutý.'; +$messages['moveerror'] = 'Nemožno presunúť vybraný filter. Nastala chyba servera.'; +$messages['nametoolong'] = 'Názov je prÃliÅ¡ dlhý.'; $messages['namereserved'] = 'Rezervovaný názov.'; -$messages['setexist'] = 'Množina už existuje.'; -$messages['nodata'] = 'Aspoň jedna pozÃcia musà byÅ¥ zvolená.'; +$messages['setexist'] = 'Súprava už existuje.'; +$messages['nodata'] = 'Aspoň jedna pozÃcia musà byÅ¥ zvolená!'; $messages['invaliddateformat'] = 'Neplatný formát dátumu alebo Äasti dátumu'; ?> diff --git a/plugins/managesieve/localization/sl_SI.inc b/plugins/managesieve/localization/sl_SI.inc index c776a337a..2915684d3 100644 --- a/plugins/managesieve/localization/sl_SI.inc +++ b/plugins/managesieve/localization/sl_SI.inc @@ -54,6 +54,7 @@ $labels['add'] = 'Dodaj'; $labels['del'] = 'IzbriÅ¡i'; $labels['sender'] = 'PoÅ¡iljatelj'; $labels['recipient'] = 'Prejemnik'; +$labels['vacationaddr'] = 'Moji dodatni e-naslovi'; $labels['vacationdays'] = 'Kako pogosto naj bodo sporoÄila poslana (v dnevih):'; $labels['vacationinterval'] = 'SporoÄila poÅ¡lji na:'; $labels['days'] = 'dni'; @@ -158,22 +159,31 @@ $labels['index'] = 'indeks:'; $labels['indexlast'] = 'obraten vrstni red'; $messages['filterunknownerror'] = 'PriÅ¡lo je do neznane napake.'; $messages['filterconnerror'] = 'Povezave s strežnikom (managesieve) ni bilo mogoÄe vzpostaviti'; +$messages['filterdeleteerror'] = 'Pravila ni bilo mogoÄe izbrisati. PriÅ¡lo je do napake.'; $messages['filterdeleted'] = 'Pravilo je bilo uspeÅ¡no izbrisano.'; $messages['filtersaved'] = 'Pravilo je bilo uspeÅ¡no shranjeno'; +$messages['filtersaveerror'] = 'Pravila ni bilo mogoÄe shraniti. PriÅ¡lo je do napake.'; $messages['filterdeleteconfirm'] = 'Ste prepriÄani, da želite izbrisati izbrano pravilo?'; $messages['ruledeleteconfirm'] = 'Ste prepriÄani, da želite izbrisati izbrano pravilo?'; $messages['actiondeleteconfirm'] = 'Ste prepriÄani, da želite izbrisati izbrano dejanje?'; $messages['forbiddenchars'] = 'V polju so neveljavni znaki'; $messages['cannotbeempty'] = 'Polje ne sme biti prazno'; $messages['ruleexist'] = 'Filer s tem imenom že obstaja'; +$messages['setactivateerror'] = 'Izbranih filtrov ni bilo mogoÄe vkljuÄiti. PriÅ¡lo je do napake na strežniku.'; +$messages['setdeactivateerror'] = 'Izbranih filtrov ni bilo mogoÄe izkljuÄiti. PriÅ¡lo je do napake na strežniku.'; +$messages['setdeleteerror'] = 'Izbranih filtrov ni bilo mogoÄe izbrisati. PriÅ¡lo je do napake na strežniku.'; $messages['setactivated'] = 'Filter je bil uspeÅ¡no vkljuÄen.'; $messages['setdeactivated'] = 'Filter je bil uspeÅ¡no onemogoÄen.'; $messages['setdeleted'] = 'Filter je bil uspeÅ¡no izbrisan.'; $messages['setdeleteconfirm'] = 'Ste prepriÄani, da želite izbrisati ta filter?'; +$messages['setcreateerror'] = 'Nabora filtrov ni bilo mogoÄe ustvariti. PriÅ¡lo je do napake na strežniku.'; $messages['setcreated'] = 'Filter je bil uspeÅ¡no ustvarjen.'; +$messages['activateerror'] = 'Izbranega/ih filtra/ov ni bilo mogoÄe vkljuÄiti. PriÅ¡lo je do napake na strežniku.'; +$messages['deactivateerror'] = 'Izbranega/ih fitra/ov ni bilo mogoÄe izkljuÄiti. PriÅ¡lo je do napake na strežniku.'; $messages['deactivated'] = 'Filtri so bili uspeÅ¡no omogoÄeni.'; $messages['activated'] = 'Filtri so bili uspeÅ¡no onemogoÄeni.'; $messages['moved'] = 'Filter je bil uspeÅ¡no premaknjen.'; +$messages['moveerror'] = 'Izbranega filtra ni bilo mogoÄe premakniti. PriÅ¡lo je do napake na strežniku.'; $messages['nametoolong'] = 'Ime je predolgo.'; $messages['namereserved'] = 'Rezervirano ime.'; $messages['setexist'] = 'Nastavitev filtra že obstaja.'; diff --git a/plugins/managesieve/localization/sv_SE.inc b/plugins/managesieve/localization/sv_SE.inc index 5d855bd09..131d46c5f 100644 --- a/plugins/managesieve/localization/sv_SE.inc +++ b/plugins/managesieve/localization/sv_SE.inc @@ -132,8 +132,8 @@ $labels['hour'] = 'timme'; $labels['minute'] = 'minut'; $labels['second'] = 'sekund'; $labels['time'] = 'tid (hh:mm:ss)'; -$labels['iso8601'] = 'datum (ISO8601)'; -$labels['std11'] = 'datum (RFC2822)'; +$labels['iso8601'] = 'datum (ISO 8601)'; +$labels['std11'] = 'datum (RFC 2822)'; $labels['zone'] = 'tidszon'; $labels['weekday'] = 'veckodag (0-6)'; $labels['advancedopts'] = 'Avancerade inställningar'; @@ -159,23 +159,32 @@ $labels['index'] = 'index:'; $labels['indexlast'] = 'omvänd'; $messages['filterunknownerror'] = 'Okänt serverfel'; $messages['filterconnerror'] = 'Anslutning till serverns filtertjänst misslyckades'; +$messages['filterdeleteerror'] = 'Filtret kunde inte tas bort pÃ¥ grund av serverfel'; $messages['filterdeleted'] = 'Filtret är borttaget'; $messages['filtersaved'] = 'Filtret har sparats'; +$messages['filtersaveerror'] = 'Filtret kunde inte sparas pÃ¥ grund av serverfel'; $messages['filterdeleteconfirm'] = 'Vill du ta bort det markerade filtret?'; $messages['ruledeleteconfirm'] = 'Vill du ta bort filterregeln?'; $messages['actiondeleteconfirm'] = 'Vill du ta bort filterÃ¥tgärden?'; $messages['forbiddenchars'] = 'OtillÃ¥tet tecken i fältet'; $messages['cannotbeempty'] = 'Fältet kan inte lämnas tomt'; $messages['ruleexist'] = 'Ett filter med angivet namn finns redan.'; +$messages['setactivateerror'] = 'Filtergruppen kunde inte aktiveras pÃ¥ grund av serverfel'; +$messages['setdeactivateerror'] = 'Filtergruppen kunde inte deaktiveras pÃ¥ grund av serverfel'; +$messages['setdeleteerror'] = 'Filtergruppen kunde inte tas bort pÃ¥ grund av serverfel'; $messages['setactivated'] = 'Filtergruppen är aktiverad'; $messages['setdeactivated'] = 'Filtergruppen är deaktiverad'; $messages['setdeleted'] = 'Filtergruppen är borttagen'; $messages['setdeleteconfirm'] = 'Vill du ta bort filtergruppen?'; +$messages['setcreateerror'] = 'Filtergruppen kunde inte läggas till pÃ¥ grund av serverfel'; $messages['setcreated'] = 'Filtergruppen har lagts till'; +$messages['activateerror'] = 'Kunde inte aktivera filter pÃ¥ grund av serverfel.'; +$messages['deactivateerror'] = 'Kunde inte deaktivera filter pÃ¥ grund av serverfel.'; $messages['deactivated'] = 'Filter aktiverat.'; $messages['activated'] = 'Filter deaktiverat.'; $messages['moved'] = 'Filter flyttat.'; -$messages['nametoolong'] = 'Filtergruppen kan inte läggas till med för lÃ¥ngt namn'; +$messages['moveerror'] = 'Kunde inte flytta filter pÃ¥ grund av serverfel.'; +$messages['nametoolong'] = 'För lÃ¥ngt namn.'; $messages['namereserved'] = 'Reserverat namn.'; $messages['setexist'] = 'Filtergrupp finns redan.'; $messages['nodata'] = 'Minst en position mÃ¥ste väljas!'; diff --git a/plugins/managesieve/localization/tr_TR.inc b/plugins/managesieve/localization/tr_TR.inc index 98db751fc..b0b09e18a 100644 --- a/plugins/managesieve/localization/tr_TR.inc +++ b/plugins/managesieve/localization/tr_TR.inc @@ -159,22 +159,31 @@ $labels['index'] = 'indeks:'; $labels['indexlast'] = 'geriye yönelik'; $messages['filterunknownerror'] = 'Bilinmeyen sunucu hatası.'; $messages['filterconnerror'] = 'Sunucuya baÄŸlanamıyor.'; +$messages['filterdeleteerror'] = 'Filtre silinemedi. Sunucuda hata oluÅŸtu.'; $messages['filterdeleted'] = 'Filtre baÅŸarıyla silindi.'; $messages['filtersaved'] = 'Filter baÅŸarıyla kaydedildi.'; +$messages['filtersaveerror'] = 'Filtre kaydedilemedi. Sunucuda hata oluÅŸtu.'; $messages['filterdeleteconfirm'] = 'Seçilen filtreleri gerçekten silmek istiyor musun?'; $messages['ruledeleteconfirm'] = 'Seçili kuralları silmek istediÄŸinizden emin misiniz?'; $messages['actiondeleteconfirm'] = 'Seçili aksiyonları silmek istediÄŸinizden emin misiniz?'; $messages['forbiddenchars'] = 'Alanda izin verilmeyen karakterler var.'; $messages['cannotbeempty'] = 'Alan boÅŸ olmaz'; $messages['ruleexist'] = 'Belirtilen isimde bir filtre zaten var.'; +$messages['setactivateerror'] = 'Seçilen filtreler etkinleÅŸtirilemedi. Sunucuda hata oluÅŸtu.'; +$messages['setdeactivateerror'] = 'Seçilen filtreler pasifleÅŸtirilemedi. Sunucuda hata oluÅŸtu.'; +$messages['setdeleteerror'] = 'Seçilen filtreler silinemedi. Sunucuda hata oluÅŸtu.'; $messages['setactivated'] = 'Filtreler baÅŸarıyla etkinleÅŸtirilemedi.'; $messages['setdeactivated'] = 'Filtreler baÅŸarıyla pasifleÅŸtirildi.'; $messages['setdeleted'] = 'Filtre seti baÅŸarıyla silindi.'; $messages['setdeleteconfirm'] = 'Seçilen filtre setlerini silmek istediÄŸinizden emin misiniz?'; +$messages['setcreateerror'] = 'Filtre setleri oluÅŸturulamadı. Sunucuda hata oluÅŸtu.'; $messages['setcreated'] = 'Filtre setleri baÅŸarıyla oluÅŸturuldu.'; +$messages['activateerror'] = 'Seçilen filtre(ler) etkinleÅŸtirilemedi. Sunucuda hata oluÅŸtu.'; +$messages['deactivateerror'] = 'Seçilen filtre(ler) pasifleÅŸtirilemedi. Sunucuda hata oluÅŸtu.'; $messages['deactivated'] = 'Filtre(ler) baÅŸarıyla etkinleÅŸtirildi.'; $messages['activated'] = 'Filtre(ler) baÅŸarıyla iptal edildi.'; $messages['moved'] = 'Filtre baÅŸarıyla taşındı.'; +$messages['moveerror'] = 'Seçilen filtre taşınamadı. Sunucuda hata oluÅŸtu.'; $messages['nametoolong'] = 'Ä°sim çok uzun.'; $messages['namereserved'] = 'rezerve edilmiÅŸ isim.'; $messages['setexist'] = 'Set zaten var.'; diff --git a/plugins/managesieve/localization/uk_UA.inc b/plugins/managesieve/localization/uk_UA.inc index a0e7b6ad0..d85b03bf5 100644 --- a/plugins/managesieve/localization/uk_UA.inc +++ b/plugins/managesieve/localization/uk_UA.inc @@ -38,18 +38,26 @@ $labels['addrule'] = 'Додати правило'; $labels['delrule'] = 'Видалити правило'; $labels['messagemoveto'] = 'ПереÑунути Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð´Ð¾'; $labels['messageredirect'] = 'Перенаправити Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð´Ð¾'; +$labels['messagecopyto'] = 'Копіювати лиÑта до'; +$labels['messagesendcopy'] = 'ÐадÑилати копію лиÑта на'; $labels['messagereply'] = 'Ðвтовідповідач'; $labels['messagedelete'] = 'Видалити повідомленнÑ'; $labels['messagediscard'] = 'Відхилити з повідомленнÑм'; +$labels['messagekeep'] = 'Залишити лиÑÑ‚ у Вхідних'; $labels['messagesrules'] = 'Ð”Ð»Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¾Ñ— пошти'; $labels['messagesactions'] = '... виконати дію:'; $labels['add'] = 'Додати'; $labels['del'] = 'Видалити'; $labels['sender'] = 'Відправник'; $labels['recipient'] = 'Отримувач'; +$labels['vacationaddr'] = 'Додаткова адреÑа(и):'; $labels['vacationdays'] = 'Як чаÑто повторювати (у днÑÑ…):'; +$labels['days'] = 'днів'; +$labels['seconds'] = 'Ñекунд'; $labels['vacationreason'] = 'ТекÑÑ‚ повідомленнÑ:'; +$labels['vacationsubject'] = 'Тема лиÑта:'; $labels['rulestop'] = 'Зупинити перевірку правил'; +$labels['enable'] = 'Увімкнути/Вимкнуни'; $labels['filterset'] = 'Ðабір фільтрів'; $labels['filtersetadd'] = 'Додати набір фільтрів'; $labels['filtersetdel'] = 'Видалити поточний набір'; @@ -62,6 +70,62 @@ $labels['none'] = 'нічого'; $labels['fromset'] = 'з набору'; $labels['fromfile'] = 'з файлу'; $labels['filterdisabled'] = 'Фільтр вимкнено'; +$labels['countisgreaterthan'] = 'лічильник більший за'; +$labels['countisgreaterthanequal'] = 'лічильник більший або рівний '; +$labels['countislessthan'] = 'лічильник менший'; +$labels['countislessthanequal'] = 'льчильник менший або рівний'; +$labels['countequals'] = 'лічильник рівний'; +$labels['countnotequals'] = 'лічильник рівний'; +$labels['valueisgreaterthan'] = 'Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð±Ñ–Ð»ÑŒÑˆÐµ за'; +$labels['valueisgreaterthanequal'] = 'Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð±Ñ–Ð»ÑŒÑˆÐµ або рівне'; +$labels['valueislessthan'] = 'Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼ÐµÐ½ÑˆÐµ за'; +$labels['valueislessthanequal'] = 'Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼ÐµÐ½ÑˆÐµ або рівне'; +$labels['valueequals'] = 'Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€Ñ–Ð²Ð½Ðµ'; +$labels['valuenotequals'] = 'Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ рівне'; +$labels['flagdraft'] = 'Чернетка'; +$labels['setvariable'] = 'Ð’Ñтановити змінну'; +$labels['setvarname'] = 'Ðазва змінної:'; +$labels['setvarvalue'] = 'Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½Ð½Ð¾Ñ—:'; +$labels['setvarmodifiers'] = 'Модифікатори:'; +$labels['varlower'] = 'нижній регіÑÑ‚Ñ€'; +$labels['varupper'] = 'верхній регіÑÑ‚Ñ€'; +$labels['varlowerfirst'] = 'перший Ñимвол в нижньому регіÑтрі'; +$labels['varupperfirst'] = 'перший Ñимвол в верхньому регіÑтрі'; +$labels['varlength'] = 'довжина'; +$labels['notify'] = 'ÐадÑилати ÑповіщеннÑ'; +$labels['notifyaddress'] = 'Ðа електронну адреÑу:'; +$labels['notifybody'] = 'Тіло ÑповіщеннÑ:'; +$labels['notifysubject'] = 'Тема ÑповіщеннÑ:'; +$labels['notifyfrom'] = 'Відправник ÑповіщеннÑ:'; +$labels['filtercreate'] = 'Створити фільтр'; +$labels['nextstep'] = 'ÐаÑтупний крок'; +$labels['...'] = '...'; +$labels['currdate'] = 'Поточна дата'; +$labels['datetest'] = 'Дата'; +$labels['dateheader'] = 'шапка:'; +$labels['year'] = 'рік'; +$labels['month'] = 'міÑÑць'; +$labels['day'] = 'день'; +$labels['date'] = 'дата (рррр-мм-дд)'; +$labels['hour'] = 'година'; +$labels['minute'] = 'хвилина'; +$labels['second'] = 'Ñекунда'; +$labels['time'] = 'Ñ‡Ð°Ñ (гг:Ñ…Ñ…:ÑÑ)'; +$labels['iso8601'] = 'дата (ISO8601)'; +$labels['std11'] = 'дата (RFC2822)'; +$labels['zone'] = 'чаÑовий поÑÑ'; +$labels['advancedopts'] = 'Розширені параметри'; +$labels['body'] = 'Тіло'; +$labels['address'] = 'адреÑа'; +$labels['text'] = 'текÑÑ‚'; +$labels['modtype'] = 'тип:'; +$labels['allparts'] = 'вÑе'; +$labels['domain'] = 'домен'; +$labels['localpart'] = 'локальна чаÑтина'; +$labels['user'] = 'кориÑтувач'; +$labels['detail'] = 'деталь'; +$labels['default'] = 'типово'; +$labels['index'] = 'індекÑ:'; $messages['filterunknownerror'] = 'Ðевідома помилка Ñервера'; $messages['filterconnerror'] = 'Ðеможливо з\'єднатиÑÑ Ð· Ñервером'; $messages['filterdeleted'] = 'Фільтр уÑпішно видалено'; @@ -75,5 +139,6 @@ $messages['setactivated'] = 'Ðабір фільтрів активовано у $messages['setdeleted'] = 'Ðабір фільтрів видалено уÑпішно'; $messages['setdeleteconfirm'] = 'Ви впевнені, що хочете видалити обраний набір?'; $messages['setcreated'] = 'Ðабір фільтрів Ñтворено уÑпішно'; +$messages['moveerror'] = 'Ðеможливо переміÑтити обраний фільтр. Помилка Ñервера.'; $messages['nametoolong'] = 'Ðе вдалоÑÑ Ñтворити набір. Занадто довга назва'; ?> diff --git a/plugins/managesieve/localization/vi_VN.inc b/plugins/managesieve/localization/vi_VN.inc index 747d1931f..c7913813e 100644 --- a/plugins/managesieve/localization/vi_VN.inc +++ b/plugins/managesieve/localization/vi_VN.inc @@ -47,13 +47,18 @@ $labels['messagesendcopy'] = 'Gá»i bản sao chép tin nhắn tá»›i'; $labels['messagereply'] = 'Trả lá»i tin nhắn'; $labels['messagedelete'] = 'Xóa thÆ°'; $labels['messagediscard'] = 'Loại bá» vá»›i tin nhắn'; +$labels['messagekeep'] = 'Giữ thÆ° ở Há»™p thÆ° chÃnh'; $labels['messagesrules'] = 'Vá»›i thÆ° đến'; $labels['messagesactions'] = 'Thá»±c hiện các hà nh Ä‘á»™ng sau:'; $labels['add'] = 'Thêm'; $labels['del'] = 'Xoá'; $labels['sender'] = 'NgÆ°á»i gá»i'; $labels['recipient'] = 'NgÆ°á»i nháºn'; +$labels['vacationaddr'] = '(Các) Äịa chỉ email bổ sung của tôi:'; $labels['vacationdays'] = 'Số lần gá»i thÆ° (trong ngà y)'; +$labels['vacationinterval'] = 'Tần suất gá»i thÆ°:'; +$labels['days'] = 'ngà y'; +$labels['seconds'] = 'giây'; $labels['vacationreason'] = 'Ná»™i dung chÃnh'; $labels['vacationsubject'] = 'Tiêu Ä‘á» thÆ°'; $labels['rulestop'] = 'Ngừng đánh giá qui luáºt'; @@ -77,11 +82,13 @@ $labels['countisgreaterthanequal'] = 'Äếm lá»›n hÆ¡n hoặc bằng'; $labels['countislessthan'] = 'Äếm Ãt hÆ¡n'; $labels['countislessthanequal'] = 'Äếm Ãt hÆ¡n hoặc bằng'; $labels['countequals'] = 'Äếm bằng'; +$labels['countnotequals'] = 'đếm không bằng vá»›i'; $labels['valueisgreaterthan'] = 'Giá trị lá»›n hÆ¡n'; $labels['valueisgreaterthanequal'] = 'Giá trị lá»›n hÆ¡n hoặc bằng'; $labels['valueislessthan'] = 'Giá trị nhá» hÆ¡n'; $labels['valueislessthanequal'] = 'Giá trị nhá» hÆ¡n hoặc bằng'; $labels['valueequals'] = 'Giá trị bằng'; +$labels['valuenotequals'] = 'giá trị không bằng vá»›i'; $labels['setflags'] = 'Thiết láºp đánh dấu cho thÆ°'; $labels['addflags'] = 'Thêm đánh dấu cho thÆ°'; $labels['removeflags'] = 'BỠđánh dấu khá»i thÆ°'; @@ -102,6 +109,9 @@ $labels['varquotewildcard'] = 'trÃch dẫn ký tá»± đặc biệt'; $labels['varlength'] = 'Ä‘á»™ dà i'; $labels['notify'] = 'Gá»i thông báo'; $labels['notifyaddress'] = 'Gá»i đến địa chỉ email:'; +$labels['notifybody'] = 'Ná»™i dung thông báo:'; +$labels['notifysubject'] = 'Tiêu Ä‘á» thông báo:'; +$labels['notifyfrom'] = 'NgÆ°á»i gá»i thông báo:'; $labels['notifyimportance'] = 'Mức Ä‘á»™ quan trá»ng:'; $labels['notifyimportancelow'] = 'thấp'; $labels['notifyimportancenormal'] = 'vừa phải'; @@ -110,6 +120,22 @@ $labels['filtercreate'] = 'Tạo bá»™ lá»c'; $labels['usedata'] = 'Dùng dữ liệu trong bá»™ lá»c sau:'; $labels['nextstep'] = 'BÆ°á»›c tiếp theo'; $labels['...'] = '…'; +$labels['currdate'] = 'Ngà y hiện tại'; +$labels['datetest'] = 'Ngà y'; +$labels['dateheader'] = 'tiêu Ä‘á»:'; +$labels['year'] = 'năm'; +$labels['month'] = 'tháng'; +$labels['day'] = 'ngà y'; +$labels['date'] = 'ngà y (cú pháp: năm-tháng-ngà y)'; +$labels['julian'] = 'ngà y (theo kiểu Julian)'; +$labels['hour'] = 'giá»'; +$labels['minute'] = 'phút'; +$labels['second'] = 'giây'; +$labels['time'] = 'giá» (cú pháp: giá»:phút:giây)'; +$labels['iso8601'] = 'ngà y (theo chuẩn ISO 8601)'; +$labels['std11'] = 'ngà y (theo chuẩn RFC 2822)'; +$labels['zone'] = 'vùng thá»i gian'; +$labels['weekday'] = 'ngà y trog tuần (0-6)'; $labels['advancedopts'] = 'Tùy chá»n tÃnh năng cao hÆ¡n'; $labels['body'] = 'Ná»™i dung'; $labels['address'] = 'Äịa chỉ'; @@ -129,26 +155,38 @@ $labels['default'] = 'Mặc định'; $labels['octet'] = 'Khắt khe'; $labels['asciicasemap'] = 'Không phân biệt chữ hoa chữ thÆ°á»ng'; $labels['asciinumeric'] = 'Bảng mã ASCII'; +$labels['index'] = 'chỉ mục:'; +$labels['indexlast'] = 'ngược'; $messages['filterunknownerror'] = 'Không tìm được lá»—i máy chủ'; $messages['filterconnerror'] = 'Không kết nối được vá»›i máy chủ.'; +$messages['filterdeleteerror'] = 'Không thể xóa bá»™ lá»c. Xuất hiện lá»—i ở máy chủ'; $messages['filterdeleted'] = 'Xóa bá»™ lá»c thà nh công'; $messages['filtersaved'] = 'LÆ°u bá»™ lá»c thà nh công'; +$messages['filtersaveerror'] = 'Không thể lÆ°u bá»™ lá»c. Xuất hiện lá»—i ở máy chủ'; $messages['filterdeleteconfirm'] = 'Bạn có thá»±c sá»± muốn xóa bá»™ lá»c được chá»n?'; $messages['ruledeleteconfirm'] = 'Bạn có chắc chắn muốn xóa qui luáºt được chá»n?'; $messages['actiondeleteconfirm'] = 'Bạn có chắc chắn muốn xóa hà nh Ä‘á»™ng được chá»n?'; $messages['forbiddenchars'] = 'Ký tá»± bị cấm trong ô'; $messages['cannotbeempty'] = 'Ô không thể bị bá» trống'; $messages['ruleexist'] = 'Äã tồn tại bá»™ lá»c vá»›i tên cụ thế'; +$messages['setactivateerror'] = 'Không thể kÃch hoạt bá»™ lá»c được lá»±a chá»n. Xuất hiện lá»—i ở máy chủ'; +$messages['setdeactivateerror'] = 'Không thể tắt bá»™ lá»c được lá»±a chá»n. Xuất hiện lá»—i ở máy chủ'; +$messages['setdeleteerror'] = 'Không thể xóa bá»™ lá»c được lá»±a chá»n. Xuất hiện lá»—i ở máy chủ.'; $messages['setactivated'] = 'Bá»™ lá»c được khởi Ä‘á»™ng thà nh công'; $messages['setdeactivated'] = 'Ngừng kÃch hoạt bá»™ lá»c thà nh công'; $messages['setdeleted'] = 'Xóa bá»™ lá»c thà nh công'; $messages['setdeleteconfirm'] = 'Bạn có chắc bạn muốn xóa thiết láºp bá»™ lá»c được chá»n?'; +$messages['setcreateerror'] = 'Không thể tạo thiết láºp bá»™ lá»c. Có lá»—i xuất hiện ở máy chủ'; $messages['setcreated'] = 'Thiết láºp bá»™ lá»c được tạo thà nh công'; +$messages['activateerror'] = 'Không thể khởi Ä‘á»™ng (các) bá»™ lá»c được chá»n. Có lá»—i xuất hiện ở máy chủ'; +$messages['deactivateerror'] = 'Không thể tắt (các) bá»™ lá»c đã chá»n. Có lá»—i xuất hiện ở máy chủ'; $messages['deactivated'] = 'Bá»™ lá»c được khởi Ä‘á»™ng thà nh công'; $messages['activated'] = 'Bá»™ lá»c được tắt thà nh công'; $messages['moved'] = 'Bá»™ lá»c được chuyển Ä‘i thà nh công'; +$messages['moveerror'] = 'Không thể chuyển bá»™ lá»c đã chá»n. Có lá»—i xuất hiện ở máy chủ.'; $messages['nametoolong'] = 'Tên quá dà i'; $messages['namereserved'] = 'Tên đã được bảo vệ'; $messages['setexist'] = 'Thiết láºp đã tồn tại'; $messages['nodata'] = 'Ãt nhất má»™t vị trà phải được chá»n'; +$messages['invaliddateformat'] = 'Lá»—i không đúng cú pháp ngà y hoặc nháºp ngà y sai'; ?> diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js index fa13b7125..53696ecf0 100644 --- a/plugins/managesieve/managesieve.js +++ b/plugins/managesieve/managesieve.js @@ -10,18 +10,8 @@ if (window.rcmail) { else rcmail.enable_command('managesieve-create', true); } - else { - var tab = $('<span>').attr('id', 'settingstabpluginmanagesieve').addClass('tablink filter'), - button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.managesieve') - .attr('title', rcmail.gettext('managesieve.managefilters')) - .html(rcmail.gettext('managesieve.filters')) - .appendTo(tab); - - // add tab - rcmail.add_element(tab, 'tabs'); - } - if (rcmail.env.task == 'mail' || rcmail.env.action.indexOf('plugin.managesieve') != -1) { + if (rcmail.env.task == 'mail' || rcmail.env.action.startsWith('plugin.managesieve')) { // Create layer for form tips if (!rcmail.env.framed) { rcmail.env.ms_tip_layer = $('<div id="managesieve-tip" class="popupmenu"></div>'); @@ -40,7 +30,7 @@ if (window.rcmail) { rcmail.register_command('plugin.managesieve-setact', function() { rcmail.managesieve_setact() }); rcmail.register_command('plugin.managesieve-setget', function() { rcmail.managesieve_setget() }); - if (rcmail.env.action == 'plugin.managesieve' || rcmail.env.action == 'plugin.managesieve-save') { + if (rcmail.env.action.startsWith('plugin.managesieve')) { if (rcmail.gui_objects.sieveform) { rcmail.enable_command('plugin.managesieve-save', true); @@ -122,7 +112,7 @@ rcube_webmail.prototype.managesieve_del = function() var id = this.filters_list.get_single_selection(); if (confirm(this.get_label('managesieve.filterdeleteconfirm'))) { var lock = this.set_busy(true, 'loading'); - this.http_post('plugin.managesieve', + this.http_post('plugin.managesieve-action', '_act=delete&_fid='+this.filters_list.rows[id].uid, lock); } }; @@ -132,7 +122,7 @@ rcube_webmail.prototype.managesieve_act = function() var id = this.filters_list.get_single_selection(), lock = this.set_busy(true, 'loading'); - this.http_post('plugin.managesieve', + this.http_post('plugin.managesieve-action', '_act=act&_fid='+this.filters_list.rows[id].uid, lock); }; @@ -150,7 +140,7 @@ rcube_webmail.prototype.managesieve_setselect = function(list) this.show_contentframe(false); this.filters_list.clear(true); this.enable_command('plugin.managesieve-setdel', list.rowcount > 1); - this.enable_command( 'plugin.managesieve-setact', 'plugin.managesieve-setget', true); + this.enable_command('plugin.managesieve-setact', 'plugin.managesieve-setget', true); var id = list.get_single_selection(); if (id != null) @@ -161,7 +151,7 @@ rcube_webmail.prototype.managesieve_rowid = function(id) { var i, rows = this.filters_list.rows; - for (i=0; i<rows.length; i++) + for (i in rows) if (rows[i] != null && rows[i].uid == id) return i; }; @@ -179,7 +169,7 @@ rcube_webmail.prototype.managesieve_list = function(script) { var lock = this.set_busy(true, 'loading'); - this.http_post('plugin.managesieve', '_act=list&_set='+urlencode(script), lock); + this.http_post('plugin.managesieve-action', '_act=list&_set='+urlencode(script), lock); }; // Script download request @@ -188,7 +178,7 @@ rcube_webmail.prototype.managesieve_setget = function() var id = this.filtersets_list.get_single_selection(), script = this.env.filtersets[id]; - location.href = this.env.comm_path+'&_action=plugin.managesieve&_act=setget&_set='+urlencode(script); + location.href = this.env.comm_path+'&_action=plugin.managesieve-action&_act=setget&_set='+urlencode(script); }; // Set activate/deactivate request @@ -199,7 +189,7 @@ rcube_webmail.prototype.managesieve_setact = function() script = this.env.filtersets[id], action = $('#rcmrow'+id).hasClass('disabled') ? 'setact' : 'deact'; - this.http_post('plugin.managesieve', '_act='+action+'&_set='+urlencode(script), lock); + this.http_post('plugin.managesieve-action', '_act='+action+'&_set='+urlencode(script), lock); }; // Set delete request @@ -212,7 +202,7 @@ rcube_webmail.prototype.managesieve_setdel = function() lock = this.set_busy(true, 'loading'), script = this.env.filtersets[id]; - this.http_post('plugin.managesieve', '_act=setdel&_set='+urlencode(script), lock); + this.http_post('plugin.managesieve-action', '_act=setdel&_set='+urlencode(script), lock); }; // Set add request @@ -224,7 +214,7 @@ rcube_webmail.prototype.managesieve_setadd = function() if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) { var lock = this.set_busy(true, 'loading'); target = window.frames[this.env.contentframe]; - target.location.href = this.env.comm_path+'&_action=plugin.managesieve&_framed=1&_newset=1&_unlock='+lock; + target.location.href = this.env.comm_path+'&_action=plugin.managesieve-action&_framed=1&_newset=1&_unlock='+lock; } }; @@ -384,7 +374,7 @@ rcube_webmail.prototype.load_managesieveframe = function(id) if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) { target = window.frames[this.env.contentframe]; var msgid = this.set_busy(true, 'loading'); - target.location.href = this.env.comm_path+'&_action=plugin.managesieve&_framed=1' + target.location.href = this.env.comm_path+'&_action=plugin.managesieve-action&_framed=1' +(has_id ? '&_fid='+id : '')+'&_unlock='+msgid; } }; @@ -405,7 +395,7 @@ rcube_webmail.prototype.managesieve_dragend = function(e) var lock = this.set_busy(true, 'loading'); this.show_contentframe(false); - this.http_post('plugin.managesieve', '_act=move&_fid='+this.drag_filter + this.http_post('plugin.managesieve-action', '_act=move&_fid='+this.drag_filter +'&_to='+this.drag_filter_target, lock); } this.drag_active = false; @@ -458,7 +448,7 @@ rcube_webmail.prototype.managesieve_save = function() // Operations on filters form rcube_webmail.prototype.managesieve_ruleadd = function(id) { - this.http_post('plugin.managesieve', '_act=ruleadd&_rid='+id); + this.http_post('plugin.managesieve-action', '_act=ruleadd&_rid='+id); }; rcube_webmail.prototype.managesieve_rulefill = function(content, id, after) @@ -497,7 +487,7 @@ rcube_webmail.prototype.managesieve_ruledel = function(id) rcube_webmail.prototype.managesieve_actionadd = function(id) { - this.http_post('plugin.managesieve', '_act=actionadd&_aid='+id); + this.http_post('plugin.managesieve-action', '_act=actionadd&_aid='+id); }; rcube_webmail.prototype.managesieve_actionfill = function(content, id, after) @@ -512,6 +502,11 @@ rcube_webmail.prototype.managesieve_actionfill = function(content, id, after) row.setAttribute('id', 'actionrow'+id); row.innerHTML = content; + // initialize smart list inputs + $('textarea[data-type="list"]', row).each(function() { + smart_field_init(this); + }); + this.managesieve_formbuttons(div); } }; diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index 6970193c2..7a7faee4c 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -41,9 +41,11 @@ class managesieve extends rcube_plugin // register actions $this->register_action('plugin.managesieve', array($this, 'managesieve_actions')); + $this->register_action('plugin.managesieve-action', array($this, 'managesieve_actions')); $this->register_action('plugin.managesieve-save', array($this, 'managesieve_save')); if ($this->rc->task == 'settings') { + $this->add_hook('settings_actions', array($this, 'settings_actions')); $this->init_ui(); } else if ($this->rc->task == 'mail') { @@ -74,6 +76,16 @@ class managesieve extends rcube_plugin } /** + * Adds Filters section in Settings + */ + function settings_actions($args) + { + // register as settings action + $args['actions'][] = array('action' => 'plugin.managesieve', 'class' => 'filter', 'label' => 'filters', 'domain' => 'managesieve'); + return $args; + } + + /** * Add UI elements to the 'mailbox view' and 'show message' UI. */ function mail_task_handler() diff --git a/plugins/managesieve/skins/classic/managesieve_mail.css b/plugins/managesieve/skins/classic/managesieve_mail.css index 87a11cc92..1ade4f790 100644 --- a/plugins/managesieve/skins/classic/managesieve_mail.css +++ b/plugins/managesieve/skins/classic/managesieve_mail.css @@ -1,6 +1,6 @@ #messagemenu li a.filterlink { background-image: url(images/filter.png); - background-position: 7px 0; + background-position: 7px 1px; } #sievefilterform { diff --git a/plugins/managesieve/skins/classic/templates/managesieve.html b/plugins/managesieve/skins/classic/templates/managesieve.html index 869e3ac36..3d84466d8 100644 --- a/plugins/managesieve/skins/classic/templates/managesieve.html +++ b/plugins/managesieve/skins/classic/templates/managesieve.html @@ -64,7 +64,6 @@ </div> </div> -</div> <div id="filtersetmenu" class="popupmenu"> <ul> diff --git a/plugins/managesieve/skins/larry/managesieve_mail.css b/plugins/managesieve/skins/larry/managesieve_mail.css index ea417bdb7..855aa8e7d 100644 --- a/plugins/managesieve/skins/larry/managesieve_mail.css +++ b/plugins/managesieve/skins/larry/managesieve_mail.css @@ -1,5 +1,5 @@ ul.toolbarmenu li span.filterlink { - background-position: 0 -1924px; + background-position: 0 -2174px; } #sievefilterform { diff --git a/plugins/managesieve/skins/larry/templates/managesieve.html b/plugins/managesieve/skins/larry/templates/managesieve.html index 25bbbaf69..6ef3b2d91 100644 --- a/plugins/managesieve/skins/larry/templates/managesieve.html +++ b/plugins/managesieve/skins/larry/templates/managesieve.html @@ -14,14 +14,13 @@ <roundcube:include file="/includes/settingstabs.html" /> <div id="settings-right"> - <div id="filtersetslistbox" class="uibox listbox"> <h2 class="boxtitle"><roundcube:label name="managesieve.filtersets" /></h2> <div class="scroller withfooter"> <roundcube:object name="filtersetslist" id="filtersetslist" class="listing" cellspacing="0" summary="Filters list" type="list" noheader="true" /> </div> <div class="boxfooter"> - <roundcube:button command="plugin.managesieve-setadd" type="link" title="managesieve.filtersetadd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtersetmenulink" id="filtersetmenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="UI.show_popup('filtersetmenu');return false" innerClass="inner" content="⚙" /> + <roundcube:button command="plugin.managesieve-setadd" type="link" title="managesieve.filtersetadd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtersetmenulink" id="filtersetmenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="UI.show_popup('filtersetmenu');return false" innerClass="inner" content="⚙" /> </div> </div> @@ -32,7 +31,7 @@ <roundcube:object name="filterslist" id="filterslist" class="listing" cellspacing="0" summary="Filters list" noheader="true" /> </div> <div class="boxfooter"> - <roundcube:button command="plugin.managesieve-add" type="link" title="managesieve.filteradd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtermenulink" id="filtermenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="UI.show_popup('filtermenu');return false" innerClass="inner" content="⚙" /> + <roundcube:button command="plugin.managesieve-add" type="link" title="managesieve.filteradd" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="filtermenulink" id="filtermenulink" type="link" title="moreactions" class="listbutton groupactions" onclick="UI.show_popup('filtermenu');return false" innerClass="inner" content="⚙" /> </div> </div> @@ -40,10 +39,11 @@ <div class="iframebox"> <roundcube:object name="filterframe" id="filter-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" /> </div> - <roundcube:object name="message" id="message" class="statusbar" /> </div> </div> +</div> +</div> <div id="filtersetmenu" class="popupmenu"> <ul class="toolbarmenu"> diff --git a/plugins/markasjunk/localization/ber.inc b/plugins/markasjunk/localization/ber.inc deleted file mode 100644 index 046e45733..000000000 --- a/plugins/markasjunk/localization/ber.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | localization//labels.inc | - | | - | Language file of the Roundcube Webmail client | - | Copyright (C) 2012, The Roundcube Dev Team | - | Licensed under the GNU General Public License | - | | - +-----------------------------------------------------------------------+ - | Author: FULL NAME <EMAIL@ADDRESS> | - +-----------------------------------------------------------------------+ -*/ - - diff --git a/plugins/markasjunk/localization/ca_ES.inc b/plugins/markasjunk/localization/ca_ES.inc index 18fef58a8..1a77aaff2 100644 --- a/plugins/markasjunk/localization/ca_ES.inc +++ b/plugins/markasjunk/localization/ca_ES.inc @@ -16,6 +16,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ */ $labels['buttontext'] = 'Correu brossa'; -$labels['buttontitle'] = 'Marca com a Spam'; -$labels['reportedasjunk'] = 'S\'ha reportat correctament com a Spam'; +$labels['buttontitle'] = 'Marca com a correu brossa'; +$labels['reportedasjunk'] = 'S\'ha reportat correctament com a correu brossa'; ?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/en_CA.inc b/plugins/markasjunk/localization/en_CA.inc new file mode 100644 index 000000000..92c041948 --- /dev/null +++ b/plugins/markasjunk/localization/en_CA.inc @@ -0,0 +1,21 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/markasjunk/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Mark-As-Junk plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ +*/ +$labels['buttontext'] = 'Junk'; +$labels['buttontitle'] = 'Mark as Junk'; +$labels['reportedasjunk'] = 'Successfully reported as Junk'; +?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/es_419.inc b/plugins/markasjunk/localization/es_419.inc new file mode 100644 index 000000000..e9bc14bc4 --- /dev/null +++ b/plugins/markasjunk/localization/es_419.inc @@ -0,0 +1,21 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/markasjunk/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Mark-As-Junk plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ +*/ +$labels['buttontext'] = 'Basura'; +$labels['buttontitle'] = 'Marcar como basura'; +$labels['reportedasjunk'] = 'Reportado como basura exitosamente'; +?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/fo_FO.inc b/plugins/markasjunk/localization/fo_FO.inc new file mode 100644 index 000000000..0ef6a761c --- /dev/null +++ b/plugins/markasjunk/localization/fo_FO.inc @@ -0,0 +1,21 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/markasjunk/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Mark-As-Junk plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ +*/ +$labels['buttontext'] = 'Møsn'; +$labels['buttontitle'] = 'Merk sum møsn'; +$labels['reportedasjunk'] = 'Melda sum møsn.'; +?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/hr_HR.inc b/plugins/markasjunk/localization/hr_HR.inc index 86c72b898..6e69889bf 100644 --- a/plugins/markasjunk/localization/hr_HR.inc +++ b/plugins/markasjunk/localization/hr_HR.inc @@ -15,6 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ */ +$labels['buttontext'] = 'Smeće (spam)'; $labels['buttontitle'] = 'OznaÄi kao smeće (spam)'; $labels['reportedasjunk'] = 'UspjeÅ¡no prijavljeno kao smeće (spam)'; ?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/km_KH.inc b/plugins/markasjunk/localization/km_KH.inc index ca4ceed66..92ba883c6 100644 --- a/plugins/markasjunk/localization/km_KH.inc +++ b/plugins/markasjunk/localization/km_KH.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ */ -$labels['buttontext'] = 'សំបុážáŸ’រមិនល្អ'; -$labels['buttontitle'] = 'ចាážáŸ‹áž‡áž¶ សំបុážáŸ’រមិនល្អ'; -$labels['reportedasjunk'] = 'រាយការណáŸážáž¶áž‡áž¶ សំបុážáŸ’រមិនល្អ បានសំរáŸáž…'; +$labels['buttontext'] = 'សារ​ឥážâ€‹áž”ានការ'; +$labels['buttontitle'] = 'សម្គាល់​ជា​សារ​ឥážâ€‹áž”ានការ'; +$labels['reportedasjunk'] = 'បាន​រាយការណáŸâ€‹áž‡áž¶â€‹ážŸáž¶ážšâ€‹áž¥ážâ€‹áž”ាន​ការ​ដោយ​ជោគជáŸáž™'; ?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/sk_SK.inc b/plugins/markasjunk/localization/sk_SK.inc index 101b57ab7..25afe6cf2 100644 --- a/plugins/markasjunk/localization/sk_SK.inc +++ b/plugins/markasjunk/localization/sk_SK.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ */ -$labels['buttontext'] = 'Spam'; -$labels['buttontitle'] = 'OznaÄiÅ¥ ako Spam'; -$labels['reportedasjunk'] = 'ÚspeÅ¡ne nahlásené ako Spam'; +$labels['buttontext'] = 'Nevyžiadaná poÅ¡ta'; +$labels['buttontitle'] = 'OznaÄiÅ¥ ako nevyžiadané'; +$labels['reportedasjunk'] = 'ÚspeÅ¡ne nahlásené ako nevyžiadaná poÅ¡ta'; ?>
\ No newline at end of file diff --git a/plugins/markasjunk/localization/uk_UA.inc b/plugins/markasjunk/localization/uk_UA.inc index 34e627f1f..945a5e2b0 100644 --- a/plugins/markasjunk/localization/uk_UA.inc +++ b/plugins/markasjunk/localization/uk_UA.inc @@ -15,6 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ */ +$labels['buttontext'] = 'Спам'; $labels['buttontitle'] = 'ПереміÑтити в "Спам'; $labels['reportedasjunk'] = 'Переміщено до "Спаму'; ?>
\ No newline at end of file diff --git a/plugins/new_user_dialog/localization/en_CA.inc b/plugins/new_user_dialog/localization/en_CA.inc new file mode 100644 index 000000000..4b4e48b30 --- /dev/null +++ b/plugins/new_user_dialog/localization/en_CA.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/new_user_dialog/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail New User Dialog plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/ +*/ +$labels['identitydialogtitle'] = 'Please complete your sender identity'; +$labels['identitydialoghint'] = 'This box only appears once at the first login.'; +?>
\ No newline at end of file diff --git a/plugins/new_user_dialog/localization/es_419.inc b/plugins/new_user_dialog/localization/es_419.inc new file mode 100644 index 000000000..145c5d5ca --- /dev/null +++ b/plugins/new_user_dialog/localization/es_419.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/new_user_dialog/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail New User Dialog plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/ +*/ +$labels['identitydialogtitle'] = 'Por favor completa tu información de remitente'; +$labels['identitydialoghint'] = 'Esta sección solo aparece un vez en el primer login.'; +?>
\ No newline at end of file diff --git a/plugins/new_user_dialog/localization/fo_FO.inc b/plugins/new_user_dialog/localization/fo_FO.inc new file mode 100644 index 000000000..5a7a8d444 --- /dev/null +++ b/plugins/new_user_dialog/localization/fo_FO.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/new_user_dialog/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail New User Dialog plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/ +*/ +$labels['identitydialogtitle'] = 'Vinarliga fill út tÃn sendara samleika'; +$labels['identitydialoghint'] = 'Hesin kassin sæðst einans á fyrstu innriting.'; +?>
\ No newline at end of file diff --git a/plugins/new_user_dialog/localization/gl_ES.inc b/plugins/new_user_dialog/localization/gl_ES.inc index 83c73b90d..859855ea2 100644 --- a/plugins/new_user_dialog/localization/gl_ES.inc +++ b/plugins/new_user_dialog/localization/gl_ES.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/ */ -$labels['identitydialogtitle'] = 'Por favor, complete os seus datos persoais'; -$labels['identitydialoghint'] = 'Este diálogo só aparecerá a primera vez que se conecte ao correo.'; +$labels['identitydialogtitle'] = 'Por favor, completa os teus datos persoais'; +$labels['identitydialoghint'] = 'Este diálogo só aparecerá a primera vez que te conectes ao correo.'; ?>
\ No newline at end of file diff --git a/plugins/new_user_dialog/localization/km_KH.inc b/plugins/new_user_dialog/localization/km_KH.inc index cbb87713e..f7e7ffb27 100644 --- a/plugins/new_user_dialog/localization/km_KH.inc +++ b/plugins/new_user_dialog/localization/km_KH.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/ */ -$labels['identitydialogtitle'] = 'សូមបំពáŸáž‰áž¢áŸ’ážážŸáž‰áŸ’ញាណអ្នកផ្ញើ'; -$labels['identitydialoghint'] = 'ប្រអប់នáŸáŸ‡áž”ង្ហាញážáŸ‚ម្ážáž„ទ០ពáŸáž›áž…ូលលើកទីមួយ'; +$labels['identitydialogtitle'] = 'សូម​បំពáŸáž‰â€‹áž¢ážáŸ’ážážŸáž‰áŸ’ញាណ​របស់​អ្នក​ផ្ញើ​របស់​អ្នក'; +$labels['identitydialoghint'] = 'ប្រអប់​នáŸáŸ‡â€‹áž”ង្ហាញ​ážáŸ‚​ម្ដង​នៅ​ពáŸáž›â€‹áž…ូល​​ដំបូង​ប៉ុណ្ណោះ។'; ?>
\ No newline at end of file diff --git a/plugins/new_user_dialog/localization/sk_SK.inc b/plugins/new_user_dialog/localization/sk_SK.inc index 236c1d893..32feebc00 100644 --- a/plugins/new_user_dialog/localization/sk_SK.inc +++ b/plugins/new_user_dialog/localization/sk_SK.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/ */ -$labels['identitydialogtitle'] = 'Doplňte prosÃm VaÅ¡u identifikáciu odosielateľa'; -$labels['identitydialoghint'] = 'Toto okno sa objavà len pri prvom prihlásenÃ.'; +$labels['identitydialogtitle'] = 'Doplňte prosÃm svoju identifikáciu odosielateľa'; +$labels['identitydialoghint'] = 'Toto okno sa zobrazà len raz, pri prvom prihlásenÃ.'; ?>
\ No newline at end of file diff --git a/plugins/newmail_notifier/localization/az_AZ.inc b/plugins/newmail_notifier/localization/az_AZ.inc index 94283f9dc..355c30f0a 100644 --- a/plugins/newmail_notifier/localization/az_AZ.inc +++ b/plugins/newmail_notifier/localization/az_AZ.inc @@ -24,4 +24,5 @@ $labels['body'] = 'SizÉ™ mÉ™ktub gÉ™ldi'; $labels['testbody'] = 'Bu sınaq bildiriÅŸidir'; $labels['desktopdisabled'] = 'Sizin brauzerdÉ™ iÅŸ masasında bildiriÅŸ söndürülüb'; $labels['desktopunsupported'] = 'Sizin brauzer iÅŸ masasında bildiriÅŸ funksiyasını dÉ™stÉ™klÉ™mir'; +$labels['desktoptimeout'] = 'Masaüstü bildiriÅŸi baÄŸla'; ?> diff --git a/plugins/newmail_notifier/localization/ca_ES.inc b/plugins/newmail_notifier/localization/ca_ES.inc index bb510ae26..37359de61 100644 --- a/plugins/newmail_notifier/localization/ca_ES.inc +++ b/plugins/newmail_notifier/localization/ca_ES.inc @@ -18,10 +18,11 @@ $labels['basic'] = 'Mostra notificacions del navegador quan hi hagi un missatge nou'; $labels['desktop'] = 'Mostra notificacions de l\'escriptori quan hi hagi un missatge nou'; $labels['sound'] = 'Reprodueix el so quan hi hagi un missatge nou'; -$labels['test'] = 'Comprova'; +$labels['test'] = 'Prova'; $labels['title'] = 'Missatge nou!'; $labels['body'] = 'Heu rebut un missatge nou.'; $labels['testbody'] = 'Això és una notificació de prova.'; $labels['desktopdisabled'] = 'Les notificacions d\'escriptori estan deshabilitades al vostre navegador.'; $labels['desktopunsupported'] = 'El vostre navegador no permet les notificacions d\'escriptori.'; +$labels['desktoptimeout'] = 'Tanca la notificació de l\'escriptori'; ?> diff --git a/plugins/newmail_notifier/localization/da_DK.inc b/plugins/newmail_notifier/localization/da_DK.inc index 26e4e6a7b..356076f71 100644 --- a/plugins/newmail_notifier/localization/da_DK.inc +++ b/plugins/newmail_notifier/localization/da_DK.inc @@ -24,4 +24,5 @@ $labels['body'] = 'Du har modtaget en ny besked.'; $labels['testbody'] = 'Dette er en test meddelelse.'; $labels['desktopdisabled'] = 'Skrivebordsbeskeder er deaktiveret i din browser.'; $labels['desktopunsupported'] = 'Din browser understøtter ikke skrivebordsbeskeder.'; +$labels['desktoptimeout'] = 'Luk skrivebordsbesked'; ?> diff --git a/plugins/newmail_notifier/localization/el_GR.inc b/plugins/newmail_notifier/localization/el_GR.inc index 5f41bc974..ea4339e90 100644 --- a/plugins/newmail_notifier/localization/el_GR.inc +++ b/plugins/newmail_notifier/localization/el_GR.inc @@ -24,4 +24,5 @@ $labels['body'] = 'Έχετε λάβει Îνα νÎο μήνυμα.'; $labels['testbody'] = 'Αυτή είναι μια δοκιμή ειδοποίησης.'; $labels['desktopdisabled'] = 'Οι κοινοποιήσεις Desktop ειναι απενεÏγοποιημÎνη στον πεÏιηγητή σας.'; $labels['desktopunsupported'] = 'Ο πεÏιηγητής σας δεν υποστηÏίζει ειδοποιήσεις στην επιφάνεια εÏγασίας.'; +$labels['desktoptimeout'] = 'Κλείσιμο ειδοποίησης επιφάνειας εÏγασίας'; ?> diff --git a/plugins/newmail_notifier/localization/en_CA.inc b/plugins/newmail_notifier/localization/en_CA.inc new file mode 100644 index 000000000..ce3b5b0b3 --- /dev/null +++ b/plugins/newmail_notifier/localization/en_CA.inc @@ -0,0 +1,28 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/newmail_notifier/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail New Mail Notifier plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/ +*/ +$labels['basic'] = 'Display browser notifications on new message'; +$labels['desktop'] = 'Display desktop notifications on new message'; +$labels['sound'] = 'Play the sound on new message'; +$labels['test'] = 'Test'; +$labels['title'] = 'New Email!'; +$labels['body'] = 'You\'ve received a new message.'; +$labels['testbody'] = 'This is a test notification.'; +$labels['desktopdisabled'] = 'Desktop notifications are disabled in your browser.'; +$labels['desktopunsupported'] = 'Your browser does not support desktop notifications.'; +$labels['desktoptimeout'] = 'Close desktop notification'; +?> diff --git a/plugins/newmail_notifier/localization/en_GB.inc b/plugins/newmail_notifier/localization/en_GB.inc index 3ac79e594..20160c71c 100644 --- a/plugins/newmail_notifier/localization/en_GB.inc +++ b/plugins/newmail_notifier/localization/en_GB.inc @@ -24,4 +24,5 @@ $labels['body'] = 'You\'ve received a new message.'; $labels['testbody'] = 'This is a test notification.'; $labels['desktopdisabled'] = 'Desktop notifications are disabled in your browser.'; $labels['desktopunsupported'] = 'Your browser does not support desktop notifications.'; +$labels['desktoptimeout'] = 'Close desktop notification'; ?> diff --git a/plugins/newmail_notifier/localization/eu_ES.inc b/plugins/newmail_notifier/localization/eu_ES.inc index 7d7d90408..3aa465712 100644 --- a/plugins/newmail_notifier/localization/eu_ES.inc +++ b/plugins/newmail_notifier/localization/eu_ES.inc @@ -24,4 +24,5 @@ $labels['body'] = 'Mezu berria jaso duzu'; $labels['testbody'] = 'Hau jakinarazpen proba bat da'; $labels['desktopdisabled'] = 'Sistemaren jakinarazpenak ezgaituak daude zure nabigatzailean'; $labels['desktopunsupported'] = 'Zure nabigatzaileak ez ditu sistemaren jakinarazpenak onartzen.'; +$labels['desktoptimeout'] = 'Itxi mahaigaineko jakinarazpena'; ?> diff --git a/plugins/newmail_notifier/localization/fa_IR.inc b/plugins/newmail_notifier/localization/fa_IR.inc index af58aeed2..2c7980640 100644 --- a/plugins/newmail_notifier/localization/fa_IR.inc +++ b/plugins/newmail_notifier/localization/fa_IR.inc @@ -24,4 +24,5 @@ $labels['body'] = 'شما یک پیغام جدید دریاÙت Ú©Ø±Ø¯Ù‡â€ŒØ§ÛŒØ $labels['testbody'] = 'این یک تذکر آزمایشی است.'; $labels['desktopdisabled'] = 'تذکرهای رومیزی در مرورگر شما غیرÙعال شده‌اند.'; $labels['desktopunsupported'] = 'مرورگر شما تذکرهای رومیزی را پشتیبانی نمی‌کند.'; +$labels['desktoptimeout'] = 'بستن تذکر دسکتاپ'; ?> diff --git a/plugins/newmail_notifier/localization/fo_FO.inc b/plugins/newmail_notifier/localization/fo_FO.inc new file mode 100644 index 000000000..a4197e929 --- /dev/null +++ b/plugins/newmail_notifier/localization/fo_FO.inc @@ -0,0 +1,28 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/newmail_notifier/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail New Mail Notifier plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/ +*/ +$labels['basic'] = 'VÃs kaga kunngerðir tá ið nýtt boð verður stovna'; +$labels['desktop'] = 'VÃs skrivaraborð kunngerðir tá ið nýtt boð er stovna'; +$labels['sound'] = 'Spæl ljóð tá ið nýtt boð verður móttikið'; +$labels['test'] = 'Roynd'; +$labels['title'] = 'Nýggjur teldupostur!'; +$labels['body'] = 'Tú hevur móttikið eini boð.'; +$labels['testbody'] = 'Hettar eru eini royndar boð.'; +$labels['desktopdisabled'] = 'Skrivaraborð kunngerðir eru sløktar à tÃnum kaga.'; +$labels['desktopunsupported'] = 'TÃn kagi studlar ikki skriviborða kunngerðir.'; +$labels['desktoptimeout'] = 'Sløkk skriviborða kunngerðir'; +?> diff --git a/plugins/newmail_notifier/localization/gl_ES.inc b/plugins/newmail_notifier/localization/gl_ES.inc index 1dae35297..154a8cbb9 100644 --- a/plugins/newmail_notifier/localization/gl_ES.inc +++ b/plugins/newmail_notifier/localization/gl_ES.inc @@ -17,11 +17,12 @@ */ $labels['basic'] = 'Amosar notificacións no navegador cando entre unha mensaxe nova'; $labels['desktop'] = 'Amosar notificacións no escritorio cando chegue unha mensaxe nova'; -$labels['sound'] = 'Tocar un son cando chegue unha mensaxe nova'; +$labels['sound'] = 'Reproducir un son cando chegue unha nova mensaxe'; $labels['test'] = 'Proba'; $labels['title'] = 'Novo Correo!'; -$labels['body'] = 'Recibiu unha mensaxe nova'; +$labels['body'] = 'Recibiches unha nova mensaxe'; $labels['testbody'] = 'Esta é unha notificación de proba'; -$labels['desktopdisabled'] = 'As notificacións de escritorio están desactivadas no seu navegador'; +$labels['desktopdisabled'] = 'As notificacións de escritorio están desactivadas no teu navegador'; $labels['desktopunsupported'] = 'O teu navegador non soporta notificacións de escritorio.'; +$labels['desktoptimeout'] = 'Pechar notificación de escritorio'; ?> diff --git a/plugins/newmail_notifier/localization/he_IL.inc b/plugins/newmail_notifier/localization/he_IL.inc index 9002d7c6d..33afdb954 100644 --- a/plugins/newmail_notifier/localization/he_IL.inc +++ b/plugins/newmail_notifier/localization/he_IL.inc @@ -24,4 +24,5 @@ $labels['body'] = 'התקבלה הודעה חדשה'; $labels['testbody'] = '×–×” ×יתות ×œ× ×¡×™×•×Ÿ'; $labels['desktopdisabled'] = '××™×ª×•×ª×™× ×ž×©×•×œ×—×Ÿ העבודה ××™× × ×¤×¢×™×œ×™× ×‘×“×¤×“×¤×Ÿ שלך'; $labels['desktopunsupported'] = 'הדפדפן שלך ××™× ×• תומך ב××™×ª×•×ª×™× ×ž×©×•×œ×—×Ÿ העבודה'; +$labels['desktoptimeout'] = 'ביטול ×יתות משולחן העבודה על הגעת הודעות חדשות'; ?> diff --git a/plugins/newmail_notifier/localization/hr_HR.inc b/plugins/newmail_notifier/localization/hr_HR.inc index 3ee6cff3b..919ed0dd7 100644 --- a/plugins/newmail_notifier/localization/hr_HR.inc +++ b/plugins/newmail_notifier/localization/hr_HR.inc @@ -24,4 +24,5 @@ $labels['body'] = 'Primili ste novu poruku'; $labels['testbody'] = 'Ovo je probna dojava.'; $labels['desktopdisabled'] = 'Dojave na desktopu su onemogućene u vaÅ¡em pregledniku.'; $labels['desktopunsupported'] = 'VaÅ¡ preglednik ne podržava dojave na desktopu.'; +$labels['desktoptimeout'] = 'Zatvori dojavu na desktopu'; ?> diff --git a/plugins/newmail_notifier/localization/hy_AM.inc b/plugins/newmail_notifier/localization/hy_AM.inc index 23fdbed65..db63f4f6e 100644 --- a/plugins/newmail_notifier/localization/hy_AM.inc +++ b/plugins/newmail_notifier/localization/hy_AM.inc @@ -24,4 +24,5 @@ $labels['body'] = 'Ô´Õ¸Ö‚Ö„ Õ½Õ¿Õ¡ÖÕ¡Ö„ Õ¶Õ¸Ö€ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ $labels['testbody'] = 'ÕÕ¡ ÖƒÕ¸Ö€Õ±Õ¶Õ¡Õ¯Õ¡Õ¶ Õ®Õ¡Õ¶Õ¸Ö‚ÖÕ¸Ö‚Õ´ Õ§'; $labels['desktopdisabled'] = 'ÕÕ¥Õ²Õ¡Õ¶Õ¡Õ¤Ö€Õ« Õ®Õ¡Õ¶Õ¸Ö‚ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨ ÕÕ¥Ö€ Õ¦Õ¶Õ¶Õ¡Ö€Õ¯Õ¹Õ¸Ö‚Õ´ Õ¡Õ¶Õ»Õ¡Õ¿Õ¾Õ¡Õ® Õ¥Õ¶'; $labels['desktopunsupported'] = 'ÕÕ¥Ö€ Õ¦Õ¶Õ¶Õ¡Ö€Õ¯Õ«Õ¹Õ¨ Õ¹Õ¸Ö‚Õ¶Õ« Õ½Õ¥Õ²Õ¡Õ¶Õ¡Õ¤Ö€Õ« Õ®Õ¡Õ¶Õ¸Ö‚ÖÕ¸Ö‚Õ´Õ¶Õ¥Ö€Õ« Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Ö‰'; +$labels['desktoptimeout'] = 'Õ“Õ¡Õ¯Õ¥Õ¬ Õ½Õ¥Õ²Õ¡Õ¶Õ¡Õ¤Ö€Õ« Õ®Õ¡Õ¶Õ¸Ö‚ÖÕ¸Ö‚Õ´Õ¨'; ?> diff --git a/plugins/newmail_notifier/localization/km_KH.inc b/plugins/newmail_notifier/localization/km_KH.inc index fdad4b302..5fd24403f 100644 --- a/plugins/newmail_notifier/localization/km_KH.inc +++ b/plugins/newmail_notifier/localization/km_KH.inc @@ -15,9 +15,14 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/ */ -$labels['sound'] = 'បន្លឹសម្កáŸáž„áž–áŸáž›áž˜áž¶áž“សារážáŸ’មី'; +$labels['basic'] = 'បង្ហាញ​ការ​ជូនដំណឹង​កម្មវិធី​អ៊ីនធឺណិážâ€‹áž–áŸáž›â€‹áž˜áž¶áž“​សារ​ážáŸ’មី'; +$labels['desktop'] = 'បង្ហាញ​ការ​ជូនដំណឹង​ផ្ទៃážáž»â€‹áž–áŸáž›â€‹áž˜áž¶áž“​សារ​ážáŸ’មី'; +$labels['sound'] = 'បន្លឺ​សំឡáŸáž„​ពáŸáž›â€‹áž˜áž¶áž“​សារ​ážáŸ’មី'; $labels['test'] = 'សាកល្បង'; -$labels['title'] = 'មានសារážáŸ’មី'; -$labels['body'] = 'អ្នកបានទទួលសារážáŸ’មី'; -$labels['testbody'] = 'áž“áŸáŸ‡áž‡áž¶áž€áž¶ážšážŸáž¶áž€áŸ’បងដំណឹង'; +$labels['title'] = 'មាន​សារ​ážáŸ’មី!'; +$labels['body'] = 'អ្នក​បាន​ទទួល​សារ​ážáŸ’មី'; +$labels['testbody'] = 'áž“áŸáŸ‡â€‹áž‡áž¶â€‹áž€áž¶ážšâ€‹áž‡áž¼áž“ដំណឹង​សាកល្បង។'; +$labels['desktopdisabled'] = 'ការ​ជូនដំណឹង​ផ្ទៃážáž»â€‹ážáŸ’រូវ​បាន​បិទ​នៅ​ក្នុង​កម្មវិធី​អ៊ីនធឺណិážâ€‹ážšáž”ស់​អ្នក។'; +$labels['desktopunsupported'] = 'កម្មវិធី​អ៊ីនធឺណិážâ€‹ážšáž”ស់​អ្នក​មិន​គាំទ្រ​ការ​ជូនដំណឹង​ផ្ទៃážáž»áŸ”'; +$labels['desktoptimeout'] = 'បិទ​ការ​ជូនដំណឹង​ផ្ទៃážáž»'; ?> diff --git a/plugins/newmail_notifier/localization/lt_LT.inc b/plugins/newmail_notifier/localization/lt_LT.inc index 6db304f90..e97a6cfea 100644 --- a/plugins/newmail_notifier/localization/lt_LT.inc +++ b/plugins/newmail_notifier/localization/lt_LT.inc @@ -24,4 +24,5 @@ $labels['body'] = 'JÅ«s gavote naujÄ… laiÅ¡kÄ….'; $labels['testbody'] = 'Tai – bandomasis praneÅ¡imas.'; $labels['desktopdisabled'] = 'JÅ«sų narÅ¡yklÄ—je sistemos praneÅ¡imai iÅ¡jungti.'; $labels['desktopunsupported'] = 'JÅ«sų narÅ¡yklÄ—je sistemos praneÅ¡imai nepalaikomi.'; +$labels['desktoptimeout'] = 'Užverti sistemos praneÅ¡imÄ…'; ?> diff --git a/plugins/newmail_notifier/localization/lv_LV.inc b/plugins/newmail_notifier/localization/lv_LV.inc index 60d951e5e..4ca083598 100644 --- a/plugins/newmail_notifier/localization/lv_LV.inc +++ b/plugins/newmail_notifier/localization/lv_LV.inc @@ -24,4 +24,5 @@ $labels['body'] = 'JÅ«s esat saņēmis jaunu vÄ“stuli.'; $labels['testbody'] = 'Å is ir testa paziņojums.'; $labels['desktopdisabled'] = 'Darbavirsmas paziņojumi JÅ«su pÄrlÅ«kprogrammÄ ir atslÄ“gti.'; $labels['desktopunsupported'] = 'JÅ«su pÄrlÅ«kprogramma neatbalsta darbavirsmas paziņojumus.'; +$labels['desktoptimeout'] = 'AizvÄ“rt darbavirsmas paziņojumu'; ?> diff --git a/plugins/newmail_notifier/localization/sk_SK.inc b/plugins/newmail_notifier/localization/sk_SK.inc index b60447c36..fa206ba7d 100644 --- a/plugins/newmail_notifier/localization/sk_SK.inc +++ b/plugins/newmail_notifier/localization/sk_SK.inc @@ -18,11 +18,11 @@ $labels['basic'] = 'ZobraziÅ¥ upozornenie v prehliadaÄi pri novej správe'; $labels['desktop'] = 'ZobraziÅ¥ upozornenie na ploche pri novej správe'; $labels['sound'] = 'PrehraÅ¥ zvuk pri novej správe'; -$labels['test'] = 'Skúška'; -$labels['title'] = 'Nová správa'; +$labels['test'] = 'OtestovaÅ¥'; +$labels['title'] = 'Nová správa!'; $labels['body'] = 'Máte novú správu.'; $labels['testbody'] = 'Toto je skúšobné upozornenie.'; $labels['desktopdisabled'] = 'Upozornenia na ploche sú vo vaÅ¡om prehliadaÄi vypnuté.'; -$labels['desktopunsupported'] = 'VÃ¡Ä prehliadaÄ nepodporuje upozornenia na ploche.'; +$labels['desktopunsupported'] = 'Váš prehliadaÄ nepodporuje upozornenia na ploche.'; $labels['desktoptimeout'] = 'ZatvoriÅ¥ notifikáciu na ploche'; ?> diff --git a/plugins/newmail_notifier/localization/sl_SI.inc b/plugins/newmail_notifier/localization/sl_SI.inc index 32f36f7d9..a95fde055 100644 --- a/plugins/newmail_notifier/localization/sl_SI.inc +++ b/plugins/newmail_notifier/localization/sl_SI.inc @@ -24,4 +24,5 @@ $labels['body'] = 'Prejeli ste novo sporoÄilo.'; $labels['testbody'] = 'To je testno obvestilo.'; $labels['desktopdisabled'] = 'Obvestila na namizju so v vaÅ¡em brskalniku onemogoÄena.'; $labels['desktopunsupported'] = 'VaÅ¡ brskalnik ne podpira izpis obvestil na namizju.'; +$labels['desktoptimeout'] = 'Zapri obvestila na namizju'; ?> diff --git a/plugins/newmail_notifier/localization/uk_UA.inc b/plugins/newmail_notifier/localization/uk_UA.inc index 06fb8b964..7d3ffc014 100644 --- a/plugins/newmail_notifier/localization/uk_UA.inc +++ b/plugins/newmail_notifier/localization/uk_UA.inc @@ -24,4 +24,5 @@ $labels['body'] = 'Ви отримали нове повідомленнÑ.'; $labels['testbody'] = 'Це теÑтове ÑповіщеннÑ'; $labels['desktopdisabled'] = 'ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð½Ð° робочому Ñтолі відключені у вашому браузері.'; $labels['desktopunsupported'] = 'Ваш браузер не підтримує Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð½Ð° робочому Ñтолі.'; +$labels['desktoptimeout'] = 'Закрити ÑÐ¿Ð¾Ð²Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñ€Ð¾Ð±Ð¾Ñ‡Ð¾Ð³Ð¾ Ñтолу'; ?> diff --git a/plugins/newmail_notifier/localization/vi_VN.inc b/plugins/newmail_notifier/localization/vi_VN.inc index e8ce68b69..73df64d30 100644 --- a/plugins/newmail_notifier/localization/vi_VN.inc +++ b/plugins/newmail_notifier/localization/vi_VN.inc @@ -15,13 +15,14 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/ */ -$labels['basic'] = 'Hiển thị thông báo trên trình duyệt là có thÆ° má»›i'; -$labels['desktop'] = 'Hiển thị thông báo trên mà n hình là có thÆ° má»›i'; -$labels['sound'] = 'Mở tÃnh năng âm thanh trên thÆ° má»›i'; +$labels['basic'] = 'Hiển thị thông báo trên trình duyệt khi có thÆ° má»›i'; +$labels['desktop'] = 'Hiển thị thông báo trên mà n hình khi có thÆ° má»›i'; +$labels['sound'] = 'Thông báo bằng âm thanh khi có thÆ° má»›i'; $labels['test'] = 'Kiểm tra'; $labels['title'] = 'Có thÆ° má»›i!'; $labels['body'] = 'Bạn vừa nháºn má»™t thÆ° má»›i'; $labels['testbody'] = 'Äây là thông báo kiểm tra'; -$labels['desktopdisabled'] = 'Thông báo máy tÃnh bị tắt trên trình duyệt của bạn'; -$labels['desktopunsupported'] = 'Trình duyệt của bạn không há»— trợ thông báo trên máy tÃnh'; +$labels['desktopdisabled'] = 'Thông báo trên mà n hình bị tắt ở trình duyệt của bạn'; +$labels['desktopunsupported'] = 'Trình duyệt của bạn không há»— trợ thông báo trên mà n hình.'; +$labels['desktoptimeout'] = 'Äóng hiển thị mà n hình'; ?> diff --git a/plugins/newmail_notifier/newmail_notifier.js b/plugins/newmail_notifier/newmail_notifier.js index 2beacf650..69f1867c9 100644 --- a/plugins/newmail_notifier/newmail_notifier.js +++ b/plugins/newmail_notifier/newmail_notifier.js @@ -108,7 +108,7 @@ function newmail_notifier_desktop(body) lang: "", body: body, tag: "newmail_notifier", - icon: "plugins/newmail_notifier/mail.png", + icon: "plugins/newmail_notifier/mail.png" }); popup.onclick = function() { this.close(); diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php index 3351d2fd3..62d9bfce2 100644 --- a/plugins/password/drivers/domainfactory.php +++ b/plugins/password/drivers/domainfactory.php @@ -54,7 +54,12 @@ class rcube_domainfactory_password curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields)); if ($result = curl_exec($ch)) { - // did the new password match the requirements? + // has the password been changed? + if (strpos($result, 'Einstellungen erfolgreich') !== false) { + return PASSWORD_SUCCESS; + } + + // show error message(s) if possible if (strpos($result, '<div class="d-msg-text">') !== false) { preg_match_all('#<div class="d-msg-text">(.*?)</div>#s', $result, $errors); if (isset($errors[1])) { @@ -66,9 +71,6 @@ class rcube_domainfactory_password } } - if (strpos($result, 'Einstellungen erfolgreich') !== false) { - return PASSWORD_SUCCESS; - } } else { return PASSWORD_CONNECT_ERROR; diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php index cf62debcf..739958ad7 100644 --- a/plugins/password/drivers/ldap.php +++ b/plugins/password/drivers/ldap.php @@ -146,7 +146,7 @@ class rcube_ldap_password return ''; } - $base = $rcmail->config->get('password_ldap_search_base'); + $base = self::substitute_vars($rcmail->config->get('password_ldap_search_base')); $filter = self::substitute_vars($rcmail->config->get('password_ldap_search_filter')); $options = array ( 'scope' => 'sub', diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php index c5d828fab..3e167ea5b 100644 --- a/plugins/password/drivers/ldap_simple.php +++ b/plugins/password/drivers/ldap_simple.php @@ -113,7 +113,7 @@ class rcube_ldap_simple_password return PASSWORD_CRYPT_ERROR; } - $this->_debug("C: Bind $binddn [pass: $bindpw]"); + $this->_debug("C: Bind $binddn, pass: **** [" . strlen($bindpw) . "]"); // Bind if (!ldap_bind($ds, $binddn, $bindpw)) { @@ -175,7 +175,7 @@ class rcube_ldap_simple_password return null; } - $this->_debug("C: Bind $search_user [pass: $search_pass]"); + $this->_debug("C: Bind $search_user, pass: **** [" . strlen($search_pass) . "]"); // Bind if (!ldap_bind($ds, $search_user, $search_pass)) { @@ -187,6 +187,8 @@ class rcube_ldap_simple_password $search_base = $rcmail->config->get('password_ldap_search_base'); $search_filter = $rcmail->config->get('password_ldap_search_filter'); + + $search_base = rcube_ldap_password::substitute_vars($search_base); $search_filter = rcube_ldap_password::substitute_vars($search_filter); $this->_debug("C: Search $search_base for $search_filter"); diff --git a/plugins/password/localization/ber.inc b/plugins/password/localization/ber.inc deleted file mode 100644 index 046e45733..000000000 --- a/plugins/password/localization/ber.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | localization//labels.inc | - | | - | Language file of the Roundcube Webmail client | - | Copyright (C) 2012, The Roundcube Dev Team | - | Licensed under the GNU General Public License | - | | - +-----------------------------------------------------------------------+ - | Author: FULL NAME <EMAIL@ADDRESS> | - +-----------------------------------------------------------------------+ -*/ - - diff --git a/plugins/password/localization/br.inc b/plugins/password/localization/br.inc index 423fc74df..a43b0b715 100644 --- a/plugins/password/localization/br.inc +++ b/plugins/password/localization/br.inc @@ -16,7 +16,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ $labels['changepasswd'] = 'Kemmañ ar ger-tremen'; -$labels['curpasswd'] = 'Ger-tremen red :'; +$labels['curpasswd'] = 'Ger-tremen bremañ :'; $labels['newpasswd'] = 'Ger-tremen nevez :'; $labels['confpasswd'] = 'Kadarnaat ar ger-tremen :'; $messages['nopassword'] = 'Roit ur ger-tremen nevez, mar plij.'; @@ -27,5 +27,6 @@ $messages['crypterror'] = 'N\'haller ket enrollañ ar ger-tremen nevez. Arc\'hwe $messages['connecterror'] = 'N\'haller ket enrollañ ar ger-tremen nevez. Fazi gant ar c\'hennask.'; $messages['internalerror'] = 'N\'haller ket enrollañ ar ger-tremen nevez.'; $messages['passwordshort'] = 'Ret eo d\'ar ger-tremen bezañ hiroc\'h eget $length arouezenn.'; +$messages['passwordweak'] = 'En ho ker-tremen e tle bezañ ur sifr hag un arouezenn boentaouiñ da nebeutañ'; $messages['passwordforbidden'] = 'Arouezennoù difennet zo er ger-tremen.'; ?> diff --git a/plugins/password/localization/ca_ES.inc b/plugins/password/localization/ca_ES.inc index 3ab4ed1ad..8e367155f 100644 --- a/plugins/password/localization/ca_ES.inc +++ b/plugins/password/localization/ca_ES.inc @@ -23,10 +23,10 @@ $messages['nopassword'] = 'Si us plau, introduïu la nova contrasenya.'; $messages['nocurpassword'] = 'Si us plau, introduïu la contrasenya actual.'; $messages['passwordincorrect'] = 'Contrasenya actual incorrecta.'; $messages['passwordinconsistency'] = 'La contrasenya nova no coincideix, torneu-ho a provar.'; -$messages['crypterror'] = 'No es pot desar la nova contrasenya. No existeix la funció d\'encriptació.'; -$messages['connecterror'] = 'No es pot desar la nova contrasenya. Error de connexió.'; -$messages['internalerror'] = 'No es pot desar la nova contrasenya.'; -$messages['passwordshort'] = 'La nova contrasenya ha de tenir com a mÃnim $length carà cters de llarg.'; +$messages['crypterror'] = 'No s\'ha pogut desar la nova contrasenya. No existeix la funció d\'encriptació.'; +$messages['connecterror'] = 'No s\'ha pogut desar la nova contrasenya. Error de connexió.'; +$messages['internalerror'] = 'No s\'ha pogut desar la nova contrasenya.'; +$messages['passwordshort'] = 'La nova contrasenya ha de tenir com a mÃnim $length carà cters.'; $messages['passwordweak'] = 'La nova contrasenya ha d\'incloure com a mÃnim un nombre i un carà cter de puntuació.'; $messages['passwordforbidden'] = 'La contrasenya conté carà cters no permesos.'; ?> diff --git a/plugins/password/localization/en_CA.inc b/plugins/password/localization/en_CA.inc new file mode 100644 index 000000000..6206b5923 --- /dev/null +++ b/plugins/password/localization/en_CA.inc @@ -0,0 +1,32 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/password/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Password plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ +*/ +$labels['changepasswd'] = 'Change Password'; +$labels['curpasswd'] = 'Current Password:'; +$labels['newpasswd'] = 'New Password:'; +$labels['confpasswd'] = 'Confirm New Password:'; +$messages['nopassword'] = 'Please input new password.'; +$messages['nocurpassword'] = 'Please input current password.'; +$messages['passwordincorrect'] = 'Current password incorrect.'; +$messages['passwordinconsistency'] = 'Passwords do not match, please try again.'; +$messages['crypterror'] = 'Could not save new password. Encryption function missing.'; +$messages['connecterror'] = 'Could not save new password. Connection error.'; +$messages['internalerror'] = 'Could not save new password.'; +$messages['passwordshort'] = 'Password must be at least $length characters long.'; +$messages['passwordweak'] = 'Password must include at least one number and one punctuation character.'; +$messages['passwordforbidden'] = 'Password contains forbidden characters.'; +?> diff --git a/plugins/password/localization/es_419.inc b/plugins/password/localization/es_419.inc new file mode 100644 index 000000000..3d99b561c --- /dev/null +++ b/plugins/password/localization/es_419.inc @@ -0,0 +1,32 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/password/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Password plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ +*/ +$labels['changepasswd'] = 'Cambiar contraseña'; +$labels['curpasswd'] = 'Contraseña actual: '; +$labels['newpasswd'] = 'Contraseña nueva:'; +$labels['confpasswd'] = 'Confirmar contraseña nueva:'; +$messages['nopassword'] = 'Por favor, ingresa la nueva contraseña.'; +$messages['nocurpassword'] = 'Por favor, ingresa la contraseña actual.'; +$messages['passwordincorrect'] = 'Contraseña actual incorrecta.'; +$messages['passwordinconsistency'] = 'Las contraseñas no concuerdan, por favor intenta nuevamente.'; +$messages['crypterror'] = 'No se puedo guardar la nueva contraseña. No se encuentra la función de encriptación.'; +$messages['connecterror'] = 'No se puedo guardar la nueva contraseña. Error de conexión.'; +$messages['internalerror'] = 'No se puedo guardar la nueva contraseña.'; +$messages['passwordshort'] = 'La contraseña debe tener al menos $length carácteres.'; +$messages['passwordweak'] = 'La contraseña debe incluir por lo menos un número y un signo de puntuación.'; +$messages['passwordforbidden'] = 'La contraseña contiene carácteres ilegales.'; +?> diff --git a/plugins/password/localization/fo_FO.inc b/plugins/password/localization/fo_FO.inc new file mode 100644 index 000000000..7c9ba55bc --- /dev/null +++ b/plugins/password/localization/fo_FO.inc @@ -0,0 +1,32 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/password/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Password plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ +*/ +$labels['changepasswd'] = 'Broyt loyniorð'; +$labels['curpasswd'] = 'Nú verandi loyniorð:'; +$labels['newpasswd'] = 'Nýtt loyniorð:'; +$labels['confpasswd'] = 'Endurtak nýggja loyniorð:'; +$messages['nopassword'] = 'Vinarliga skriva inn nýtt loyniorð.'; +$messages['nocurpassword'] = 'Vinarliga skriva inn núverandi loyniorð.'; +$messages['passwordincorrect'] = 'Verandi loyniorð er skeift.'; +$messages['passwordinconsistency'] = 'Loyniorðini eru ikki lÃka, vinarliga royn aftur.'; +$messages['crypterror'] = 'Kann ikki goyma nýggja loyniorð. Brongling manglar.'; +$messages['connecterror'] = 'Kann ikki goyma nýtt loyniorð. Sambands feilur.'; +$messages['internalerror'] = 'Kundi ikki goyma nýggja loyniorðið.'; +$messages['passwordshort'] = 'Loyniorði má hvørfall verða $length tekin langt.'; +$messages['passwordweak'] = 'Loyniorði má innihalda minst eitt nummar og eitt punktum tekin.'; +$messages['passwordforbidden'] = 'Loyniorð inniheldur ólóglig tekin.'; +?> diff --git a/plugins/password/localization/gl_ES.inc b/plugins/password/localization/gl_ES.inc index f738c62a0..1415366a3 100644 --- a/plugins/password/localization/gl_ES.inc +++ b/plugins/password/localization/gl_ES.inc @@ -19,13 +19,13 @@ $labels['changepasswd'] = 'Cambiar contrasinal'; $labels['curpasswd'] = 'Contrasinal actual:'; $labels['newpasswd'] = 'Contrasinal novo:'; $labels['confpasswd'] = 'Confirmar contrasinal:'; -$messages['nopassword'] = 'Por favor, introduza un contrasinal novo.'; -$messages['nocurpassword'] = 'Por favor, introduza o contrasinal actual.'; +$messages['nopassword'] = 'Por favor, introduce un contrasinal novo.'; +$messages['nocurpassword'] = 'Por favor, introduce o contrasinal actual.'; $messages['passwordincorrect'] = 'O contrasinal actual é incorrecto.'; -$messages['passwordinconsistency'] = 'Os contrasinais non cadran. Por favor, inténteo outra vez.'; -$messages['crypterror'] = 'Non foi posible gardar o contrasinal novo. Falta a función de cifrado.'; -$messages['connecterror'] = 'Non foi posible gardar o contrasinal novo. Erro de conexión'; -$messages['internalerror'] = 'Non foi posible gardar o contrasinal novo.'; +$messages['passwordinconsistency'] = 'Os contrasinais non cadran. Por favor, inténtao outra vez.'; +$messages['crypterror'] = 'Non foi posÃbel gardar o contrasinal novo. Falta a función de cifrado.'; +$messages['connecterror'] = 'Non foi posÃbel gardar o contrasinal novo. Erro de conexión'; +$messages['internalerror'] = 'Non foi posÃbel gardar o contrasinal novo.'; $messages['passwordshort'] = 'O contrasinal debe ter polo menos $length caracteres.'; $messages['passwordweak'] = 'O contrasinal debe incluir polo menos un número e un signo de puntuación.'; $messages['passwordforbidden'] = 'O contrasinal contén caracteres non permitidos.'; diff --git a/plugins/password/localization/km_KH.inc b/plugins/password/localization/km_KH.inc new file mode 100644 index 000000000..f223dc653 --- /dev/null +++ b/plugins/password/localization/km_KH.inc @@ -0,0 +1,32 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/password/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Password plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ +*/ +$labels['changepasswd'] = 'ប្ដូរ​ពាក្យ​សម្ងាážáŸ‹'; +$labels['curpasswd'] = 'ពាក្យ​សម្ងាážáŸ‹â€‹áž”ច្ចុប្បន្ន៖'; +$labels['newpasswd'] = 'ពាក្យ​សម្ងាážáŸ‹â€‹ážáŸ’មី៖'; +$labels['confpasswd'] = 'បញ្ជាក់​ពាក្យ​សម្ងាážáŸ‹â€‹ážáŸ’មី៖'; +$messages['nopassword'] = 'សូម​បញ្ចូល​ពាក្យ​សម្ងាážáŸ‹â€‹ážáŸ’មី។'; +$messages['nocurpassword'] = 'សូម​បញ្ចូល​ពាក្យ​សម្ងាážáŸ‹â€‹áž”ច្ចុប្បន្ន​ឲ្យ​បាន​ážáŸ’រូវ។'; +$messages['passwordincorrect'] = 'ពាក្យ​សម្ងាážáŸ‹â€‹áž”ច្ចុប្បន្ន​គឺ​មិន​ážáŸ’រូវ​ឡើយ។'; +$messages['passwordinconsistency'] = 'ពាក្យ​សម្ងាážáŸ‹â€‹áž˜áž·áž“​ážáŸ’រូវ​គ្នា​ទ០សូម​ព្យាយាម​ម្ដង​ទៀážáŸ”'; +$messages['crypterror'] = 'មិន​អាច​រក្សា​ទុក​ពាក្យ​សម្ងាážáŸ‹â€‹ážáŸ’មី​បាន​ទáŸáŸ” បាážáŸ‹â€‹áž˜áž»ážáž„ារ​កូដនីយកម្ម។'; +$messages['connecterror'] = 'មិន​អាច​រក្សា​ទុក​ពាក្យ​សម្ងាážáŸ‹â€‹ážáŸ’មី​បាន​ទáŸáŸ” ការ​ážáž—្ជាប់​មាន​បញ្ហា។'; +$messages['internalerror'] = 'មិន​អាច​រក្សា​ទុក​ពាក្យ​សម្ងាážáŸ‹â€‹ážáŸ’មី​បាន​ទáŸáŸ”'; +$messages['passwordshort'] = 'ពាក្យ​សម្ងាážáŸ‹â€‹ážáŸ’រូវ​ážáŸ‚​មាន​យ៉ាង​ážáž·áž… $length ážáž½áŸ”'; +$messages['passwordweak'] = 'ពាក្យ​សម្ងាážáŸ‹â€‹ážáŸ’រូវ​ážáŸ‚​មាន​បញ្ចូល​យ៉ាង​ហោច​ណាស់​លáŸážâ€‹áž˜áž½áž™â€‹ážáž½ និង​អក្សរ​សញ្ញា​មួយ​ážáž½áŸ”'; +$messages['passwordforbidden'] = 'ពាក្យ​សម្ងាážáŸ‹â€‹áž˜áž¶áž“​អក្សរ​ដែល​ážáŸ’រូវហាម​ឃាážáŸ‹áŸ”'; +?> diff --git a/plugins/password/localization/sk_SK.inc b/plugins/password/localization/sk_SK.inc index fd0210285..51339bb7b 100644 --- a/plugins/password/localization/sk_SK.inc +++ b/plugins/password/localization/sk_SK.inc @@ -16,16 +16,16 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ $labels['changepasswd'] = 'ZmeniÅ¥ heslo'; -$labels['curpasswd'] = 'SúÄasné heslo:'; +$labels['curpasswd'] = 'Aktuálne heslo:'; $labels['newpasswd'] = 'Nové heslo:'; -$labels['confpasswd'] = 'PotvrÄ nové heslo:'; -$messages['nopassword'] = 'ProsÃm zadaj nové heslo.'; -$messages['nocurpassword'] = 'ProsÃm zadaj súÄasné heslo.'; -$messages['passwordincorrect'] = 'SúÄasné heslo je nesprávne.'; -$messages['passwordinconsistency'] = 'Heslá nie sú rovnaké, skús znova.'; -$messages['crypterror'] = 'Nemôžem uložiÅ¥ nové heslo. Chýba Å¡ifrovacia funkcia.'; -$messages['connecterror'] = 'Nemôžem uložiÅ¥ nové heslo. Chyba spojenia.'; -$messages['internalerror'] = 'Nemôžem uložiÅ¥ nové heslo.'; +$labels['confpasswd'] = 'PotvrÄte nové heslo:'; +$messages['nopassword'] = 'ProsÃm zadajte nové heslo.'; +$messages['nocurpassword'] = 'ProsÃm zadajte aktuálne heslo.'; +$messages['passwordincorrect'] = 'Aktuálne heslo je nesprávne.'; +$messages['passwordinconsistency'] = 'Heslá nie sú rovnaké, skúste to znova.'; +$messages['crypterror'] = 'Nové heslo nemožno uložiÅ¥. Chýba Å¡ifrovacia funkcia.'; +$messages['connecterror'] = 'Nové heslo nemožno uložiÅ¥. Chyba spojenia.'; +$messages['internalerror'] = 'Nové heslo nemožno uložiÅ¥.'; $messages['passwordshort'] = 'Heslo musà maÅ¥ najmenej $length znakov.'; $messages['passwordweak'] = 'Heslo musà obsahovaÅ¥ aspoň jedno ÄÃslo a jedno interpunkÄné znamienko.'; $messages['passwordforbidden'] = 'Heslo obsahuje nepovolené znaky.'; diff --git a/plugins/password/password.js b/plugins/password/password.js index 12c9074ff..1bfb2a0d3 100644 --- a/plugins/password/password.js +++ b/plugins/password/password.js @@ -1,4 +1,4 @@ -/* +/** * Password plugin script * @version @package_version@ */ @@ -8,17 +8,17 @@ if (window.rcmail) { // register command handler rcmail.register_command('plugin.password-save', function() { - var input_curpasswd = rcube_find_object('_curpasswd'); - var input_newpasswd = rcube_find_object('_newpasswd'); - var input_confpasswd = rcube_find_object('_confpasswd'); - - if (input_curpasswd && input_curpasswd.value=='') { + var input_curpasswd = rcube_find_object('_curpasswd'), + input_newpasswd = rcube_find_object('_newpasswd'), + input_confpasswd = rcube_find_object('_confpasswd'); + + if (input_curpasswd && input_curpasswd.value == '') { alert(rcmail.gettext('nocurpassword', 'password')); input_curpasswd.focus(); - } else if (input_newpasswd && input_newpasswd.value=='') { + } else if (input_newpasswd && input_newpasswd.value == '') { alert(rcmail.gettext('nopassword', 'password')); input_newpasswd.focus(); - } else if (input_confpasswd && input_confpasswd.value=='') { + } else if (input_confpasswd && input_confpasswd.value == '') { alert(rcmail.gettext('nopassword', 'password')); input_confpasswd.focus(); } else if (input_newpasswd && input_confpasswd && input_newpasswd.value != input_confpasswd.value) { diff --git a/plugins/subscriptions_option/localization/ca_ES.inc b/plugins/subscriptions_option/localization/ca_ES.inc index 3a723968b..b2f4ddb50 100644 --- a/plugins/subscriptions_option/localization/ca_ES.inc +++ b/plugins/subscriptions_option/localization/ca_ES.inc @@ -15,5 +15,5 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ */ -$labels['useimapsubscriptions'] = 'Fes servir subscripcions IMAP'; +$labels['useimapsubscriptions'] = 'Fes servir Subscripcions IMAP'; ?> diff --git a/plugins/subscriptions_option/localization/en_CA.inc b/plugins/subscriptions_option/localization/en_CA.inc new file mode 100644 index 000000000..4895fdd30 --- /dev/null +++ b/plugins/subscriptions_option/localization/en_CA.inc @@ -0,0 +1,19 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/subscriptions_option/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Subscriptions plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ +*/ +$labels['useimapsubscriptions'] = 'Use IMAP Subscriptions'; +?> diff --git a/plugins/subscriptions_option/localization/es_419.inc b/plugins/subscriptions_option/localization/es_419.inc new file mode 100644 index 000000000..ae8c72474 --- /dev/null +++ b/plugins/subscriptions_option/localization/es_419.inc @@ -0,0 +1,19 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/subscriptions_option/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Subscriptions plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ +*/ +$labels['useimapsubscriptions'] = 'Usar subscripciones IMAP'; +?> diff --git a/plugins/subscriptions_option/localization/fo_FO.inc b/plugins/subscriptions_option/localization/fo_FO.inc new file mode 100644 index 000000000..7ee0c6851 --- /dev/null +++ b/plugins/subscriptions_option/localization/fo_FO.inc @@ -0,0 +1,19 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/subscriptions_option/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Subscriptions plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ +*/ +$labels['useimapsubscriptions'] = 'Brúka IMAP tekningar'; +?> diff --git a/plugins/subscriptions_option/localization/hr_HR.inc b/plugins/subscriptions_option/localization/hr_HR.inc new file mode 100644 index 000000000..6900cf568 --- /dev/null +++ b/plugins/subscriptions_option/localization/hr_HR.inc @@ -0,0 +1,19 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/subscriptions_option/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Subscriptions plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ +*/ +$labels['useimapsubscriptions'] = 'Koristi IMAP pretplate'; +?> diff --git a/plugins/subscriptions_option/localization/km_KH.inc b/plugins/subscriptions_option/localization/km_KH.inc new file mode 100644 index 000000000..37e19252f --- /dev/null +++ b/plugins/subscriptions_option/localization/km_KH.inc @@ -0,0 +1,19 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/subscriptions_option/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Subscriptions plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ +*/ +$labels['useimapsubscriptions'] = 'ប្រើ​ការ​ជាង IMAP'; +?> diff --git a/plugins/subscriptions_option/localization/sk_SK.inc b/plugins/subscriptions_option/localization/sk_SK.inc index f65a508d4..9f9634bdf 100644 --- a/plugins/subscriptions_option/localization/sk_SK.inc +++ b/plugins/subscriptions_option/localization/sk_SK.inc @@ -15,5 +15,5 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ */ -$labels['useimapsubscriptions'] = 'Použi IMAP nastavenia'; +$labels['useimapsubscriptions'] = 'PoužiÅ¥ prihlásenia IMAP'; ?> diff --git a/plugins/subscriptions_option/localization/uk_UA.inc b/plugins/subscriptions_option/localization/uk_UA.inc new file mode 100644 index 000000000..8b3564008 --- /dev/null +++ b/plugins/subscriptions_option/localization/uk_UA.inc @@ -0,0 +1,19 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/subscriptions_option/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Subscriptions plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ +*/ +$labels['useimapsubscriptions'] = 'ВикориÑтовувати IMAP ПідпиÑки'; +?> diff --git a/plugins/userinfo/localization/ber.inc b/plugins/userinfo/localization/ber.inc deleted file mode 100644 index 046e45733..000000000 --- a/plugins/userinfo/localization/ber.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | localization//labels.inc | - | | - | Language file of the Roundcube Webmail client | - | Copyright (C) 2012, The Roundcube Dev Team | - | Licensed under the GNU General Public License | - | | - +-----------------------------------------------------------------------+ - | Author: FULL NAME <EMAIL@ADDRESS> | - +-----------------------------------------------------------------------+ -*/ - - diff --git a/plugins/userinfo/localization/ca_ES.inc b/plugins/userinfo/localization/ca_ES.inc index 8c82c52a2..155ae6bdb 100644 --- a/plugins/userinfo/localization/ca_ES.inc +++ b/plugins/userinfo/localization/ca_ES.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/ */ -$labels['userinfo'] = 'Informació de l\'usuari/a'; +$labels['userinfo'] = 'Informació de l\'usuari'; $labels['created'] = 'Creat'; $labels['lastlogin'] = 'Última connexió'; $labels['defaultidentity'] = 'Identitat per defecte'; diff --git a/plugins/userinfo/localization/en_CA.inc b/plugins/userinfo/localization/en_CA.inc new file mode 100644 index 000000000..d2951a984 --- /dev/null +++ b/plugins/userinfo/localization/en_CA.inc @@ -0,0 +1,22 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/userinfo/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Userinfo plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/ +*/ +$labels['userinfo'] = 'User info'; +$labels['created'] = 'Created'; +$labels['lastlogin'] = 'Last Login'; +$labels['defaultidentity'] = 'Default Identity'; +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/es_419.inc b/plugins/userinfo/localization/es_419.inc new file mode 100644 index 000000000..e3274539d --- /dev/null +++ b/plugins/userinfo/localization/es_419.inc @@ -0,0 +1,22 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/userinfo/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Userinfo plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/ +*/ +$labels['userinfo'] = 'Información de usuario'; +$labels['created'] = 'Creado'; +$labels['lastlogin'] = 'Último login'; +$labels['defaultidentity'] = 'Identidad predetermidada'; +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/fo_FO.inc b/plugins/userinfo/localization/fo_FO.inc new file mode 100644 index 000000000..865429221 --- /dev/null +++ b/plugins/userinfo/localization/fo_FO.inc @@ -0,0 +1,22 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/userinfo/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Userinfo plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/ +*/ +$labels['userinfo'] = 'Brúkara upplýsing'; +$labels['created'] = 'Stovnaður'; +$labels['lastlogin'] = 'Seinast innritaður'; +$labels['defaultidentity'] = 'Sjálvsett samleiki'; +?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/gl_ES.inc b/plugins/userinfo/localization/gl_ES.inc index 860c92673..8dbbfd699 100644 --- a/plugins/userinfo/localization/gl_ES.inc +++ b/plugins/userinfo/localization/gl_ES.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/ */ -$labels['userinfo'] = 'Información do usuario'; +$labels['userinfo'] = 'Información de persoa usuaria'; $labels['created'] = 'Creado'; $labels['lastlogin'] = 'Última conexión'; $labels['defaultidentity'] = 'Identidade predeterminada'; diff --git a/plugins/userinfo/localization/km_KH.inc b/plugins/userinfo/localization/km_KH.inc index ce7c0a18c..f2962d329 100644 --- a/plugins/userinfo/localization/km_KH.inc +++ b/plugins/userinfo/localization/km_KH.inc @@ -15,8 +15,8 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/ */ -$labels['userinfo'] = 'áž–áŸážáž˜áž¶áž“អ្នកប្រើប្រាស់'; +$labels['userinfo'] = 'áž–áŸážáŸŒáž˜áž¶áž“​អ្នក​ប្រើ'; $labels['created'] = 'បាន​បង្កើáž'; -$labels['lastlogin'] = 'ចុះឈ្មោះចូលចុងក្រោយ'; +$labels['lastlogin'] = 'ចូល​ចុងក្រោយ'; $labels['defaultidentity'] = 'អážáŸ’ážážŸáž‰áŸ’ញាណ​លំនាំដើម'; ?>
\ No newline at end of file diff --git a/plugins/userinfo/localization/sk_SK.inc b/plugins/userinfo/localization/sk_SK.inc index f6b0c63d2..95deee14e 100644 --- a/plugins/userinfo/localization/sk_SK.inc +++ b/plugins/userinfo/localization/sk_SK.inc @@ -15,8 +15,8 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/ */ -$labels['userinfo'] = 'UžÃvateľské informácie'; +$labels['userinfo'] = 'Informácie o použÃvateľovi'; $labels['created'] = 'Vytvorené'; $labels['lastlogin'] = 'Posledné prihlásenie'; -$labels['defaultidentity'] = 'Å tandardná identita'; +$labels['defaultidentity'] = 'Predvolená identita'; ?>
\ No newline at end of file diff --git a/plugins/vcard_attachments/localization/en_CA.inc b/plugins/vcard_attachments/localization/en_CA.inc new file mode 100644 index 000000000..ac21ef96b --- /dev/null +++ b/plugins/vcard_attachments/localization/en_CA.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/vcard_attachments/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Vcard Attachments plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/ +*/ +$labels['addvcardmsg'] = 'Add vCard to addressbook'; +$labels['vcardsavefailed'] = 'Unable to save vCard'; +?>
\ No newline at end of file diff --git a/plugins/vcard_attachments/localization/es_419.inc b/plugins/vcard_attachments/localization/es_419.inc new file mode 100644 index 000000000..3d56d761b --- /dev/null +++ b/plugins/vcard_attachments/localization/es_419.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/vcard_attachments/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Vcard Attachments plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/ +*/ +$labels['addvcardmsg'] = 'Agregar vCard a la libreta de direcciones'; +$labels['vcardsavefailed'] = 'No se puede guardar la vCard'; +?>
\ No newline at end of file diff --git a/plugins/vcard_attachments/localization/fo_FO.inc b/plugins/vcard_attachments/localization/fo_FO.inc new file mode 100644 index 000000000..92a9d76fb --- /dev/null +++ b/plugins/vcard_attachments/localization/fo_FO.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/vcard_attachments/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Vcard Attachments plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/ +*/ +$labels['addvcardmsg'] = 'Legg vCard til búðstaðar savn'; +$labels['vcardsavefailed'] = 'Kann ikki goyma vCard'; +?>
\ No newline at end of file diff --git a/plugins/vcard_attachments/localization/gl_ES.inc b/plugins/vcard_attachments/localization/gl_ES.inc index af6f2842e..55792ee01 100644 --- a/plugins/vcard_attachments/localization/gl_ES.inc +++ b/plugins/vcard_attachments/localization/gl_ES.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/ */ -$labels['addvcardmsg'] = 'Engadir vCard ao caderno de enderezos'; -$labels['vcardsavefailed'] = 'Non foi posible gardar a vCard'; +$labels['addvcardmsg'] = 'Engadir vCard á Axenda de enderezos'; +$labels['vcardsavefailed'] = 'Non foi posÃbel gardar a vCard'; ?>
\ No newline at end of file diff --git a/plugins/vcard_attachments/localization/km_KH.inc b/plugins/vcard_attachments/localization/km_KH.inc index f3909e0b5..75e233448 100644 --- a/plugins/vcard_attachments/localization/km_KH.inc +++ b/plugins/vcard_attachments/localization/km_KH.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/ */ -$labels['addvcardmsg'] = 'បន្ážáŸ‚ម vCard ទៅសៀវភៅកážáŸ‹ážáŸ’រា'; -$labels['vcardsavefailed'] = 'មិនអាចរក្សាទុក vCard'; +$labels['addvcardmsg'] = 'បន្ážáŸ‚ម vCard ទៅ​សៀវភៅ​អាសយដ្ឋាន'; +$labels['vcardsavefailed'] = 'មិន​អាច​រក្សាទុក vCard'; ?>
\ No newline at end of file diff --git a/plugins/vcard_attachments/localization/sk_SK.inc b/plugins/vcard_attachments/localization/sk_SK.inc index 17aecb261..ecbaac834 100644 --- a/plugins/vcard_attachments/localization/sk_SK.inc +++ b/plugins/vcard_attachments/localization/sk_SK.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/ */ -$labels['addvcardmsg'] = 'Pridať vCard do adresára'; -$labels['vcardsavefailed'] = 'Nemôžem uložiť vCard'; +$labels['addvcardmsg'] = 'Pridať vizitku vCard do adresára'; +$labels['vcardsavefailed'] = 'Vizitku vCard nemožno uložiť'; ?>
\ No newline at end of file diff --git a/plugins/vcard_attachments/vcardattach.js b/plugins/vcard_attachments/vcardattach.js index 29bc1a60f..b287acd4a 100644 --- a/plugins/vcard_attachments/vcardattach.js +++ b/plugins/vcard_attachments/vcardattach.js @@ -1,4 +1,4 @@ -/* +/** * vcard_attachments plugin script * @version @package_version@ */ @@ -13,6 +13,7 @@ function plugin_vcard_save_contact(mime_id) function plugin_vcard_insertrow(data) { var ctype = data.row.ctype; + if (ctype == 'text/vcard' || ctype == 'text/x-vcard' || ctype == 'text/directory') { $('#rcmrow'+data.uid+' > td.attachment').html('<img src="'+rcmail.env.vcard_icon+'" alt="" />'); } diff --git a/plugins/zipdownload/CHANGELOG b/plugins/zipdownload/CHANGELOG deleted file mode 100644 index 32b878e76..000000000 --- a/plugins/zipdownload/CHANGELOG +++ /dev/null @@ -1,34 +0,0 @@ -Roundcube Webmail ZipDownload -============================= - -2012-09-20 -========== - * Added style for new Larry skin - * Made plugin work with 0.8 version of Roundcube - * Save attachments to temp files before adding to zip archive (memory!) - -2011 03 12 -========== - * Convert charset for filenames inside zip - -2010 08 30 -========== - * Get all messages in folder, not just the first page - -2010 08 12 -========== - * Use $.inArray() instead of Array.indexOf() - -2010 08 07 -========== - * Add the ability to download a folder as zip - * Add the ability to download selection of messages as zip - * Add config file to control download options - -2010 05 29 -========== - * Remove tnef_decode, now done by message class (r3680) - -2010 02 21 -========== - * First version
\ No newline at end of file diff --git a/plugins/zipdownload/localization/ca_ES.inc b/plugins/zipdownload/localization/ca_ES.inc index 665c53ad8..bf5640ec6 100644 --- a/plugins/zipdownload/localization/ca_ES.inc +++ b/plugins/zipdownload/localization/ca_ES.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ */ -$labels['downloadall'] = 'Descarregar tots els adjunts'; -$labels['downloadfolder'] = 'Descarregar carpeta'; +$labels['downloadall'] = 'Descarrega tots els adjunts'; +$labels['downloadfolder'] = 'Descarrega la carpeta'; ?>
\ No newline at end of file diff --git a/plugins/zipdownload/localization/en_CA.inc b/plugins/zipdownload/localization/en_CA.inc new file mode 100644 index 000000000..48a8d9bcb --- /dev/null +++ b/plugins/zipdownload/localization/en_CA.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/zipdownload/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Zipdownload plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ +*/ +$labels['downloadall'] = 'Download all attachments'; +$labels['downloadfolder'] = 'Download folder'; +?>
\ No newline at end of file diff --git a/plugins/zipdownload/localization/es_419.inc b/plugins/zipdownload/localization/es_419.inc new file mode 100644 index 000000000..a25e34266 --- /dev/null +++ b/plugins/zipdownload/localization/es_419.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/zipdownload/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Zipdownload plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ +*/ +$labels['downloadall'] = 'Descargar todos los archivos adjuntos'; +$labels['downloadfolder'] = 'Descargar carpeta'; +?>
\ No newline at end of file diff --git a/plugins/zipdownload/localization/fo_FO.inc b/plugins/zipdownload/localization/fo_FO.inc new file mode 100644 index 000000000..c49d20b68 --- /dev/null +++ b/plugins/zipdownload/localization/fo_FO.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/zipdownload/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Zipdownload plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ +*/ +$labels['downloadall'] = 'Heinta allar viðheftingar'; +$labels['downloadfolder'] = 'Heinta mappu'; +?>
\ No newline at end of file diff --git a/plugins/zipdownload/localization/gl_ES.inc b/plugins/zipdownload/localization/gl_ES.inc index 599c8ffcb..91fc14651 100644 --- a/plugins/zipdownload/localization/gl_ES.inc +++ b/plugins/zipdownload/localization/gl_ES.inc @@ -15,6 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ */ -$labels['downloadall'] = 'Descargar tódolos adxuntos'; +$labels['downloadall'] = 'Descargar todos os adxuntos'; $labels['downloadfolder'] = 'Descargar o cartafol'; ?>
\ No newline at end of file diff --git a/plugins/zipdownload/localization/hr_HR.inc b/plugins/zipdownload/localization/hr_HR.inc new file mode 100644 index 000000000..38d9cd0c4 --- /dev/null +++ b/plugins/zipdownload/localization/hr_HR.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/zipdownload/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Zipdownload plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ +*/ +$labels['downloadall'] = 'Preuzmi sve privitke'; +$labels['downloadfolder'] = 'Preuzmi (kao) mapu'; +?>
\ No newline at end of file diff --git a/plugins/zipdownload/localization/hy_AM.inc b/plugins/zipdownload/localization/hy_AM.inc new file mode 100644 index 000000000..10b21f6e2 --- /dev/null +++ b/plugins/zipdownload/localization/hy_AM.inc @@ -0,0 +1,20 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/zipdownload/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Zipdownload plugin | + | Copyright (C) 2012-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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ +*/ +$labels['downloadall'] = 'Õ†Õ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸ Õ¯ÖÕ¾Õ¡Õ® Õ¶Õ«Õ·Ö„Õ¥Ö€Õ¨'; +$labels['downloadfolder'] = 'Õ†Õ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬ ÕºÕ¡Õ¶Õ¡Õ¯Õ¨'; +?>
\ No newline at end of file diff --git a/plugins/zipdownload/localization/sk_SK.inc b/plugins/zipdownload/localization/sk_SK.inc index 86c2b9a5f..4c918528f 100644 --- a/plugins/zipdownload/localization/sk_SK.inc +++ b/plugins/zipdownload/localization/sk_SK.inc @@ -16,5 +16,5 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ */ $labels['downloadall'] = 'StiahnuÅ¥ vÅ¡etky prÃlohy'; -$labels['downloadfolder'] = 'PrieÄinok na sÅ¥ahovanie'; +$labels['downloadfolder'] = 'PrieÄinok pre stiahnuté súbory'; ?>
\ No newline at end of file diff --git a/plugins/zipdownload/zipdownload.php b/plugins/zipdownload/zipdownload.php index 59431267d..3bab286c5 100644 --- a/plugins/zipdownload/zipdownload.php +++ b/plugins/zipdownload/zipdownload.php @@ -12,261 +12,273 @@ */ class zipdownload extends rcube_plugin { - public $task = 'mail'; - private $charset = 'ASCII'; - - /** - * Plugin initialization - */ - public function init() - { - // check requirements first - if (!class_exists('ZipArchive', false)) { - rcmail::raise_error(array( - 'code' => 520, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "php_zip extension is required for the zipdownload plugin"), true, false); - return; - } - - $rcmail = rcmail::get_instance(); - - $this->load_config(); - $this->charset = $rcmail->config->get('zipdownload_charset', RCUBE_CHARSET); - $this->add_texts('localization'); - - if ($rcmail->config->get('zipdownload_attachments', 1) > -1 && ($rcmail->action == 'show' || $rcmail->action == 'preview')) - $this->add_hook('template_object_messageattachments', array($this, 'attachment_ziplink')); - - $this->register_action('plugin.zipdownload.zip_attachments', array($this, 'download_attachments')); - $this->register_action('plugin.zipdownload.zip_messages', array($this, 'download_selection')); - $this->register_action('plugin.zipdownload.zip_folder', array($this, 'download_folder')); - - if ($rcmail->config->get('zipdownload_folder', false) || $rcmail->config->get('zipdownload_selection', false)) { - $this->include_script('zipdownload.js'); - $this->api->output->set_env('zipdownload_selection', $rcmail->config->get('zipdownload_selection', false)); - - if ($rcmail->config->get('zipdownload_folder', false) && ($rcmail->action == '' || $rcmail->action == 'show')) { - $zipdownload = $this->api->output->button(array('command' => 'plugin.zipdownload.zip_folder', 'type' => 'link', 'classact' => 'active', 'content' => $this->gettext('downloadfolder'))); - $this->api->add_content(html::tag('li', array('class' => 'separator_above'), $zipdownload), 'mailboxoptions'); - } - } - } - - /** - * Place a link/button after attachments listing to trigger download - */ - public function attachment_ziplink($p) - { - $rcmail = rcmail::get_instance(); - - // only show the link if there is more than the configured number of attachments - if (substr_count($p['content'], '<li') > $rcmail->config->get('zipdownload_attachments', 1)) { - $href = $rcmail->url(array( - '_action' => 'plugin.zipdownload.zip_attachments', - '_mbox' => $rcmail->output->env['mailbox'], - '_uid' => $rcmail->output->env['uid'], - )); - - $link = html::a(array('href' => $href, 'class' => 'button zipdownload'), - rcube::Q($this->gettext('downloadall')) - ); - - // append link to attachments list, slightly different in some skins - switch (rcmail::get_instance()->config->get('skin')) { - case 'classic': - $p['content'] = str_replace('</ul>', html::tag('li', array('class' => 'zipdownload'), $link) . '</ul>', $p['content']); - break; - - default: - $p['content'] .= $link; - break; - } - - $this->include_stylesheet($this->local_skin_path() . '/zipdownload.css'); - } - - return $p; - } - - /** - * Handler for attachment download action - */ - public function download_attachments() - { - $rcmail = rcmail::get_instance(); - $imap = $rcmail->storage; - $temp_dir = $rcmail->config->get('temp_dir'); - $tmpfname = tempnam($temp_dir, 'zipdownload'); - $tempfiles = array($tmpfname); - $message = new rcube_message(rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET)); - - // open zip file - $zip = new ZipArchive(); - $zip->open($tmpfname, ZIPARCHIVE::OVERWRITE); - - foreach ($message->attachments as $part) { - $pid = $part->mime_id; - $part = $message->mime_parts[$pid]; - $disp_name = $this->_convert_filename($part->filename); - - if ($part->body) { - $orig_message_raw = $part->body; - $zip->addFromString($disp_name, $orig_message_raw); - } - else { - $tmpfn = tempnam($temp_dir, 'zipattach'); - $tmpfp = fopen($tmpfn, 'w'); - $imap->get_message_part($message->uid, $part->mime_id, $part, null, $tmpfp, true); - $tempfiles[] = $tmpfn; - fclose($tmpfp); - $zip->addFile($tmpfn, $disp_name); - } - - } - - $zip->close(); - - $filename = ($message->subject ? $message->subject : 'roundcube') . '.zip'; - $this->_deliver_zipfile($tmpfname, $filename); - - // delete temporary files from disk - foreach ($tempfiles as $tmpfn) - unlink($tmpfn); - - exit; - } - - /** - * Handler for message download action - */ - public function download_selection() - { - if (isset($_REQUEST['_uid'])) { - $uids = explode(",", rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GPC)); - - if (sizeof($uids) > 0) - $this->_download_messages($uids); - } - } - - /** - * Handler for folder download action - */ - public function download_folder() - { - $imap = rcmail::get_instance()->storage; - $mbox_name = $imap->get_folder(); - - // initialize searching result if search_filter is used - if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') { - $imap->search($mbox_name, $_SESSION['search_filter'], RCUBE_CHARSET); - } - - // fetch message headers for all pages - $uids = array(); - if ($count = $imap->count($mbox_name, $imap->get_threading() ? 'THREADS' : 'ALL', FALSE)) { - for ($i = 0; ($i * $imap->get_pagesize()) <= $count; $i++) { - $a_headers = $imap->list_messages($mbox_name, ($i + 1)); - - foreach ($a_headers as $header) { - if (empty($header)) - continue; - - array_push($uids, $header->uid); - } - } - } - - if (sizeof($uids) > 0) - $this->_download_messages($uids); - } - - /** - * Helper method to packs all the given messages into a zip archive - * - * @param array List of message UIDs to download - */ - private function _download_messages($uids) - { - $rcmail = rcmail::get_instance(); - $imap = $rcmail->storage; - $temp_dir = $rcmail->config->get('temp_dir'); - $tmpfname = tempnam($temp_dir, 'zipdownload'); - $tempfiles = array($tmpfname); - - // open zip file - $zip = new ZipArchive(); - $zip->open($tmpfname, ZIPARCHIVE::OVERWRITE); - - foreach ($uids as $uid){ - $headers = $imap->get_message_headers($uid); - $subject = rcube_mime::decode_mime_string((string)$headers->subject); - $subject = $this->_convert_filename($subject); - $subject = substr($subject, 0, 16); - - if (isset($subject) && $subject !="") - $disp_name = $subject . ".eml"; - else - $disp_name = "message_rfc822.eml"; - - $disp_name = $uid . "_" . $disp_name; - - $tmpfn = tempnam($temp_dir, 'zipmessage'); - $tmpfp = fopen($tmpfn, 'w'); - $imap->get_raw_body($uid, $tmpfp); - $tempfiles[] = $tmpfn; - fclose($tmpfp); - $zip->addFile($tmpfn, $disp_name); - } - - $zip->close(); - - $this->_deliver_zipfile($tmpfname, $imap->get_folder() . '.zip'); - - // delete temporary files from disk - foreach ($tempfiles as $tmpfn) - unlink($tmpfn); - - exit; - } - - /** - * Helper method to send the zip archive to the browser - */ - private function _deliver_zipfile($tmpfname, $filename) - { - $browser = new rcube_browser; - $rcmail = rcmail::get_instance(); - - $rcmail->output->nocacheing_headers(); - - if ($browser->ie && $browser->ver < 7) - $filename = rawurlencode(abbreviate_string($filename, 55)); - else if ($browser->ie) - $filename = rawurlencode($filename); - else - $filename = addcslashes($filename, '"'); - - // send download headers - header("Content-Type: application/octet-stream"); - if ($browser->ie) - header("Content-Type: application/force-download"); - - // don't kill the connection if download takes more than 30 sec. - @set_time_limit(0); - header("Content-Disposition: attachment; filename=\"". $filename ."\""); - header("Content-length: " . filesize($tmpfname)); - readfile($tmpfname); - } - - /** - * Helper function to convert filenames to the configured charset - */ - private function _convert_filename($str) - { + public $task = 'mail'; + private $charset = 'ASCII'; + + /** + * Plugin initialization + */ + public function init() + { + // check requirements first + if (!class_exists('ZipArchive', false)) { + rcmail::raise_error(array( + 'code' => 520, + 'file' => __FILE__, + 'line' => __LINE__, + 'message' => "php_zip extension is required for the zipdownload plugin"), true, false); + return; + } + + $rcmail = rcmail::get_instance(); + + $this->load_config(); + $this->charset = $rcmail->config->get('zipdownload_charset', RCUBE_CHARSET); + $this->add_texts('localization'); + + if ($rcmail->config->get('zipdownload_attachments', 1) > -1 && ($rcmail->action == 'show' || $rcmail->action == 'preview')) { + $this->add_hook('template_object_messageattachments', array($this, 'attachment_ziplink')); + } + + $this->register_action('plugin.zipdownload.zip_attachments', array($this, 'download_attachments')); + $this->register_action('plugin.zipdownload.zip_messages', array($this, 'download_selection')); + $this->register_action('plugin.zipdownload.zip_folder', array($this, 'download_folder')); + + if (($selection = $rcmail->config->get('zipdownload_selection')) || $rcmail->config->get('zipdownload_folder')) { + $this->include_script('zipdownload.js'); + $this->api->output->set_env('zipdownload_selection', $selection); + + if ($rcmail->config->get('zipdownload_folder', false) && ($rcmail->action == '' || $rcmail->action == 'show')) { + $zipdownload = $this->api->output->button(array('command' => 'plugin.zipdownload.zip_folder', 'type' => 'link', 'classact' => 'active', 'content' => $this->gettext('downloadfolder'))); + $this->api->add_content(html::tag('li', array('class' => 'separator_above'), $zipdownload), 'mailboxoptions'); + } + } + } + + /** + * Place a link/button after attachments listing to trigger download + */ + public function attachment_ziplink($p) + { + $rcmail = rcmail::get_instance(); + + // only show the link if there is more than the configured number of attachments + if (substr_count($p['content'], '<li') > $rcmail->config->get('zipdownload_attachments', 1)) { + $href = $rcmail->url(array( + '_action' => 'plugin.zipdownload.zip_attachments', + '_mbox' => $rcmail->output->env['mailbox'], + '_uid' => $rcmail->output->env['uid'], + )); + + $link = html::a(array('href' => $href, 'class' => 'button zipdownload'), + rcube::Q($this->gettext('downloadall')) + ); + + // append link to attachments list, slightly different in some skins + switch (rcmail::get_instance()->config->get('skin')) { + case 'classic': + $p['content'] = str_replace('</ul>', html::tag('li', array('class' => 'zipdownload'), $link) . '</ul>', $p['content']); + break; + + default: + $p['content'] .= $link; + break; + } + + $this->include_stylesheet($this->local_skin_path() . '/zipdownload.css'); + } + + return $p; + } + + /** + * Handler for attachment download action + */ + public function download_attachments() + { + $rcmail = rcmail::get_instance(); + $imap = $rcmail->get_storage(); + $temp_dir = $rcmail->config->get('temp_dir'); + $tmpfname = tempnam($temp_dir, 'zipdownload'); + $tempfiles = array($tmpfname); + $message = new rcube_message(rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET)); + + // open zip file + $zip = new ZipArchive(); + $zip->open($tmpfname, ZIPARCHIVE::OVERWRITE); + + foreach ($message->attachments as $part) { + $pid = $part->mime_id; + $part = $message->mime_parts[$pid]; + $filename = $part->filename; + + if ($filename === null || $filename === '') { + $ext = (array) rcube_mime::get_mime_extensions($part->mimetype); + $ext = array_shift($ext); + $filename = $rcmail->gettext('messagepart') . ' ' . $pid; + if ($ext) { + $filename .= '.' . $ext; + } + } + + $disp_name = $this->_convert_filename($filename); + + if ($part->body) { + $orig_message_raw = $part->body; + $zip->addFromString($disp_name, $orig_message_raw); + } + else { + $tmpfn = tempnam($temp_dir, 'zipattach'); + $tmpfp = fopen($tmpfn, 'w'); + $imap->get_message_part($message->uid, $part->mime_id, $part, null, $tmpfp, true); + $tempfiles[] = $tmpfn; + fclose($tmpfp); + $zip->addFile($tmpfn, $disp_name); + } + } + + $zip->close(); + + $filename = ($message->subject ? $message->subject : 'roundcube') . '.zip'; + $this->_deliver_zipfile($tmpfname, $filename); + + // delete temporary files from disk + foreach ($tempfiles as $tmpfn) { + unlink($tmpfn); + } + + exit; + } + + /** + * Handler for message download action + */ + public function download_selection() + { + if (isset($_REQUEST['_uid'])) { + $uids = explode(",", rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GPC)); + + if (sizeof($uids) > 0) { + $this->_download_messages($uids); + } + } + } + + /** + * Handler for folder download action + */ + public function download_folder() + { + $imap = rcmail::get_instance()->get_storage(); + $mbox_name = $imap->get_folder(); + + // initialize searching result if search_filter is used + if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') { + $imap->search($mbox_name, $_SESSION['search_filter'], RCUBE_CHARSET); + } + + // fetch message headers for all pages + $uids = array(); + if ($count = $imap->count($mbox_name, $imap->get_threading() ? 'THREADS' : 'ALL', FALSE)) { + for ($i = 0; ($i * $imap->get_pagesize()) <= $count; $i++) { + $a_headers = $imap->list_messages($mbox_name, ($i + 1)); + + foreach ($a_headers as $header) { + if (empty($header)) + continue; + + array_push($uids, $header->uid); + } + } + } + + if (sizeof($uids) > 0) + $this->_download_messages($uids); + } + + /** + * Helper method to packs all the given messages into a zip archive + * + * @param array List of message UIDs to download + */ + private function _download_messages($uids) + { + $rcmail = rcmail::get_instance(); + $imap = $rcmail->get_storage(); + $temp_dir = $rcmail->config->get('temp_dir'); + $tmpfname = tempnam($temp_dir, 'zipdownload'); + $tempfiles = array($tmpfname); + + // open zip file + $zip = new ZipArchive(); + $zip->open($tmpfname, ZIPARCHIVE::OVERWRITE); + + foreach ($uids as $uid){ + $headers = $imap->get_message_headers($uid); + $subject = rcube_mime::decode_mime_string((string)$headers->subject); + $subject = $this->_convert_filename($subject); + $subject = substr($subject, 0, 16); + + $disp_name = ($subject ? $subject : 'message_rfc822') . ".eml"; + $disp_name = $uid . "_" . $disp_name; + + $tmpfn = tempnam($temp_dir, 'zipmessage'); + $tmpfp = fopen($tmpfn, 'w'); + $imap->get_raw_body($uid, $tmpfp); + $tempfiles[] = $tmpfn; + fclose($tmpfp); + $zip->addFile($tmpfn, $disp_name); + } + + $zip->close(); + + $this->_deliver_zipfile($tmpfname, $imap->get_folder() . '.zip'); + + // delete temporary files from disk + foreach ($tempfiles as $tmpfn) { + unlink($tmpfn); + } + + exit; + } + + /** + * Helper method to send the zip archive to the browser + */ + private function _deliver_zipfile($tmpfname, $filename) + { + $browser = new rcube_browser; + $rcmail = rcmail::get_instance(); + + $rcmail->output->nocacheing_headers(); + + if ($browser->ie && $browser->ver < 7) + $filename = rawurlencode(abbreviate_string($filename, 55)); + else if ($browser->ie) + $filename = rawurlencode($filename); + else + $filename = addcslashes($filename, '"'); + + // send download headers + header("Content-Type: application/octet-stream"); + if ($browser->ie) { + header("Content-Type: application/force-download"); + } + + // don't kill the connection if download takes more than 30 sec. + @set_time_limit(0); + header("Content-Disposition: attachment; filename=\"". $filename ."\""); + header("Content-length: " . filesize($tmpfname)); + readfile($tmpfname); + } + + /** + * Helper function to convert filenames to the configured charset + */ + private function _convert_filename($str) + { $str = rcube_charset::convert($str, RCUBE_CHARSET, $this->charset); - return strtr($str, array(':'=>'', '/'=>'-')); - } + return strtr($str, array(':'=>'', '/'=>'-')); + } } diff --git a/program/.htaccess b/program/.htaccess deleted file mode 100644 index be9e7e25a..000000000 --- a/program/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -<IfModule mod_rewrite.c> -RewriteEngine On -RewriteRule !^(js|resources) - [F] -</IfModule> diff --git a/program/include/bc.php b/program/include/bc.php index a7d7b5ac1..2cb151798 100644 --- a/program/include/bc.php +++ b/program/include/bc.php @@ -22,7 +22,7 @@ /** * Roundcube Webmail deprecated functions * - * @package Core + * @package Webmail * @subpackage Legacy * @author Thomas Bruederli <roundcube@gmail.com> */ diff --git a/program/include/clisetup.php b/program/include/clisetup.php index 07e318521..47a40719a 100644 --- a/program/include/clisetup.php +++ b/program/include/clisetup.php @@ -20,7 +20,7 @@ */ if (php_sapi_name() != 'cli') { - die('Not on the "shell" (php-cli).'); + die('Not on the "shell" (php-cli).'); } require_once INSTALL_PATH . 'program/include/iniset.php'; diff --git a/program/include/iniset.php b/program/include/iniset.php index 919cc7682..f6ad466da 100644 --- a/program/include/iniset.php +++ b/program/include/iniset.php @@ -84,4 +84,3 @@ function rcmail_autoload($classname) return false; } - diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 0483f0e18..d1b544135 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -5,8 +5,8 @@ | program/include/rcmail.php | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | - | Copyright (C) 2011-2012, Kolab Systems AG | + | Copyright (C) 2008-2014, The Roundcube Dev Team | + | Copyright (C) 2011-2014, Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -21,584 +21,642 @@ +-----------------------------------------------------------------------+ */ - /** * Application class of Roundcube Webmail * implemented as singleton * - * @package Core + * @package Webmail */ class rcmail extends rcube { - /** - * Main tasks. - * - * @var array - */ - static public $main_tasks = array('mail','settings','addressbook','login','logout','utils','dummy'); - - /** - * Current task. - * - * @var string - */ - public $task; - - /** - * Current action. - * - * @var string - */ - public $action = ''; - public $comm_path = './'; - public $filename = ''; - - private $address_books = array(); - private $action_map = array(); - - - const ERROR_STORAGE = -2; - const ERROR_INVALID_REQUEST = 1; - const ERROR_INVALID_HOST = 2; - const ERROR_COOKIES_DISABLED = 3; - - - /** - * This implements the 'singleton' design pattern - * - * @param string Environment name to run (e.g. live, dev, test) - * @return rcmail The one and only instance - */ - static function get_instance($env = '') - { - if (!self::$instance || !is_a(self::$instance, 'rcmail')) { - self::$instance = new rcmail($env); - self::$instance->startup(); // init AFTER object was linked with self::$instance - } + /** + * Main tasks. + * + * @var array + */ + static public $main_tasks = array('mail','settings','addressbook','login','logout','utils','dummy'); - return self::$instance; - } - - - /** - * Initial startup function - * to register session, create database and imap connections - */ - protected function startup() - { - $this->init(self::INIT_WITH_DB | self::INIT_WITH_PLUGINS); - - // set filename if not index.php - if (($basename = basename($_SERVER['SCRIPT_FILENAME'])) && $basename != 'index.php') - $this->filename = $basename; - - // start session - $this->session_init(); - - // create user object - $this->set_user(new rcube_user($_SESSION['user_id'])); - - // set task and action properties - $this->set_task(rcube_utils::get_input_value('_task', rcube_utils::INPUT_GPC)); - $this->action = asciiwords(rcube_utils::get_input_value('_action', rcube_utils::INPUT_GPC)); - - // reset some session parameters when changing task - if ($this->task != 'utils') { - // we reset list page when switching to another task - // but only to the main task interface - empty action (#1489076) - // this will prevent from unintentional page reset on cross-task requests - if ($this->session && $_SESSION['task'] != $this->task && empty($this->action)) - $this->session->remove('page'); - // set current task to session - $_SESSION['task'] = $this->task; - } + /** + * Current task. + * + * @var string + */ + public $task; - // init output class - if (!empty($_REQUEST['_remote'])) - $GLOBALS['OUTPUT'] = $this->json_init(); - else - $GLOBALS['OUTPUT'] = $this->load_gui(!empty($_REQUEST['_framed'])); - - // load plugins - $this->plugins->init($this, $this->task); - $this->plugins->load_plugins((array)$this->config->get('plugins', array()), array('filesystem_attachments', 'jqueryui')); - } - - - /** - * Setter for application task - * - * @param string Task to set - */ - public function set_task($task) - { - $task = asciiwords($task, true); - - if ($this->user && $this->user->ID) - $task = !$task ? 'mail' : $task; - else - $task = 'login'; - - $this->task = $task; - $this->comm_path = $this->url(array('task' => $this->task)); - - if ($this->output) - $this->output->set_env('task', $this->task); - } - - - /** - * Setter for system user object - * - * @param rcube_user Current user instance - */ - public function set_user($user) - { - if (is_object($user)) { - $this->user = $user; - - // overwrite config with user preferences - $this->config->set_user_prefs((array)$this->user->get_prefs()); - } + /** + * Current action. + * + * @var string + */ + public $action = ''; + public $comm_path = './'; + public $filename = ''; - $lang = $this->language_prop($this->config->get('language', $_SESSION['language'])); - $_SESSION['language'] = $this->user->language = $lang; + private $address_books = array(); + private $action_map = array(); - // set localization - setlocale(LC_ALL, $lang . '.utf8', $lang . '.UTF-8', 'en_US.utf8', 'en_US.UTF-8'); - // workaround for http://bugs.php.net/bug.php?id=18556 - if (version_compare(PHP_VERSION, '5.5.0', '<') && in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) { - setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8'); - } - } - - - /** - * Return instance of the internal address book class - * - * @param string Address book identifier (-1 for default addressbook) - * @param boolean True if the address book needs to be writeable - * - * @return rcube_contacts Address book object - */ - public function get_address_book($id, $writeable = false) - { - $contacts = null; - $ldap_config = (array)$this->config->get('ldap_public'); - - // 'sql' is the alias for '0' used by autocomplete - if ($id == 'sql') - $id = '0'; - else if ($id == -1) { - $id = $this->config->get('default_addressbook'); - $default = true; - } + const ERROR_STORAGE = -2; + const ERROR_INVALID_REQUEST = 1; + const ERROR_INVALID_HOST = 2; + const ERROR_COOKIES_DISABLED = 3; - // use existing instance - if (isset($this->address_books[$id]) && ($this->address_books[$id] instanceof rcube_addressbook)) { - $contacts = $this->address_books[$id]; - } - else if ($id && $ldap_config[$id]) { - $contacts = new rcube_ldap($ldap_config[$id], $this->config->get('ldap_debug'), $this->config->mail_domain($_SESSION['storage_host'])); - } - else if ($id === '0') { - $contacts = new rcube_contacts($this->db, $this->get_user_id()); - } - else { - $plugin = $this->plugins->exec_hook('addressbook_get', array('id' => $id, 'writeable' => $writeable)); - // plugin returned instance of a rcube_addressbook - if ($plugin['instance'] instanceof rcube_addressbook) { - $contacts = $plugin['instance']; - } - } + /** + * This implements the 'singleton' design pattern + * + * @param string Environment name to run (e.g. live, dev, test) + * + * @return rcmail The one and only instance + */ + static function get_instance($env = '') + { + if (!self::$instance || !is_a(self::$instance, 'rcmail')) { + self::$instance = new rcmail($env); + // init AFTER object was linked with self::$instance + self::$instance->startup(); + } - // when user requested default writeable addressbook - // we need to check if default is writeable, if not we - // will return first writeable book (if any exist) - if ($contacts && $default && $contacts->readonly && $writeable) { - $contacts = null; + return self::$instance; } - // Get first addressbook from the list if configured default doesn't exist - // This can happen when user deleted the addressbook (e.g. Kolab folder) - if (!$contacts && (!$id || $default)) { - $source = reset($this->get_address_sources($writeable, !$default)); - if (!empty($source)) { - $contacts = $this->get_address_book($source['id']); - if ($contacts) { - $id = $source['id']; + /** + * Initial startup function + * to register session, create database and imap connections + */ + protected function startup() + { + $this->init(self::INIT_WITH_DB | self::INIT_WITH_PLUGINS); + + // set filename if not index.php + if (($basename = basename($_SERVER['SCRIPT_FILENAME'])) && $basename != 'index.php') { + $this->filename = $basename; } - } - } - if (!$contacts) { - // there's no default, just return - if ($default) { - return null; - } - - self::raise_error(array( - 'code' => 700, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Addressbook source ($id) not found!"), - true, true); - } + // start session + $this->session_init(); - // add to the 'books' array for shutdown function - $this->address_books[$id] = $contacts; + // create user object + $this->set_user(new rcube_user($_SESSION['user_id'])); - if ($writeable && $contacts->readonly) { - return null; - } + // set task and action properties + $this->set_task(rcube_utils::get_input_value('_task', rcube_utils::INPUT_GPC)); + $this->action = asciiwords(rcube_utils::get_input_value('_action', rcube_utils::INPUT_GPC)); - // set configured sort order - if ($sort_col = $this->config->get('addressbook_sort_col')) { - $contacts->set_sort_order($sort_col); - } + // reset some session parameters when changing task + if ($this->task != 'utils') { + // we reset list page when switching to another task + // but only to the main task interface - empty action (#1489076) + // this will prevent from unintentional page reset on cross-task requests + if ($this->session && $_SESSION['task'] != $this->task && empty($this->action)) { + $this->session->remove('page'); + } - return $contacts; - } - - - /** - * Return identifier of the address book object - * - * @param rcube_addressbook Addressbook source object - * - * @return string Source identifier - */ - public function get_address_book_id($object) - { - foreach ($this->address_books as $index => $book) { - if ($book === $object) { - return $index; - } - } - } - - - /** - * Return address books list - * - * @param boolean True if the address book needs to be writeable - * @param boolean True if the address book needs to be not hidden - * - * @return array Address books array - */ - public function get_address_sources($writeable = false, $skip_hidden = false) - { - $abook_type = (string) $this->config->get('address_book_type'); - $ldap_config = (array) $this->config->get('ldap_public'); - $autocomplete = (array) $this->config->get('autocomplete_addressbooks'); - $list = array(); - - // We are using the DB address book or a plugin address book - if (!empty($abook_type) && strtolower($abook_type) != 'ldap') { - if (!isset($this->address_books['0'])) - $this->address_books['0'] = new rcube_contacts($this->db, $this->get_user_id()); - $list['0'] = array( - 'id' => '0', - 'name' => $this->gettext('personaladrbook'), - 'groups' => $this->address_books['0']->groups, - 'readonly' => $this->address_books['0']->readonly, - 'autocomplete' => in_array('sql', $autocomplete), - 'undelete' => $this->address_books['0']->undelete && $this->config->get('undo_timeout'), - ); - } + // set current task to session + $_SESSION['task'] = $this->task; + } - if (!empty($ldap_config)) { - foreach ($ldap_config as $id => $prop) { - // handle misconfiguration - if (empty($prop) || !is_array($prop)) { - continue; - } - $list[$id] = array( - 'id' => $id, - 'name' => html::quote($prop['name']), - 'groups' => !empty($prop['groups']) || !empty($prop['group_filters']), - 'readonly' => !$prop['writable'], - 'hidden' => $prop['hidden'], - 'autocomplete' => in_array($id, $autocomplete) - ); - } - } + // init output class + if (!empty($_REQUEST['_remote'])) + $GLOBALS['OUTPUT'] = $this->json_init(); + else + $GLOBALS['OUTPUT'] = $this->load_gui(!empty($_REQUEST['_framed'])); - $plugin = $this->plugins->exec_hook('addressbooks_list', array('sources' => $list)); - $list = $plugin['sources']; - - foreach ($list as $idx => $item) { - // register source for shutdown function - if (!is_object($this->address_books[$item['id']])) { - $this->address_books[$item['id']] = $item; - } - // remove from list if not writeable as requested - if ($writeable && $item['readonly']) { - unset($list[$idx]); - } - // remove from list if hidden as requested - else if ($skip_hidden && $item['hidden']) { - unset($list[$idx]); - } + // load plugins + $this->plugins->init($this, $this->task); + $this->plugins->load_plugins((array)$this->config->get('plugins', array()), + array('filesystem_attachments', 'jqueryui')); } - return $list; - } - - - /** - * Init output object for GUI and add common scripts. - * This will instantiate a rcmail_output_html object and set - * environment vars according to the current session and configuration - * - * @param boolean True if this request is loaded in a (i)frame - * @return rcube_output Reference to HTML output object - */ - public function load_gui($framed = false) - { - // init output page - if (!($this->output instanceof rcmail_output_html)) - $this->output = new rcmail_output_html($this->task, $framed); - - // set refresh interval - $this->output->set_env('refresh_interval', $this->config->get('refresh_interval', 0)); - $this->output->set_env('session_lifetime', $this->config->get('session_lifetime', 0) * 60); - - if ($framed) { - $this->comm_path .= '&_framed=1'; - $this->output->set_env('framed', true); - } + /** + * Setter for application task + * + * @param string Task to set + */ + public function set_task($task) + { + $task = asciiwords($task, true); - $this->output->set_env('task', $this->task); - $this->output->set_env('action', $this->action); - $this->output->set_env('comm_path', $this->comm_path); - $this->output->set_charset(RCUBE_CHARSET); - - // add some basic labels to client - $this->output->add_label('loading', 'servererror', 'requesttimedout', 'refreshing'); - - return $this->output; - } - - - /** - * Create an output object for JSON responses - * - * @return rcube_output Reference to JSON output object - */ - public function json_init() - { - if (!($this->output instanceof rcmail_output_json)) - $this->output = new rcmail_output_json($this->task); - - return $this->output; - } - - - /** - * Create session object and start the session. - */ - public function session_init() - { - parent::session_init(); - - // set initial session vars - if (!$_SESSION['user_id']) - $_SESSION['temp'] = true; - - // restore skin selection after logout - if ($_SESSION['temp'] && !empty($_SESSION['skin'])) - $this->config->set('skin', $_SESSION['skin']); - } - - - /** - * Perfom login to the mail server and to the webmail service. - * This will also create a new user entry if auto_create_user is configured. - * - * @param string Mail storage (IMAP) user name - * @param string Mail storage (IMAP) password - * @param string Mail storage (IMAP) host - * @param bool Enables cookie check - * - * @return boolean True on success, False on failure - */ - function login($username, $pass, $host = null, $cookiecheck = false) - { - $this->login_error = null; - - if (empty($username)) { - return false; - } + if ($this->user && $this->user->ID) + $task = !$task ? 'mail' : $task; + else + $task = 'login'; - if ($cookiecheck && empty($_COOKIE)) { - $this->login_error = self::ERROR_COOKIES_DISABLED; - return false; - } + $this->task = $task; + $this->comm_path = $this->url(array('task' => $this->task)); - $config = $this->config->all(); - - if (!$host) - $host = $config['default_host']; - - // Validate that selected host is in the list of configured hosts - if (is_array($config['default_host'])) { - $allowed = false; - foreach ($config['default_host'] as $key => $host_allowed) { - if (!is_numeric($key)) - $host_allowed = $key; - if ($host == $host_allowed) { - $allowed = true; - break; - } - } - if (!$allowed) { - $host = null; - } - } - else if (!empty($config['default_host']) && $host != rcube_utils::parse_host($config['default_host'])) { - $host = null; + if ($this->output) { + $this->output->set_env('task', $this->task); + } } - if (!$host) { - $this->login_error = self::ERROR_INVALID_HOST; - return false; - } + /** + * Setter for system user object + * + * @param rcube_user Current user instance + */ + public function set_user($user) + { + parent::set_user($user); - // parse $host URL - $a_host = parse_url($host); - if ($a_host['host']) { - $host = $a_host['host']; - $ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? $a_host['scheme'] : null; - if (!empty($a_host['port'])) - $port = $a_host['port']; - else if ($ssl && $ssl != 'tls' && (!$config['default_port'] || $config['default_port'] == 143)) - $port = 993; - } + $lang = $this->language_prop($this->config->get('language', $_SESSION['language'])); + $_SESSION['language'] = $this->user->language = $lang; - if (!$port) { - $port = $config['default_port']; + // set localization + setlocale(LC_ALL, $lang . '.utf8', $lang . '.UTF-8', 'en_US.utf8', 'en_US.UTF-8'); + + // workaround for http://bugs.php.net/bug.php?id=18556 + if (version_compare(PHP_VERSION, '5.5.0', '<') && in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) { + setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8'); + } } - // Check if we need to add/force domain to username - if (!empty($config['username_domain'])) { - $domain = is_array($config['username_domain']) ? $config['username_domain'][$host] : $config['username_domain']; + /** + * Return instance of the internal address book class + * + * @param string Address book identifier (-1 for default addressbook) + * @param boolean True if the address book needs to be writeable + * + * @return rcube_contacts Address book object + */ + public function get_address_book($id, $writeable = false) + { + $contacts = null; + $ldap_config = (array)$this->config->get('ldap_public'); - if ($domain = rcube_utils::parse_host((string)$domain, $host)) { - $pos = strpos($username, '@'); + // 'sql' is the alias for '0' used by autocomplete + if ($id == 'sql') + $id = '0'; + else if ($id == -1) { + $id = $this->config->get('default_addressbook'); + $default = true; + } - // force configured domains - if (!empty($config['username_domain_forced']) && $pos !== false) { - $username = substr($username, 0, $pos) . '@' . $domain; + // use existing instance + if (isset($this->address_books[$id]) && ($this->address_books[$id] instanceof rcube_addressbook)) { + $contacts = $this->address_books[$id]; } - // just add domain if not specified - else if ($pos === false) { - $username .= '@' . $domain; + else if ($id && $ldap_config[$id]) { + $domain = $this->config->mail_domain($_SESSION['storage_host']); + $contacts = new rcube_ldap($ldap_config[$id], $this->config->get('ldap_debug'), $domain); } - } - } + else if ($id === '0') { + $contacts = new rcube_contacts($this->db, $this->get_user_id()); + } + else { + $plugin = $this->plugins->exec_hook('addressbook_get', array('id' => $id, 'writeable' => $writeable)); - if (!isset($config['login_lc'])) { - $config['login_lc'] = 2; // default - } + // plugin returned instance of a rcube_addressbook + if ($plugin['instance'] instanceof rcube_addressbook) { + $contacts = $plugin['instance']; + } + } - // Convert username to lowercase. If storage backend - // is case-insensitive we need to store always the same username (#1487113) - if ($config['login_lc']) { - if ($config['login_lc'] == 2 || $config['login_lc'] === true) { - $username = mb_strtolower($username); - } - else if (strpos($username, '@')) { - // lowercase domain name - list($local, $domain) = explode('@', $username); - $username = $local . '@' . mb_strtolower($domain); - } + // when user requested default writeable addressbook + // we need to check if default is writeable, if not we + // will return first writeable book (if any exist) + if ($contacts && $default && $contacts->readonly && $writeable) { + $contacts = null; + } + + // Get first addressbook from the list if configured default doesn't exist + // This can happen when user deleted the addressbook (e.g. Kolab folder) + if (!$contacts && (!$id || $default)) { + $source = reset($this->get_address_sources($writeable, !$default)); + if (!empty($source)) { + $contacts = $this->get_address_book($source['id']); + if ($contacts) { + $id = $source['id']; + } + } + } + + if (!$contacts) { + // there's no default, just return + if ($default) { + return null; + } + + self::raise_error(array( + 'code' => 700, + 'file' => __FILE__, + 'line' => __LINE__, + 'message' => "Addressbook source ($id) not found!" + ), + true, true); + } + + // add to the 'books' array for shutdown function + $this->address_books[$id] = $contacts; + + if ($writeable && $contacts->readonly) { + return null; + } + + // set configured sort order + if ($sort_col = $this->config->get('addressbook_sort_col')) { + $contacts->set_sort_order($sort_col); + } + + return $contacts; } - // try to resolve email address from virtuser table - if (strpos($username, '@') && ($virtuser = rcube_user::email2user($username))) { - $username = $virtuser; + /** + * Return identifier of the address book object + * + * @param rcube_addressbook Addressbook source object + * + * @return string Source identifier + */ + public function get_address_book_id($object) + { + foreach ($this->address_books as $index => $book) { + if ($book === $object) { + return $index; + } + } } - // Here we need IDNA ASCII - // Only rcube_contacts class is using domain names in Unicode - $host = rcube_utils::idn_to_ascii($host); - $username = rcube_utils::idn_to_ascii($username); + /** + * Return address books list + * + * @param boolean True if the address book needs to be writeable + * @param boolean True if the address book needs to be not hidden + * + * @return array Address books array + */ + public function get_address_sources($writeable = false, $skip_hidden = false) + { + $abook_type = (string) $this->config->get('address_book_type'); + $ldap_config = (array) $this->config->get('ldap_public'); + $autocomplete = (array) $this->config->get('autocomplete_addressbooks'); + $list = array(); + + // We are using the DB address book or a plugin address book + if (!empty($abook_type) && strtolower($abook_type) != 'ldap') { + if (!isset($this->address_books['0'])) { + $this->address_books['0'] = new rcube_contacts($this->db, $this->get_user_id()); + } + + $list['0'] = array( + 'id' => '0', + 'name' => $this->gettext('personaladrbook'), + 'groups' => $this->address_books['0']->groups, + 'readonly' => $this->address_books['0']->readonly, + 'undelete' => $this->address_books['0']->undelete && $this->config->get('undo_timeout'), + 'autocomplete' => in_array('sql', $autocomplete), + ); + } + + if (!empty($ldap_config)) { + foreach ($ldap_config as $id => $prop) { + // handle misconfiguration + if (empty($prop) || !is_array($prop)) { + continue; + } - // user already registered -> overwrite username - if ($user = rcube_user::query($username, $host)) { - $username = $user->data['username']; + $list[$id] = array( + 'id' => $id, + 'name' => html::quote($prop['name']), + 'groups' => !empty($prop['groups']) || !empty($prop['group_filters']), + 'readonly' => !$prop['writable'], + 'hidden' => $prop['hidden'], + 'autocomplete' => in_array($id, $autocomplete) + ); + } + } + + $plugin = $this->plugins->exec_hook('addressbooks_list', array('sources' => $list)); + $list = $plugin['sources']; + + foreach ($list as $idx => $item) { + // register source for shutdown function + if (!is_object($this->address_books[$item['id']])) { + $this->address_books[$item['id']] = $item; + } + // remove from list if not writeable as requested + if ($writeable && $item['readonly']) { + unset($list[$idx]); + } + // remove from list if hidden as requested + else if ($skip_hidden && $item['hidden']) { + unset($list[$idx]); + } + } + + return $list; } - $storage = $this->get_storage(); + /** + * Getter for compose responses. + * These are stored in local config and user preferences. + * + * @param boolean True to sort the list alphabetically + * @param boolean True if only this user's responses shall be listed + * + * @return array List of the current user's stored responses + */ + public function get_compose_responses($sorted = false, $user_only = false) + { + $responses = array(); + + if (!$user_only) { + foreach ($this->config->get('compose_responses_static', array()) as $response) { + if (empty($response['key'])) { + $response['key'] = substr(md5($response['name']), 0, 16); + } + + $response['static'] = true; + $response['class'] = 'readonly'; + + $k = $sorted ? '0000-' . strtolower($response['name']) : $response['key']; + $responses[$k] = $response; + } + } + + foreach ($this->config->get('compose_responses', array()) as $response) { + if (empty($response['key'])) { + $response['key'] = substr(md5($response['name']), 0, 16); + } - // try to log in - if (!$storage->connect($host, $username, $pass, $port, $ssl)) { - return false; + $k = $sorted ? strtolower($response['name']) : $response['key']; + $responses[$k] = $response; + } + + // sort list by name + if ($sorted) { + ksort($responses, SORT_LOCALE_STRING); + } + + return array_values($responses); } - // user already registered -> update user's record - if (is_object($user)) { - // update last login timestamp - $user->touch(); + /** + * Init output object for GUI and add common scripts. + * This will instantiate a rcmail_output_html object and set + * environment vars according to the current session and configuration + * + * @param boolean True if this request is loaded in a (i)frame + * + * @return rcube_output Reference to HTML output object + */ + public function load_gui($framed = false) + { + // init output page + if (!($this->output instanceof rcmail_output_html)) { + $this->output = new rcmail_output_html($this->task, $framed); + } + + // set refresh interval + $this->output->set_env('refresh_interval', $this->config->get('refresh_interval', 0)); + $this->output->set_env('session_lifetime', $this->config->get('session_lifetime', 0) * 60); + + if ($framed) { + $this->comm_path .= '&_framed=1'; + $this->output->set_env('framed', true); + } + + $this->output->set_env('task', $this->task); + $this->output->set_env('action', $this->action); + $this->output->set_env('comm_path', $this->comm_path); + $this->output->set_charset(RCUBE_CHARSET); + + if ($this->user && $this->user->ID) { + $this->output->set_env('user_id', $this->user->get_hash()); + } + + // add some basic labels to client + $this->output->add_label('loading', 'servererror', 'requesttimedout', 'refreshing'); + + return $this->output; } - // create new system user - else if ($config['auto_create_user']) { - if ($created = rcube_user::create($username, $host)) { - $user = $created; - } - else { - self::raise_error(array( - 'code' => 620, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Failed to create a user record. Maybe aborted by a plugin?" - ), true, false); - } + + /** + * Create an output object for JSON responses + * + * @return rcube_output Reference to JSON output object + */ + public function json_init() + { + if (!($this->output instanceof rcmail_output_json)) { + $this->output = new rcmail_output_json($this->task); + } + + return $this->output; } - else { - self::raise_error(array( - 'code' => 621, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Access denied for new user $username. 'auto_create_user' is disabled" - ), true, false); + + /** + * Create session object and start the session. + */ + public function session_init() + { + parent::session_init(); + + // set initial session vars + if (!$_SESSION['user_id']) { + $_SESSION['temp'] = true; + } + + // restore skin selection after logout + if ($_SESSION['temp'] && !empty($_SESSION['skin'])) { + $this->config->set('skin', $_SESSION['skin']); + } } - // login succeeded - if (is_object($user) && $user->ID) { - // Configure environment - $this->set_user($user); - $this->set_storage_prop(); + /** + * Perfom login to the mail server and to the webmail service. + * This will also create a new user entry if auto_create_user is configured. + * + * @param string Mail storage (IMAP) user name + * @param string Mail storage (IMAP) password + * @param string Mail storage (IMAP) host + * @param bool Enables cookie check + * + * @return boolean True on success, False on failure + */ + function login($username, $pass, $host = null, $cookiecheck = false) + { + $this->login_error = null; - // fix some old settings according to namespace prefix - $this->fix_namespace_settings($user); + if (empty($username)) { + return false; + } - // create default folders on first login - if ($config['create_default_folders'] && (!empty($created) || empty($user->data['last_login']))) { - $storage->create_default_folders(); - } + if ($cookiecheck && empty($_COOKIE)) { + $this->login_error = self::ERROR_COOKIES_DISABLED; + return false; + } - // set session vars - $_SESSION['user_id'] = $user->ID; - $_SESSION['username'] = $user->data['username']; - $_SESSION['storage_host'] = $host; - $_SESSION['storage_port'] = $port; - $_SESSION['storage_ssl'] = $ssl; - $_SESSION['password'] = $this->encrypt($pass); - $_SESSION['login_time'] = time(); + $default_host = $this->config->get('default_host'); + $default_port = $this->config->get('default_port'); + $username_domain = $this->config->get('username_domain'); + $login_lc = $this->config->get('login_lc', 2); - if (isset($_REQUEST['_timezone']) && $_REQUEST['_timezone'] != '_default_') - $_SESSION['timezone'] = rcube_utils::get_input_value('_timezone', rcube_utils::INPUT_GPC); + if (!$host) { + $host = $default_host; + } - // force reloading complete list of subscribed mailboxes - $storage->clear_cache('mailboxes', true); + // Validate that selected host is in the list of configured hosts + if (is_array($default_host)) { + $allowed = false; - return true; - } + foreach ($default_host as $key => $host_allowed) { + if (!is_numeric($key)) { + $host_allowed = $key; + } + if ($host == $host_allowed) { + $allowed = true; + break; + } + } + + if (!$allowed) { + $host = null; + } + } + else if (!empty($default_host) && $host != rcube_utils::parse_host($default_host)) { + $host = null; + } + + if (!$host) { + $this->login_error = self::ERROR_INVALID_HOST; + return false; + } + + // parse $host URL + $a_host = parse_url($host); + if ($a_host['host']) { + $host = $a_host['host']; + $ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? $a_host['scheme'] : null; + + if (!empty($a_host['port'])) + $port = $a_host['port']; + else if ($ssl && $ssl != 'tls' && (!$default_port || $default_port == 143)) + $port = 993; + } + + if (!$port) { + $port = $default_port; + } - return false; - } + // Check if we need to add/force domain to username + if (!empty($username_domain)) { + $domain = is_array($username_domain) ? $username_domain[$host] : $username_domain; + if ($domain = rcube_utils::parse_host((string)$domain, $host)) { + $pos = strpos($username, '@'); + + // force configured domains + if ($pos !== false && $this->config->get('username_domain_forced')) { + $username = substr($username, 0, $pos) . '@' . $domain; + } + // just add domain if not specified + else if ($pos === false) { + $username .= '@' . $domain; + } + } + } + + // Convert username to lowercase. If storage backend + // is case-insensitive we need to store always the same username (#1487113) + if ($login_lc) { + if ($login_lc == 2 || $login_lc === true) { + $username = mb_strtolower($username); + } + else if (strpos($username, '@')) { + // lowercase domain name + list($local, $domain) = explode('@', $username); + $username = $local . '@' . mb_strtolower($domain); + } + } + + // try to resolve email address from virtuser table + if (strpos($username, '@') && ($virtuser = rcube_user::email2user($username))) { + $username = $virtuser; + } + + // Here we need IDNA ASCII + // Only rcube_contacts class is using domain names in Unicode + $host = rcube_utils::idn_to_ascii($host); + $username = rcube_utils::idn_to_ascii($username); + + // user already registered -> overwrite username + if ($user = rcube_user::query($username, $host)) { + $username = $user->data['username']; + } + + $storage = $this->get_storage(); + + // try to log in + if (!$storage->connect($host, $username, $pass, $port, $ssl)) { + return false; + } + + // user already registered -> update user's record + if (is_object($user)) { + // update last login timestamp + $user->touch(); + } + // create new system user + else if ($this->config->get('auto_create_user')) { + if ($created = rcube_user::create($username, $host)) { + $user = $created; + } + else { + self::raise_error(array( + 'code' => 620, + 'file' => __FILE__, + 'line' => __LINE__, + 'message' => "Failed to create a user record. Maybe aborted by a plugin?" + ), + true, false); + } + } + else { + self::raise_error(array( + 'code' => 621, + 'file' => __FILE__, + 'line' => __LINE__, + 'message' => "Access denied for new user $username. 'auto_create_user' is disabled" + ), + true, false); + } + + // login succeeded + if (is_object($user) && $user->ID) { + // Configure environment + $this->set_user($user); + $this->set_storage_prop(); + + // set session vars + $_SESSION['user_id'] = $user->ID; + $_SESSION['username'] = $user->data['username']; + $_SESSION['storage_host'] = $host; + $_SESSION['storage_port'] = $port; + $_SESSION['storage_ssl'] = $ssl; + $_SESSION['password'] = $this->encrypt($pass); + $_SESSION['login_time'] = time(); + + if (isset($_REQUEST['_timezone']) && $_REQUEST['_timezone'] != '_default_') { + $_SESSION['timezone'] = rcube_utils::get_input_value('_timezone', rcube_utils::INPUT_GPC); + } + + // fix some old settings according to namespace prefix + $this->fix_namespace_settings($user); + + // create default folders on login + if ($this->config->get('create_default_folders')) { + $storage->create_default_folders(); + } + + // clear all mailboxes related cache(s) + $storage->clear_cache('mailboxes', true); + + return true; + } + + return false; + } /** * Returns error code of last login operation @@ -616,315 +674,317 @@ class rcmail extends rcube } } + /** + * Auto-select IMAP host based on the posted login information + * + * @return string Selected IMAP host + */ + public function autoselect_host() + { + $default_host = $this->config->get('default_host'); + $host = null; - /** - * Auto-select IMAP host based on the posted login information - * - * @return string Selected IMAP host - */ - public function autoselect_host() - { - $default_host = $this->config->get('default_host'); - $host = null; - - if (is_array($default_host)) { - $post_host = rcube_utils::get_input_value('_host', rcube_utils::INPUT_POST); - $post_user = rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST); - - list(, $domain) = explode('@', $post_user); - - // direct match in default_host array - if ($default_host[$post_host] || in_array($post_host, array_values($default_host))) { - $host = $post_host; - } - // try to select host by mail domain - else if (!empty($domain)) { - foreach ($default_host as $storage_host => $mail_domains) { - if (is_array($mail_domains) && in_array_nocase($domain, $mail_domains)) { - $host = $storage_host; - break; - } - else if (stripos($storage_host, $domain) !== false || stripos(strval($mail_domains), $domain) !== false) { - $host = is_numeric($storage_host) ? $mail_domains : $storage_host; - break; - } + if (is_array($default_host)) { + $post_host = rcube_utils::get_input_value('_host', rcube_utils::INPUT_POST); + $post_user = rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST); + + list(, $domain) = explode('@', $post_user); + + // direct match in default_host array + if ($default_host[$post_host] || in_array($post_host, array_values($default_host))) { + $host = $post_host; + } + // try to select host by mail domain + else if (!empty($domain)) { + foreach ($default_host as $storage_host => $mail_domains) { + if (is_array($mail_domains) && in_array_nocase($domain, $mail_domains)) { + $host = $storage_host; + break; + } + else if (stripos($storage_host, $domain) !== false || stripos(strval($mail_domains), $domain) !== false) { + $host = is_numeric($storage_host) ? $mail_domains : $storage_host; + break; + } + } + } + + // take the first entry if $host is still not set + if (empty($host)) { + list($key, $val) = each($default_host); + $host = is_numeric($key) ? $val : $key; + } + } + else if (empty($default_host)) { + $host = rcube_utils::get_input_value('_host', rcube_utils::INPUT_POST); + } + else { + $host = rcube_utils::parse_host($default_host); } - } - // take the first entry if $host is still not set - if (empty($host)) { - list($key, $val) = each($default_host); - $host = is_numeric($key) ? $val : $key; - } + return $host; } - else if (empty($default_host)) { - $host = rcube_utils::get_input_value('_host', rcube_utils::INPUT_POST); + + /** + * Destroy session data and remove cookie + */ + public function kill_session() + { + $this->plugins->exec_hook('session_destroy'); + + $this->session->kill(); + $_SESSION = array('language' => $this->user->language, 'temp' => true, 'skin' => $this->config->get('skin')); + $this->user->reset(); } - else - $host = rcube_utils::parse_host($default_host); - return $host; - } + /** + * Do server side actions on logout + */ + public function logout_actions() + { + $config = $this->config->all(); + $storage = $this->get_storage(); + if ($config['logout_purge'] && !empty($config['trash_mbox'])) { + $storage->clear_folder($config['trash_mbox']); + } - /** - * Destroy session data and remove cookie - */ - public function kill_session() - { - $this->plugins->exec_hook('session_destroy'); + if ($config['logout_expunge']) { + $storage->expunge_folder('INBOX'); + } - $this->session->kill(); - $_SESSION = array('language' => $this->user->language, 'temp' => true, 'skin' => $this->config->get('skin')); - $this->user->reset(); - } + // Try to save unsaved user preferences + if (!empty($_SESSION['preferences'])) { + $this->user->save_prefs(unserialize($_SESSION['preferences'])); + } + } + /** + * Generate a unique token to be used in a form request + * + * @return string The request token + */ + public function get_request_token() + { + $sess_id = $_COOKIE[ini_get('session.name')]; - /** - * Do server side actions on logout - */ - public function logout_actions() - { - $config = $this->config->all(); - $storage = $this->get_storage(); + if (!$sess_id) { + $sess_id = session_id(); + } - if ($config['logout_purge'] && !empty($config['trash_mbox'])) { - $storage->clear_folder($config['trash_mbox']); - } + $plugin = $this->plugins->exec_hook('request_token', array( + 'value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id))); - if ($config['logout_expunge']) { - $storage->expunge_folder('INBOX'); + return $plugin['value']; } - // Try to save unsaved user preferences - if (!empty($_SESSION['preferences'])) { - $this->user->save_prefs(unserialize($_SESSION['preferences'])); - } - } - - - /** - * Generate a unique token to be used in a form request - * - * @return string The request token - */ - public function get_request_token() - { - $sess_id = $_COOKIE[ini_get('session.name')]; - if (!$sess_id) $sess_id = session_id(); - - $plugin = $this->plugins->exec_hook('request_token', array( - 'value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id))); - - return $plugin['value']; - } - - - /** - * Check if the current request contains a valid token - * - * @param int Request method - * @return boolean True if request token is valid false if not - */ - public function check_request($mode = rcube_utils::INPUT_POST) - { - $token = rcube_utils::get_input_value('_token', $mode); - $sess_id = $_COOKIE[ini_get('session.name')]; - return !empty($sess_id) && $token == $this->get_request_token(); - } - - - /** - * Build a valid URL to this instance of Roundcube - * - * @param mixed Either a string with the action or url parameters as key-value pairs - * - * @return string Valid application URL - */ - public function url($p) - { - if (!is_array($p)) { - if (strpos($p, 'http') === 0) - return $p; - - $p = array('_action' => @func_get_arg(0)); - } + /** + * Check if the current request contains a valid token + * + * @param int Request method + * + * @return boolean True if request token is valid false if not + */ + public function check_request($mode = rcube_utils::INPUT_POST) + { + $token = rcube_utils::get_input_value('_token', $mode); + $sess_id = $_COOKIE[ini_get('session.name')]; - $task = $p['_task'] ? $p['_task'] : ($p['task'] ? $p['task'] : $this->task); - $p['_task'] = $task; - unset($p['task']); - - $url = './' . $this->filename; - $delm = '?'; - foreach (array_reverse($p) as $key => $val) { - if ($val !== '' && $val !== null) { - $par = $key[0] == '_' ? $key : '_'.$key; - $url .= $delm.urlencode($par).'='.urlencode($val); - $delm = '&'; - } + return !empty($sess_id) && $token == $this->get_request_token(); } - return $url; - } + /** + * Build a valid URL to this instance of Roundcube + * + * @param mixed Either a string with the action or url parameters as key-value pairs + * + * @return string Valid application URL + */ + public function url($p) + { + if (!is_array($p)) { + if (strpos($p, 'http') === 0) { + return $p; + } - /** - * Function to be executed in script shutdown - */ - public function shutdown() - { - parent::shutdown(); + $p = array('_action' => @func_get_arg(0)); + } - foreach ($this->address_books as $book) { - if (is_object($book) && is_a($book, 'rcube_addressbook')) - $book->close(); - } + $task = $p['_task'] ? $p['_task'] : ($p['task'] ? $p['task'] : $this->task); + $p['_task'] = $task; + unset($p['task']); - // write performance stats to logs/console - if ($this->config->get('devel_mode')) { - if (function_exists('memory_get_usage')) - $mem = $this->show_bytes(memory_get_usage()); - if (function_exists('memory_get_peak_usage')) - $mem .= '/'.$this->show_bytes(memory_get_peak_usage()); - - $log = $this->task . ($this->action ? '/'.$this->action : '') . ($mem ? " [$mem]" : ''); - if (defined('RCMAIL_START')) - self::print_timer(RCMAIL_START, $log); - else - self::console($log); - } - } - - - /** - * Registers action aliases for current task - * - * @param array $map Alias-to-filename hash array - */ - public function register_action_map($map) - { - if (is_array($map)) { - foreach ($map as $idx => $val) { - $this->action_map[$idx] = $val; - } - } - } - - - /** - * Returns current action filename - * - * @param array $map Alias-to-filename hash array - */ - public function get_action_file() - { - if (!empty($this->action_map[$this->action])) { - return $this->action_map[$this->action]; - } + $url = './' . $this->filename; + $delm = '?'; - return strtr($this->action, '-', '_') . '.inc'; - } - - - /** - * Fixes some user preferences according to namespace handling change. - * Old Roundcube versions were using folder names with removed namespace prefix. - * Now we need to add the prefix on servers where personal namespace has prefix. - * - * @param rcube_user $user User object - */ - private function fix_namespace_settings($user) - { - $prefix = $this->storage->get_namespace('prefix'); - $prefix_len = strlen($prefix); - - if (!$prefix_len) - return; - - $prefs = $this->config->all(); - if (!empty($prefs['namespace_fixed'])) - return; - - // Build namespace prefix regexp - $ns = $this->storage->get_namespace(); - $regexp = array(); - - foreach ($ns as $entry) { - if (!empty($entry)) { - foreach ($entry as $item) { - if (strlen($item[0])) { - $regexp[] = preg_quote($item[0], '/'); - } + foreach (array_reverse($p) as $key => $val) { + if ($val !== '' && $val !== null) { + $par = $key[0] == '_' ? $key : '_'.$key; + $url .= $delm.urlencode($par).'='.urlencode($val); + $delm = '&'; + } } - } + + return $url; } - $regexp = '/^('. implode('|', $regexp).')/'; - // Fix preferences - $opts = array('drafts_mbox', 'junk_mbox', 'sent_mbox', 'trash_mbox', 'archive_mbox'); - foreach ($opts as $opt) { - if ($value = $prefs[$opt]) { - if ($value != 'INBOX' && !preg_match($regexp, $value)) { - $prefs[$opt] = $prefix.$value; + /** + * Function to be executed in script shutdown + */ + public function shutdown() + { + parent::shutdown(); + + foreach ($this->address_books as $book) { + if (is_object($book) && is_a($book, 'rcube_addressbook')) + $book->close(); } - } - } - if (!empty($prefs['default_folders'])) { - foreach ($prefs['default_folders'] as $idx => $name) { - if ($name != 'INBOX' && !preg_match($regexp, $name)) { - $prefs['default_folders'][$idx] = $prefix.$name; + // write performance stats to logs/console + if ($this->config->get('devel_mode')) { + if (function_exists('memory_get_usage')) + $mem = $this->show_bytes(memory_get_usage()); + if (function_exists('memory_get_peak_usage')) + $mem .= '/'.$this->show_bytes(memory_get_peak_usage()); + + $log = $this->task . ($this->action ? '/'.$this->action : '') . ($mem ? " [$mem]" : ''); + + if (defined('RCMAIL_START')) + self::print_timer(RCMAIL_START, $log); + else + self::console($log); } - } } - if (!empty($prefs['search_mods'])) { - $folders = array(); - foreach ($prefs['search_mods'] as $idx => $value) { - if ($idx != 'INBOX' && $idx != '*' && !preg_match($regexp, $idx)) { - $idx = $prefix.$idx; + /** + * Registers action aliases for current task + * + * @param array $map Alias-to-filename hash array + */ + public function register_action_map($map) + { + if (is_array($map)) { + foreach ($map as $idx => $val) { + $this->action_map[$idx] = $val; + } } - $folders[$idx] = $value; - } - $prefs['search_mods'] = $folders; } - if (!empty($prefs['message_threading'])) { - $folders = array(); - foreach ($prefs['message_threading'] as $idx => $value) { - if ($idx != 'INBOX' && !preg_match($regexp, $idx)) { - $idx = $prefix.$idx; + /** + * Returns current action filename + * + * @param array $map Alias-to-filename hash array + */ + public function get_action_file() + { + if (!empty($this->action_map[$this->action])) { + return $this->action_map[$this->action]; } - $folders[$prefix.$idx] = $value; - } - $prefs['message_threading'] = $folders; + + return strtr($this->action, '-', '_') . '.inc'; } - if (!empty($prefs['collapsed_folders'])) { - $folders = explode('&&', $prefs['collapsed_folders']); - $count = count($folders); - $folders_str = ''; + /** + * Fixes some user preferences according to namespace handling change. + * Old Roundcube versions were using folder names with removed namespace prefix. + * Now we need to add the prefix on servers where personal namespace has prefix. + * + * @param rcube_user $user User object + */ + private function fix_namespace_settings($user) + { + $prefix = $this->storage->get_namespace('prefix'); + $prefix_len = strlen($prefix); - if ($count) { - $folders[0] = substr($folders[0], 1); - $folders[$count-1] = substr($folders[$count-1], 0, -1); - } + if (!$prefix_len) + return; + + $prefs = $this->config->all(); + if (!empty($prefs['namespace_fixed'])) + return; - foreach ($folders as $value) { - if ($value != 'INBOX' && !preg_match($regexp, $value)) { - $value = $prefix.$value; + // Build namespace prefix regexp + $ns = $this->storage->get_namespace(); + $regexp = array(); + + foreach ($ns as $entry) { + if (!empty($entry)) { + foreach ($entry as $item) { + if (strlen($item[0])) { + $regexp[] = preg_quote($item[0], '/'); + } + } + } + } + $regexp = '/^('. implode('|', $regexp).')/'; + + // Fix preferences + $opts = array('drafts_mbox', 'junk_mbox', 'sent_mbox', 'trash_mbox', 'archive_mbox'); + foreach ($opts as $opt) { + if ($value = $prefs[$opt]) { + if ($value != 'INBOX' && !preg_match($regexp, $value)) { + $prefs[$opt] = $prefix.$value; + } + } } - $folders_str .= '&'.$value.'&'; - } - $prefs['collapsed_folders'] = $folders_str; - } - $prefs['namespace_fixed'] = true; + if (!empty($prefs['default_folders'])) { + foreach ($prefs['default_folders'] as $idx => $name) { + if ($name != 'INBOX' && !preg_match($regexp, $name)) { + $prefs['default_folders'][$idx] = $prefix.$name; + } + } + } - // save updated preferences and reset imap settings (default folders) - $user->save_prefs($prefs); - $this->set_storage_prop(); - } + if (!empty($prefs['search_mods'])) { + $folders = array(); + foreach ($prefs['search_mods'] as $idx => $value) { + if ($idx != 'INBOX' && $idx != '*' && !preg_match($regexp, $idx)) { + $idx = $prefix.$idx; + } + $folders[$idx] = $value; + } + $prefs['search_mods'] = $folders; + } + + if (!empty($prefs['message_threading'])) { + $folders = array(); + foreach ($prefs['message_threading'] as $idx => $value) { + if ($idx != 'INBOX' && !preg_match($regexp, $idx)) { + $idx = $prefix.$idx; + } + $folders[$prefix.$idx] = $value; + } + + $prefs['message_threading'] = $folders; + } + + if (!empty($prefs['collapsed_folders'])) { + $folders = explode('&&', $prefs['collapsed_folders']); + $count = count($folders); + $folders_str = ''; + + if ($count) { + $folders[0] = substr($folders[0], 1); + $folders[$count-1] = substr($folders[$count-1], 0, -1); + } + + foreach ($folders as $value) { + if ($value != 'INBOX' && !preg_match($regexp, $value)) { + $value = $prefix.$value; + } + $folders_str .= '&'.$value.'&'; + } + + $prefs['collapsed_folders'] = $folders_str; + } + + $prefs['namespace_fixed'] = true; + + // save updated preferences and reset imap settings (default folders) + $user->save_prefs($prefs); + $this->set_storage_prop(); + } /** * Overwrite action variable @@ -937,6 +997,17 @@ class rcmail extends rcube $this->output->set_env('action', $action); } + /** + * Set environment variables for specified config options + */ + public function set_env_config($options) + { + foreach ((array) $options as $option) { + if ($this->config->get($option)) { + $this->output->set_env($option, true); + } + } + } /** * Returns RFC2822 formatted current date in user's timezone @@ -957,7 +1028,6 @@ class rcmail extends rcube return $date->format('r'); } - /** * Write login data (name, ID, IP address) to the 'userlogins' log file. */ @@ -982,14 +1052,13 @@ class rcmail extends rcube } $message = sprintf('Successful login for %s (ID: %d) from %s in session %s', - $user_name, $user_id, rcube_utils::remote_ip(), session_id()); + $user_name, $user_id, rcube_utils::remote_ip(), session_id()); } // log login self::write_log('userlogins', $message); } - /** * Create a HTML table based on the given data * @@ -1039,7 +1108,6 @@ class rcmail extends rcube return $table->show($attrib); } - /** * Convert the given date to a human readable form * This uses the date formatting properties from config @@ -1169,7 +1237,6 @@ class rcmail extends rcube return $out; } - /** * Return folders list in HTML * @@ -1241,19 +1308,27 @@ class rcmail extends rcube } else { $js_mailboxlist = array(); - $out = html::tag('ul', $attrib, $rcmail->render_folder_tree_html($a_mailboxes, $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib); + $tree = $rcmail->render_folder_tree_html($a_mailboxes, $mbox_name, $js_mailboxlist, $attrib); + + if ($type != 'js') { + $out = html::tag('ul', $attrib, $tree, html::$common_attrib); + + $rcmail->output->include_script('treelist.js'); + $rcmail->output->add_gui_object('mailboxlist', $attrib['id']); + $rcmail->output->set_env('unreadwrap', $attrib['unreadwrap']); + $rcmail->output->set_env('collapsed_folders', (string)$rcmail->config->get('collapsed_folders')); + } - $rcmail->output->include_script('treelist.js'); - $rcmail->output->add_gui_object('mailboxlist', $attrib['id']); $rcmail->output->set_env('mailboxes', $js_mailboxlist); - $rcmail->output->set_env('unreadwrap', $attrib['unreadwrap']); - $rcmail->output->set_env('collapsed_folders', (string)$rcmail->config->get('collapsed_folders')); + + // we can't use object keys in javascript because they are unordered + // we need sorted folders list for folder-selector widget + $rcmail->output->set_env('mailboxes_list', array_keys($js_mailboxlist)); } return $out; } - /** * Return folders list as html_select object * @@ -1297,7 +1372,6 @@ class rcmail extends rcube return $select; } - /** * Create a hierarchical array of the mailbox list */ @@ -1355,7 +1429,6 @@ class rcmail extends rcube } } - /** * Return html for a structured list <ul> for the mailbox tree */ @@ -1432,9 +1505,13 @@ class rcmail extends rcube $jslist[$folder['id']] = array( 'id' => $folder['id'], 'name' => $foldername, - 'virtual' => $folder['virtual'] + 'virtual' => $folder['virtual'], ); + if (!empty($folder_class)) { + $jslist[$folder['id']]['class'] = $folder_class; + } + if (!empty($folder['folders'])) { $out .= html::tag('ul', array('style' => ($is_collapsed ? "display:none;" : null)), $this->render_folder_tree_html($folder['folders'], $mbox_name, $jslist, $attrib, $nestLevel+1)); @@ -1446,7 +1523,6 @@ class rcmail extends rcube return $out; } - /** * Return html for a flat list <select> for the mailbox tree */ @@ -1491,7 +1567,6 @@ class rcmail extends rcube return $out; } - /** * Return internal name for the given folder if it matches the configured special folders */ @@ -1510,7 +1585,6 @@ class rcmail extends rcube } } - /** * Try to localize the given IMAP folder name. * UTF-7 decode it in case no localized text was found @@ -1589,7 +1663,7 @@ class rcmail extends rcube $rcmail->output->add_script('rcmail.set_quota('.rcube_output::json_serialize($quota).');', 'docready'); - return html::span($attrib, ''); + return html::span($attrib, ' '); } @@ -1628,7 +1702,6 @@ class rcmail extends rcube return $quota_result; } - /** * Outputs error message according to server error/response codes * @@ -1682,7 +1755,6 @@ class rcmail extends rcube } } - /** * Output HTML editor scripts * @@ -1723,7 +1795,6 @@ class rcmail extends rcube $this->output->add_script("rcmail_editor_init($script)", 'docready'); } - /** * Replaces TinyMCE's emoticon images with plain-text representation * @@ -1761,7 +1832,6 @@ class rcmail extends rcube return preg_replace($search, $replace, $html); } - /** * File upload progress handler. */ @@ -1793,7 +1863,6 @@ class rcmail extends rcube $this->output->send(); } - /** * Initializes file uploading interface. */ @@ -1811,19 +1880,19 @@ class rcmail extends rcube // find max filesize value $max_filesize = parse_bytes(ini_get('upload_max_filesize')); $max_postsize = parse_bytes(ini_get('post_max_size')); + if ($max_postsize && $max_postsize < $max_filesize) { $max_filesize = $max_postsize; } $this->output->set_env('max_filesize', $max_filesize); - $max_filesize = self::show_bytes($max_filesize); + $max_filesize = $this->show_bytes($max_filesize); $this->output->set_env('filesizeerror', $this->gettext(array( 'name' => 'filesizeerror', 'vars' => array('size' => $max_filesize)))); return $max_filesize; } - /** * Initializes client-side autocompletion. */ @@ -1850,7 +1919,6 @@ class rcmail extends rcube $this->output->add_label('autocompletechars', 'autocompletemore'); } - /** * Returns supported font-family specifications * @@ -1883,7 +1951,6 @@ class rcmail extends rcube return $fonts; } - /** * Create a human readable string for a number of bytes * @@ -1911,7 +1978,6 @@ class rcmail extends rcube return $str; } - /** * Returns real size (calculated) of the message part * diff --git a/program/include/rcmail_html_page.php b/program/include/rcmail_html_page.php index 5d07b8d04..604d756e7 100644 --- a/program/include/rcmail_html_page.php +++ b/program/include/rcmail_html_page.php @@ -23,7 +23,7 @@ /** * Class to create an empty HTML page with some default styles * - * @package Core + * @package Webmail * @subpackage View */ class rcmail_html_page extends rcmail_output_html @@ -38,11 +38,12 @@ class rcmail_html_page extends rcmail_output_html } else { // set default styles for warning blocks inside the attachment part frame $this->add_header(html::tag('style', array('type' => 'text/css'), - ".rcmail-inline-message { font-family: sans-serif; border:2px solid #ffdf0e; background:#fef893; padding:0.6em 1em; margin-bottom:0.6em }\n" . + ".rcmail-inline-message { font-family: sans-serif; border:2px solid #ffdf0e;" + . "background:#fef893; padding:0.6em 1em; margin-bottom:0.6em }\n" . ".rcmail-inline-buttons { margin-bottom:0 }" )); } parent::write($contents); } -}
\ No newline at end of file +} diff --git a/program/include/rcmail_output.php b/program/include/rcmail_output.php index 36512ad48..0f7aaf966 100644 --- a/program/include/rcmail_output.php +++ b/program/include/rcmail_output.php @@ -22,7 +22,7 @@ /** * Class for output generation * - * @package Core + * @package Webmail * @subpackage View */ abstract class rcmail_output extends rcube_output diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index 7cab3725e..17b5b9647 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -5,7 +5,7 @@ | program/include/rcmail_output_html.php | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2006-2012, The Roundcube Dev Team | + | Copyright (C) 2006-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -23,7 +23,7 @@ /** * Class to create HTML page output using a skin template * - * @package Core + * @package Webmail * @subpackage View */ class rcmail_output_html extends rcmail_output @@ -45,6 +45,7 @@ class rcmail_output_html extends rcmail_output protected $footer = ''; protected $body = ''; protected $base_path = ''; + protected $devel_mode = false; // deprecated names of templates used before 0.5 protected $deprecated_templates = array( @@ -64,6 +65,8 @@ class rcmail_output_html extends rcmail_output { parent::__construct(); + $this->devel_mode = $this->config->get('devel_mode'); + //$this->framed = $framed; $this->set_env('task', $task); $this->set_env('x_frame_options', $this->config->get('x_frame_options', 'sameorigin')); @@ -80,9 +83,9 @@ class rcmail_output_html extends rcmail_output $this->set_env('skin', $skin); if (!empty($_REQUEST['_extwin'])) - $this->set_env('extwin', 1); + $this->set_env('extwin', 1); if ($this->framed || !empty($_REQUEST['_framed'])) - $this->set_env('framed', 1); + $this->set_env('framed', 1); // add common javascripts $this->add_script('var '.self::JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top'); @@ -116,6 +119,7 @@ class rcmail_output_html extends rcmail_output public function set_env($name, $value, $addtojs = true) { $this->env[$name] = $value; + if ($addtojs || isset($this->js_env[$name])) { $this->js_env[$name] = $value; } @@ -310,12 +314,14 @@ class rcmail_output_html extends rcmail_output */ public function reset($all = false) { + $framed = $this->framed; $env = $all ? null : array_intersect_key($this->env, array('extwin'=>1, 'framed'=>1)); parent::reset(); // let some env variables survive $this->env = $this->js_env = $env; + $this->framed = $framed || $this->env['framed']; $this->js_labels = array(); $this->js_commands = array(); $this->script_files = array(); @@ -323,6 +329,11 @@ class rcmail_output_html extends rcmail_output $this->header = ''; $this->footer = ''; $this->body = ''; + + // load defaults + if (!$all) { + $this->__construct(); + } } /** @@ -651,16 +662,37 @@ class rcmail_output_html extends rcmail_output } // add file modification timestamp - if (preg_match('/\.(js|css)$/', $file)) { - if ($fs = @filemtime($file)) { - $file .= '?s=' . $fs; - } + if (preg_match('/\.(js|css)$/', $file, $m)) { + $file = $this->file_mod($file); } return $matches[1] . '=' . $matches[2] . $file . $matches[4]; } /** + * Modify file by adding mtime indicator + */ + protected function file_mod($file) + { + $fs = false; + $ext = substr($file, strrpos($file, '.') + 1); + + // use minified file if exists (not in development mode) + if (!$this->devel_mode && !preg_match('/\.min\.' . $ext . '$/', $file)) { + $minified_file = substr($file, 0, strlen($ext) * -1) . 'min.' . $ext; + if ($fs = @filemtime($minified_file)) { + return $minified_file . '?s=' . $fs; + } + } + + if ($fs = @filemtime($file)) { + $file .= '?s=' . $fs; + } + + return $file; + } + + /** * Public wrapper to dipp into template parsing. * * @param string $input @@ -964,7 +996,7 @@ class rcmail_output_html extends rcmail_output $content = html::quote($this->get_pagetitle()); } else if ($object == 'pagetitle') { - if ($this->config->get('devel_mode') && !empty($_SESSION['username'])) + if ($this->devel_mode && !empty($_SESSION['username'])) $title = $_SESSION['username'].' :: '; else if ($prod_name = $this->config->get('product_name')) $title = $prod_name . ' :: '; @@ -1165,7 +1197,7 @@ class rcmail_output_html extends rcmail_output } else if ($attrib['type'] == 'link') { $btn_content = isset($attrib['content']) ? $attrib['content'] : ($attrib['label'] ? $attrib['label'] : $attrib['command']); - $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style', 'tabindex', 'target'); + $link_attrib = array_merge(html::$common_attrib, array('href', 'onclick', 'tabindex', 'target')); if ($attrib['innerclass']) $btn_content = html::span($attrib['innerclass'], $btn_content); } @@ -1203,26 +1235,17 @@ class rcmail_output_html extends rcmail_output */ public function include_script($file, $position='head') { - static $sa_files = array(); - if (!preg_match('|^https?://|i', $file) && $file[0] != '/') { - $file = $this->scripts_path . $file; - if ($fs = @filemtime($file)) { - $file .= '?s=' . $fs; - } - } - - if (in_array($file, $sa_files)) { - return; + $file = $this->file_mod($this->scripts_path . $file); } - $sa_files[] = $file; - if (!is_array($this->script_files[$position])) { $this->script_files[$position] = array(); } - $this->script_files[$position][] = $file; + if (!in_array($file, $this->script_files[$position])) { + $this->script_files[$position][] = $file; + } } /** @@ -1280,7 +1303,12 @@ class rcmail_output_html extends rcmail_output */ public function _write($templ = '', $base_path = '') { - $output = empty($templ) ? $this->default_template : trim($templ); + $output = trim($templ); + + if (empty($output)) { + $output = $this->default_template; + $is_empty = true; + } // set default page title if (empty($this->pagetitle)) { @@ -1371,8 +1399,8 @@ class rcmail_output_html extends rcmail_output } // add css files in head, before scripts, for speed up with parallel downloads - if (!empty($this->css_files) && - (($pos = stripos($output, '<script ')) || ($pos = stripos($output, '</head>'))) + if (!empty($this->css_files) && !$is_empty + && (($pos = stripos($output, '<script ')) || ($pos = stripos($output, '</head>'))) ) { $css = ''; foreach ($this->css_files as $file) { diff --git a/program/include/rcmail_output_json.php b/program/include/rcmail_output_json.php index d0e1eec64..fa35824db 100644 --- a/program/include/rcmail_output_json.php +++ b/program/include/rcmail_output_json.php @@ -23,7 +23,7 @@ /** * View class to produce JSON responses * - * @package Core + * @package Webmail * @subpackage View */ class rcmail_output_json extends rcmail_output diff --git a/program/include/rcmail_string_replacer.php b/program/include/rcmail_string_replacer.php index 4fbc611c9..d3fdc3e7f 100644 --- a/program/include/rcmail_string_replacer.php +++ b/program/include/rcmail_string_replacer.php @@ -5,7 +5,7 @@ | program/include/rcmail_string_replacer.php | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -19,12 +19,11 @@ +-----------------------------------------------------------------------+ */ - /** * Helper class for turning URLs and email addresses in plaintext content * into clickable links. * - * @package Core + * @package Webmail * @subpackage Utils */ class rcmail_string_replacer extends rcube_string_replacer @@ -40,15 +39,15 @@ class rcmail_string_replacer extends rcube_string_replacer */ public function mailto_callback($matches) { - $href = $matches[1]; - $suffix = $this->parse_url_brackets($href); + $href = $matches[1]; + $suffix = $this->parse_url_brackets($href); - $i = $this->add(html::a(array( - 'href' => 'mailto:' . $href, - 'onclick' => "return ".rcmail_output::JS_OBJECT_NAME.".command('compose','".rcube::JQ($href)."',this)", - ), rcube::Q($href)) . $suffix); + $i = $this->add(html::a(array( + 'href' => 'mailto:' . $href, + 'onclick' => "return ".rcmail_output::JS_OBJECT_NAME.".command('compose','".rcube::JQ($href)."',this)", + ), + rcube::Q($href)) . $suffix); - return $i >= 0 ? $this->get_replacement($i) : ''; + return $i >= 0 ? $this->get_replacement($i) : ''; } - -}
\ No newline at end of file +} diff --git a/program/js/app.js b/program/js/app.js index 7fbab8003..1ef341415 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -34,7 +34,7 @@ function rcube_webmail() // webmail client settings this.dblclick_time = 500; - this.message_time = 4000; + this.message_time = 5000; this.identifier_expr = new RegExp('[^0-9a-z\-_]', 'gi'); // environment defaults @@ -198,32 +198,29 @@ function rcube_webmail() multiselect:true, multiexpand:true, draggable:true, keyboard:true, column_movable:this.env.col_movable, dblclick_time:this.dblclick_time }); - this.message_list.row_init = function(o){ p.init_message_row(o); }; - this.message_list.addEventListener('dblclick', function(o){ p.msglist_dbl_click(o); }); - this.message_list.addEventListener('click', function(o){ p.msglist_click(o); }); - this.message_list.addEventListener('keypress', function(o){ p.msglist_keypress(o); }); - this.message_list.addEventListener('select', function(o){ p.msglist_select(o); }); - this.message_list.addEventListener('dragstart', function(o){ p.drag_start(o); }); - this.message_list.addEventListener('dragmove', function(e){ p.drag_move(e); }); - this.message_list.addEventListener('dragend', function(e){ p.drag_end(e); }); - this.message_list.addEventListener('expandcollapse', function(e){ p.msglist_expand(e); }); - this.message_list.addEventListener('column_replace', function(e){ p.msglist_set_coltypes(e); }); - this.message_list.addEventListener('listupdate', function(e){ p.triggerEvent('listupdate', e); }); + this.message_list + .addEventListener('initrow', function(o) { p.init_message_row(o); }) + .addEventListener('dblclick', function(o) { p.msglist_dbl_click(o); }) + .addEventListener('click', function(o) { p.msglist_click(o); }) + .addEventListener('keypress', function(o) { p.msglist_keypress(o); }) + .addEventListener('select', function(o) { p.msglist_select(o); }) + .addEventListener('dragstart', function(o) { p.drag_start(o); }) + .addEventListener('dragmove', function(e) { p.drag_move(e); }) + .addEventListener('dragend', function(e) { p.drag_end(e); }) + .addEventListener('expandcollapse', function(o) { p.msglist_expand(o); }) + .addEventListener('column_replace', function(o) { p.msglist_set_coltypes(o); }) + .addEventListener('listupdate', function(o) { p.triggerEvent('listupdate', o); }) + .init(); document.onmouseup = function(e){ return p.doc_mouse_up(e); }; this.gui_objects.messagelist.parentNode.onmousedown = function(e){ return p.click_on_list(e); }; - this.message_list.init(); this.enable_command('toggle_status', 'toggle_flag', 'sort', true); // load messages this.command('list'); - } - if (this.gui_objects.qsearchbox) { - if (this.env.search_text != null) - this.gui_objects.qsearchbox.value = this.env.search_text; - $(this.gui_objects.qsearchbox).focusin(function() { rcmail.message_list && rcmail.message_list.blur(); }); + $(this.gui_objects.qsearchbox).val(this.env.search_text).focusin(function() { rcmail.message_list.blur(); }); } this.set_button_titles(); @@ -256,12 +253,14 @@ function rcube_webmail() } else if (this.env.action == 'compose') { this.env.address_group_stack = []; - this.env.compose_commands = ['send-attachment', 'remove-attachment', 'send', 'cancel', 'toggle-editor', 'list-adresses', 'pushgroup', 'search', 'reset-search', 'extwin']; + this.env.compose_commands = ['send-attachment', 'remove-attachment', 'send', 'cancel', + 'toggle-editor', 'list-adresses', 'pushgroup', 'search', 'reset-search', 'extwin', + 'insert-response', 'save-response']; if (this.env.drafts_mailbox) this.env.compose_commands.push('savedraft') - this.enable_command(this.env.compose_commands, 'identities', true); + this.enable_command(this.env.compose_commands, 'identities', 'responses', true); // add more commands (not enabled) $.merge(this.env.compose_commands, ['add-recipient', 'firstpage', 'previouspage', 'nextpage', 'lastpage']); @@ -272,6 +271,23 @@ function rcube_webmail() this.enable_command('spellcheck', true); } + // init canned response functions + if (this.gui_objects.responseslist) { + $('a.insertresponse', this.gui_objects.responseslist) + .attr('unselectable', 'on') + .mousedown(function(e){ return rcube_event.cancel(e); }) + .mouseup(function(e){ + ref.command('insert-response', $(this).attr('rel')); + $(document.body).trigger('mouseup'); // hides the menu + return rcube_event.cancel(e); + }); + + // avoid textarea loosing focus when hitting the save-response button/link + for (var i=0; this.buttons['save-response'] && i < this.buttons['save-response'].length; i++) { + $('#'+this.buttons['save-response'][i].id).mousedown(function(e){ return rcube_event.cancel(e); }) + } + } + document.onmouseup = function(e){ return p.doc_mouse_up(e); }; // init message compose form @@ -298,9 +314,11 @@ function rcube_webmail() if (this.gui_objects.contactslist) { this.contact_list = new rcube_list_widget(this.gui_objects.contactslist, { multiselect:true, draggable:false, keyboard:false }); - this.contact_list.addEventListener('select', function(o){ ref.compose_recipient_select(o); }); - this.contact_list.addEventListener('dblclick', function(o){ ref.compose_add_recipient('to'); }); - this.contact_list.init(); + this.contact_list + .addEventListener('initrow', function(o) { p.triggerEvent('insertrow', { cid:o.uid, row:o }); }) + .addEventListener('select', function(o) { ref.compose_recipient_select(o); }) + .addEventListener('dblclick', function(o) { ref.compose_add_recipient('to'); }) + .init(); } if (this.gui_objects.addressbookslist) { @@ -332,26 +350,27 @@ function rcube_webmail() this.env.contactfolders = $.extend($.extend({}, this.env.address_sources), this.env.contactgroups); this.enable_command('add', 'import', this.env.writable_source); - this.enable_command('list', 'listgroup', 'pushgroup', 'popgroup', 'listsearch', 'advanced-search', true); + this.enable_command('list', 'listgroup', 'pushgroup', 'popgroup', 'listsearch', 'search', 'reset-search', 'advanced-search', true); if (this.gui_objects.contactslist) { this.contact_list = new rcube_list_widget(this.gui_objects.contactslist, {multiselect:true, draggable:this.gui_objects.folderlist?true:false, keyboard:true}); - this.contact_list.row_init = function(row){ p.triggerEvent('insertrow', { cid:row.uid, row:row }); }; - this.contact_list.addEventListener('keypress', function(o){ p.contactlist_keypress(o); }); - this.contact_list.addEventListener('select', function(o){ p.contactlist_select(o); }); - this.contact_list.addEventListener('dragstart', function(o){ p.drag_start(o); }); - this.contact_list.addEventListener('dragmove', function(e){ p.drag_move(e); }); - this.contact_list.addEventListener('dragend', function(e){ p.drag_end(e); }); - this.contact_list.init(); + this.contact_list + .addEventListener('initrow', function(o) { p.triggerEvent('insertrow', { cid:o.uid, row:o }); }) + .addEventListener('keypress', function(o) { p.contactlist_keypress(o); }) + .addEventListener('select', function(o) { p.contactlist_select(o); }) + .addEventListener('dragstart', function(o) { p.drag_start(o); }) + .addEventListener('dragmove', function(e) { p.drag_move(e); }) + .addEventListener('dragend', function(e) { p.drag_end(e); }) + .init(); if (this.env.cid) this.contact_list.highlight_row(this.env.cid); this.gui_objects.contactslist.parentNode.onmousedown = function(e){ return p.click_on_list(e); }; document.onmouseup = function(e){ return p.doc_mouse_up(e); }; - if (this.gui_objects.qsearchbox) - $(this.gui_objects.qsearchbox).focusin(function() { rcmail.contact_list.blur(); }); + + $(this.gui_objects.qsearchbox).focusin(function() { rcmail.contact_list.blur(); }); this.update_group_commands(); this.command('list'); @@ -375,13 +394,10 @@ function rcube_webmail() this.init_contact_form(); } - if (this.gui_objects.qsearchbox) - this.enable_command('search', 'reset-search', true); - break; case 'settings': - this.enable_command('preferences', 'identities', 'save', 'folders', true); + this.enable_command('preferences', 'identities', 'responses', 'save', 'folders', true); if (this.env.action == 'identities') { this.enable_command('add', this.env.identities_level < 2); @@ -389,9 +405,6 @@ function rcube_webmail() else if (this.env.action == 'edit-identity' || this.env.action == 'add-identity') { this.enable_command('save', 'edit', 'toggle-editor', true); this.enable_command('delete', this.env.identities_level < 2); - - if (this.env.action == 'add-identity') - $("input[type='text']").first().select(); } else if (this.env.action == 'folders') { this.enable_command('subscribe', 'unsubscribe', 'create-folder', 'rename-folder', true); @@ -400,26 +413,46 @@ function rcube_webmail() this.enable_command('save', 'folder-size', true); parent.rcmail.env.exists = this.env.messagecount; parent.rcmail.enable_command('purge', this.env.messagecount); - $("input[type='text']").first().select(); + } + else if (this.env.action == 'responses') { + this.enable_command('add', true); } if (this.gui_objects.identitieslist) { - this.identity_list = new rcube_list_widget(this.gui_objects.identitieslist, {multiselect:false, draggable:false, keyboard:false}); - this.identity_list.addEventListener('select', function(o){ p.identity_select(o); }); - this.identity_list.init(); - this.identity_list.focus(); + this.identity_list = new rcube_list_widget(this.gui_objects.identitieslist, + {multiselect:false, draggable:false, keyboard:false}); + this.identity_list + .addEventListener('select', function(o) { p.identity_select(o); }) + .init() + .focus(); if (this.env.iid) this.identity_list.highlight_row(this.env.iid); } else if (this.gui_objects.sectionslist) { this.sections_list = new rcube_list_widget(this.gui_objects.sectionslist, {multiselect:false, draggable:false, keyboard:false}); - this.sections_list.addEventListener('select', function(o){ p.section_select(o); }); - this.sections_list.init(); - this.sections_list.focus(); + this.sections_list + .addEventListener('select', function(o) { p.section_select(o); }) + .init() + .focus(); } - else if (this.gui_objects.subscriptionlist) + else if (this.gui_objects.subscriptionlist) { this.init_subscription_list(); + } + else if (this.gui_objects.responseslist) { + this.responses_list = new rcube_list_widget(this.gui_objects.responseslist, {multiselect:false, draggable:false, keyboard:false}); + this.responses_list + .addEventListener('select', function(list) { + var win, id = list.get_single_selection(); + p.enable_command('delete', !!id && $.inArray(id, p.env.readonly_responses) < 0); + if (id && (win = p.get_frame_window(p.env.contentframe))) { + p.set_busy(true); + p.location_href({ _action:'edit-response', _key:id, _framed:1 }, win); + } + }) + .init() + .focus(); + } break; @@ -453,6 +486,11 @@ function rcube_webmail() break; } + // select first input field in an edit form + if (this.gui_objects.editform) + $("input,select,textarea", this.gui_objects.editform) + .not(':hidden').not(':disabled').first().select(); + // unset contentframe variable if preview_pane is enabled if (this.env.contentframe && !$('#' + this.env.contentframe).is(':visible')) this.env.contentframe = null; @@ -463,6 +501,7 @@ function rcube_webmail() // flag object as complete this.loaded = true; + this.env.lastrefresh = new Date(); // show message if (this.pending_message) @@ -478,11 +517,12 @@ function rcube_webmail() id_prefix: 'rcmli', id_encode: this.html_identifier_encode, id_decode: this.html_identifier_decode, - check_droptarget: function(node){ return !node.virtual && ref.check_droptarget(node.id) } + check_droptarget: function(node) { return !node.virtual && ref.check_droptarget(node.id) } }); - this.treelist.addEventListener('collapse', function(node){ ref.folder_collapsed(node) }); - this.treelist.addEventListener('expand', function(node){ ref.folder_collapsed(node) }); - this.treelist.addEventListener('select', function(node){ ref.triggerEvent('selectfolder', { folder:node.id, prefix:'rcmli' }) }); + this.treelist + .addEventListener('collapse', function(node) { ref.folder_collapsed(node) }) + .addEventListener('expand', function(node) { ref.folder_collapsed(node) }) + .addEventListener('select', function(node) { ref.triggerEvent('selectfolder', { folder:node.id, prefix:'rcmli' }) }); } } @@ -547,9 +587,12 @@ function rcube_webmail() } // check input before leaving compose step - if (this.task == 'mail' && this.env.action == 'compose' && $.inArray(command, this.env.compose_commands)<0) { + if (this.task == 'mail' && this.env.action == 'compose' && $.inArray(command, this.env.compose_commands) < 0 && !this.env.server_error) { if (this.cmp_hash != this.compose_field_hash() && !confirm(this.get_label('notsentwarning'))) return false; + + // remove copy from local storage if compose screen is left intentionally + this.remove_compose_data(this.env.compose_id); } // process external commands @@ -584,10 +627,10 @@ function rcube_webmail() break; // commands to switch task + case 'logout': case 'mail': case 'addressbook': case 'settings': - case 'logout': this.switch_task(command); break; @@ -607,6 +650,7 @@ function rcube_webmail() var form = this.gui_objects.messageform, win = this.open_window(''); + this.save_compose_form_local(); $("input[name='_action']", form).val('compose'); form.action = this.url('mail/compose', { _id: this.env.compose_id, _extwin: 1 }); form.target = win.name; @@ -725,6 +769,13 @@ function rcube_webmail() case 'add': if (this.task == 'addressbook') this.load_contact(0, 'add'); + else if (this.task == 'settings' && this.env.action == 'responses') { + var frame; + if ((frame = this.get_frame_window(this.env.contentframe))) { + this.set_busy(true); + this.location_href({ _action:'add-response', _framed:1 }, frame); + } + } else if (this.task == 'settings') { this.identity_list.clear_selection(); this.load_identity(0, 'add-identity'); @@ -788,7 +839,10 @@ function rcube_webmail() // addressbook task else if (this.task == 'addressbook') this.delete_contacts(); - // user settings task + // settings: canned response + else if (this.task == 'settings' && this.env.action == 'responses') + this.delete_response(); + // settings: user identities else if (this.task == 'settings') this.delete_identity(); break; @@ -797,14 +851,14 @@ function rcube_webmail() case 'move': case 'moveto': // deprecated if (this.task == 'mail') - this.move_messages(props); + this.move_messages(props, obj); else if (this.task == 'addressbook') this.move_contacts(props); break; case 'copy': if (this.task == 'mail') - this.copy_messages(props); + this.copy_messages(props, obj); else if (this.task == 'addressbook') this.copy_contacts(props); break; @@ -815,37 +869,24 @@ function rcube_webmail() break; case 'toggle_status': - if (props && !props._row) - break; - - flag = 'read'; - - if (props._row.uid) { - uid = props._row.uid; + case 'toggle_flag': + flag = command == 'toggle_flag' ? 'flagged' : 'read'; + if (uid = props) { + // toggle flagged/unflagged + if (flag == 'flagged') { + if (this.message_list.rows[uid].flagged) + flag = 'unflagged'; + } // toggle read/unread - if (this.message_list.rows[uid].deleted) + else if (this.message_list.rows[uid].deleted) flag = 'undelete'; else if (!this.message_list.rows[uid].unread) flag = 'unread'; - } - - this.mark_message(flag, uid); - break; - - case 'toggle_flag': - if (props && !props._row) - break; - flag = 'flagged'; - - if (props._row.uid) { - uid = props._row.uid; - // toggle flagged/unflagged - if (this.message_list.rows[uid].flagged) - flag = 'unflagged'; + this.mark_message(flag, uid); } - this.mark_message(flag, uid); + break; case 'always-load': @@ -1031,7 +1072,7 @@ function rcube_webmail() url = {_reply_uid: uid, _mbox: this.env.mailbox}; if (command == 'reply-all') // do reply-list, when list is detected and popup menu wasn't used - url._all = (!props && this.commands['reply-list'] ? 'list' : 'all'); + url._all = (!props && this.env.reply_all_mode == 1 && this.commands['reply-list'] ? 'list' : 'all'); else if (command == 'reply-list') url._all = 'list'; @@ -1173,6 +1214,7 @@ function rcube_webmail() // user settings commands case 'preferences': case 'identities': + case 'responses': case 'folders': this.goto_url('settings/' + command); break; @@ -1263,8 +1305,10 @@ function rcube_webmail() return; var url = this.get_task_url(task); - if (task=='mail') + if (task == 'mail') url += '&_mbox=INBOX'; + else if (task == 'logout') + this.clear_compose_data(); this.redirect(url); }; @@ -1376,8 +1420,6 @@ function rcube_webmail() this.drag_start = function(list) { - var model = this.task == 'mail' ? this.env.mailboxes : this.env.contactfolders; - this.drag_active = true; if (this.preview_timer) @@ -1392,11 +1434,31 @@ function rcube_webmail() this.drag_end = function(e) { - this.drag_active = false; - this.env.last_folder_target = null; + var list, model; if (this.treelist) this.treelist.drag_end(); + + // execute drag & drop action when mouse was released + if (list = this.message_list) + model = this.env.mailboxes; + else if (list = this.contact_list) + model = this.env.contactfolders; + + if (this.drag_active && model && this.env.last_folder_target) { + var target = model[this.env.last_folder_target]; + list.draglayer.hide(); + + if (this.contact_list) { + if (!this.contacts_drag_menu(e, target)) + this.command('move', target); + } + else if (!this.drag_menu(e, target)) + this.command('move', target); + } + + this.drag_active = false; + this.env.last_folder_target = null; }; this.drag_move = function(e) @@ -1439,7 +1501,7 @@ function rcube_webmail() // select the folder if one of its childs is currently selected // don't select if it's virtual (#1488346) - if (this.env.mailbox && this.env.mailbox.indexOf(name + this.env.delimiter) == 0 && !node.virtual) + if (this.env.mailbox && this.env.mailbox.startsWith(name + this.env.delimiter) && !node.virtual) this.command('list', name); } else { @@ -1457,38 +1519,16 @@ function rcube_webmail() this.doc_mouse_up = function(e) { - var model, list, id; + var list, id; // ignore event if jquery UI dialog is open if ($(rcube_event.get_target(e)).closest('.ui-dialog, .ui-widget-overlay').length) return; - if (list = this.message_list) - model = this.env.mailboxes; - else if (list = this.contact_list) - model = this.env.contactfolders; - else if (this.ksearch_value) - this.ksearch_blur(); - + list = this.message_list || this.contact_list; if (list && !rcube_mouse_is_over(e, list.list.parentNode)) list.blur(); - // handle mouse release when dragging - if (this.drag_active && model && this.env.last_folder_target) { - var target = model[this.env.last_folder_target]; - - this.env.last_folder_target = null; - list.draglayer.hide(); - this.drag_end(e); - - if (this.contact_list) { - if (!this.contacts_drag_menu(e, target)) - this.command('move', target); - } - else if (!this.drag_menu(e, target)) - this.command('move', target); - } - // reset 'pressed' buttons if (this.buttons_sel) { for (id in this.buttons_sel) @@ -1620,8 +1660,8 @@ function rcube_webmail() this.env.coltypes = []; for (i=0; i<cols.length; i++) - if (cols[i].id && cols[i].id.match(/^rcm/)) { - name = cols[i].id.replace(/^rcm/, ''); + if (cols[i].id && cols[i].id.startsWith('rcm')) { + name = cols[i].id.slice(3); this.env.coltypes.push(name); } @@ -1671,7 +1711,7 @@ function rcube_webmail() url += (url.match(/\?/) ? '&' : '?') + '_extwin=1'; if (this.env.standard_windows) - extwin = window.open(url, wname); + var extwin = window.open(url, wname); else { var win = this.is_framed() ? parent.window : window, page = $(win), @@ -1691,8 +1731,11 @@ function rcube_webmail() extwin.document.write('<html><body>' + this.get_label('loading') + '</body></html>'); } + // allow plugins to grab the window reference (#1489413) + this.triggerEvent('openwindow', { url:url, handle:extwin }); + // focus window, delayed to bring to front - window.setTimeout(function() { extwin.focus(); }, 10); + window.setTimeout(function() { extwin && extwin.focus(); }, 10); return extwin; }; @@ -1704,7 +1747,7 @@ function rcube_webmail() this.init_message_row = function(row) { - var expando, self = this, uid = row.uid, + var i, fn = {}, self = this, uid = row.uid, status_icon = (this.env.status_col != null ? 'status' : 'msg') + 'icn' + row.uid; if (uid && this.env.messages[uid]) @@ -1712,8 +1755,7 @@ function rcube_webmail() // set eventhandler to status icon if (row.icon = document.getElementById(status_icon)) { - row.icon._row = row.obj; - row.icon.onclick = function(e) { self.command('toggle_status', this); return rcube_event.cancel(e); }; + fn.icon = function(e) { self.command('toggle_status', uid); }; } // save message icon position too @@ -1722,24 +1764,28 @@ function rcube_webmail() else row.msgicon = row.icon; - // set eventhandler to flag icon, if icon found + // set eventhandler to flag icon if (this.env.flagged_col != null && (row.flagicon = document.getElementById('flagicn'+row.uid))) { - row.flagicon._row = row.obj; - row.flagicon.onclick = function(e) { self.command('toggle_flag', this); return rcube_event.cancel(e); }; + fn.flagicon = function(e) { self.command('toggle_flag', uid); }; } - if (!row.depth && row.has_children && (expando = document.getElementById('rcmexpando'+row.uid))) { - row.expando = expando; - expando.onclick = function(e) { return self.expand_message_row(e, uid); }; + // set event handler to thread expand/collapse icon + if (!row.depth && row.has_children && (row.expando = document.getElementById('rcmexpando'+row.uid))) { + fn.expando = function(e) { self.expand_message_row(e, uid); }; + } + + // attach events + $.each(fn, function(i, f) { + row[i].onclick = function(e) { f(e); return rcube_event.cancel(e); }; if (bw.touch) { - expando.addEventListener('touchend', function(e) { + row[i].addEventListener('touchend', function(e) { if (e.changedTouches.length == 1) { - self.expand_message_row(e, uid); + f(e); return rcube_event.cancel(e); } }, false); } - } + }); this.triggerEvent('insertrow', { uid:uid, row:row }); }; @@ -2006,7 +2052,6 @@ function rcube_webmail() if (preview && this.message_list && this.message_list.rows[id] && this.message_list.rows[id].unread && this.env.preview_pane_mark_read >= 0) { this.preview_read_timer = setTimeout(function() { ref.set_message(id, 'unread', false); - ref.update_thread_root(id, 'read'); if (ref.env.unread_counts[ref.env.mailbox]) { ref.env.unread_counts[ref.env.mailbox] -= 1; ref.set_unread_count(ref.env.mailbox, ref.env.unread_counts[ref.env.mailbox], ref.env.mailbox == 'INBOX'); @@ -2024,12 +2069,14 @@ function rcube_webmail() if (name && (frame = this.get_frame_element(name))) { if (!show && (win = this.get_frame_window(name))) { - if (win.stop) - win.stop(); - else // IE - win.document.execCommand('Stop'); + if (win.location.href.indexOf(this.env.blankpage) < 0) { + if (win.stop) + win.stop(); + else // IE + win.document.execCommand('Stop'); - win.location.href = this.env.blankpage; + win.location.href = this.env.blankpage; + } } else if (!bw.safari && !bw.konq) $(frame)[show ? 'show' : 'hide'](); @@ -2510,8 +2557,11 @@ function rcube_webmail() if (!row) return false; - if (flag == 'unread') + if (flag == 'unread') { + if (row.unread != status) + this.update_thread_root(uid, status ? 'unread' : 'read'); row.unread = status; + } else if(flag == 'deleted') row.deleted = status; else if (flag == 'replied') @@ -2569,10 +2619,12 @@ function rcube_webmail() }; // copy selected messages to the specified mailbox - this.copy_messages = function(mbox) + this.copy_messages = function(mbox, obj) { if (mbox && typeof mbox === 'object') mbox = mbox.id; + else if (!mbox) + return this.folder_selector(obj, function(folder) { ref.command('copy', folder); }); // exit if current or no mailbox specified if (!mbox || mbox == this.env.mailbox) @@ -2589,10 +2641,12 @@ function rcube_webmail() }; // move selected messages to the specified mailbox - this.move_messages = function(mbox) + this.move_messages = function(mbox, obj) { if (mbox && typeof mbox === 'object') mbox = mbox.id; + else if (!mbox) + return this.folder_selector(obj, function(folder) { ref.command('move', folder); }); // exit if current or no mailbox specified if (!mbox || mbox == this.env.mailbox) @@ -2619,20 +2673,7 @@ function rcube_webmail() // delete selected messages from the current mailbox this.delete_messages = function(event) { - var uid, i, len, trash = this.env.trash_mailbox, - list = this.message_list, - selection = list ? list.get_selection() : []; - - // exit if no mailbox specified or if selection is empty - if (!this.env.uid && !selection.length) - return; - - // also select childs of collapsed rows - for (i=0, len=selection.length; i<len; i++) { - uid = selection[i]; - if (list.rows[uid].has_children && !list.rows[uid].expanded) - list.select_children(uid); - } + var list = this.message_list, trash = this.env.trash_mailbox; // if config is set to flag for deletion if (this.env.flag_for_deletion) { @@ -2672,7 +2713,7 @@ function rcube_webmail() this._with_selected_messages('delete', post_data); }; - // Send a specifc move/delete request with UIDs of all selected messages + // Send a specific move/delete request with UIDs of all selected messages // @private this._with_selected_messages = function(action, post_data, lock) { @@ -2704,9 +2745,6 @@ function rcube_webmail() } } - if (this.env.display_next && this.env.next_uid) - post_data._next_uid = this.env.next_uid; - if (count < 0) post_data._count = (count*-1); // remove threads from the end of the list @@ -2742,6 +2780,9 @@ function rcube_webmail() if (this.env.search_request) data._search = this.env.search_request; + if (this.env.display_next && this.env.next_uid) + data._next_uid = this.env.next_uid; + return data; }; @@ -2808,9 +2849,6 @@ function rcube_webmail() this.set_message(a_uids[i], 'unread', (flag == 'unread' ? true : false)); this.http_post('mark', post_data, lock); - - for (i=0; i<len; i++) - this.update_thread_root(a_uids[i], flag); }; // set image to flagged or unflagged @@ -2992,9 +3030,12 @@ function rcube_webmail() // test if purge command is allowed this.purge_mailbox_test = function() { - return (this.env.exists && (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox - || this.env.mailbox.match('^' + RegExp.escape(this.env.trash_mailbox) + RegExp.escape(this.env.delimiter)) - || this.env.mailbox.match('^' + RegExp.escape(this.env.junk_mailbox) + RegExp.escape(this.env.delimiter)))); + return (this.env.exists && ( + this.env.mailbox == this.env.trash_mailbox + || this.env.mailbox == this.env.junk_mailbox + || this.env.mailbox.startsWith(this.env.trash_mailbox + this.env.delimiter) + || this.env.mailbox.startsWith(this.env.junk_mailbox + this.env.delimiter) + )); }; @@ -3080,6 +3121,64 @@ function rcube_webmail() } } + // check for locally stored compose data + if (window.localStorage) { + var index = this.local_storage_get_item('compose.index', []); + + for (var key, i = 0; i < index.length; i++) { + key = index[i], formdata = this.local_storage_get_item('compose.' + key, null, true); + if (!formdata) { + continue; + } + // restore saved copy of current compose_id + if (formdata.changed && key == this.env.compose_id) { + this.restore_compose_form(key, html_mode); + break; + } + // skip records from 'other' drafts + if (this.env.draft_id && formdata.draft_id && formdata.draft_id != this.env.draft_id) { + continue; + } + // skip records on reply + if (this.env.reply_msgid && formdata.reply_msgid != this.env.reply_msgid) { + continue; + } + // show dialog asking to restore the message + if (formdata.changed && formdata.session != this.env.session_id) { + this.show_popup_dialog( + this.get_label('restoresavedcomposedata') + .replace('$date', new Date(formdata.changed).toLocaleString()) + .replace('$subject', formdata._subject) + .replace(/\n/g, '<br/>'), + this.get_label('restoremessage'), + [{ + text: this.get_label('restore'), + click: function(){ + ref.restore_compose_form(key, html_mode); + ref.remove_compose_data(key); // remove old copy + ref.save_compose_form_local(); // save under current compose_id + $(this).dialog('close'); + } + }, + { + text: this.get_label('delete'), + click: function(){ + ref.remove_compose_data(key); + $(this).dialog('close'); + } + }, + { + text: this.get_label('ignore'), + click: function(){ + $(this).dialog('close'); + } + }] + ); + break; + } + } + } + if (input_to.val() == '') input_to.focus(); else if (input_subject.val() == '') @@ -3100,7 +3199,7 @@ function rcube_webmail() { this.env.recipients_delimiter = this.env.recipients_separator + ' '; - obj[bw.ie || bw.safari || bw.chrome ? 'keydown' : 'keypress'](function(e) { return ref.ksearch_keydown(e, this, props); }) + obj.keydown(function(e) { return ref.ksearch_keydown(e, this, props); }) .attr('autocomplete', 'off'); }; @@ -3285,6 +3384,154 @@ function rcube_webmail() return true; }; + this.insert_response = function(key) + { + var insert = this.env.textresponses[key] ? this.env.textresponses[key].text : null; + if (!insert) + return false; + + // insert into tinyMCE editor + if ($("input[name='_is_html']").val() == '1') { + var editor = tinyMCE.get(this.env.composebody); + editor.getWin().focus(); // correct focus in IE & Chrome + editor.selection.setContent(this.quote_html(insert).replace(/\r?\n/g, '<br/>'), { format:'text' }); + } + // replace selection in compose textarea + else { + var textarea = rcube_find_object(this.env.composebody), + selection = $(textarea).is(':focus') ? this.get_input_selection(textarea) : { start:0, end:0 }, + inp_value = textarea.value; + pre = inp_value.substring(0, selection.start), + end = inp_value.substring(selection.end, inp_value.length); + + // insert response text + textarea.value = pre + insert + end; + + // set caret after inserted text + this.set_caret_pos(textarea, selection.start + insert.length); + textarea.focus(); + } + }; + + /** + * Open the dialog to save a new canned response + */ + this.save_response = function() + { + var sigstart, text = '', strip = false; + + // get selected text from tinyMCE editor + if ($("input[name='_is_html']").val() == '1') { + var editor = tinyMCE.get(this.env.composebody); + editor.getWin().focus(); // correct focus in IE & Chrome + text = editor.selection.getContent({ format:'text' }); + + if (!text) { + text = editor.getContent({ format:'text' }); + strip = true; + } + } + // get selected text from compose textarea + else { + var textarea = rcube_find_object(this.env.composebody), sigstart; + if (textarea && $(textarea).is(':focus')) { + text = this.get_input_selection(textarea).text; + } + + if (!text && textarea) { + text = textarea.value; + strip = true; + } + } + + // strip off signature + if (strip) { + sigstart = text.indexOf('-- \n'); + if (sigstart > 0) { + text = text.substring(0, sigstart); + } + } + + // show dialog to enter a name and to modify the text to be saved + var buttons = {}, + html = '<form class="propform">' + + '<div class="prop block"><label>' + this.get_label('responsename') + '</label>' + + '<input type="text" name="name" id="ffresponsename" size="40" /></div>' + + '<div class="prop block"><label>' + this.get_label('responsetext') + '</label>' + + '<textarea name="text" id="ffresponsetext" cols="40" rows="8"></textarea></div>' + + '</form>'; + + buttons[this.gettext('save')] = function(e) { + var name = $('#ffresponsename').val(), + text = $('#ffresponsetext').val(); + + if (!text) { + $('#ffresponsetext').select(); + return false; + } + if (!name) + name = text.substring(0,40); + + var lock = ref.display_message(ref.get_label('savingresponse'), 'loading'); + ref.http_post('settings/responses', { _insert:1, _name:name, _text:text }, lock); + $(this).dialog('close'); + }; + + buttons[this.gettext('cancel')] = function() { + $(this).dialog('close'); + }; + + this.show_popup_dialog(html, this.gettext('savenewresponse'), buttons); + + $('#ffresponsetext').val(text); + $('#ffresponsename').select(); + }; + + this.add_response_item = function(response) + { + var key = response.key; + this.env.textresponses[key] = response; + + // append to responses list + if (this.gui_objects.responseslist) { + var li = $('<li>').appendTo(this.gui_objects.responseslist); + $('<a>').addClass('insertresponse active') + .attr('href', '#') + .attr('rel', key) + .html(this.quote_html(response.name)) + .appendTo(li) + .mousedown(function(e){ + return rcube_event.cancel(e); + }) + .mouseup(function(e){ + ref.command('insert-response', key); + $(document.body).trigger('mouseup'); // hides the menu + return rcube_event.cancel(e); + }); + } + }; + + this.edit_responses = function() + { + // TODO: implement inline editing of responses + }; + + this.delete_response = function(key) + { + if (!key && this.responses_list) { + var selection = this.responses_list.get_selection(); + key = selection[0]; + } + + // submit delete request + if (key && confirm(this.get_label('deleteresponseconfirm'))) { + this.http_post('settings/delete-response', { _key: key }, false); + return true; + } + + return false; + }; + this.stop_spellchecking = function() { var ed; @@ -3361,14 +3608,20 @@ function rcube_webmail() { var rc; - if (!this.env.draft_id && id && (rc = this.opener())) { - // refresh the drafts folder in opener window - if (rc.env.task == 'mail' && rc.env.action == '' && rc.env.mailbox == this.env.drafts_mailbox) - rc.command('checkmail'); + if (id && id != this.env.draft_id) { + if (rc = this.opener()) { + // refresh the drafts folder in opener window + if (rc.env.task == 'mail' && rc.env.action == '' && rc.env.mailbox == this.env.drafts_mailbox) + rc.command('checkmail'); + } + + this.env.draft_id = id; + $("input[name='_draft_saveid']").val(id); + } - this.env.draft_id = id; - $("input[name='_draft_saveid']").val(id); + // always remove local copy upon saving as draft + this.remove_compose_data(this.env.compose_id); }; this.auto_save_start = function() @@ -3376,6 +3629,20 @@ function rcube_webmail() if (this.env.draft_autosave) this.save_timer = setTimeout(function(){ ref.command("savedraft"); }, this.env.draft_autosave * 1000); + // save compose form content to local storage every 5 seconds + if (!this.local_save_timer && window.localStorage) { + // track typing activity and only save on changes + this.compose_type_activity = this.compose_type_activity_last = 0; + $(document).bind('keypress', function(e){ ref.compose_type_activity++; }); + + this.local_save_timer = setInterval(function(){ + if (ref.compose_type_activity > ref.compose_type_activity_last) { + ref.save_compose_form_local(); + ref.compose_type_activity_last = ref.compose_type_activity; + } + }, 5000); + } + // Unlock interface now that saving is complete this.busy = false; }; @@ -3404,6 +3671,118 @@ function rcube_webmail() return str; }; + // store the contents of the compose form to localstorage + this.save_compose_form_local = function() + { + var formdata = { session:this.env.session_id, changed:new Date().getTime() }, + ed, empty = true; + + // get fresh content from editor + if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody))) { + tinyMCE.triggerSave(); + } + + if (this.env.draft_id) { + formdata.draft_id = this.env.draft_id; + } + if (this.env.reply_msgid) { + formdata.reply_msgid = this.env.reply_msgid; + } + + $('input, select, textarea', this.gui_objects.messageform).each(function(i, elem) { + switch (elem.tagName.toLowerCase()) { + case 'input': + if (elem.type == 'button' || elem.type == 'submit' || (elem.type == 'hidden' && elem.name != '_is_html')) { + break; + } + formdata[elem.name] = elem.type != 'checkbox' || elem.checked ? $(elem).val() : ''; + + if (formdata[elem.name] != '' && elem.type != 'hidden') + empty = false; + break; + + case 'select': + formdata[elem.name] = $('option:checked', elem).val(); + break; + + default: + formdata[elem.name] = $(elem).val(); + if (formdata[elem.name] != '') + empty = false; + } + }); + + if (window.localStorage && !empty) { + var index = this.local_storage_get_item('compose.index', []), + key = this.env.compose_id; + + if ($.inArray(key, index) < 0) { + index.push(key); + } + this.local_storage_set_item('compose.' + key, formdata, true); + this.local_storage_set_item('compose.index', index); + } + }; + + // write stored compose data back to form + this.restore_compose_form = function(key, html_mode) + { + var ed, formdata = this.local_storage_get_item('compose.' + key, true); + + if (formdata && typeof formdata == 'object') { + $.each(formdata, function(k, value) { + if (k[0] == '_') { + var elem = $("*[name='"+k+"']"); + if (elem[0] && elem[0].type == 'checkbox') { + elem.prop('checked', value != ''); + } + else { + elem.val(value); + } + } + }); + + // initialize HTML editor + if (formdata._is_html == '1') { + if (!html_mode) { + tinyMCE.execCommand('mceAddControl', false, this.env.composebody); + this.triggerEvent('aftertoggle-editor', { mode:'html' }); + } + } + else if (html_mode) { + tinyMCE.execCommand('mceRemoveControl', false, this.env.composebody); + this.triggerEvent('aftertoggle-editor', { mode:'plain' }); + } + } + }; + + // remove stored compose data from localStorage + this.remove_compose_data = function(key) + { + if (window.localStorage) { + var index = this.local_storage_get_item('compose.index', []); + + if ($.inArray(key, index) >= 0) { + this.local_storage_remove_item('compose.' + key); + this.local_storage_set_item('compose.index', $.grep(index, function(val,i) { return val != key; })); + } + } + }; + + // clear all stored compose data of this user + this.clear_compose_data = function() + { + if (window.localStorage) { + var index = this.local_storage_get_item('compose.index', []); + + for (var i=0; i < index.length; i++) { + this.local_storage_remove_item('compose.' + index[i]); + } + this.local_storage_remove_item('compose.index'); + } + } + + this.change_identity = function(obj, show_sig) { if (!obj || !obj.options) @@ -3559,6 +3938,7 @@ function rcube_webmail() } this.env.identity = id; + this.triggerEvent('change_identity'); return true; }; @@ -3835,7 +4215,7 @@ function rcube_webmail() case 38: // arrow up case 40: // arrow down if (!this.ksearch_visible()) - break; + return; var dir = key==38 ? 1 : 0; @@ -3870,8 +4250,7 @@ function rcube_webmail() case 37: // left case 39: // right - if (mod != SHIFT_KEY) - return; + return; } // start timer @@ -3934,8 +4313,10 @@ function rcube_webmail() if (this.ksearch_input.setSelectionRange) this.ksearch_input.setSelectionRange(cpos, cpos); - if (trigger) + if (trigger) { this.triggerEvent('autocomplete_insert', { field:this.ksearch_input, insert:insert }); + this.compose_type_activity++; + } }; this.replace_group_recipients = function(id, recipients) @@ -3944,6 +4325,7 @@ function rcube_webmail() this.group2expand[id].input.value = this.group2expand[id].input.value.replace(this.group2expand[id].name, recipients); this.triggerEvent('autocomplete_insert', { field:this.group2expand[id].input, insert:recipients }); this.group2expand[id] = null; + this.compose_type_activity++; } }; @@ -3990,7 +4372,7 @@ function rcube_webmail() return; // ...new search value contains old one and previous search was not finished or its result was empty - if (old_value && old_value.length && q.indexOf(old_value) == 0 && (!ac || ac.num <= 0) && this.env.contacts && !this.env.contacts.length) + if (old_value && old_value.length && q.startsWith(old_value) && (!ac || ac.num <= 0) && this.env.contacts && !this.env.contacts.length) return; var i, lock, source, xhr, reqid = new Date().getTime(), @@ -4628,8 +5010,6 @@ function rcube_webmail() $('input.datepicker').datepicker(); } - $("input[type='text']:visible").first().focus(); - // Submit search form on Enter if (this.env.action == 'search') $(this.gui_objects.editform).append($('<input type="submit">').hide()) @@ -4674,6 +5054,7 @@ function rcube_webmail() { var key = 'G'+prop.source+prop.id; if (this.treelist.remove(key)) { + this.triggerEvent('group_delete', { source:prop.source, id:prop.id }); delete this.env.contactfolders[key]; delete this.env.contactgroups[key]; } @@ -5171,9 +5552,8 @@ function rcube_webmail() target = win; } - if (action && (id || action == 'add-identity')) { - this.set_busy(true); - this.location_href(url, target); + if (id || action == 'add-identity') { + this.location_href(url, target, true); } return true; @@ -5210,6 +5590,35 @@ function rcube_webmail() } }; + this.update_response_row = function(response, oldkey) + { + var list = this.responses_list; + + if (list && oldkey) { + list.update_row(oldkey, [ response.name ], response.key, true); + } + else if (list) { + list.insert_row({ id:'rcmrow'+response.key, cols:[ { className:'name', innerHTML:response.name } ] }); + list.select(response.key); + } + }; + + this.remove_response = function(key) + { + var frame; + + if (this.env.textresponses) { + delete this.env.textresponses[key]; + } + + if (this.responses_list) { + this.responses_list.remove_row(key); + if (this.env.contentframe && (frame = this.get_frame_window(this.env.contentframe))) { + frame.location.href = this.env.blankpage; + } + } + }; + /*********************************************************/ /********* folder manager methods *********/ @@ -5217,17 +5626,22 @@ function rcube_webmail() this.init_subscription_list = function() { - var p = this; + var p = this, delim = RegExp.escape(this.env.delimiter); + + this.last_sub_rx = RegExp('['+delim+']?[^'+delim+']+$'); + this.subscription_list = new rcube_list_widget(this.gui_objects.subscriptionlist, {multiselect:false, draggable:true, keyboard:false, toggleselect:true}); - this.subscription_list.addEventListener('select', function(o){ p.subscription_select(o); }); - this.subscription_list.addEventListener('dragstart', function(o){ p.drag_active = true; }); - this.subscription_list.addEventListener('dragend', function(o){ p.subscription_move_folder(o); }); - this.subscription_list.row_init = function (row) { - row.obj.onmouseover = function() { p.focus_subscription(row.id); }; - row.obj.onmouseout = function() { p.unfocus_subscription(row.id); }; - }; - this.subscription_list.init(); + this.subscription_list + .addEventListener('select', function(o){ p.subscription_select(o); }) + .addEventListener('dragstart', function(o){ p.drag_active = true; }) + .addEventListener('dragend', function(o){ p.subscription_move_folder(o); }) + .addEventListener('initrow', function (row) { + row.obj.onmouseover = function() { p.focus_subscription(row.id); }; + row.obj.onmouseout = function() { p.unfocus_subscription(row.id); }; + }) + .init(); + $('#mailboxroot') .mouseover(function(){ p.focus_subscription(this.id); }) .mouseout(function(){ p.unfocus_subscription(this.id); }) @@ -5235,9 +5649,7 @@ function rcube_webmail() this.focus_subscription = function(id) { - var row, folder, - delim = RegExp.escape(this.env.delimiter), - reg = RegExp('['+delim+']?[^'+delim+']+$'); + var row, folder; if (this.drag_active && this.env.mailbox && (row = document.getElementById(id))) if (this.env.subscriptionrows[id] && @@ -5245,8 +5657,8 @@ function rcube_webmail() ) { if (this.check_droptarget(folder) && !this.env.subscriptionrows[this.get_folder_row_id(this.env.mailbox)][2] && - (folder != this.env.mailbox.replace(reg, '')) && - (!folder.match(new RegExp('^'+RegExp.escape(this.env.mailbox+this.env.delimiter)))) + folder != this.env.mailbox.replace(this.last_sub_rx, '') && + !folder.startsWith(this.env.mailbox + this.env.delimiter) ) { this.env.dstfolder = folder; $(row).addClass('droptarget'); @@ -5259,7 +5671,8 @@ function rcube_webmail() var row = $('#'+id); this.env.dstfolder = null; - if (this.env.subscriptionrows[id] && row[0]) + + if (this.env.subscriptionrows[id] && row.length) row.removeClass('droptarget'); else $(this.subscription_list.frame).removeClass('droptarget'); @@ -5285,21 +5698,20 @@ function rcube_webmail() this.subscription_move_folder = function(list) { - var delim = RegExp.escape(this.env.delimiter), - reg = RegExp('['+delim+']?[^'+delim+']+$'); - - if (this.env.mailbox && this.env.dstfolder !== null && (this.env.dstfolder != this.env.mailbox) && - (this.env.dstfolder != this.env.mailbox.replace(reg, '')) + if (this.env.mailbox && this.env.dstfolder !== null && + this.env.dstfolder != this.env.mailbox && + this.env.dstfolder != this.env.mailbox.replace(this.last_sub_rx, '') ) { - reg = new RegExp('[^'+delim+']*['+delim+']', 'g'); - var basename = this.env.mailbox.replace(reg, ''), - newname = this.env.dstfolder === '' ? basename : this.env.dstfolder+this.env.delimiter+basename; + var path = this.env.mailbox.split(this.env.delimiter), + basename = path.pop(), + newname = this.env.dstfolder === '' ? basename : this.env.dstfolder + this.env.delimiter + basename; if (newname != this.env.mailbox) { this.http_post('rename-folder', {_folder_oldname: this.env.mailbox, _folder_newname: newname}, this.set_busy(true, 'foldermoving')); this.subscription_list.draglayer.hide(); } } + this.drag_active = false; this.unfocus_subscription(this.get_folder_row_id(this.env.dstfolder)); }; @@ -5328,7 +5740,7 @@ function rcube_webmail() if (!this.gui_objects.subscriptionlist) return false; - var row, n, i, tmp, tmp_name, folders, rowid, list = [], slist = [], + var row, n, i, tmp, tmp_name, rowid, folders = [], list = [], slist = [], tbody = this.gui_objects.subscriptionlist.tBodies[0], refrow = $('tr', tbody).get(1), id = 'rcmrow'+((new Date).getTime()); @@ -5343,8 +5755,7 @@ function rcube_webmail() row = $(refrow).clone(true); // set ID, reset css class - row.attr('id', id); - row.attr('class', class_name); + row.attr({id: id, 'class': class_name}); // set folder name row.find('td:first').html(display_name); @@ -5354,12 +5765,27 @@ function rcube_webmail() .prop({checked: subscribed ? true : false, disabled: is_protected ? true : false}); // add to folder/row-ID map - this.env.subscriptionrows[id] = [name, display_name, 0]; + this.env.subscriptionrows[id] = [name, display_name, false]; + + // sort folders (to find a place where to insert the row) + // replace delimiter with \0 character to fix sorting + // issue where 'Abc Abc' would be placed before 'Abc/def' + var replace_from = RegExp(RegExp.escape(this.env.delimiter), 'g'), + replace_to = String.fromCharCode(0); + + $.each(this.env.subscriptionrows, function(k,v) { + if (v.length < 4) { + var n = v[0]; + n = n.replace(replace_from, replace_to); + v.push(n); + } + folders.push(v); + }); - // sort folders, to find a place where to insert the row - folders = []; - $.each(this.env.subscriptionrows, function(k,v){ folders.push(v) }); - folders.sort(function(a,b){ return a[0] < b[0] ? -1 : (a[0] > b[0] ? 1 : 0) }); + folders.sort(function(a, b) { + var len = a.length - 1; n1 = a[len], n2 = b[len]; + return n1 < n2 ? -1 : 1; + }); for (n in folders) { // protected folder @@ -5372,7 +5798,7 @@ function rcube_webmail() tmp = tmp_name; } // protected folder's child - else if (tmp && folders[n][0].indexOf(tmp) == 0) + else if (tmp && folders[n][0].startsWith(tmp)) slist.push(folders[n][0]); // other else { @@ -5383,7 +5809,7 @@ function rcube_webmail() // check if subfolder of a protected folder for (n=0; n<slist.length; n++) { - if (name.indexOf(slist[n]+this.env.delimiter) == 0) + if (name.startsWith(slist[n] + this.env.delimiter)) rowid = this.get_folder_row_id(slist[n]); } @@ -5414,18 +5840,28 @@ function rcube_webmail() // replace an existing table row with a new folder line (with subfolders) this.replace_folder_row = function(oldfolder, newfolder, display_name, is_protected, class_name) { - if (!this.gui_objects.subscriptionlist) + if (!this.gui_objects.subscriptionlist) { + if (this.is_framed) + return parent.rcmail.replace_folder_row(oldfolder, newfolder, display_name, is_protected, class_name); return false; + } var i, n, len, name, dispname, oldrow, tmprow, row, level, tbody = this.gui_objects.subscriptionlist.tBodies[0], folders = this.env.subscriptionrows, id = this.get_folder_row_id(oldfolder), - regex = new RegExp('^'+RegExp.escape(oldfolder)), + prefix_len = oldfolder.length, subscribed = $('input[name="_subscribed[]"]', $('#'+id)).prop('checked'), // find subfolders of renamed folder list = this.get_subfolders(oldfolder); + // no renaming, only update class_name + if (oldfolder == newfolder) { + $('#'+id).attr('class', class_name || ''); + this.subscription_list.focus(); + return; + } + // replace an existing table row this._remove_folder_row(id); row = $(this.add_folder_row(newfolder, display_name, is_protected, subscribed, true, class_name)); @@ -5446,7 +5882,7 @@ function rcube_webmail() row.after(tmprow); row = tmprow; // update folder index - name = name.replace(regex, newfolder); + name = newfolder + name.slice(prefix_len); $('input[name="_subscribed[]"]', row).val(name); this.env.subscriptionrows[id][0] = name; // update the name if level is changed @@ -5495,13 +5931,13 @@ function rcube_webmail() this.get_subfolders = function(folder) { var name, list = [], - regex = new RegExp('^'+RegExp.escape(folder)+RegExp.escape(this.env.delimiter)), + prefix = folder + this.env.delimiter, row = $('#'+this.get_folder_row_id(folder)).get(0); while (row = row.nextSibling) { if (row.id) { name = this.env.subscriptionrows[row.id][0]; - if (regex.test(name)) { + if (name && name.startsWith(prefix)) { list.push(row.id); } else @@ -5691,59 +6127,36 @@ function rcube_webmail() // mouse over button this.button_over = function(command, id) { - var n, button, obj, a_buttons = this.buttons[command], - len = a_buttons ? a_buttons.length : 0; - - for (n=0; n<len; n++) { - button = a_buttons[n]; - if (button.id == id && button.status == 'act') { - obj = document.getElementById(button.id); - if (obj && button.over) { - if (button.type == 'image') - obj.src = button.over; - else - obj.className = button.over; - } - } - } + this.button_event(command, id, 'over'); }; // mouse down on button this.button_sel = function(command, id) { - var n, button, obj, a_buttons = this.buttons[command], - len = a_buttons ? a_buttons.length : 0; - - for (n=0; n<len; n++) { - button = a_buttons[n]; - if (button.id == id && button.status == 'act') { - obj = document.getElementById(button.id); - if (obj && button.sel) { - if (button.type == 'image') - obj.src = button.sel; - else - obj.className = button.sel; - } - this.buttons_sel[id] = command; - } - } + this.button_event(command, id, 'sel'); }; // mouse out of button this.button_out = function(command, id) { + this.button_event(command, id, 'act'); + }; + + // event of button + this.button_event = function(command, id, event) + { var n, button, obj, a_buttons = this.buttons[command], len = a_buttons ? a_buttons.length : 0; for (n=0; n<len; n++) { button = a_buttons[n]; if (button.id == id && button.status == 'act') { - obj = document.getElementById(button.id); - if (obj && button.act) { - if (button.type == 'image') - obj.src = button.act; - else - obj.className = button.act; + if (button[event] && (obj = document.getElementById(button.id))) { + obj[button.type == 'image' ? 'src' : 'className'] = button[event]; + } + + if (event == 'sel') { + this.buttons_sel[id] = command; } } } @@ -5818,7 +6231,7 @@ function rcube_webmail() this.triggerEvent('message', { message:msg, type:type, timeout:timeout, object:obj }); if (timeout > 0) - setTimeout(function() { ref.hide_message(id, type == 'loading'); }, timeout); + setTimeout(function() { ref.hide_message(id, type != 'loading'); }, timeout); return id; }; @@ -5898,24 +6311,23 @@ function rcube_webmail() }; // open a jquery UI dialog with the given content - this.show_popup_dialog = function(html, title, buttons) + this.show_popup_dialog = function(html, title, buttons, options) { // forward call to parent window if (this.is_framed()) { - parent.rcmail.show_popup_dialog(html, title, buttons); - return; + return parent.rcmail.show_popup_dialog(html, title, buttons, options); } var popup = $('<div class="popup">') .html(html) - .dialog({ + .dialog($.extend({ title: title, buttons: buttons, modal: true, resizable: true, width: 500, close: function(event, ui) { $(this).remove() } - }); + }, options || {})); // resize and center popup var win = $(window), w = win.width(), h = win.height(), @@ -5923,15 +6335,17 @@ function rcube_webmail() popup.dialog('option', { height: Math.min(h - 40, height + 75 + (buttons ? 50 : 0)), - width: Math.min(w - 20, width + 20) + width: Math.min(w - 20, width + 36) }); + + return popup; }; // enable/disable buttons for page shifting this.set_page_buttons = function() { - this.enable_command('nextpage', 'lastpage', (this.env.pagecount > this.env.current_page)); - this.enable_command('previouspage', 'firstpage', (this.env.current_page > 1)); + this.enable_command('nextpage', 'lastpage', this.env.pagecount > this.env.current_page); + this.enable_command('previouspage', 'firstpage', this.env.current_page > 1); }; // mark a mailbox as selected and set environment variable @@ -5941,14 +6355,10 @@ function rcube_webmail() this.treelist.select(name); } else if (this.gui_objects.folderlist) { - var current_li, target_li; - - if ((current_li = $('li.selected', this.gui_objects.folderlist))) { - current_li.removeClass('selected').addClass('unfocused'); - } - if ((target_li = this.get_folder_li(name, prefix, encode))) { - $(target_li).removeClass('unfocused').addClass('selected'); - } + $('li.selected', this.gui_objects.folderlist) + .removeClass('selected').addClass('unfocused'); + $(this.get_folder_li(name, prefix, encode)) + .removeClass('unfocused').addClass('selected'); // trigger event hook this.triggerEvent('selectfolder', { folder:name, prefix:prefix }); @@ -5959,12 +6369,14 @@ function rcube_webmail() this.mark_folder = function(name, class_name, prefix, encode) { $(this.get_folder_li(name, prefix, encode)).addClass(class_name); + this.triggerEvent('markfolder', {folder: name, mark: class_name, status: true}); }; // adds a class to selected folder this.unmark_folder = function(name, class_name, prefix, encode) { $(this.get_folder_li(name, prefix, encode)).removeClass(class_name); + this.triggerEvent('markfolder', {folder: name, mark: class_name, status: false}); }; // helper method to find a folder list item @@ -5977,8 +6389,6 @@ function rcube_webmail() name = this.html_identifier(name, encode); return document.getElementById(prefix+name); } - - return null; }; // for reordering column array (Konqueror workaround) @@ -6070,6 +6480,12 @@ function rcube_webmail() this.env.quota_content = content; }; + // update trash folder state + this.set_trash_count = function(count) + { + this[(count ? 'un' : '') + 'mark_folder'](this.env.trash_mailbox, 'empty', '', true); + }; + // update the mailboxlist this.set_unread_count = function(mbox, count, set_title, mark) { @@ -6103,7 +6519,7 @@ function rcube_webmail() div.className.match(/collapsed/)) { // add children's counters for (var k in this.env.unread_counts) - if (k.indexOf(mbox + this.env.delimiter) == 0) + if (k.startsWith(mbox + this.env.delimiter)) childcount += this.env.unread_counts[k]; } @@ -6176,6 +6592,105 @@ function rcube_webmail() elem.onclick = function() { rcmail.command('show-headers', '', elem); }; }; + // create folder selector popup, position and display it + this.folder_selector = function(obj, callback) + { + var container = this.folder_selector_element; + + if (!container) { + var rows = [], + delim = this.env.delimiter, + ul = $('<ul class="toolbarmenu iconized">'), + li = document.createElement('li'), + link = document.createElement('a'), + span = document.createElement('span'); + + container = $('<div id="folder-selector" class="popupmenu"></div>'); + link.href = '#'; + link.className = 'icon'; + + // loop over sorted folders list + $.each(this.env.mailboxes_list, function() { + var tmp, n = 0, s = 0, + folder = ref.env.mailboxes[this], + id = folder.id, + a = link.cloneNode(false), row = li.cloneNode(false); + + if (folder.virtual) + a.className += ' virtual'; + else { + a.className += ' active'; + a.onclick = function() { container.hide().data('callback')(folder.id); }; + } + + if (folder['class']) + a.className += ' ' + folder['class']; + + // calculate/set indentation level + while ((s = id.indexOf(delim, s)) >= 0) { + n++; s++; + } + a.style.paddingLeft = n ? (n * 16) + 'px' : 0; + + // add folder name element + tmp = span.cloneNode(false); + $(tmp).text(folder.name); + a.appendChild(tmp); + + row.appendChild(a); + rows.push(row); + }); + + ul.append(rows).appendTo(container); + + // temporarily show element to calculate its size + container.css({left: '-1000px', top: '-1000px'}) + .appendTo($('body')).show(); + + // set max-height if the list is long + if (rows.length > 10) + container.css('max-height', $('li', container)[0].offsetHeight * 10 + 9) + + // hide selector on click out of selector element + var fn = function(e) { if (e.target != container.get(0)) container.hide(); }; + $(document.body).on('mouseup', fn); + $('iframe').contents().on('mouseup', fn) + .load(function(e) { try { $(this).contents().on('mouseup', fn); } catch(e) {}; }); + + this.folder_selector_element = container; + } + + // position menu on the screen + this.element_position(container, obj); + + container.show().data('callback', callback); + }; + + // position a menu element on the screen in relation to other object + this.element_position = function(element, obj) + { + var obj = $(obj), win = $(window), + width = obj.width(), + height = obj.height(), + win_height = win.height(), + elem_height = $(element).height(), + elem_width = $(element).width(), + pos = obj.offset(), + top = pos.top, + left = pos.left + width; + + if (top + elem_height > win_height) { + top -= elem_height - height; + if (top < 0) + top = Math.max(0, (win_height - elem_height) / 2); + } + + if (left + elem_width > win.width()) + left -= elem_width + width; + + element.css({left: left + 'px', top: top + 'px'}); + }; + /********************************************************/ /********* html to text conversion functions *********/ @@ -6297,7 +6812,7 @@ function rcube_webmail() if (result === false) return false; else - query = result; + url = this.url(action, result); } url += '&_remote=1'; @@ -6445,6 +6960,16 @@ function rcube_webmail() case 'refresh': case 'check-recent': + // update message flags + $.each(this.env.recent_flags || {}, function(uid, flags) { + ref.set_message(uid, 'deleted', flags.deleted); + ref.set_message(uid, 'replied', flags.answered); + ref.set_message(uid, 'unread', !flags.seen); + ref.set_message(uid, 'forwarded', flags.forwarded); + ref.set_message(uid, 'flagged', flags.flagged); + }); + delete this.env.recent_flags; + case 'getunread': case 'search': this.env.qsearch = null; @@ -6457,7 +6982,6 @@ function rcube_webmail() if ((response.action == 'list' || response.action == 'search') && this.message_list) { this.msglist_select(this.message_list); - this.message_list.resize(); this.triggerEvent('listupdate', { folder:this.env.mailbox, rowcount:this.message_list.rowcount }); } } @@ -6468,7 +6992,6 @@ function rcube_webmail() this.enable_command('search-create', this.env.source == ''); this.enable_command('search-delete', this.env.search_id); this.update_group_commands(); - this.contact_list.resize(); this.triggerEvent('listupdate', { folder:this.env.source, rowcount:this.contact_list.rowcount }); } } @@ -6522,6 +7045,20 @@ function rcube_webmail() setTimeout(function(){ ref.keep_alive(); ref.start_keepalive(); }, 30000); }; + // handler for session errors detected on the server + this.session_error = function(redirect_url) + { + this.env.server_error = 401; + + // save message in local storage and do not redirect + if (this.env.action == 'compose') { + this.save_compose_form_local(); + } + else if (redirect_url) { + window.setTimeout(function(){ ref.redirect(redirect_url, true); }, 2000); + } + }; + // callback when an iframe finished loading this.iframe_loaded = function(unlock) { @@ -6534,7 +7071,7 @@ function rcube_webmail() // post the given form to a hidden iframe this.async_upload_form = function(form, action, onload) { - var ts = new Date().getTime(), + var frame, ts = new Date().getTime(), frame_name = 'rcmupload'+ts; // upload progress support @@ -6553,21 +7090,19 @@ function rcube_webmail() // have to do it this way for IE // otherwise the form will be posted to a new window if (document.all) { - var html = '<iframe name="'+frame_name+'" src="program/resources/blank.gif" style="width:0;height:0;visibility:hidden;"></iframe>'; - document.body.insertAdjacentHTML('BeforeEnd', html); + document.body.insertAdjacentHTML('BeforeEnd', '<iframe name="'+frame_name+'"' + + ' src="program/resources/blank.gif" style="width:0;height:0;visibility:hidden;"></iframe>'); + frame = $('iframe[name="'+frame_name+'"]'); } - else { // for standards-compilant browsers - var frame = document.createElement('iframe'); - frame.name = frame_name; - frame.style.border = 'none'; - frame.style.width = 0; - frame.style.height = 0; - frame.style.visibility = 'hidden'; - document.body.appendChild(frame); + // for standards-compliant browsers + else { + frame = $('<iframe>').attr('name', frame_name) + .css({border: 'none', width: 0, height: 0, visibility: 'hidden'}) + .appendTo(document.body); } // handle upload errors, parsing iframe content in onload - $(frame_name).bind('load', {ts:ts}, onload); + frame.bind('load', {ts:ts}, onload); $(form).attr({ target: frame_name, @@ -6744,6 +7279,9 @@ function rcube_webmail() if (this.task == 'mail' && this.gui_objects.mailboxlist) params = this.check_recent_params(); + params._last = Math.floor(this.env.lastrefresh.getTime() / 1000); + this.env.lastrefresh = new Date(); + // plugins should bind to 'requestrefresh' event to add own params this.http_request('refresh', params, lock); }; @@ -6755,13 +7293,18 @@ function rcube_webmail() if (this.gui_objects.mailboxlist) params._folderlist = 1; - if (this.gui_objects.messagelist) - params._list = 1; if (this.gui_objects.quotadisplay) params._quota = 1; if (this.env.search_request) params._search = this.env.search_request; + if (this.gui_objects.messagelist) { + params._list = 1; + + // message uids for flag updates check + params._uids = $.map(this.message_list.rows, function(row, uid) { return uid; }).join(','); + } + return params; }; @@ -6770,6 +7313,14 @@ function rcube_webmail() /********* helper methods *********/ /********************************************************/ + /** + * Quote html entities + */ + this.quote_html = function(str) + { + return String(str).replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); + }; + // get window.opener.rcmail if available this.opener = function() { @@ -6834,6 +7385,57 @@ function rcube_webmail() } }; + // get selected text from an input field + // http://stackoverflow.com/questions/7186586/how-to-get-the-selected-text-in-textarea-using-jquery-in-internet-explorer-7 + this.get_input_selection = function(obj) + { + var start = 0, end = 0, + normalizedValue, range, + textInputRange, len, endRange; + + if (typeof obj.selectionStart == "number" && typeof obj.selectionEnd == "number") { + normalizedValue = obj.value; + start = obj.selectionStart; + end = obj.selectionEnd; + } + else { + range = document.selection.createRange(); + + if (range && range.parentElement() == obj) { + len = obj.value.length; + normalizedValue = obj.value; //.replace(/\r\n/g, "\n"); + + // create a working TextRange that lives only in the input + textInputRange = obj.createTextRange(); + textInputRange.moveToBookmark(range.getBookmark()); + + // Check if the start and end of the selection are at the very end + // of the input, since moveStart/moveEnd doesn't return what we want + // in those cases + endRange = obj.createTextRange(); + endRange.collapse(false); + + if (textInputRange.compareEndPoints("StartToEnd", endRange) > -1) { + start = end = len; + } + else { + start = -textInputRange.moveStart("character", -len); + start += normalizedValue.slice(0, start).split("\n").length - 1; + + if (textInputRange.compareEndPoints("EndToEnd", endRange) > -1) { + end = len; + } + else { + end = -textInputRange.moveEnd("character", -len); + end += normalizedValue.slice(0, end).split("\n").length - 1; + } + } + } + } + + return { start:start, end:end, text:normalizedValue.substr(start, end-start) }; + }; + // disable/enable all fields of a form this.lock_form = function(form, lock) { @@ -6983,7 +7585,37 @@ function rcube_webmail() this.set_cookie = function(name, value, expires) { setCookie(name, value, expires, this.env.cookie_path, this.env.cookie_domain, this.env.cookie_secure); - } + }; + + this.get_local_storage_prefix = function() + { + if (!this.local_storage_prefix) + this.local_storage_prefix = 'roundcube.' + (this.env.user_id || 'anonymous') + '.'; + + return this.local_storage_prefix; + }; + + // wrapper for localStorage.getItem(key) + this.local_storage_get_item = function(key, deflt, encrypted) + { + + // TODO: add encryption + var item = localStorage.getItem(this.get_local_storage_prefix() + key); + return item !== null ? JSON.parse(item) : (deflt || null); + }; + + // wrapper for localStorage.setItem(key, data) + this.local_storage_set_item = function(key, data, encrypted) + { + // TODO: add encryption + return localStorage.setItem(this.get_local_storage_prefix() + key, JSON.stringify(data)); + }; + + // wrapper for localStorage.removeItem(key) + this.local_storage_remove_item = function(key) + { + return localStorage.removeItem(this.get_local_storage_prefix() + key); + }; } // end object rcube_webmail diff --git a/program/js/common.js b/program/js/common.js index afaf91639..722eb3f60 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -37,47 +37,48 @@ function roundcube_browser() this.vendver = n.vendorSub ? parseFloat(n.vendorSub) : 0; this.product = n.product ? n.product : ''; this.platform = String(n.platform).toLowerCase(); - this.lang = (n.language) ? n.language.substring(0,2) : - (n.browserLanguage) ? n.browserLanguage.substring(0,2) : - (n.systemLanguage) ? n.systemLanguage.substring(0,2) : 'en'; + this.lang = n.language ? n.language.substring(0,2) : + n.browserLanguage ? n.browserLanguage.substring(0,2) : + n.systemLanguage ? n.systemLanguage.substring(0,2) : 'en'; - this.win = (this.platform.indexOf('win') >= 0); - this.mac = (this.platform.indexOf('mac') >= 0); - this.linux = (this.platform.indexOf('linux') >= 0); - this.unix = (this.platform.indexOf('unix') >= 0); + this.win = this.platform.indexOf('win') >= 0; + this.mac = this.platform.indexOf('mac') >= 0; + this.linux = this.platform.indexOf('linux') >= 0; + this.unix = this.platform.indexOf('unix') >= 0; this.dom = document.getElementById ? true : false; - this.dom2 = (document.addEventListener && document.removeEventListener); - - this.ie = (document.all && !window.opera); - this.ie4 = (this.ie && !this.dom); - this.ie5 = (this.dom && this.appver.indexOf('MSIE 5')>0); - this.ie8 = (this.dom && this.appver.indexOf('MSIE 8')>0); - this.ie9 = (this.dom && this.appver.indexOf('MSIE 9')>0); - this.ie7 = (this.dom && this.appver.indexOf('MSIE 7')>0); - this.ie6 = (this.dom && !this.ie8 && !this.ie7 && this.appver.indexOf('MSIE 6')>0); - - this.ns = ((this.ver < 5 && this.name == 'Netscape') || (this.ver >= 5 && this.vendor.indexOf('Netscape') >= 0)); - this.chrome = (this.agent_lc.indexOf('chrome') > 0); - this.safari = (!this.chrome && (this.agent_lc.indexOf('safari') > 0 || this.agent_lc.indexOf('applewebkit') > 0)); - this.konq = (this.agent_lc.indexOf('konqueror') > 0); - this.mz = (this.dom && !this.ie && !this.ns && !this.chrome && !this.safari && !this.konq && this.agent.indexOf('Mozilla') >= 0); - this.iphone = (this.safari && (this.agent_lc.indexOf('iphone') > 0 || this.agent_lc.indexOf('ipod') > 0)); - this.ipad = (this.safari && this.agent_lc.indexOf('ipad') > 0); - this.opera = window.opera ? true : false; - - if (this.opera && window.RegExp) - this.vendver = (/opera(\s|\/)([0-9\.]+)/.test(this.agent_lc)) ? parseFloat(RegExp.$2) : -1; - else if (this.chrome && window.RegExp) - this.vendver = (/chrome\/([0-9\.]+)/.test(this.agent_lc)) ? parseFloat(RegExp.$1) : 0; - else if (!this.vendver && this.safari) - this.vendver = (/(safari|applewebkit)\/([0-9]+)/.test(this.agent_lc)) ? parseInt(RegExp.$2) : 0; - else if ((!this.vendver && this.mz) || this.agent.indexOf('Camino')>0) - this.vendver = (/rv:([0-9\.]+)/.test(this.agent)) ? parseFloat(RegExp.$1) : 0; - else if (this.ie && window.RegExp) - this.vendver = (/msie\s+([0-9\.]+)/.test(this.agent_lc)) ? parseFloat(RegExp.$1) : 0; - else if (this.konq && window.RegExp) - this.vendver = (/khtml\/([0-9\.]+)/.test(this.agent_lc)) ? parseFloat(RegExp.$1) : 0; + this.dom2 = document.addEventListener && document.removeEventListener; + + this.webkit = this.agent_lc.indexOf('applewebkit') > 0; + this.ie = (document.all && !window.opera) || (this.win && this.agent_lc.indexOf('trident/') > 0); + + if (this.ie) { + this.ie6 = this.appver.indexOf('MSIE 6') > 0; + this.ie7 = this.appver.indexOf('MSIE 7') > 0; + this.ie8 = this.appver.indexOf('MSIE 8') > 0; + this.ie9 = this.appver.indexOf('MSIE 9') > 0; + } + else if (window.opera) { + this.opera = true; + this.vendver = opera.version(); + } + else { + this.chrome = this.agent_lc.indexOf('chrome') > 0; + this.safari = !this.chrome && (this.webkit || this.agent_lc.indexOf('safari') > 0); + this.konq = this.agent_lc.indexOf('konqueror') > 0; + this.mz = this.dom && !this.chrome && !this.safari && !this.konq && this.agent.indexOf('Mozilla') >= 0; + this.iphone = this.safari && (this.agent_lc.indexOf('iphone') > 0 || this.agent_lc.indexOf('ipod') > 0); + this.ipad = this.safari && this.agent_lc.indexOf('ipad') > 0; + } + + if (!this.vendver) { + // common version strings + this.vendver = /(opera|opr|khtml|chrome|safari|applewebkit|msie)(\s|\/)([0-9\.]+)/.test(this.agent_lc) ? parseFloat(RegExp.$3) : 0; + + // any other (Mozilla, Camino, IE>=11) + if (!this.vendver) + this.vendver = /rv:([0-9\.]+)/.test(this.agent) ? parseFloat(RegExp.$1) : 0; + } // get real language out of safari's user agent if (this.safari && (/;\s+([a-z]{2})-[a-z]{2}\)/.test(this.agent_lc))) @@ -86,11 +87,6 @@ function roundcube_browser() this.tablet = /ipad|android|xoom|sch-i800|playbook|tablet|kindle/i.test(this.agent_lc); this.mobile = /iphone|ipod|blackberry|iemobile|opera mini|opera mobi|mobile/i.test(this.agent_lc); this.touch = this.mobile || this.tablet; - this.dhtml = ((this.ie4 && this.win) || this.ie5 || this.ie6 || this.ns4 || this.mz); - this.vml = (this.win && this.ie && this.dom && !this.opera); - this.pngalpha = (this.mz || (this.opera && this.vendver >= 6) || (this.ie && this.mac && this.vendver >= 5) || - (this.ie && this.win && this.vendver >= 5.5) || this.safari); - this.opacity = (this.mz || (this.ie && this.vendver >= 5.5 && !this.opera) || (this.safari && this.vendver >= 100)); this.cookies = n.cookieEnabled; // test for XMLHTTP support @@ -124,7 +120,7 @@ function roundcube_browser() classname += ' iphone'; else if (this.ipad) classname += ' ipad'; - else if (this.safari || this.chrome) + else if (this.webkit) classname += ' webkit'; if (this.mobile) @@ -293,7 +289,6 @@ rcube_event_engine.prototype = { * * @param {String} Event name * @param {Function} Handler function - * @return Listener ID (used to remove this handler later on) */ addEventListener: function(evt, func, obj) { @@ -303,6 +298,8 @@ addEventListener: function(evt, func, obj) this._events[evt] = []; this._events[evt].push({func:func, obj:obj ? obj : window}); + + return this; // chainable }, /** @@ -592,6 +589,14 @@ Date.prototype.getStdTimezoneOffset = function() return tzo; } +// define String's startsWith() method for old browsers +if (!String.prototype.startsWith) { + String.prototype.startsWith = function(search, position) { + position = position || 0; + return this.slice(position, search.length) === search; + }; +} + // Make getElementById() case-sensitive on IE if (bw.ie) { document._getElementById = document.getElementById; diff --git a/program/js/editor.js b/program/js/editor.js index 6d7b9538a..df3d41240 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -61,6 +61,9 @@ function rcmail_editor_init(config) if (!active) rcmail.spellcheck_state(); }); + ed.onKeyPress.add(function(ed, e) { + rcmail.compose_type_activity++; + }); } } @@ -161,8 +164,8 @@ function rcmail_editor_images() for (i in files) { att = files[i]; - if (att.complete && att.mimetype.indexOf('image/') == 0) { - list.push([att.name, rcmail.env.comm_path+'&_action=display-attachment&_file='+i+'&_id='+rcmail.env.compose_id]); + if (att.complete && att.mimetype.startsWith('image/')) { + list.push([att.name, rcmail.env.comm_path+'&_id='+rcmail.env.compose_id+'&_action=display-attachment&_file='+i]); } } diff --git a/program/js/jquery.min.js b/program/js/jquery.min.js index 83589daa7..73f33fb3a 100644 --- a/program/js/jquery.min.js +++ b/program/js/jquery.min.js @@ -1,2 +1,4 @@ -/*! jQuery v1.8.3 jquery.com | jquery.org/license */
-(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window);
\ No newline at end of file +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) +},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/program/js/list.js b/program/js/list.js index cb69bc462..d54b59d24 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -20,7 +20,7 @@ /** * Roundcube List Widget class - * @contructor + * @constructor */ function rcube_list_widget(list, p) { @@ -31,10 +31,7 @@ function rcube_list_widget(list, p) this.list = list ? list : null; this.tagname = this.list ? this.list.nodeName.toLowerCase() : 'table'; - this.thead; - this.tbody; - this.fixed_header; - this.frame = null; + this.id_regexp = /^rcmrow([a-z0-9\-_=\+\/]+)/i; this.rows = {}; this.selection = []; this.rowcount = 0; @@ -55,7 +52,6 @@ function rcube_list_widget(list, p) this.column_fixed = null; this.last_selected = 0; this.shift_start = 0; - this.in_selection_before = false; this.focused = false; this.drag_mouse_start = null; this.dblclick_time = 500; // default value on MS Windows is 500 @@ -91,8 +87,7 @@ init: function() var r, len, rows = this.tbody.childNodes; for (r=0, len=rows.length; r<len; r++) { - this.init_row(rows[r]); - this.rowcount++; + this.rowcount += this.init_row(rows[r]) ? 1 : 0; } this.init_header(); @@ -102,6 +97,8 @@ init: function() if (this.keyboard) rcube_event.add_listener({event:'keydown', object:this, method:'key_press'}); } + + return this; }, @@ -111,7 +108,7 @@ init: function() init_row: function(row) { // make references in internal array and set event handlers - if (row && String(row.id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i)) { + if (row && String(row.id).match(this.id_regexp)) { var self = this, uid = RegExp.$1; row.uid = uid; @@ -148,6 +145,8 @@ init_row: function(row) this.row_init(this.rows[uid]); // legacy support this.triggerEvent('initrow', this.rows[uid]); + + return true; } }, @@ -196,6 +195,12 @@ init_fixed_header: function() var me = this; $(window).resize(function(){ me.resize() }); + $(window).scroll(function(){ + var w = $(window); + me.fixed_header.css('marginLeft', (-w.scrollLeft()) + 'px'); + if (!bw.webkit) + me.fixed_header.css('marginTop', (-w.scrollTop()) + 'px'); + }); } else { $(this.fixed_header).find('thead').replaceWith(clone); @@ -222,6 +227,8 @@ resize: function() $(this.thead).find('tr td').each(function(index) { $(this).css('width', column_widths[index]); }); + + $(window).scroll(); }, /** @@ -248,6 +255,9 @@ clear: function(sel) // reset scroll position (in Opera) if (this.frame) this.frame.scrollTop = 0; + + // fix list header after removing any rows + this.resize(); }, @@ -256,7 +266,7 @@ clear: function(sel) */ remove_row: function(uid, sel_next) { - var node = this.rows[uid] ? this.rows[uid].obj : null; + var self = this, node = this.rows[uid] ? this.rows[uid].obj : null; if (!node) return; @@ -268,6 +278,10 @@ remove_row: function(uid, sel_next) delete this.rows[uid]; this.rowcount--; + + // fix list header after removing any rows + clearTimeout(this.resize_timeout) + this.resize_timeout = setTimeout(function() { self.resize(); }, 50); }, @@ -276,7 +290,7 @@ remove_row: function(uid, sel_next) */ insert_row: function(row, before) { - var tbody = this.tbody; + var self = this, tbody = this.tbody; // create a real dom node first if (row.nodeName === undefined) { @@ -304,6 +318,10 @@ insert_row: function(row, before) this.init_row(row); this.rowcount++; + + // fix list header after adding any rows + clearTimeout(this.resize_timeout) + this.resize_timeout = setTimeout(function() { self.resize(); }, 50); }, /** @@ -347,7 +365,7 @@ focus: function(e) // Un-focus already focused elements (#1487123, #1487316, #1488600, #1488620) // It looks that window.focus() does the job for all browsers, but not Firefox (#1489058) - $(':focus:not(body)').blur(); + $('iframe,:focus:not(body)').blur(); window.focus(); if (e || (e = window.event)) @@ -405,10 +423,7 @@ drag_column: function(e, col) drag_row: function(e, id) { // don't do anything (another action processed before) - var evtarget = rcube_event.get_target(e), - tagname = evtarget.tagName.toLowerCase(); - - if (evtarget && (tagname == 'input' || tagname == 'img' || (tagname != 'a' && evtarget.onclick))) + if (!this.is_event_target(e)) return true; // accept right-clicks @@ -420,12 +435,13 @@ drag_row: function(e, id) // selects currently unselected row if (!this.in_selection_before) { var mod_key = rcube_event.get_modifier(e); - this.select_row(id, mod_key, false); + this.select_row(id, mod_key, true); } if (this.draggable && this.selection.length && this.in_selection(id)) { this.drag_start = true; this.drag_mouse_start = rcube_event.get_mouse_pos(e); + rcube_event.add_listener({event:'mousemove', object:this, method:'drag_mouse_move'}); rcube_event.add_listener({event:'mouseup', object:this, method:'drag_mouse_up'}); if (bw.touch) { @@ -446,19 +462,16 @@ drag_row: function(e, id) */ click_row: function(e, id) { - var now = new Date().getTime(), - mod_key = rcube_event.get_modifier(e), - evtarget = rcube_event.get_target(e), - tagname = evtarget.tagName.toLowerCase(); - - if ((evtarget && (tagname == 'input' || tagname == 'img'))) + // don't do anything (another action processed before) + if (!this.is_event_target(e)) return true; - var dblclicked = now - this.rows[id].clicked < this.dblclick_time; + var now = new Date().getTime(), + dblclicked = now - this.rows[id].clicked < this.dblclick_time; // unselects currently selected row - if (!this.drag_active && this.in_selection_before == id && !dblclicked) - this.select_row(id, mod_key, false); + if (!this.drag_active && !dblclicked && this.in_selection_before == id) + this.select_row(id, rcube_event.get_modifier(e), true); this.drag_start = false; this.in_selection_before = false; @@ -482,6 +495,18 @@ click_row: function(e, id) }, +/** + * Check target of the current event + */ +is_event_target: function(e) +{ + var target = rcube_event.get_target(e), + tagname = target.tagName.toLowerCase(); + + return !(target && (tagname == 'input' || tagname == 'img' || (tagname != 'a' && target.onclick))); +}, + + /* * Returns thread root ID for specified row ID */ @@ -523,17 +548,18 @@ expand_row: function(e, id) collapse: function(row) { + var r, depth = row.depth, + new_row = row ? row.obj.nextSibling : null; + row.expanded = false; this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded, obj:row.obj }); - var depth = row.depth; - var new_row = row ? row.obj.nextSibling : null; - var r; while (new_row) { if (new_row.nodeType == 1) { - var r = this.rows[new_row.uid]; + r = this.rows[new_row.uid]; if (r && r.depth <= depth) break; + $(new_row).css('display', 'none'); if (r.expanded) { r.expanded = false; @@ -545,6 +571,7 @@ collapse: function(row) this.resize(); this.triggerEvent('listupdate'); + return false; }, @@ -726,7 +753,7 @@ get_first_row: function() var i, len, rows = this.tbody.childNodes; for (i=0, len=rows.length-1; i<len; i++) - if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) + if (rows[i].id && String(rows[i].id).match(this.id_regexp) && this.rows[RegExp.$1] != null) return RegExp.$1; } @@ -739,7 +766,7 @@ get_last_row: function() var i, rows = this.tbody.childNodes; for (i=rows.length-1; i>=0; i--) - if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) + if (rows[i].id && String(rows[i].id).match(this.id_regexp) && this.rows[RegExp.$1] != null) return RegExp.$1; } @@ -769,6 +796,7 @@ get_cell: function(row, index) select_row: function(id, mod_key, with_mouse) { var select_before = this.selection.join(','); + if (!this.multiselect) mod_key = 0; @@ -787,8 +815,10 @@ select_row: function(id, mod_key, with_mouse) break; case CONTROL_KEY: - if (!with_mouse) + if (with_mouse) { + this.shift_start = id; this.highlight_row(id, true); + } break; case CONTROL_SHIFT_KEY: @@ -799,6 +829,7 @@ select_row: function(id, mod_key, with_mouse) this.highlight_row(id, false); break; } + this.multi_selecting = true; } @@ -856,14 +887,8 @@ select_first: function(mod_key) { var row = this.get_first_row(); if (row) { - if (mod_key) { - this.shift_select(row, mod_key); - this.triggerEvent('select'); - this.scrollto(row); - } - else { - this.select(row); - } + this.select_row(row, mod_key, false); + this.scrollto(row); } }, @@ -875,14 +900,8 @@ select_last: function(mod_key) { var row = this.get_last_row(); if (row) { - if (mod_key) { - this.shift_select(row, mod_key); - this.triggerEvent('select'); - this.scrollto(row); - } - else { - this.select(row); - } + this.select_row(row, mod_key, false); + this.scrollto(row); } }, @@ -896,7 +915,7 @@ select_children: function(uid) for (i=0; i<len; i++) if (!this.in_selection(children[i])) - this.select_row(children[i], CONTROL_KEY); + this.select_row(children[i], CONTROL_KEY, true); }, @@ -912,7 +931,8 @@ shift_select: function(id, control) from_rowIndex = this._rowIndex(this.rows[this.shift_start].obj), to_rowIndex = this._rowIndex(to_row.obj); - if (!to_row.expanded && to_row.has_children) + // if we're going down the list, and we hit a thread, and it's closed, select the whole thread + if (from_rowIndex < to_rowIndex && !to_row.expanded && to_row.has_children) if (to_row = this.rows[(this.row_children(id)).pop()]) to_rowIndex = this._rowIndex(to_row.obj); @@ -934,6 +954,7 @@ shift_select: function(id, control) } }, + /** * Helper method to emulate the rowIndex property of non-tr elements */ @@ -948,7 +969,7 @@ _rowIndex: function(obj) in_selection: function(id) { for (var n in this.selection) - if (this.selection[n]==id) + if (this.selection[n] == id) return true; return false; @@ -1044,9 +1065,26 @@ clear_selection: function(id) /** * Getter for the selection array */ -get_selection: function() +get_selection: function(deep) { - return this.selection; + var res = $.merge([], this.selection); + + // return children of selected threads even if only root is selected + if (deep !== false && res.length) { + for (var uid, uids, i=0, len=res.length; i<len; i++) { + uid = res[i]; + if (this.rows[uid] && this.rows[uid].has_children && !this.rows[uid].expanded) { + uids = this.row_children(uid); + for (var j=0, uids_len=uids.length; j<uids_len; j++) { + uid = uids[j]; + if (!this.in_selection(uid)) + res.push(uid); + } + } + } + } + + return res; }, @@ -1120,6 +1158,7 @@ highlight_children: function(id, status) key_press: function(e) { var target = e.target || {}; + if (this.focused != true || target.nodeName == 'INPUT' || target.nodeName == 'TEXTAREA' || target.nodeName == 'SELECT') return true; @@ -1134,32 +1173,41 @@ key_press: function(e) // Stop propagation so that the browser doesn't scroll rcube_event.cancel(e); return this.use_arrow_key(keyCode, mod_key); - case 61: - case 107: // Plus sign on a numeric keypad (fc11 + firefox 3.5.2) - case 109: + case 32: + rcube_event.cancel(e); + return this.select_row(this.last_selected, mod_key, true); + + case 37: // Left arrow key + case 39: // Right arrow key // Stop propagation rcube_event.cancel(e); - var ret = this.use_plusminus_key(keyCode, mod_key); + var ret = this.use_arrow_key(keyCode, mod_key); this.key_pressed = keyCode; this.modkey = mod_key; this.triggerEvent('keypress'); this.modkey = 0; return ret; + case 36: // Home this.select_first(mod_key); return rcube_event.cancel(e); + case 35: // End this.select_last(mod_key); return rcube_event.cancel(e); + case 27: if (this.drag_active) return this.drag_mouse_up(e); + if (this.col_drag_active) { this.selected_column = null; return this.column_drag_mouse_up(e); } + return rcube_event.cancel(e); + default: this.key_pressed = keyCode; this.modkey = mod_key; @@ -1179,46 +1227,49 @@ key_press: function(e) */ use_arrow_key: function(keyCode, mod_key) { - var new_row; + var new_row, + selected_row = this.rows[this.last_selected]; + // Safari uses the nonstandard keycodes 63232/63233 for up/down, if we're // using the keypress event (but not the keydown or keyup event). if (keyCode == 40 || keyCode == 63233) // down arrow key pressed new_row = this.get_next_row(); else if (keyCode == 38 || keyCode == 63232) // up arrow key pressed new_row = this.get_prev_row(); + else { + if (!selected_row || !selected_row.has_children) + return; - if (new_row) { - this.select_row(new_row.uid, mod_key, false); - this.scrollto(new_row.uid); - } + // expand + if (keyCode == 39) { + if (selected_row.expanded) + return; - return false; -}, + if (mod_key == CONTROL_KEY || this.multiexpand) + this.expand_all(selected_row); + else + this.expand(selected_row); + } + // collapse + else { + if (!selected_row.expanded) + return; + if (mod_key == CONTROL_KEY || this.multiexpand) + this.collapse_all(selected_row); + else + this.collapse(selected_row); + } -/** - * Special handling method for +/- keys - */ -use_plusminus_key: function(keyCode, mod_key) -{ - var selected_row = this.rows[this.last_selected]; - if (!selected_row) - return; + this.update_expando(selected_row.uid, selected_row.expanded); - if (keyCode == 32) - keyCode = selected_row.expanded ? 109 : 61; - if (keyCode == 61 || keyCode == 107) - if (mod_key == CONTROL_KEY || this.multiexpand) - this.expand_all(selected_row); - else - this.expand(selected_row); - else - if (mod_key == CONTROL_KEY || this.multiexpand) - this.collapse_all(selected_row); - else - this.collapse(selected_row); + return false; + } - this.update_expando(selected_row.uid, selected_row.expanded); + if (new_row) { + this.select_row(new_row.uid, mod_key, false); + this.scrollto(new_row.uid); + } return false; }, @@ -1231,7 +1282,8 @@ scrollto: function(id) { var row = this.rows[id].obj; if (row && this.frame) { - var scroll_to = Number(row.offsetTop); + var scroll_to = Number(row.offsetTop), + head_offset = 0; // expand thread if target row is hidden (collapsed) if (!scroll_to && this.rows[id].parent_uid) { @@ -1240,8 +1292,14 @@ scrollto: function(id) scroll_to = Number(row.offsetTop); } - if (scroll_to < Number(this.frame.scrollTop)) - this.frame.scrollTop = scroll_to; + if (this.fixed_header) + head_offset = Number(this.thead.offsetHeight); + + // if row is above the frame (or behind header) + if (scroll_to < Number(this.frame.scrollTop) + head_offset) { + // scroll window so that row isn't behind header + this.frame.scrollTop = scroll_to - head_offset; + } else if (scroll_to + Number(row.offsetHeight) > Number(this.frame.scrollTop) + Number(this.frame.offsetHeight)) this.frame.scrollTop = (scroll_to + Number(row.offsetHeight)) - Number(this.frame.offsetHeight); } @@ -1263,60 +1321,71 @@ drag_mouse_move: function(e) if (this.drag_start) { // check mouse movement, of less than 3 pixels, don't start dragging - var m = rcube_event.get_mouse_pos(e); + var m = rcube_event.get_mouse_pos(e), + limit = 10, selection = [], self = this; if (!this.drag_mouse_start || (Math.abs(m.x - this.drag_mouse_start.x) < 3 && Math.abs(m.y - this.drag_mouse_start.y) < 3)) return false; + // remember dragging start position + this.drag_start_pos = {left: m.x, top: m.y}; + + // initialize drag layer if (!this.draglayer) this.draglayer = $('<div>').attr('id', 'rcmdraglayer') - .css({ position:'absolute', display:'none', 'z-index':2000 }) + .css({position: 'absolute', display: 'none', 'z-index': 2000}) .appendTo(document.body); + else + this.draglayer.html(''); - // also select childs of (collapsed) threads for dragging - var n, uid, selection = $.merge([], this.selection); - for (n in selection) { - uid = selection[n]; - if (!this.rows[uid].expanded) - this.select_children(uid); - } + // get selected rows (in display order), don't use this.selection here + $(this.row_tagname() + '.selected', this.tbody).each(function() { + if (!String(this.id).match(self.id_regexp)) + return; - // reset content - this.draglayer.html(''); + var uid = RegExp.$1, row = self.rows[uid]; - // get subjects of selected messages - var i, n, obj, me; - for (n=0; n<this.selection.length; n++) { - // only show 12 lines - if (n>12) { - this.draglayer.append('...'); - break; - } + if (!row || $.inArray(uid, selection) > -1) + return; - me = this; - if (obj = this.rows[this.selection[n]].obj) { - $('> '+this.col_tagname(), obj).each(function(i,elem){ - if (n == 0) - me.drag_start_pos = $(elem).offset(); + selection.push(uid); - if (me.subject_col < 0 || (me.subject_col >= 0 && me.subject_col == i)) { - var subject = $(elem).text(); + // also handle children of (collapsed) trees for dragging (they might be not selected) + if (row.has_children && !row.expanded) + $.each(self.row_children(uid), function() { + if ($.inArray(this, selection) > -1) + return; + selection.push(this); + }); - if (subject) { - // remove leading spaces - subject = $.trim(subject); - // truncate line to 50 characters - subject = (subject.length > 50 ? subject.substring(0, 50) + '...' : subject); + // break the loop asap + if (selection.length > limit + 1) + return false; + }); - var entry = $('<div>').text(subject); - me.draglayer.append(entry); - } + // append subject (of every row up to the limit) to the drag layer + $.each(selection, function(i, uid) { + if (i > limit) { + self.draglayer.append('...'); + return false; + } + + $('> ' + self.col_tagname(), self.rows[uid].obj).each(function(n, cell) { + if (self.subject_col < 0 || (self.subject_col >= 0 && self.subject_col == n)) { + var subject = $(cell).text(); + + if (subject) { + // remove leading spaces + subject = $.trim(subject); + // truncate line to 50 characters + subject = (subject.length > 50 ? subject.substring(0, 50) + '...' : subject); - return false; // break + self.draglayer.append($('<div>').text(subject)); + return false; } - }); - } - } + } + }); + }); this.draglayer.show(); this.drag_active = true; @@ -1391,6 +1460,9 @@ column_drag_mouse_move: function(e) var lpos = $(this.list).offset(), cells = this.thead.rows[0].cells; + // fix layer position when list is scrolled + lpos.top += this.list.scrollTop + this.list.parentNode.scrollTop; + // create dragging layer this.col_draglayer = $('<div>').attr('id', 'rcmcoldraglayer') .css(lpos).css({ position:'absolute', 'z-index':2001, @@ -1501,7 +1573,7 @@ row_children: function(uid) while (row) { if (row.nodeType == 1) { - if ((r = this.rows[row.uid])) { + if (r = this.rows[row.uid]) { if (!r.depth || r.depth <= depth) break; res.push(r.uid); @@ -1536,7 +1608,7 @@ add_dragfix: function() */ del_dragfix: function() { - $('div.iframe-dragdrop-fix').each(function() { this.parentNode.removeChild(this); }); + $('div.iframe-dragdrop-fix').remove(); }, diff --git a/program/js/tiny_mce/langs/en.js b/program/js/tiny_mce/langs/en.js index 16d7a93e0..19324f74c 100644 --- a/program/js/tiny_mce/langs/en.js +++ b/program/js/tiny_mce/langs/en.js @@ -1 +1 @@ -tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"}}});
\ No newline at end of file +tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode_stick":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"},visualblocks:{desc:'Show/hide block elements'}}});
\ No newline at end of file diff --git a/program/js/tiny_mce/license.txt b/program/js/tiny_mce/license.txt index 60d6d4c8f..5a2534299 100644 --- a/program/js/tiny_mce/license.txt +++ b/program/js/tiny_mce/license.txt @@ -20,7 +20,7 @@ free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
+can use it too, but we suggest you first think carefuly about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
diff --git a/program/js/tiny_mce/plugins/advlink/js/advlink.js b/program/js/tiny_mce/plugins/advlink/js/advlink.js index 9ca955c92..f013aac1e 100644 --- a/program/js/tiny_mce/plugins/advlink/js/advlink.js +++ b/program/js/tiny_mce/plugins/advlink/js/advlink.js @@ -64,13 +64,14 @@ function init() { if (elm != null && elm.nodeName == "A")
action = "update";
- formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
+ formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
setPopupControlsDisabled(true);
if (action == "update") {
var href = inst.dom.getAttrib(elm, 'href');
var onclick = inst.dom.getAttrib(elm, 'onclick');
+ var linkTarget = inst.dom.getAttrib(elm, 'target') ? inst.dom.getAttrib(elm, 'target') : "_self";
// Setup form data
setFormValue('href', href);
@@ -98,7 +99,7 @@ function init() { setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
- setFormValue('target', inst.dom.getAttrib(elm, 'target'));
+ setFormValue('target', linkTarget);
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
// Parse onclick data
@@ -119,7 +120,7 @@ function init() { addClassesToList('classlist', 'advlink_styles');
selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
- selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
+ selectByValue(formObj, 'targetlist', linkTarget, true);
} else
addClassesToList('classlist', 'advlink_styles');
}
@@ -377,6 +378,9 @@ function getAnchorListHTML(id, target) { for (i=0, len=nodes.length; i<len; i++) {
if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
html += '<option value="#' + name + '">' + name + '</option>';
+
+ if ((name = nodes[i].id) != "" && !nodes[i].href)
+ html += '<option value="#' + name + '">' + name + '</option>';
}
if (html == "")
diff --git a/program/js/tiny_mce/plugins/autolink/editor_plugin.js b/program/js/tiny_mce/plugins/autolink/editor_plugin.js index d1c3502ac..71d86bbec 100644 --- a/program/js/tiny_mce/plugins/autolink/editor_plugin.js +++ b/program/js/tiny_mce/plugins/autolink/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;a.onKeyDown.addToTop(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});if(tinyMCE.isIE){return}a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng(true).cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}if(n.nodeType==3){a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}var m=a.toString();if(m.charAt(m.length-1)=="."){a.setEnd(n,c-1)}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])&&!/^mailto:/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);i.nodeChanged();if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})();
\ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;a.onKeyDown.addToTop(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});if(tinyMCE.isIE){return}a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng(true).cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}if(n.nodeType==3){a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f>=2?f-2:0);a.setEnd(n,f>=1?f-1:0);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}var m=a.toString();if(m.charAt(m.length-1)=="."){a.setEnd(n,c-1)}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])&&!/^mailto:/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);i.nodeChanged();if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})();
\ No newline at end of file diff --git a/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js b/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js index c05fbbc09..5b61f7a20 100644 --- a/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js +++ b/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js @@ -107,8 +107,8 @@ do { // Move the selection one character backwards. - r.setStart(endContainer, end - 2); - r.setEnd(endContainer, end - 1); + r.setStart(endContainer, end >= 2 ? end - 2 : 0); + r.setEnd(endContainer, end >= 1 ? end - 1 : 0); end -= 1; // Loop until one of the following is found: a blank space, , delimeter, (end-2) >= 0 diff --git a/program/js/tiny_mce/plugins/emotions/langs/en_dlg.js b/program/js/tiny_mce/plugins/emotions/langs/en_dlg.js index f5aafc390..037c4b588 100644 --- a/program/js/tiny_mce/plugins/emotions/langs/en_dlg.js +++ b/program/js/tiny_mce/plugins/emotions/langs/en_dlg.js @@ -1 +1 @@ -tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed",usage:"Use left and right arrows to navigate."});
\ No newline at end of file +tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",usage:"Use left and right arrows to navigate.",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed"}); diff --git a/program/js/tiny_mce/plugins/example/editor_plugin_src.js b/program/js/tiny_mce/plugins/example/editor_plugin_src.js index 9a0e7da15..0a259471d 100644 --- a/program/js/tiny_mce/plugins/example/editor_plugin_src.js +++ b/program/js/tiny_mce/plugins/example/editor_plugin_src.js @@ -49,7 +49,7 @@ },
/**
- * Creates control instances based in the incomming name. This method is normally not
+ * Creates control instances based in the incoming name. This method is normally not
* needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
* but you sometimes need to create more complex controls like listboxes, split buttons etc then this
* method can be used to create those.
diff --git a/program/js/tiny_mce/plugins/fullscreen/editor_plugin.js b/program/js/tiny_mce/plugins/fullscreen/editor_plugin.js index a2eb03483..1aa8cc443 100644 --- a/program/js/tiny_mce/plugins/fullscreen/editor_plugin.js +++ b/program/js/tiny_mce/plugins/fullscreen/editor_plugin.js @@ -1 +1 @@ -(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().getElementsByTagName("table")[0]);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
\ No newline at end of file +(function(){var b=tinymce.DOM;var a=function(d,f,e){var c=function(g){var i=d.controlManager.get(g);var h=f.controlManager.get(g);if(i&&h){h.displayColor(i.value)}};c("forecolor");c("backcolor");f.setContent(d.getContent({format:"raw"}),{format:"raw"});f.selection.moveToBookmark(e);if(d.plugins.spellchecker&&f.plugins.spellchecker){f.plugins.spellchecker.setLanguage(d.plugins.spellchecker.selectedLang)}};tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(i,c){var l=this,m={},k=b.doc.documentElement,d,o,h,g,f,e,j;i.addCommand("mceFullScreen",function(){var q,r;if(i.getParam("fullscreen_is_enabled")){if(i.getParam("fullscreen_new_window")){closeFullscreen()}else{b.win.setTimeout(function(){var t=i;var s=tinyMCE.get(t.getParam("fullscreen_editor_id"));s.plugins.fullscreen.saveState(t);tinyMCE.remove(t)},10)}return}if(i.getParam("fullscreen_new_window")){l.fullscreenSettings={bookmark:i.selection.getBookmark()};q=b.win.open(c+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{q.resizeTo(screen.availWidth,screen.availHeight)}catch(p){}}else{o=b.getStyle(b.doc.body,"overflow",1)||"auto";h=b.getStyle(k,"overflow",1);d=b.getViewPort();g=d.x;f=d.y;if(tinymce.isOpera&&o=="visible"){o="auto"}if(tinymce.isIE&&o=="scroll"){o="auto"}if(tinymce.isIE&&(h=="visible"||h=="scroll")){h="auto"}if(o=="0px"){o=""}b.setStyle(b.doc.body,"overflow","hidden");k.style.overflow="hidden";d=b.getViewPort();b.win.scrollTo(0,0);if(tinymce.isIE){d.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){e="absolute;top:"+d.y}else{e="fixed;top:0"}n=b.add(b.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+e+";left:0;width:"+d.w+"px;height:"+d.h+"px;z-index:200000;"});b.add(n,"div",{id:"mce_fullscreen"});tinymce.each(i.settings,function(s,t){m[t]=s});m.id="mce_fullscreen";m.width=n.clientWidth;m.height=n.clientHeight-15;m.fullscreen_is_enabled=true;m.fullscreen_editor_id=i.id;m.theme_advanced_resizing=false;m.save_onsavecallback=function(){i.setContent(tinyMCE.get(m.id).getContent());i.execCommand("mceSave")};tinymce.each(i.getParam("fullscreen_settings"),function(t,s){m[s]=t});l.fullscreenSettings={bookmark:i.selection.getBookmark(),fullscreen_overflow:o,fullscreen_html_overflow:h,fullscreen_scrollx:g,fullscreen_scrolly:f};if(m.theme_advanced_toolbar_location==="external"){m.theme_advanced_toolbar_location="top"}tinyMCE.oldSettings=tinyMCE.settings;l.fullscreenEditor=new tinymce.Editor("mce_fullscreen",m);l.fullscreenEditor.onInit.add(function(){l.loadState(l.fullscreenEditor)});l.fullscreenEditor.render();l.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");l.fullscreenElement.update();l.resizeFunc=tinymce.dom.Event.add(b.win,"resize",function(){var v=tinymce.DOM.getViewPort(),t=l.fullscreenEditor,s,u;s=t.dom.getSize(t.getContainer().getElementsByTagName("table")[0]);u=t.dom.getSize(t.getContainer().getElementsByTagName("iframe")[0]);t.theme.resizeTo(v.w-s.w+u.w,v.h-s.h+u.h)})}});i.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});i.onNodeChange.add(function(q,p){p.setActive("fullscreen",q.getParam("fullscreen_is_enabled"))});l.loadState=function(p){if(!(p&&l.fullscreenSettings)){throw"No fullscreen editor to load to"}a(i,p,l.fullscreenSettings.bookmark);p.focus()};l.saveState=function(q){if(!(q&&l.fullscreenSettings)){throw"No fullscreen editor to restore from"}var p=l.fullscreenSettings;a(q,i,q.selection.getBookmark());if(!i.getParam("fullscreen_new_window")){tinymce.dom.Event.remove(b.win,"resize",l.resizeFunc);delete l.resizeFunc;b.remove("mce_fullscreen_container");b.doc.documentElement.style.overflow=p.fullscreen_html_overflow;b.setStyle(b.doc.body,"overflow",p.fullscreen_overflow);b.win.scrollTo(p.fullscreen_scrollx,p.fullscreen_scrolly)}tinyMCE.settings=tinyMCE.oldSettings;delete tinyMCE.oldSettings;delete l.fullscreenEditor;delete l.fullscreenElement;delete l.fullscreenSettings;b.win.setTimeout(function(){i.selection.moveToBookmark(j);i.focus()},10)}},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
\ No newline at end of file diff --git a/program/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js b/program/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js index 524b487aa..bec886f74 100644 --- a/program/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js +++ b/program/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js @@ -11,29 +11,48 @@ (function() {
var DOM = tinymce.DOM;
+ // State Transfer function
+ var transferState = function(oldEditor, newEditor, bookmark) {
+ var transferColorButtonState = function(swapme) {
+ var c = oldEditor.controlManager.get(swapme);
+ var newC = newEditor.controlManager.get(swapme);
+
+ if (c && newC) {
+ newC.displayColor(c.value);
+ }
+
+ };
+
+ transferColorButtonState('forecolor');
+ transferColorButtonState('backcolor');
+ newEditor.setContent(oldEditor.getContent({format : 'raw'}), {format : 'raw'});
+ newEditor.selection.moveToBookmark(bookmark);
+
+ if (oldEditor.plugins.spellchecker && newEditor.plugins.spellchecker) {
+ newEditor.plugins.spellchecker.setLanguage(oldEditor.plugins.spellchecker.selectedLang);
+ }
+ };
+
tinymce.create('tinymce.plugins.FullScreenPlugin', {
init : function(ed, url) {
- var t = this, s = {}, vp, posCss;
-
- t.editor = ed;
+ var t = this, s = {}, de = DOM.doc.documentElement, vp, fullscreen_overflow, fullscreen_html_overflow, fullscreen_scrollx, fullscreen_scrolly, posCss, bookmark;
// Register commands
ed.addCommand('mceFullScreen', function() {
- var win, de = DOM.doc.documentElement;
+ var win, oed;
if (ed.getParam('fullscreen_is_enabled')) {
if (ed.getParam('fullscreen_new_window'))
- closeFullscreen(); // Call to close in new window
+ closeFullscreen(); // Call to close in fullscreen.htm
else {
DOM.win.setTimeout(function() {
- tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
- tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent());
- tinyMCE.remove(ed);
- DOM.remove('mce_fullscreen_container');
- de.style.overflow = ed.getParam('fullscreen_html_overflow');
- DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
- DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
- tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
+ var fullscreenEditor = ed;
+
+ // find the editor that opened this one, execute restore function there
+ var originalEditor = tinyMCE.get(fullscreenEditor.getParam('fullscreen_editor_id'));
+ originalEditor.plugins.fullscreen.saveState(fullscreenEditor);
+
+ tinyMCE.remove(fullscreenEditor);
}, 10);
}
@@ -41,6 +60,9 @@ }
if (ed.getParam('fullscreen_new_window')) {
+ t.fullscreenSettings = {
+ bookmark: ed.selection.getBookmark()
+ };
win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
try {
win.resizeTo(screen.availWidth, screen.availHeight);
@@ -48,27 +70,26 @@ // Ignore
}
} else {
- tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
- s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
- s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
+ fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
+ fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
vp = DOM.getViewPort();
- s.fullscreen_scrollx = vp.x;
- s.fullscreen_scrolly = vp.y;
+ fullscreen_scrollx = vp.x;
+ fullscreen_scrolly = vp.y;
// Fixes an Opera bug where the scrollbars doesn't reappear
- if (tinymce.isOpera && s.fullscreen_overflow == 'visible')
- s.fullscreen_overflow = 'auto';
+ if (tinymce.isOpera && fullscreen_overflow == 'visible')
+ fullscreen_overflow = 'auto';
// Fixes an IE bug where horizontal scrollbars would appear
- if (tinymce.isIE && s.fullscreen_overflow == 'scroll')
- s.fullscreen_overflow = 'auto';
+ if (tinymce.isIE && fullscreen_overflow == 'scroll')
+ fullscreen_overflow = 'auto';
// Fixes an IE bug where the scrollbars doesn't reappear
- if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
- s.fullscreen_html_overflow = 'auto';
+ if (tinymce.isIE && (fullscreen_html_overflow == 'visible' || fullscreen_html_overflow == 'scroll'))
+ fullscreen_html_overflow = 'auto';
- if (s.fullscreen_overflow == '0px')
- s.fullscreen_overflow = '';
+ if (fullscreen_overflow == '0px')
+ fullscreen_overflow = '';
DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
de.style.overflow = 'hidden'; //Fix for IE6/7
@@ -108,13 +129,21 @@ s[k] = v;
});
+ t.fullscreenSettings = {
+ bookmark: ed.selection.getBookmark(),
+ fullscreen_overflow: fullscreen_overflow,
+ fullscreen_html_overflow: fullscreen_html_overflow,
+ fullscreen_scrollx: fullscreen_scrollx,
+ fullscreen_scrolly: fullscreen_scrolly
+ };
+
if (s.theme_advanced_toolbar_location === 'external')
s.theme_advanced_toolbar_location = 'top';
+ tinyMCE.oldSettings = tinyMCE.settings; // Store old settings, the Editor constructor overwrites them
t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
t.fullscreenEditor.onInit.add(function() {
- t.fullscreenEditor.setContent(ed.getContent());
- t.fullscreenEditor.focus();
+ t.loadState(t.fullscreenEditor);
});
t.fullscreenEditor.render();
@@ -141,6 +170,52 @@ ed.onNodeChange.add(function(ed, cm) {
cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
});
+
+ // fullscreenEditor is a param here because in window mode we don't create it
+ t.loadState = function(fullscreenEditor) {
+ if (!(fullscreenEditor && t.fullscreenSettings)) {
+ throw "No fullscreen editor to load to";
+ }
+
+ transferState(ed, fullscreenEditor, t.fullscreenSettings.bookmark);
+ fullscreenEditor.focus();
+
+ };
+
+ // fullscreenEditor is a param here because in window mode we don't create it
+ t.saveState = function(fullscreenEditor) {
+ if (!(fullscreenEditor && t.fullscreenSettings)) {
+ throw "No fullscreen editor to restore from";
+ }
+ var settings = t.fullscreenSettings;
+
+ transferState(fullscreenEditor, ed, fullscreenEditor.selection.getBookmark());
+
+ // cleanup only required if window mode isn't used
+ if (!ed.getParam('fullscreen_new_window')) {
+ tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
+ delete t.resizeFunc;
+
+ DOM.remove('mce_fullscreen_container');
+
+ DOM.doc.documentElement.style.overflow = settings.fullscreen_html_overflow;
+ DOM.setStyle(DOM.doc.body, 'overflow', settings.fullscreen_overflow);
+ DOM.win.scrollTo(settings.fullscreen_scrollx, settings.fullscreen_scrolly);
+ }
+ tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
+
+ // clear variables
+ delete tinyMCE.oldSettings;
+ delete t.fullscreenEditor;
+ delete t.fullscreenElement;
+ delete t.fullscreenSettings;
+
+ // allow the fullscreen editor to be removed before restoring focus and selection
+ DOM.win.setTimeout(function() {
+ ed.selection.moveToBookmark(bookmark);
+ ed.focus();
+ }, 10);
+ };
},
getInfo : function() {
diff --git a/program/js/tiny_mce/plugins/fullscreen/fullscreen.htm b/program/js/tiny_mce/plugins/fullscreen/fullscreen.htm index ffe528e41..baf028b79 100644 --- a/program/js/tiny_mce/plugins/fullscreen/fullscreen.htm +++ b/program/js/tiny_mce/plugins/fullscreen/fullscreen.htm @@ -46,7 +46,7 @@ settings['strict_loading_mode'] = true;
settings.save_onsavecallback = function() {
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
+ moveContent();
window.opener.tinyMCE.get(oeID).execCommand('mceSave');
window.close();
};
@@ -56,11 +56,15 @@ }
function moveContent() {
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
+ // find the original editor, execute restore state in it's plugin instance
+ window.opener.tinyMCE.get(oeID).plugins.fullscreen.saveState(tinyMCE.activeEditor);
+
+ // prevent moveContent from being called twice - e.g. if the unloadHandler runs after moveContent()
+ tinymce.dom.Event.remove(window, "beforeunload", unloadHandler);
}
function closeFullscreen() {
- moveContent();
+ // moveContent() will be called by the unload handler
window.close();
}
@@ -78,17 +82,20 @@ function render() {
var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
- e.value = window.opener.tinyMCE.get(oeID).getContent();
-
vp = dom.getViewPort();
settings.width = vp.w;
settings.height = vp.h - 15;
- tinymce.dom.Event.add(window, 'resize', function() {
- var vp = dom.getViewPort();
+ settings.oninit = function() {
+ var ed = tinyMCE.activeEditor;
+ window.opener.tinyMCE.get(oeID).plugins.fullscreen.loadState(ed);
+
+ tinymce.dom.Event.add(window, 'resize', function() {
+ var vp = dom.getViewPort();
- tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
- });
+ tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
+ });
+ }
tinyMCE.init(settings);
}
diff --git a/program/js/tiny_mce/plugins/inlinepopups/editor_plugin.js b/program/js/tiny_mce/plugins/inlinepopups/editor_plugin.js index 8bb96f9cb..2d71a2e17 100644 --- a/program/js/tiny_mce/plugins/inlinepopups/editor_plugin.js +++ b/program/js/tiny_mce/plugins/inlinepopups/editor_plugin.js @@ -1 +1 @@ -(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
\ No newline at end of file +(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId("mce_inlinepopups_");h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
\ No newline at end of file diff --git a/program/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/program/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js index 67123ca31..da6ee2493 100644 --- a/program/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +++ b/program/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js @@ -55,12 +55,12 @@ if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
}
-
+
// Only store selection if the type is a normal window
if (!f.type)
t.bookmark = ed.selection.getBookmark(1);
- id = DOM.uniqueId();
+ id = DOM.uniqueId("mce_inlinepopups_"); // Use a prefix so this can't conflict with other ids
vp = DOM.getViewPort();
f.width = parseInt(f.width || 320);
f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
@@ -111,17 +111,17 @@ opt += ' mceMovable';
// Create DOM objects
- t._addAll(DOM.doc.body,
- ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
+ t._addAll(DOM.doc.body,
+ ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
- ['div', {id : id + '_top', 'class' : 'mceTop'},
+ ['div', {id : id + '_top', 'class' : 'mceTop'},
['div', {'class' : 'mceLeft'}],
['div', {'class' : 'mceCenter'}],
['div', {'class' : 'mceRight'}],
['span', {id : id + '_title'}, f.title || '']
],
- ['div', {id : id + '_middle', 'class' : 'mceMiddle'},
+ ['div', {id : id + '_middle', 'class' : 'mceMiddle'},
['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
['span', {id : id + '_content'}],
['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
@@ -188,7 +188,7 @@ DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
-
+
Event.add(id, 'keyup', function(evt) {
var VK_ESCAPE = 27;
if (evt.keyCode === VK_ESCAPE) {
@@ -268,7 +268,7 @@ }
}
});
-
+
// Make sure the tab order loops within the dialog.
Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
var iframe = DOM.get(id + '_ifr');
@@ -284,7 +284,7 @@ DOM.get(id + '_ok').focus();
}
});
-
+
// Add window
w = t.windows[id] = {
id : id,
@@ -341,7 +341,7 @@ DOM.removeClass(t.lastId, 'mceFocus');
DOM.addClass(id, 'mceFocus');
t.lastId = id;
-
+
if (w.focussedElement) {
w.focussedElement.focus();
} else if (DOM.get(id + '_ok')) {
@@ -486,7 +486,7 @@ dw = v;
}
-
+
if (dh < (v = w.features.min_height - sz.h)) {
if (dy !== 0)
dy += dh - v;
@@ -505,7 +505,7 @@ if (dx + dy !== 0) {
if (sx + dx < 0)
dx = 0;
-
+
if (sy + dy < 0)
dy = 0;
@@ -567,7 +567,7 @@ t.focus(fw.id);
}
},
-
+
// Find front most window
_frontWindow : function() {
var fw, ix = 0;
diff --git a/program/js/tiny_mce/plugins/media/js/media.js b/program/js/tiny_mce/plugins/media/js/media.js index f6a081a63..89cea2a41 100644 --- a/program/js/tiny_mce/plugins/media/js/media.js +++ b/program/js/tiny_mce/plugins/media/js/media.js @@ -295,30 +295,40 @@ } else {
src = getVal("src");
- // YouTube *NEW*
- if (src.match(/youtu.be\/[a-z1-9.-_]+/)) {
+ // YouTube Embed
+ if (src.match(/youtube\.com\/embed\/\w+/)) {
data.width = 425;
data.height = 350;
data.params.frameborder = '0';
data.type = 'iframe';
- src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1];
setVal('src', src);
setVal('media_type', data.type);
- }
+ } else {
+ // YouTube *NEW*
+ if (src.match(/youtu\.be\/[a-z1-9.-_]+/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
- // YouTube
- if (src.match(/youtube.com(.+)v=([^&]+)/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1];
- setVal('src', src);
- setVal('media_type', data.type);
+ // YouTube
+ if (src.match(/youtube\.com(.+)v=([^&]+)/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
}
// Google video
- if (src.match(/video.google.com(.+)docid=([^&]+)/)) {
+ if (src.match(/video\.google\.com(.+)docid=([^&]+)/)) {
data.width = 425;
data.height = 326;
data.type = 'flash';
@@ -328,7 +338,7 @@ }
// Vimeo
- if (src.match(/vimeo.com\/([0-9]+)/)) {
+ if (src.match(/vimeo\.com\/([0-9]+)/)) {
data.width = 425;
data.height = 350;
data.params.frameborder = '0';
@@ -339,7 +349,7 @@ }
// stream.cz
- if (src.match(/stream.cz\/((?!object).)*\/([0-9]+)/)) {
+ if (src.match(/stream\.cz\/((?!object).)*\/([0-9]+)/)) {
data.width = 425;
data.height = 350;
data.params.frameborder = '0';
@@ -350,7 +360,7 @@ }
// Google maps
- if (src.match(/maps.google.([a-z]{2,3})\/maps\/(.+)msid=(.+)/)) {
+ if (src.match(/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/)) {
data.width = 425;
data.height = 350;
data.params.frameborder = '0';
diff --git a/program/js/tiny_mce/plugins/media/langs/en_dlg.js b/program/js/tiny_mce/plugins/media/langs/en_dlg.js index b247f85cd..ecef3a801 100644 --- a/program/js/tiny_mce/plugins/media/langs/en_dlg.js +++ b/program/js/tiny_mce/plugins/media/langs/en_dlg.js @@ -1 +1 @@ -tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right",flash:"",quicktime:"","embedded_audio_options":"Embedded Audio Options",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",iframe:"",embeddedaudio:""});
\ No newline at end of file +tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" }); diff --git a/program/js/tiny_mce/plugins/paste/editor_plugin.js b/program/js/tiny_mce/plugins/paste/editor_plugin.js index be7eee8f1..f69f263f9 100644 --- a/program/js/tiny_mce/plugins/paste/editor_plugin.js +++ b/program/js/tiny_mce/plugins/paste/editor_plugin.js @@ -1 +1 @@ -(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="<p>"+o.encode(r).replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br />")+"</p>"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e.content)){d([[/(?:<br> [\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br> [\s\r\n]+|<br>)*/g,"$1"]]);d([[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |<br[^>]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(k,"paste_convert_middot_lists")){d([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/<h[1-6][^>]*>/gi,"<p><strong>"],[/<\/h[1-6][^>]*>/gi,"</strong></p>"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l<d.length;l++){o=d[l];j=h.getStyle(m,o);if(j){n[o]=j;k++}}}h.setAttrib(m,"style","");if(d&&k>0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f<d){n=tinymce.inArray(m,f);o=i.getParents(h.parentNode,s);h=o[o.length-1-n]||h}}}c(i.select("span",t),function(v){var p=v.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/<br[^>]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*<t[dh][^>]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"<br />"]])}else{if(e=="p"){h([[/\n+/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"]])}else{h([[/\n\n/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"],[/\n/g,"<br />"]])}}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
\ No newline at end of file +(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_max_consecutive_linebreaks:2,paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="<p>"+o.encode(r).replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br />")+"</p>"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e.content)){d([[/(?:<br> [\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br> [\s\r\n]+|<br>)*/g,"$1"]]);d([[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |<br[^>]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(k,"paste_convert_middot_lists")){d([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<?!(ol|ul)[^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1");j=j.replace(/(<(ol|ul)[^>]*\s)(?:id|name|language|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/<h[1-6][^>]*>/gi,"<p><strong>"],[/<\/h[1-6][^>]*>/gi,"</strong></p>"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l<d.length;l++){o=d[l];j=h.getStyle(m,o);if(j){n[o]=j;k++}}}h.setAttrib(m,"style","");if(d&&k>0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f<d){n=tinymce.inArray(m,f);o=i.getParents(h.parentNode,s);h=o[o.length-1-n]||h}}}c(i.select("span",t),function(v){var p=v.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j){var h=this.editor,f=b(h,"paste_text_linebreaktype"),k=b(h,"paste_text_replacements"),g=tinymce.is;function e(m){c(m,function(n){if(n.constructor==RegExp){j=j.replace(n,"")}else{j=j.replace(n[0],n[1])}})}if((typeof(j)==="string")&&(j.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(j)){e([/[\n\r]+/g])}else{e([/\r+/g])}e([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/<br[^>]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*<t[dh][^>]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"]]);var d=Number(b(h,"paste_max_consecutive_linebreaks"));if(d>-1){var l=new RegExp("\n{"+(d+1)+",}","g");var i="";while(i.length<d){i+="\n"}e([[l,i]])}j=h.dom.decode(tinymce.html.Entities.encodeRaw(j));if(g(k,"array")){e(k)}else{if(g(k,"string")){e(new RegExp(k,"gi"))}}if(f=="none"){e([[/\n+/g," "]])}else{if(f=="br"){e([[/\n/g,"<br />"]])}else{if(f=="p"){e([[/\n+/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"]])}else{e([[/\n\n/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"],[/\n/g,"<br />"]])}}}h.execCommand("mceInsertContent",false,j)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
\ No newline at end of file diff --git a/program/js/tiny_mce/plugins/paste/editor_plugin_src.js b/program/js/tiny_mce/plugins/paste/editor_plugin_src.js index 9f1c35476..6f1734299 100644 --- a/program/js/tiny_mce/plugins/paste/editor_plugin_src.js +++ b/program/js/tiny_mce/plugins/paste/editor_plugin_src.js @@ -23,6 +23,7 @@ paste_convert_headers_to_strong : false,
paste_dialog_width : "450",
paste_dialog_height : "400",
+ paste_max_consecutive_linebreaks: 2,
paste_text_use_dialog : false,
paste_text_sticky : false,
paste_text_sticky_default : false,
@@ -290,7 +291,7 @@ }
}
- // Check if we should use the new auto process method
+ // Check if we should use the new auto process method
if (getParam(ed, "paste_auto_cleanup_on_paste")) {
// Is it's Opera or older FF use key handler
if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
@@ -353,7 +354,7 @@ h = h.replace(v[0], v[1]);
});
}
-
+
if (ed.settings.paste_enable_default_filters == false) {
return;
}
@@ -412,7 +413,9 @@ // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
do {
len = h.length;
- h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
+ // Don't remove the type attribute for lists so that non-default list types display correctly.
+ h = h.replace(/(<?!(ol|ul)[^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
+ h = h.replace(/(<(ol|ul)[^>]*\s)(?:id|name|language|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
} while (len != h.length);
// Remove all spans if no styles is to be retained
@@ -588,7 +591,7 @@ if (ed.settings.paste_enable_default_filters == false) {
return;
}
-
+
if (o.wordContent) {
// Remove named anchors or TOC links
each(dom.select('a', o.node), function(a) {
@@ -790,10 +793,23 @@ [/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
/<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
[/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
- [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"],// Cool little RegExp deletes whitespace around linebreak chars.
- [/\n{3,}/g, "\n\n"] // Max. 2 consecutive linebreaks
+ [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"] // Cool little RegExp deletes whitespace around linebreak chars.
]);
+ var maxLinebreaks = Number(getParam(ed, "paste_max_consecutive_linebreaks"));
+ if (maxLinebreaks > -1) {
+ var maxLinebreaksRegex = new RegExp("\n{" + (maxLinebreaks + 1) + ",}", "g");
+ var linebreakReplacement = "";
+
+ while (linebreakReplacement.length < maxLinebreaks) {
+ linebreakReplacement += "\n";
+ }
+
+ process([
+ [maxLinebreaksRegex, linebreakReplacement] // Limit max consecutive linebreaks
+ ]);
+ }
+
content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content));
// Perform default or custom replacements
diff --git a/program/js/tiny_mce/plugins/searchreplace/js/searchreplace.js b/program/js/tiny_mce/plugins/searchreplace/js/searchreplace.js index 80284b9f3..eb9b6eea8 100644 --- a/program/js/tiny_mce/plugins/searchreplace/js/searchreplace.js +++ b/program/js/tiny_mce/plugins/searchreplace/js/searchreplace.js @@ -14,6 +14,7 @@ var SearchReplaceDialog = { mcTabs.onChange.add(function(tab_id, panel_id) {
t.switchMode(tab_id.substring(0, tab_id.indexOf('_')));
});
+
},
switchMode : function(m) {
@@ -39,6 +40,11 @@ var SearchReplaceDialog = { searchNext : function(a) {
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
+ if (tinymce.isIE11 && !window.find) {
+ ed.windowManager.alert("This feature is not available in IE 11+. Upgrade TinyMCE to 4.x to get this functionallity back.");
+ return;
+ }
+
// Get input
f = document.forms[0];
s = f[m + '_panel_searchstring'].value;
diff --git a/program/js/tiny_mce/plugins/spellchecker/editor_plugin.js b/program/js/tiny_mce/plugins/spellchecker/editor_plugin.js index 48549c923..6b57241a9 100644 --- a/program/js/tiny_mce/plugins/spellchecker/editor_plugin.js +++ b/program/js/tiny_mce/plugins/spellchecker/editor_plugin.js @@ -1 +1 @@ -(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={},h=[];this._walk(e.getBody(),function(i){if(i.nodeType==3){d+=i.nodeValue+" "}});if(e.getParam("spellchecker_word_pattern")){h=d.match("("+e.getParam("spellchecker_word_pattern")+")","gi")}else{d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));h=d.split(" ")}c(h,function(i){if(!f[i]){g.push(i);f[i]=1}});return g},_removeWords:function(d){var e=this.editor,h=e.dom,g=e.selection,f=g.getRng(true);c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!d||h.decode(i.innerHTML)==d){h.remove(i,1)}}});g.setRng(f)},_markWords:function(l){var h=this.editor,g=h.dom,j=h.getDoc(),i=h.selection,d=i.getRng(true),e=[],k=l.join("|"),m=this._getSeparators(),f=new RegExp("(^|["+m+"])("+k+")(?=["+m+"]|$)","g");this._walk(h.getBody(),function(o){if(o.nodeType==3){e.push(o)}});c(e,function(t){var r,q,o,s,p=t.nodeValue;if(f.test(p)){p=g.encode(p);q=g.create("span",{"class":"mceItemHidden"});if(tinymce.isIE){p=p.replace(f,"$1<mcespell>$2</mcespell>");while((s=p.indexOf("<mcespell>"))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("</mcespell>");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1<span class="mceItemHiddenSpellWord">$2</span>')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})();
\ No newline at end of file +(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);f.menuItems={};c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}f._updateMenu(l);f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);f.menuItems[n]=l;if(n==f.selectedLang){f.selectedItem=l}})});return g}},setLanguage:function(e){var d=this;if(e==d.selectedLang){return}if(tinymce.grep(d.languages,function(f){return f===e}).length===0){throw"Unknown language: "+e}d.selectedLang=e;if(d.menuItems){d._updateMenu(d.menuItems[e])}if(d.active){d._done()}},_updateMenu:function(d){d.setSelected(1);this.selectedItem.setSelected(0);this.selectedItem=d},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={},h=[];this._walk(e.getBody(),function(i){if(i.nodeType==3){d+=i.nodeValue+" "}});if(e.getParam("spellchecker_word_pattern")){h=d.match("("+e.getParam("spellchecker_word_pattern")+")","gi")}else{d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));h=d.split(" ")}c(h,function(i){if(!f[i]){g.push(i);f[i]=1}});return g},_removeWords:function(d){var e=this.editor,h=e.dom,g=e.selection,f=g.getRng(true);c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!d||h.decode(i.innerHTML)==d){h.remove(i,1)}}});g.setRng(f)},_markWords:function(l){var h=this.editor,g=h.dom,j=h.getDoc(),i=h.selection,d=i.getRng(true),e=[],k=l.join("|"),m=this._getSeparators(),f=new RegExp("(^|["+m+"])("+k+")(?=["+m+"]|$)","g");this._walk(h.getBody(),function(o){if(o.nodeType==3){e.push(o)}});c(e,function(t){var r,q,o,s,p=t.nodeValue;f.lastIndex=0;if(f.test(p)){p=g.encode(p);q=g.create("span",{"class":"mceItemHidden"});if(tinymce.isIE){p=p.replace(f,"$1<mcespell>$2</mcespell>");while((s=p.indexOf("<mcespell>"))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("</mcespell>");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1<span class="mceItemHiddenSpellWord">$2</span>')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})();
\ No newline at end of file diff --git a/program/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/program/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js index 86fdfceb4..5751b0e52 100644 --- a/program/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js +++ b/program/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js @@ -126,6 +126,7 @@ c.onRenderMenu.add(function(c, m) {
m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
+ t.menuItems = {};
each(t.languages, function(v, k) {
var o = {icon : 1}, mi;
@@ -133,27 +134,60 @@ if (v == t.selectedLang) {
return;
}
- mi.setSelected(1);
- t.selectedItem.setSelected(0);
- t.selectedItem = mi;
+ t._updateMenu(mi);
t.selectedLang = v;
};
o.title = k;
mi = m.add(o);
mi.setSelected(v == t.selectedLang);
-
+ t.menuItems[v] = mi;
if (v == t.selectedLang)
t.selectedItem = mi;
- })
+ });
});
+
+
return c;
}
},
+ setLanguage: function(lang) {
+ var t = this;
+
+ if (lang == t.selectedLang) {
+ // allowed
+ return;
+ }
+
+ if (tinymce.grep(t.languages, function(v) { return v === lang; }).length === 0) {
+ throw "Unknown language: " + lang;
+ }
+
+ t.selectedLang = lang;
+
+ // if the menu has been shown, update it as well
+ if (t.menuItems) {
+ t._updateMenu(t.menuItems[lang]);
+ }
+
+ if (t.active) {
+ // clear error in the old language.
+ t._done();
+
+ // Don't immediately block the UI to check spelling in the new language, this is an API not a user action.
+ }
+ },
+
// Internal functions
+ _updateMenu: function(mi) {
+ mi.setSelected(1);
+ this.selectedItem.setSelected(0);
+ this.selectedItem = mi;
+ },
+
_walk : function(n, f) {
var d = this.editor.getDoc(), w;
@@ -235,6 +269,7 @@ each(nl, function(n) {
var node, elem, txt, pos, v = n.nodeValue;
+ rx.lastIndex = 0;
if (rx.test(v)) {
// Encode the content
v = dom.encode(v);
diff --git a/program/js/tiny_mce/plugins/style/langs/en_dlg.js b/program/js/tiny_mce/plugins/style/langs/en_dlg.js index 9a1d4a223..35881b3ac 100644 --- a/program/js/tiny_mce/plugins/style/langs/en_dlg.js +++ b/program/js/tiny_mce/plugins/style/langs/en_dlg.js @@ -1 +1 @@ -tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"});
\ No newline at end of file +tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",toggle_insert_span:"Insert span at selection",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); diff --git a/program/js/tiny_mce/plugins/table/editor_plugin.js b/program/js/tiny_mce/plugins/table/editor_plugin.js index 23c1a83f3..4a92e1b36 100644 --- a/program/js/tiny_mce/plugins/table/editor_plugin.js +++ b/program/js/tiny_mce/plugins/table/editor_plugin.js @@ -1 +1 @@ -(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE?" ":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{L=D=null;e(g,function(Z,aa){e(Z,function(ac,ab){if(j(ac)){if(!L){L={x:ab,y:aa}}D={x:ab,y:aa}}})});P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}});G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected")}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE?" ":'<br data-mce-bogus="1" />')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});if(d.isGecko){r.onKeyDown.add(function(z,B){if(B.keyCode===d.VK.ENTER&&B.shiftKey){var A=z.selection.getRng().startContainer;var C=q.getParent(A,"td,th");if(C){var w=z.getDoc().createTextNode("\uFEFF");q.insertAfter(w,A)}}})}s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce);
\ No newline at end of file +(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE&&!d.isIE11?" ":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE||d.isIE11){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{L=D=null;e(g,function(Z,aa){e(Z,function(ac,ab){if(j(ac)){if(!L){L={x:ab,y:aa}}D={x:ab,y:aa}}})});P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){if(!O){return}var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}});G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected")}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE&&!d.isIE11?" ":'<br data-mce-bogus="1" />')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce);
\ No newline at end of file diff --git a/program/js/tiny_mce/plugins/table/editor_plugin_src.js b/program/js/tiny_mce/plugins/table/editor_plugin_src.js index 54bab56c3..045648376 100644 --- a/program/js/tiny_mce/plugins/table/editor_plugin_src.js +++ b/program/js/tiny_mce/plugins/table/editor_plugin_src.js @@ -166,7 +166,7 @@ // Add something to the inner node if (curNode) - curNode.innerHTML = tinymce.isIE ? ' ' : '<br data-mce-bogus="1" />'; + curNode.innerHTML = tinymce.isIE && !tinymce.isIE11 ? ' ' : '<br data-mce-bogus="1" />'; return false; } @@ -179,7 +179,7 @@ if (formatNode) { cell.appendChild(formatNode); } else { - if (!tinymce.isIE) + if (!tinymce.isIE || tinymce.isIE11) cell.innerHTML = '<br data-mce-bogus="1" />'; } @@ -566,6 +566,10 @@ }; function pasteRows(rows, before) { + // If we don't have any rows in the clipboard, return immediately + if(!rows) + return; + var selectedRows = getSelectedRows(), targetRow = selectedRows[before ? 0 : selectedRows.length - 1], targetCellCount = targetRow.cells.length; @@ -1245,7 +1249,7 @@ if (last && last.nodeName == 'TABLE') { if (ed.settings.forced_root_block) - ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE ? ' ' : '<br data-mce-bogus="1" />'); + ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE && !tinymce.isIE11 ? ' ' : '<br data-mce-bogus="1" />'); else ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'}); } @@ -1294,7 +1298,10 @@ /** * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line + * + * Removed: Since the new enter logic seems to fix this one. */ + /* if (tinymce.isGecko) { ed.onKeyDown.add(function(ed, e) { if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) { @@ -1307,7 +1314,7 @@ } }); } - + */ fixTableCaretPos(); ed.startContent = ed.getContent({format : 'raw'}); diff --git a/program/js/tiny_mce/plugins/table/js/row.js b/program/js/tiny_mce/plugins/table/js/row.js index a13d69592..0c678de46 100644 --- a/program/js/tiny_mce/plugins/table/js/row.js +++ b/program/js/tiny_mce/plugins/table/js/row.js @@ -25,6 +25,7 @@ function init() { var dir = dom.getAttrib(trElm, 'dir');
selectByValue(formObj, 'rowtype', rowtype);
+ setActionforRowType(formObj, rowtype);
// Any cells selected
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
@@ -234,4 +235,20 @@ function changedColor() { formObj.style.value = dom.serializeStyle(st);
}
+function changedRowType() {
+ var formObj = document.forms[0];
+ var rowtype = getSelectValue(formObj, 'rowtype');
+
+ setActionforRowType(formObj, rowtype);
+
+}
+
+function setActionforRowType(formObj, rowtype) {
+ if (rowtype === "tbody") {
+ formObj.action.disabled = false;
+ } else {
+ selectByValue(formObj, 'action', "row");
+ formObj.action.disabled = true;
+ }
+}
tinyMCEPopup.onInit.add(init);
diff --git a/program/js/tiny_mce/plugins/table/js/table.js b/program/js/tiny_mce/plugins/table/js/table.js index 1db243b63..f427f5f87 100644 --- a/program/js/tiny_mce/plugins/table/js/table.js +++ b/program/js/tiny_mce/plugins/table/js/table.js @@ -91,7 +91,7 @@ function insertTable() { if (!capEl && caption) {
capEl = elm.ownerDocument.createElement('caption');
- if (!tinymce.isIE)
+ if (!tinymce.isIE || tinymce.isIE11)
capEl.innerHTML = '<br data-mce-bogus="1"/>';
elm.insertBefore(capEl, elm.firstChild);
@@ -199,7 +199,7 @@ function insertTable() { html += '>';
if (caption) {
- if (!tinymce.isIE)
+ if (!tinymce.isIE || tinymce.isIE11)
html += '<caption><br data-mce-bogus="1"/></caption>';
else
html += '<caption></caption>';
@@ -209,7 +209,7 @@ function insertTable() { html += "<tr>";
for (var x=0; x<cols; x++) {
- if (!tinymce.isIE)
+ if (!tinymce.isIE || tinymce.isIE11)
html += '<td><br data-mce-bogus="1"/></td>';
else
html += '<td></td>';
@@ -242,16 +242,16 @@ function insertTable() { } else
inst.execCommand('mceInsertContent', false, html);
- tinymce.each(dom.select('table[data-mce-new]'), function(node) { + tinymce.each(dom.select('table[data-mce-new]'), function(node) {
var tdorth = dom.select('td,th', node);
- +
// Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
- if (tinymce.isIE && node.nextSibling == null) {
+ if (tinymce.isIE && !tinymce.isIE11 && node.nextSibling == null) {
if (inst.settings.forced_root_block)
dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
else
dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
- } + }
try {
// IE9 might fail to do this selection
diff --git a/program/js/tiny_mce/plugins/table/row.htm b/program/js/tiny_mce/plugins/table/row.htm index 1885401f6..6ebef2842 100644 --- a/program/js/tiny_mce/plugins/table/row.htm +++ b/program/js/tiny_mce/plugins/table/row.htm @@ -28,7 +28,7 @@ <tr>
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
<td class="col2">
- <select id="rowtype" name="rowtype" class="mceFocus">
+ <select id="rowtype" name="rowtype" class="mceFocus" onChange="changedRowType();">
<option value="thead">{#table_dlg.thead}</option>
<option value="tbody">{#table_dlg.tbody}</option>
<option value="tfoot">{#table_dlg.tfoot}</option>
@@ -83,8 +83,8 @@ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
- <td class="column1"><label for="id">{#table_dlg.id}</label></td>
- <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
+ <td class="column1"><label for="id">{#table_dlg.id}</label></td>
+ <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
</tr>
<tr>
@@ -93,25 +93,25 @@ </tr>
<tr>
- <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
+ <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
<td>
- <select id="dir" name="dir" style="width: 200px">
- <option value="">{#not_set}</option>
- <option value="ltr">{#table_dlg.ltr}</option>
- <option value="rtl">{#table_dlg.rtl}</option>
+ <select id="dir" name="dir" style="width: 200px">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#table_dlg.ltr}</option>
+ <option value="rtl">{#table_dlg.rtl}</option>
</select>
- </td>
+ </td>
</tr>
<tr>
- <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
+ <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
<td>
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
- </td>
+ </td>
</tr>
<tr>
- <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
+ <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
<td>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -119,11 +119,11 @@ <td id="backgroundimagebrowsercontainer"> </td>
</tr>
</table>
- </td>
+ </td>
</tr>
<tr>
- <td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
+ <td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
<td>
<span role="group" aria-labelledby="bgcolor_label">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
@@ -133,7 +133,7 @@ </tr>
</table>
</span>
- </td>
+ </td>
</tr>
</table>
</fieldset>
diff --git a/program/js/tiny_mce/themes/advanced/editor_template.js b/program/js/tiny_mce/themes/advanced/editor_template.js index 9ab712cb5..4b8d56375 100644 --- a/program/js/tiny_mce/themes/advanced/editor_template.js +++ b/program/js/tiny_mce/themes/advanced/editor_template.js @@ -1 +1 @@ -(function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(p,m){var k,l,o=p.dom,j="",n,r;previewStyles=p.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function q(s){return s.replace(/%(\w+)/g,"")}k=m.block||m.inline||"span";l=o.create(k);f(m.styles,function(t,s){t=q(t);if(t){o.setStyle(l,s,t)}});f(m.attributes,function(t,s){t=q(t);if(t){o.setAttrib(l,s,t)}});f(m.classes,function(s){s=q(s);if(!o.hasClass(l,s)){o.addClass(l,s)}});o.setStyles(l,{position:"absolute",left:-65535});p.getBody().appendChild(l);n=o.getStyle(p.getBody(),"fontSize",true);n=/px$/.test(n)?parseInt(n,10):0;f(previewStyles.split(" "),function(s){var t=o.getStyle(l,s,true);if(s=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)){t=o.getStyle(p.getBody(),s,true);if(o.toHex(t).toLowerCase()=="#ffffff"){return}}if(s=="font-size"){if(/em|%$/.test(t)){if(n===0){return}t=parseFloat(t,10)/(/%$/.test(t)?100:1);t=(t*n)+"px"}}j+=s+":"+t+";"});o.remove(l);return j}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j<o.clientWidth){j=o.clientWidth;i.setStyle(p,"width",o.clientWidth)}}if(l&&m.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+k.id+"_size",{cw:j,ch:n})}},destroy:function(){var j=this.editor.id;g.clear(j+"_resize");g.clear(j+"_path_row");g.clear(j+"_external_close")},_simpleLayout:function(z,u,l,j){var y=this,v=y.editor,w=z.theme_advanced_toolbar_location,q=z.theme_advanced_statusbar_location,m,k,r,x;if(z.readonly){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});return k}if(w=="top"){y._addToolbars(u,l)}if(w=="external"){m=x=i.create("div",{style:"position:relative"});m=i.add(m,"div",{id:v.id+"_external","class":"mceExternalToolbar"});i.add(m,"a",{id:v.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});m=i.add(m,"table",{id:v.id+"_tblext",cellSpacing:0,cellPadding:0});r=i.add(m,"tbody");if(j.firstChild.className=="mceOldBoxModel"){j.firstChild.appendChild(x)}else{j.insertBefore(x,j.firstChild)}y._addToolbars(r,l);v.onMouseUp.add(function(){var o=i.get(v.id+"_external");i.show(o);i.hide(e);var n=g.add(v.id+"_external_close","click",function(){i.hide(v.id+"_external");g.remove(v.id+"_external_close","click",n);return false});i.show(o);i.setStyle(o,"top",0-i.getRect(v.id+"_tblext").h-1);i.hide(o);i.show(o);o.style.filter="";e=v.id+"_external";o=null})}if(q=="top"){y._addStatusBar(u,l)}if(!z.theme_advanced_toolbar_container){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"})}if(w=="bottom"){y._addToolbars(u,l)}if(q=="bottom"){y._addStatusBar(u,l)}return k},_rowLayout:function(x,p,l){var w=this,q=w.editor,v,y,j=q.controlManager,m,k,u,r;v=x.theme_advanced_containers_default_class||"";y=x.theme_advanced_containers_default_align||"center";f(d(x.theme_advanced_containers||""),function(s,o){var n=x["theme_advanced_container_"+s]||"";switch(s.toLowerCase()){case"mceeditor":m=i.add(p,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":w._addStatusBar(p,l);break;default:r=(x["theme_advanced_container_"+s+"_align"]||y).toLowerCase();r="mce"+w._ufirst(r);m=i.add(i.add(p,"tr"),"td",{"class":"mceToolbar "+(x["theme_advanced_container_"+s+"_class"]||v)+" "+r||y});u=j.createToolbar("toolbar"+o);w._addControls(n,u);i.setHTML(m,u.renderHTML());l.deltaHeight-=x.theme_advanced_row_height}});return k},_addControls:function(k,j){var l=this,m=l.settings,n,o=l.editor.controlManager;if(m.theme_advanced_disable&&!l._disabled){n={};f(d(m.theme_advanced_disable),function(p){n[p]=1});l._disabled=n}else{n=l._disabled}f(d(k),function(q){var p;if(n&&n[q]){return}if(q=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(r){r=l.createControl(r,o);if(r){j.add(r)}});return}p=l.createControl(q,o);if(p){j.add(p)}})},_addToolbars:function(y,k){var B=this,q,p,u=B.editor,C=B.settings,A,j=u.controlManager,w,l,r=[],z,x,m=false;x=j.createToolbarGroup("toolbargroup",{name:u.getLang("advanced.toolbar"),tab_focus_toolbar:u.getParam("theme_advanced_tab_focus_toolbar")});B.toolbarGroup=x;z=C.theme_advanced_toolbar_align.toLowerCase();z="mce"+B._ufirst(z);l=i.add(i.add(y,"tr",{role:"presentation"}),"td",{"class":"mceToolbar "+z,role:"presentation"});for(q=1;(A=C["theme_advanced_buttons"+q]);q++){m=true;p=j.createToolbar("toolbar"+q,{"class":"mceToolbarRow"+q});if(C["theme_advanced_buttons"+q+"_add"]){A+=","+C["theme_advanced_buttons"+q+"_add"]}if(C["theme_advanced_buttons"+q+"_add_before"]){A=C["theme_advanced_buttons"+q+"_add_before"]+","+A}B._addControls(A,p);x.add(p);k.deltaHeight-=C.theme_advanced_row_height}if(!m){k.deltaHeight-=C.theme_advanced_row_height}r.push(x.renderHTML());r.push(i.createHTML("a",{href:"#",accesskey:"z",title:u.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+u.id+"').focus();"},"<!-- IE -->"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{}," ")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true);q.nodeChanged()}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}u.setActive("visualaid",o.hasVisual);z._updateUndoStatus(o);u.setDisabled("outdent",!o.queryCommandState("Outdent"));D=q("A");if(H=u.get("link")){H.setDisabled((!D&&r)||(D&&!D.href));H.setActive(!!D&&(!D.name&&!D.id))}if(H=u.get("unlink")){H.setDisabled(!D&&r);H.setActive(!!D&&!D.name&&!D.id)}if(H=u.get("anchor")){H.setActive(!r&&!!D&&(D.name||(D.id&&!D.href)))}D=q("IMG");if(H=u.get("image")){H.setActive(!r&&!!D&&E.className.indexOf("mceItem")==-1)}if(H=u.get("styleselect")){z._importClasses();k=[];f(H.items,function(n){k.push(n.value)});j=o.formatter.matchAll(k);H.select(j[0]);h.each(j,function(p,n){if(n>0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce));
\ No newline at end of file +(function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(p,m){var k,l,o=p.dom,j="",n,r;previewStyles=p.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function q(s){return s.replace(/%(\w+)/g,"")}k=m.block||m.inline||"span";l=o.create(k);f(m.styles,function(t,s){t=q(t);if(t){o.setStyle(l,s,t)}});f(m.attributes,function(t,s){t=q(t);if(t){o.setAttrib(l,s,t)}});f(m.classes,function(s){s=q(s);if(!o.hasClass(l,s)){o.addClass(l,s)}});o.setStyles(l,{position:"absolute",left:-65535});p.getBody().appendChild(l);n=o.getStyle(p.getBody(),"fontSize",true);n=/px$/.test(n)?parseInt(n,10):0;f(previewStyles.split(" "),function(s){var t=o.getStyle(l,s,true);if(s=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)){t=o.getStyle(p.getBody(),s,true);if(o.toHex(t).toLowerCase()=="#ffffff"){return}}if(s=="font-size"){if(/em|%$/.test(t)){if(n===0){return}t=parseFloat(t,10)/(/%$/.test(t)?100:1);t=(t*n)+"px"}}j+=s+":"+t+";"});o.remove(l);return j}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j<o.clientWidth){j=o.clientWidth;i.setStyle(p,"width",o.clientWidth)}}if(l&&m.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+k.id+"_size",{cw:j,ch:n})}},destroy:function(){var j=this.editor.id;g.clear(j+"_resize");g.clear(j+"_path_row");g.clear(j+"_external_close")},_simpleLayout:function(z,u,l,j){var y=this,v=y.editor,w=z.theme_advanced_toolbar_location,q=z.theme_advanced_statusbar_location,m,k,r,x;if(z.readonly){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});return k}if(w=="top"){y._addToolbars(u,l)}if(w=="external"){m=x=i.create("div",{style:"position:relative"});m=i.add(m,"div",{id:v.id+"_external","class":"mceExternalToolbar"});i.add(m,"a",{id:v.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});m=i.add(m,"table",{id:v.id+"_tblext",cellSpacing:0,cellPadding:0});r=i.add(m,"tbody");if(j.firstChild.className=="mceOldBoxModel"){j.firstChild.appendChild(x)}else{j.insertBefore(x,j.firstChild)}y._addToolbars(r,l);v.onMouseUp.add(function(){var o=i.get(v.id+"_external");i.show(o);i.hide(e);var n=g.add(v.id+"_external_close","click",function(){i.hide(v.id+"_external");g.remove(v.id+"_external_close","click",n);return false});i.show(o);i.setStyle(o,"top",0-i.getRect(v.id+"_tblext").h-1);i.hide(o);i.show(o);o.style.filter="";e=v.id+"_external";o=null})}if(q=="top"){y._addStatusBar(u,l)}if(!z.theme_advanced_toolbar_container){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"})}if(w=="bottom"){y._addToolbars(u,l)}if(q=="bottom"){y._addStatusBar(u,l)}return k},_rowLayout:function(x,p,l){var w=this,q=w.editor,v,y,j=q.controlManager,m,k,u,r;v=x.theme_advanced_containers_default_class||"";y=x.theme_advanced_containers_default_align||"center";f(d(x.theme_advanced_containers||""),function(s,o){var n=x["theme_advanced_container_"+s]||"";switch(s.toLowerCase()){case"mceeditor":m=i.add(p,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":w._addStatusBar(p,l);break;default:r=(x["theme_advanced_container_"+s+"_align"]||y).toLowerCase();r="mce"+w._ufirst(r);m=i.add(i.add(p,"tr"),"td",{"class":"mceToolbar "+(x["theme_advanced_container_"+s+"_class"]||v)+" "+r||y});u=j.createToolbar("toolbar"+o);w._addControls(n,u);i.setHTML(m,u.renderHTML());l.deltaHeight-=x.theme_advanced_row_height}});return k},_addControls:function(k,j){var l=this,m=l.settings,n,o=l.editor.controlManager;if(m.theme_advanced_disable&&!l._disabled){n={};f(d(m.theme_advanced_disable),function(p){n[p]=1});l._disabled=n}else{n=l._disabled}f(d(k),function(q){var p;if(n&&n[q]){return}if(q=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(r){r=l.createControl(r,o);if(r){j.add(r)}});return}p=l.createControl(q,o);if(p){j.add(p)}})},_addToolbars:function(y,k){var B=this,q,p,u=B.editor,C=B.settings,A,j=u.controlManager,w,l,r=[],z,x,m=false;x=j.createToolbarGroup("toolbargroup",{name:u.getLang("advanced.toolbar"),tab_focus_toolbar:u.getParam("theme_advanced_tab_focus_toolbar")});B.toolbarGroup=x;z=C.theme_advanced_toolbar_align.toLowerCase();z="mce"+B._ufirst(z);l=i.add(i.add(y,"tr",{role:"presentation"}),"td",{"class":"mceToolbar "+z,role:"toolbar"});for(q=1;(A=C["theme_advanced_buttons"+q]);q++){m=true;p=j.createToolbar("toolbar"+q,{"class":"mceToolbarRow"+q});if(C["theme_advanced_buttons"+q+"_add"]){A+=","+C["theme_advanced_buttons"+q+"_add"]}if(C["theme_advanced_buttons"+q+"_add_before"]){A=C["theme_advanced_buttons"+q+"_add_before"]+","+A}B._addControls(A,p);x.add(p);k.deltaHeight-=C.theme_advanced_row_height}if(!m){k.deltaHeight-=C.theme_advanced_row_height}r.push(x.renderHTML());r.push(i.createHTML("a",{href:"#",accesskey:"z",title:u.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+u.id+"').focus();"},"<!-- IE -->"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{}," ")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true);q.nodeChanged()}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}u.setActive("visualaid",o.hasVisual);z._updateUndoStatus(o);u.setDisabled("outdent",!o.queryCommandState("Outdent"));D=q("A");if(H=u.get("link")){H.setDisabled((!D&&r)||(D&&!D.href));H.setActive(!!D&&(!D.name&&!D.id))}if(H=u.get("unlink")){H.setDisabled(!D&&r);H.setActive(!!D&&!D.name&&!D.id)}if(H=u.get("anchor")){H.setActive(!r&&!!D&&(D.name||(D.id&&!D.href)))}D=q("IMG");if(H=u.get("image")){H.setActive(!r&&!!D&&E.className.indexOf("mceItem")==-1)}if(H=u.get("styleselect")){z._importClasses();k=[];f(H.items,function(n){k.push(n.value)});j=o.formatter.matchAll(k);H.select(j[0]);h.each(j,function(p,n){if(n>0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce));
\ No newline at end of file diff --git a/program/js/tiny_mce/themes/advanced/editor_template_src.js b/program/js/tiny_mce/themes/advanced/editor_template_src.js index afd722d13..82166dcb6 100644 --- a/program/js/tiny_mce/themes/advanced/editor_template_src.js +++ b/program/js/tiny_mce/themes/advanced/editor_template_src.js @@ -150,7 +150,7 @@ init : function(ed, url) {
var t = this, s, v, o;
-
+
t.editor = ed;
t.url = url;
t.onResolveName = new tinymce.util.Dispatcher(this);
@@ -167,7 +167,7 @@ theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
}, s);
}
-
+
// Default settings
t.settings = s = extend({
theme_advanced_path : true,
@@ -678,7 +678,7 @@ if (DOM.get(ed.id + '_path_row')) {
Event.add(ed.id + '_tbl', 'mouseover', function(e) {
var re;
-
+
e = e.target;
if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
@@ -956,7 +956,7 @@ a = s.theme_advanced_toolbar_align.toLowerCase();
a = 'mce' + t._ufirst(a);
- n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"});
+ n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"toolbar"});
// Create toolbar and add the controls
for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
@@ -986,7 +986,7 @@ var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
n = DOM.add(tb, 'tr');
- n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
+ n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
if (s.theme_advanced_path) {
DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
@@ -994,7 +994,7 @@ } else {
DOM.add(n, 'span', {}, ' ');
}
-
+
if (s.theme_advanced_resizing) {
DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"});
@@ -1154,7 +1154,7 @@ if (!fn && n.style.fontFamily)
fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
-
+
if (!fc && n.style.color)
fc = n.style.color;
@@ -1185,7 +1185,7 @@ return true;
});
}
-
+
if (s.theme_advanced_show_current_color) {
function updateColor(controlId, color) {
if (c = cm.get(controlId)) {
diff --git a/program/js/tiny_mce/themes/advanced/langs/en_dlg.js b/program/js/tiny_mce/themes/advanced/langs/en_dlg.js index e451f3774..50cd87e3d 100644 --- a/program/js/tiny_mce/themes/advanced/langs/en_dlg.js +++ b/program/js/tiny_mce/themes/advanced/langs/en_dlg.js @@ -1 +1 @@ -tinyMCE.addI18n('en.advanced_dlg',{"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","charmap_usage":"Use left and right arrows to navigate.","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value"});
\ No newline at end of file +tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""}); diff --git a/program/js/tiny_mce/tiny_mce.js b/program/js/tiny_mce/tiny_mce.js index af5a80293..208dfcc07 100644 --- a/program/js/tiny_mce/tiny_mce.js +++ b/program/js/tiny_mce/tiny_mce.js @@ -1 +1 @@ -(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.6",releaseDate:"2012-07-26",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){r=f[m].href;if(r){if(/^https?:\/\/[^\/]+$/.test(r)){r+="/"}k=r?r.match(/.*\//)[0]:""}}function h(i){if(i.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(i.src)){if(/_(src|dev)\.js/g.test(i.src)){s.suffix="_src"}if((j=i.src.indexOf("?"))!=-1){s.query=i.src.substring(j+1)}s.baseURL=i.src.substring(0,i.src.lastIndexOf("/"));if(k&&s.baseURL.indexOf("://")==-1&&s.baseURL.indexOf("/")!==0){s.baseURL=k+s.baseURL}return s.baseURL}return null}f=q.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}l=q.getElementsByTagName("head")[0];if(l){f=l.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}}return},is:function(g,f){if(!f){return g!==b}if(f=="array"&&(g.hasOwnProperty&&g instanceof Array)){return true}return typeof(g)==f},makeMap:function(f,j,h){var g;f=f||[];j=j||",";if(typeof(f)=="string"){f=f.split(j)}h=h||{};g=f.length;while(g--){h[f[g]]={}}return h},each:function(i,f,h){var j,g;if(!i){return 0}h=h||i;if(i.length!==b){for(j=0,g=i.length;j<g;j++){if(f.call(h,i[j],j,i)===false){return 0}}}else{for(j in i){if(i.hasOwnProperty(j)){if(f.call(h,i[j],j,i)===false){return 0}}}}return 1},map:function(g,h){var i=[];c.each(g,function(f){i.push(h(f))});return i},grep:function(g,h){var i=[];c.each(g,function(f){if(!h||h(f)){i.push(f)}});return i},inArray:function(g,h){var j,f;if(g){for(j=0,f=g.length;j<f;j++){if(g[j]===h){return j}}}return -1},extend:function(n,k){var j,f,h,g=arguments,m;for(j=1,f=g.length;j<f;j++){k=g[j];for(h in k){if(k.hasOwnProperty(h)){m=k[h];if(m!==b){n[h]=m}}}}return n},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(o,f,j){var n=this,g,i,k,l,h,m=0;o=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(o);k=o[3].match(/(^|\.)(\w+)$/i)[2];i=n.createNS(o[3].replace(/\.\w+$/,""),j);if(i[k]){return}if(o[2]=="static"){i[k]=f;if(this.onCreate){this.onCreate(o[2],o[3],i[k])}return}if(!f[k]){f[k]=function(){};m=1}i[k]=f[k];n.extend(i[k].prototype,f);if(o[5]){g=n.resolve(o[5]).prototype;l=o[5].match(/\.(\w+)$/i)[1];h=i[k];if(m){i[k]=function(){return g[l].apply(this,arguments)}}else{i[k]=function(){this.parent=g[l];return h.apply(this,arguments)}}i[k].prototype[k]=i[k];n.each(g,function(p,q){i[k].prototype[q]=g[q]});n.each(f,function(p,q){if(g[q]){i[k].prototype[q]=function(){this.parent=g[q];return p.apply(this,arguments)}}else{if(q!=k){i[k].prototype[q]=p}}})}n.each(f["static"],function(p,q){i[k][q]=p});if(this.onCreate){this.onCreate(o[2],o[3],i[k].prototype)}},walk:function(i,h,j,g){g=g||this;if(i){if(j){i=i[j]}c.each(i,function(k,f){if(h.call(g,k,f,j)===false){return false}c.walk(k,h,j,g)})}},createNS:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0;g<j.length;g++){f=j[g];if(!h[f]){h[f]={}}h=h[f]}return h},resolve:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0,f=j.length;g<f;g++){h=h[j[g]];if(!h){break}}return h},addUnload:function(j,i){var h=this,g;g=function(){var f=h.unloads,l,m;if(f){for(m in f){l=f[m];if(l&&l.func){l.func.call(l.scope,1)}}if(e.detachEvent){e.detachEvent("onbeforeunload",k);e.detachEvent("onunload",g)}else{if(e.removeEventListener){e.removeEventListener("unload",g,false)}}h.unloads=l=f=w=g=0;if(e.CollectGarbage){CollectGarbage()}}};function k(){var l=document;function f(){l.detachEvent("onstop",f);if(g){g()}l=0}if(l.readyState=="interactive"){if(l){l.attachEvent("onstop",f)}e.setTimeout(function(){if(l){l.detachEvent("onstop",f)}},0)}}j={func:j,scope:i||this};if(!h.unloads){if(e.attachEvent){e.attachEvent("onunload",g);e.attachEvent("onbeforeunload",k)}else{if(e.addEventListener){e.addEventListener("unload",g,false)}}h.unloads=[j]}else{h.unloads.push(j)}return j},removeUnload:function(i){var g=this.unloads,h=null;c.each(g,function(j,f){if(j&&j.func==i){g.splice(f,1);h=i;return false}});return h},explode:function(f,g){if(!f||c.is(f,"array")){return f}return c.map(f.split(g||","),c.trim)},_addVer:function(g){var f;if(!this.query){return g}f=(g.indexOf("?")==-1?"?":"&")+this.query;if(g.indexOf("#")==-1){return g+f}return g.replace("#",f+"#")},_replace:function(h,f,g){if(d){return g.replace(h,function(){var l=f,j=arguments,k;for(k=0;k<j.length-2;k++){if(j[k]===b){l=l.replace(new RegExp("\\$"+k,"g"),"")}else{l=l.replace(new RegExp("\\$"+k,"g"),j[k])}}return l})}return g.replace(h,f)}};c._init();e.tinymce=e.tinyMCE=c})(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:false,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(b,a){this.listeners.push({cb:b,scope:a||this.scope});return b},addToTop:function(d,b){var a=this,c={cb:d,scope:b||a.scope};if(a.inDispatch){a.listeners=[c].concat(a.listeners)}else{a.listeners.unshift(c)}return d},remove:function(c){var b=this.listeners,a=null;tinymce.each(b,function(e,d){if(c==e.cb){a=e;b.splice(d,1);return false}});return a},dispatch:function(){var a=this,e,b=arguments,c,d=a.listeners,f;a.inDispatch=true;for(c=0;c<d.length;c++){f=d[c];e=f.cb.apply(f.scope,b.length>0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e<b;e++){if(e>=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length<c.length){for(e=0,b=c.length;e<b;e++){if(e>=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e<b;e++){d+="../"}for(e=f-1,b=c.length;e<b;e++){if(e!=f-1){d+="/"+c[e]}else{d+=c[e]}}return d},toAbsPath:function(e,f){var c,b=0,h=[],d,g;d=/\/$/.test(f)?"/":"";e=e.split("/");f=f.split("/");a(e,function(i){if(i){h.push(i)}});e=h;for(c=f.length-1,h=[];c>=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i<o.length;i++){v+=(i>0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey&&!b.altKey}}})(tinymce);tinymce.util.Quirks=function(d){var m=tinymce.VK,t=m.BACKSPACE,u=m.DELETE,p=d.dom,E=d.selection,s=d.settings;function c(I,H){try{d.getDoc().execCommand(I,false,H)}catch(G){}}function z(){var G=d.getDoc().documentMode;return G?G:6}function j(){function G(J){var H,L,I,K;H=E.getRng();L=p.getParent(H.startContainer,p.isBlock);if(J){L=p.getNext(L,p.isBlock)}if(L){I=L.firstChild;while(I&&I.nodeType==3&&I.nodeValue.length===0){I=I.nextSibling}if(I&&I.nodeName==="SPAN"){K=I.cloneNode(false)}}d.getDoc().execCommand(J?"ForwardDelete":"Delete",false,null);L=p.getParent(H.startContainer,p.isBlock);tinymce.each(p.select("span.Apple-style-span,font.Apple-style-span",L),function(M){var N=E.getBookmark();if(K){p.replace(K.cloneNode(false),M,true)}else{p.remove(M,true)}E.moveToBookmark(N)})}d.onKeyDown.add(function(H,J){var I;I=J.keyCode==u;if(!J.isDefaultPrevented()&&(I||J.keyCode==t)&&!m.modifierPressed(J)){J.preventDefault();G(I)}});d.addCommand("Delete",function(){G()})}function F(){function G(J){var I=p.create("body");var K=J.cloneContents();I.appendChild(K);return E.serializer.serialize(I,{format:"html"})}function H(I){var K=G(I);var L=p.createRng();L.selectNode(d.getBody());var J=G(L);return K===J}d.onKeyDown.add(function(J,L){var K=L.keyCode,I;if(!L.isDefaultPrevented()&&(K==u||K==t)){I=J.selection.isCollapsed();if(I&&!p.isEmpty(J.getBody())){return}if(tinymce.isIE&&!I){return}if(!I&&!H(J.selection.getRng())){return}J.setContent("");J.selection.setCursorLocation(J.getBody(),0);J.nodeChanged()}})}function x(){d.onKeyDown.add(function(G,H){if(H.keyCode==65&&m.metaKeyPressed(H)){H.preventDefault();G.execCommand("SelectAll")}})}function y(){if(!d.settings.content_editable){p.bind(d.getDoc(),"focusin",function(G){E.setRng(E.getRng())});p.bind(d.getDoc(),"mousedown",function(G){if(G.target==d.getDoc().documentElement){d.getWin().focus();E.setRng(E.getRng())}})}}function n(){d.onKeyDown.add(function(G,J){if(!J.isDefaultPrevented()&&J.keyCode===t){if(E.isCollapsed()&&E.getRng(true).startOffset===0){var I=E.getNode();var H=I.previousSibling;if(H&&H.nodeName&&H.nodeName.toLowerCase()==="hr"){p.remove(H);tinymce.dom.Event.cancel(J)}}}})}function b(){if(!Range.prototype.getClientRects){d.onMouseDown.add(function(H,I){if(I.target.nodeName==="HTML"){var G=H.getBody();G.blur();setTimeout(function(){G.focus()},0)}})}}function B(){d.onClick.add(function(G,H){H=H.target;if(/^(IMG|HR)$/.test(H.nodeName)){E.getSel().setBaseAndExtent(H,0,H,1)}if(H.nodeName=="A"&&p.hasClass(H,"mceItemAnchor")){E.select(H)}G.nodeChanged()})}function C(){function H(){var J=p.getAttribs(E.getStart().cloneNode(false));return function(){var K=E.getStart();if(K!==d.getBody()){p.setAttrib(K,"style",null);tinymce.each(J,function(L){K.setAttributeNode(L.cloneNode(true))})}}}function G(){return !E.isCollapsed()&&p.getParent(E.getStart(),p.isBlock)!=p.getParent(E.getEnd(),p.isBlock)}function I(J,K){K.preventDefault();return false}d.onKeyPress.add(function(J,L){var K;if((L.keyCode==8||L.keyCode==46)&&G()){K=H();J.getDoc().execCommand("delete",false,null);K();L.preventDefault();return false}});p.bind(d.getDoc(),"cut",function(K){var J;if(G()){J=H();d.onKeyUp.addToTop(I);setTimeout(function(){J();d.onKeyUp.remove(I)},0)}})}function k(){var H,G;p.bind(d.getDoc(),"selectionchange",function(){if(G){clearTimeout(G);G=0}G=window.setTimeout(function(){var I=E.getRng();if(!H||!tinymce.dom.RangeUtils.compareRanges(I,H)){d.nodeChanged();H=I}},50)})}function D(){document.body.setAttribute("role","application")}function A(){d.onKeyDown.add(function(G,I){if(!I.isDefaultPrevented()&&I.keyCode===t){if(E.isCollapsed()&&E.getRng(true).startOffset===0){var H=E.getNode().previousSibling;if(H&&H.nodeName&&H.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(I)}}}})}function h(){if(z()>7){return}c("RespectVisibilityInDesign",true);d.contentStyles.push(".mceHideBrInPre pre br {display: none}");p.addClass(d.getBody(),"mceHideBrInPre");d.parser.addNodeFilter("pre",function(G,I){var J=G.length,L,H,M,K;while(J--){L=G[J].getAll("br");H=L.length;while(H--){M=L[H];K=M.prev;if(K&&K.type===3&&K.value.charAt(K.value-1)!="\n"){K.value+="\n"}else{M.parent.insert(new tinymce.html.Node("#text",3),M,true).value="\n"}}}});d.serializer.addNodeFilter("pre",function(G,I){var J=G.length,L,H,M,K;while(J--){L=G[J].getAll("br");H=L.length;while(H--){M=L[H];K=M.prev;if(K&&K.type==3){K.value=K.value.replace(/\r?\n$/,"")}}}})}function f(){p.bind(d.getBody(),"mouseup",function(I){var H,G=E.getNode();if(G.nodeName=="IMG"){if(H=p.getStyle(G,"width")){p.setAttrib(G,"width",H.replace(/[^0-9%]+/g,""));p.setStyle(G,"width","")}if(H=p.getStyle(G,"height")){p.setAttrib(G,"height",H.replace(/[^0-9%]+/g,""));p.setStyle(G,"height","")}}})}function r(){d.onKeyDown.add(function(M,N){var L,G,H,J,K,O,I;L=N.keyCode==u;if(!N.isDefaultPrevented()&&(L||N.keyCode==t)&&!m.modifierPressed(N)){G=E.getRng();H=G.startContainer;J=G.startOffset;I=G.collapsed;if(H.nodeType==3&&H.nodeValue.length>0&&((J===0&&!I)||(I&&J===(L?0:1)))){nonEmptyElements=M.schema.getNonEmptyElements();N.preventDefault();K=p.create("br",{id:"__tmp"});H.parentNode.insertBefore(K,H);M.getDoc().execCommand(L?"ForwardDelete":"Delete",false,null);H=E.getRng().startContainer;O=H.previousSibling;if(O&&O.nodeType==1&&!p.isBlock(O)&&p.isEmpty(O)&&!nonEmptyElements[O.nodeName.toLowerCase()]){p.remove(O)}p.remove("__tmp")}}})}function e(){d.onKeyDown.add(function(K,L){var I,H,M,G,J;if(L.isDefaultPrevented()||L.keyCode!=m.BACKSPACE){return}I=E.getRng();H=I.startContainer;M=I.startOffset;G=p.getRoot();J=H;if(!I.collapsed||M!==0){return}while(J&&J.parentNode&&J.parentNode.firstChild==J&&J.parentNode!=G){J=J.parentNode}if(J.tagName==="BLOCKQUOTE"){K.formatter.toggle("blockquote",null,J);I.setStart(H,0);I.setEnd(H,0);E.setRng(I);E.collapse(false)}})}function l(){function G(){d._refreshContentEditable();c("StyleWithCSS",false);c("enableInlineTableEditing",false);if(!s.object_resizing){c("enableObjectResizing",false)}}if(!s.readonly){d.onBeforeExecCommand.add(G);d.onMouseDown.add(G)}}function o(){function G(H,I){tinymce.each(p.select("a"),function(L){var J=L.parentNode,K=p.getRoot();if(J.lastChild===L){while(J&&!p.isBlock(J)){if(J.parentNode.lastChild!==J||J===K){return}J=J.parentNode}p.add(J,"br",{"data-mce-bogus":1})}})}d.onExecCommand.add(function(H,I){if(I==="CreateLink"){G(H)}});d.onSetContent.add(E.onSetContent.add(G))}function v(){if(s.forced_root_block){d.onInit.add(function(){c("DefaultParagraphSeparator",s.forced_root_block)})}}function a(){function G(I,H){if(!I||!H.initial){d.execCommand("mceRepaint")}}d.onUndo.add(G);d.onRedo.add(G);d.onSetContent.add(G)}function q(){d.onKeyDown.add(function(H,I){var G;if(!I.isDefaultPrevented()&&I.keyCode==t){G=H.getDoc().selection.createRange();if(G&&G.item){I.preventDefault();H.undoManager.beforeChange();p.remove(G.item(0));H.undoManager.add()}}})}function i(){var G;if(z()>=10){G="";tinymce.each("p div h1 h2 h3 h4 h5 h6".split(" "),function(H,I){G+=(I>0?",":"")+H+":empty"});d.contentStyles.push(G+"{padding-right: 1px !important}")}}function g(){var I,H,Y,G,T,W,U,X,J,K,V,R,Q,S=document,O=d.getDoc();if(!s.object_resizing||s.webkit_fake_resize===false){return}c("enableObjectResizing",false);V={n:[0.5,0,0,-1],e:[1,0.5,1,0],s:[0.5,1,0,1],w:[0,0.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};function M(ac){var ab,aa;ab=ac.screenX-W;aa=ac.screenY-U;R=ab*T[2]+X;Q=aa*T[3]+J;R=R<5?5:R;Q=Q<5?5:Q;if(m.modifierPressed(ac)||(Y.nodeName=="IMG"&&T[2]*T[3]!==0)){R=Math.round(Q/K);Q=Math.round(R*K)}p.setStyles(G,{width:R,height:Q});if(T[2]<0&&G.clientWidth<=R){p.setStyle(G,"left",I+(X-R))}if(T[3]<0&&G.clientHeight<=Q){p.setStyle(G,"top",H+(J-Q))}}function Z(){function aa(ab,ac){if(ac){if(Y.style[ab]||!d.schema.isValid(Y.nodeName.toLowerCase(),ab)){p.setStyle(Y,ab,ac)}else{p.setAttrib(Y,ab,ac)}}}aa("width",R);aa("height",Q);p.unbind(O,"mousemove",M);p.unbind(O,"mouseup",Z);if(S!=O){p.unbind(S,"mousemove",M);p.unbind(S,"mouseup",Z)}p.remove(G);L(Y)}function L(ad){var ab,ac,aa;N();ab=p.getPos(ad);I=ab.x;H=ab.y;ac=ad.offsetWidth;aa=ad.offsetHeight;if(Y!=ad){Y=ad;R=Q=0}tinymce.each(V,function(ag,ae){var af;af=p.get("mceResizeHandle"+ae);if(!af){af=p.add(O.documentElement,"div",{id:"mceResizeHandle"+ae,"class":"mceResizeHandle",style:"cursor:"+ae+"-resize; margin:0; padding:0"});p.bind(af,"mousedown",function(ah){ah.preventDefault();Z();W=ah.screenX;U=ah.screenY;X=Y.clientWidth;J=Y.clientHeight;K=J/X;T=ag;G=Y.cloneNode(true);p.addClass(G,"mceClonedResizable");p.setStyles(G,{left:I,top:H,margin:0});O.documentElement.appendChild(G);p.bind(O,"mousemove",M);p.bind(O,"mouseup",Z);if(S!=O){p.bind(S,"mousemove",M);p.bind(S,"mouseup",Z)}})}else{p.show(af)}p.setStyles(af,{left:(ac*ag[0]+I)-(af.offsetWidth/2),top:(aa*ag[1]+H)-(af.offsetHeight/2)})});if(!tinymce.isOpera&&Y.nodeName=="IMG"){Y.setAttribute("data-mce-selected","1")}}function N(){if(Y){Y.removeAttribute("data-mce-selected")}for(var aa in V){p.hide("mceResizeHandle"+aa)}}d.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}");function P(){var aa=p.getParent(E.getNode(),"table,img");tinymce.each(p.select("img[data-mce-selected]"),function(ab){ab.removeAttribute("data-mce-selected")});if(aa){L(aa)}else{N()}}d.onNodeChange.add(P);p.bind(O,"selectionchange",P);d.serializer.addAttributeFilter("data-mce-selected",function(aa,ab){var ac=aa.length;while(ac--){aa[ac].attr(ab,null)}})}A();e();F();if(tinymce.isWebKit){r();j();y();B();v();if(tinymce.isIDevice){k()}else{g();x()}}if(tinymce.isIE){n();D();h();f();q();i()}if(tinymce.isGecko){n();b();C();l();o();a()}if(tinymce.isOpera){g()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n<m.length;n+=2){o=String.fromCharCode(parseInt(m[n],p));if(!g[o]){l="&"+m[n+1]+";";q[o]=l;q[l]=o}}return q}}a=e("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);j.html=j.html||{};j.html.Entities={encodeRaw:function(m,l){return m.replace(l?k:b,function(n){return g[n]||n})},encodeAllRaw:function(l){return(""+l).replace(f,function(m){return g[m]||m})},encodeNumeric:function(m,l){return m.replace(l?k:b,function(n){if(n.length>1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g<j.length;g++){a[j[g]]="\uFEFF"+g;a["\uFEFF"+g]=j[g]}function c(n,q,p,i){function o(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u<s;u++){t=x[u];v=p[t];if(v!==e&&v.length>0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object",z);v=m("block_elements","h1 h2 h3 h4 h5 h6 hr p div address pre form table tbody thead tfoot th tr td li ol ul caption blockquote center dl dt dd dir fieldset noscript menu isindex samp header footer article section hgroup aside nav figure option datalist select optgroup");function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K<G;K++){F=N.exec(L[K]);if(F){W=F[1];Q=F[2];E=F[3];X=F[4];O={};J=[];I={attributes:O,attributesOrder:J};if(W==="#"){I.paddEmpty=true}if(W==="-"){I.removeEmpty=true}if(S){for(ad in S){O[ad]=S[ad]}J.push.apply(J,H)}if(X){X=d(X,"|");for(Z=0,V=X.length;Z<V;Z++){F=R.exec(X[Z]);if(F){U={};ac=F[1];Y=F[2].replace(/::/g,":");W=F[3];T=F[4];if(ac==="!"){I.attributesRequired=I.attributesRequired||[];I.attributesRequired.push(Y);U.required=true}if(ac==="-"){delete O[Y];J.splice(f.inArray(J,Y),1);continue}if(W){if(W==="="){I.attributesDefault=I.attributesDefault||[];I.attributesDefault.push({name:Y,value:T});U.defaultValue=T}if(W===":"){I.attributesForced=I.attributesForced||[];I.attributesForced.push({name:Y,value:T});U.forcedValue=T}if(W==="<"){U.validValues=e(T,"?")}}if(M.test(Y)){I.attributePatterns=I.attributePatterns||[];U.pattern=i(Y);I.attributePatterns.push(U)}else{if(!O[Y]){J.push(Y)}O[Y]=U}}}}if(!S&&Q=="@"){S=O;H=J}if(E){I.outputName=Q;s[E]=I}if(M.test(Q)){I.pattern=i(Q);j.push(I)}else{s[Q]=I}}}}}function t(E){s={};j=[];C(E);g(y,function(G,F){k[F]=G.children})}function l(F){var E=/^(~)?(.+)$/;if(F){g(d(F),function(J){var H=E.exec(J),I=H[1]==="~",K=I?"span":"div",G=H[2];k[G]=k[K];p[G]=K;if(!I){v[G]={}}g(k,function(L,M){if(L[K]){L[G]=L[K]}})})}}function x(F){var E=/^([+\-]?)(\w+)\[([^\]]+)\]$/;if(F){g(d(F),function(J){var I=E.exec(J),G,H;if(I){H=I[1];if(H){G=k[I[2]]}else{G=k[I[2]]={"#comment":{}}}G=k[I[2]];g(d(I[3],"|"),function(K){if(H==="-"){delete G[K]}else{G[K]={}}})}})}}function B(E){var G=s[E],F;if(G){return G}F=j.length;while(F--){G=j[F];if(G.pattern.test(E)){return G}}}if(!A.valid_elements){g(y,function(F,E){s[E]={attributes:F.attributes,attributesOrder:F.attributesOrder};k[E]=F.children});if(A.schema!="html5"){g(d("strong/b,em/i"),function(E){E=d(E,"/");s[E[1]].outputName=E[0]})}s.img.attributesDefault=[{name:"alt",value:""}];g(d("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(E){if(s[E]){s[E].removeEmpty=true}});g(d("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(E){s[E].paddEmpty=true})}else{t(A.valid_elements)}l(A.custom_elements);x(A.valid_children);C(A.extended_valid_elements);x("+ol[ul|ol],+ul[ul|ol]");if(A.invalid_elements){f.each(f.explode(A.invalid_elements),function(E){if(s[E]){delete s[E]}})}if(!B("span")){C("span[!data-mce-type|*]")}u.children=k;u.styles=D;u.getBoolAttrs=function(){return r};u.getBlockElements=function(){return v};u.getShortEndedElements=function(){return z};u.getSelfClosingElements=function(){return q};u.getNonEmptyElements=function(){return n};u.getWhiteSpaceElements=function(){return o};u.isValidChild=function(E,G){var F=k[E];return !!(F&&F[G])};u.isValid=function(F,E){var H,G,I=B(F);if(I){if(E){if(I.attributes[E]){return true}H=I.attributePatterns;if(H){G=H.length;while(G--){if(H[G].pattern.test(F)){return true}}}}else{return true}}return false};u.getElementRule=B;u.getCustomElements=function(){return p};u.addValidElements=C;u.setValidElements=t;u.addCustomElements=l;u.addValidChildren=x}})(tinymce);(function(a){a.html.SaxParser=function(c,e){var b=this,d=function(){};c=c||{};b.schema=e=e||new a.html.Schema();if(c.fix_self_closing!==false){c.fix_self_closing=true}a.each("comment cdata text start end pi doctype".split(" "),function(f){if(f){b[f]=c[f]||d}});b.parse=function(E){var n=this,g,G=0,I,B,A=[],N,Q,C,r,z,s,M,H,O,v,m,k,t,R,o,P,F,S,L,f,J,l,D,K,h,x=0,j=a.html.Entities.decode,y,q;function u(T){var V,U;V=A.length;while(V--){if(A[V].name===T){break}}if(V>=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G<g.index){n.text(j(E.substr(G,g.index-G)))}if(I=g[6]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}u(I)}else{if(I=g[7]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}O=I in M;if(y&&J[I]&&A.length>0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G<E.length){n.text(j(E.substr(G)))}for(Q=A.length-1;Q>=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h<f;h++){j=m[h];if(j.name!=="id"){k[k.length]={name:j.name,value:j.value};k.map[j.name]=j.value}}n.attributes=k}n.value=g.value;n.shortEnded=g.shortEnded;return n},wrap:function(g){var f=this;f.parent.insert(g,f);g.append(f);return f},unwrap:function(){var f=this,h,g;for(h=f.firstChild;h;){g=h.next;f.insert(h,f,true);h=g}f.remove()},remove:function(){var f=this,h=f.parent,g=f.next,i=f.prev;if(h){if(h.firstChild===f){h.firstChild=g;if(g){g.prev=null}}else{i.next=g}if(h.lastChild===f){h.lastChild=i;if(i){i.next=null}}else{g.prev=i}f.parent=f.next=f.prev=null}return f},append:function(h){var f=this,g;if(h.parent){h.remove()}g=f.lastChild;if(g){g.next=h;h.prev=g;f.lastChild=h}else{f.lastChild=f.firstChild=h}h.parent=f;return h},insert:function(h,f,i){var g;if(h.parent){h.remove()}g=f.parent||this;if(i){if(f===g.firstChild){g.firstChild=h}else{f.prev.next=h}h.prev=f.prev;h.next=f;f.prev=h}else{if(f===g.lastChild){g.lastChild=h}else{f.next.prev=h}h.next=f.next;h.prev=f;f.next=h}h.parent=g;return h},getAll:function(g){var f=this,h,i=[];for(h=f.firstChild;h;h=a(h,f)){if(h.name===g){i.push(h)}}return i},empty:function(){var g=this,f,h,j;if(g.firstChild){f=[];for(j=g.firstChild;j;j=a(j,g)){f.push(j)}h=f.length;while(h--){j=f[h];j.parent=j.firstChild=j.lastChild=j.next=j.prev=null}}g.firstChild=g.lastChild=null;return g},isEmpty:function(k){var f=this,j=f.firstChild,h,g;if(j){do{if(j.type===1){if(j.attributes.map["data-mce-bogus"]){continue}if(k[j.name]){return false}h=j.attributes.length;while(h--){g=j.attributes[h].name;if(g==="name"||g.indexOf("data-")===0){return false}}}if(j.type===8){return false}if((j.type===3&&!c.test(j.value))){return false}}while(j=a(j,f))}return true},walk:function(f){return a(this,null,f)}});d.extend(b,{create:function(g,f){var i,h;i=new b(g,e[g]||1);if(f){for(h in f){i.attr(h,f[h])}}return i}});d.html.Node=b})(tinymce);(function(b){var a=b.html.Node;b.html.DomParser=function(g,h){var f=this,e={},d=[],i={},c={};g=g||{};g.validate="validate" in g?g.validate:true;g.root_name=g.root_name||"body";f.schema=h=h||new b.html.Schema();function j(m){var o,p,x,v,z,n,q,l,t,u,k,s,y,r;s=b.makeMap("tr,td,th,tbody,thead,tfoot,table");k=h.getNonEmptyElements();for(o=0;o<m.length;o++){p=m[o];if(!p.parent){continue}v=[p];for(x=p.parent;x&&!h.isValidChild(x.name,p.name)&&!s[x.name];x=x.parent){v.push(x)}if(x&&v.length>1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t<v.length-1;t++){if(h.isValidChild(n.name,v[t].name)){q=f.filterNode(v[t].clone());n.append(q)}else{q=n}for(l=v[t].firstChild;l&&l!=v[t+1];){r=l.next;q.append(l);l=r}n=q}if(!z.isEmpty(k)){x.insert(z,v[0],true);x.insert(p,z)}else{x.insert(p,v[0],true)}x=v[0];if(x.isEmpty(k)||x.firstChild===x.lastChild&&x.firstChild.name==="br"){x.empty().remove()}}else{if(p.parent){if(p.name==="li"){y=p.prev;if(y&&(y.name==="ul"||y.name==="ul")){y.append(p);continue}y=p.next;if(y&&(y.name==="ul"||y.name==="ul")){y.insert(p,y.firstChild,true);continue}p.wrap(f.filterNode(new a("ul",1)));continue}if(h.isValidChild(p.parent.name,"div")&&h.isValidChild("div",p.name)){p.wrap(f.filterNode(new a("div",1)))}else{if(p.name==="style"||p.name==="script"){p.empty().remove()}else{p.unwrap()}}}}}}f.filterNode=function(m){var l,k,n;if(k in e){n=i[k];if(n){n.push(m)}else{i[k]=[m]}}l=d.length;while(l--){k=d[l].name;if(k in m.attributes.map){n=c[k];if(n){n.push(m)}else{c[k]=[m]}}}return m};f.addNodeFilter=function(k,l){b.each(b.explode(k),function(m){var n=e[m];if(!n){e[m]=n=[]}n.push(l)})};f.addAttributeFilter=function(k,l){b.each(b.explode(k),function(m){var n;for(n=0;n<d.length;n++){if(d[n].name===m){d[n].callbacks.push(l);return}}d.push({name:m,callbacks:[l]})})};f.parse=function(v,m){var n,J,B,A,D,C,x,r,F,N,z,o,E,M=[],L,t,k,y,s,p,u,q;m=m||{};i={};c={};o=b.extend(b.makeMap("script,style,head,html,body,title,meta,param"),h.getBlockElements());u=h.getNonEmptyElements();p=h.children;z=g.validate;q="forced_root_block" in m?m.forced_root_block:g.forced_root_block;s=h.getWhiteSpaceElements();E=/^[ \t\r\n]+/;t=/[ \t\r\n]+$/;k=/[ \t\r\n]+/g;y=/^[ \t\r\n]+$/;function G(){var O=J.firstChild,l,P;while(O){l=O.next;if(O.type==3||(O.type==1&&O.name!=="p"&&!o[O.name]&&!O.attr("data-mce-type"))){if(!P){P=K(q,1);J.insert(P,O);P.append(O)}else{P.append(O)}}else{P=null}O=l}}function K(l,O){var P=new a(l,O),Q;if(l in e){Q=i[l];if(Q){Q.push(P)}else{i[l]=[P]}}return P}function I(P){var Q,l,O;for(Q=P.prev;Q&&Q.type===3;){l=Q.value.replace(t,"");if(l.length>0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}S=B.prev;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R}else{S.remove()}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D<C;D++){F[D](A,N,m)}}for(D=0,C=d.length;D<C;D++){F=d[D];if(F.name in c){A=c[F.name];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(x=0,r=F.callbacks.length;x<r;x++){F.callbacks[x](A,F.name,m)}}}}return J};if(g.remove_trailing_brs){f.addNodeFilter("br",function(n,m){var r,q=n.length,o,v=b.extend({},h.getBlockElements()),k=h.getNonEmptyElements(),t,s,p,u;v.body=1;for(r=0;r<q;r++){o=n[r];t=o.parent;if(v[o.parent.name]&&o===t.lastChild){p=o.prev;while(p){u=p.name;if(u!=="span"||p.attr("data-mce-type")!=="bookmark"){if(u!=="br"){break}if(u==="br"){o=null;break}}p=p.prev}if(o){o.remove();if(t.isEmpty(k)){elementRule=h.getElementRule(t.name);if(elementRule){if(elementRule.removeEmpty){t.remove()}else{if(elementRule.paddEmpty){t.empty().append(new b.html.Node("#text",3)).value="\u00a0"}}}}}}else{s=o;while(t.firstChild===s&&t.lastChild===s){s=t;if(v[t.name]){break}t=t.parent}if(s===t){textNode=new b.html.Node("#text",3);textNode.value="\u00a0";o.replace(textNode)}}}})}if(!g.allow_html_in_named_anchor){f.addAttributeFilter("id,name",function(k,l){var n=k.length,p,m,o,q;while(n--){q=k[n];if(q.name==="a"&&q.firstChild&&!q.attr("href")){o=q.parent;p=q.lastChild;do{m=p.prev;o.insert(p,q);p=m}while(p)}}})}}})(tinymce);tinymce.html.Writer=function(e){var c=[],a,b,d,f,g;e=e||{};a=e.indent;b=tinymce.makeMap(e.indent_before||"");d=tinymce.makeMap(e.indent_after||"");f=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities);g=e.element_format=="html";return{start:function(m,k,p){var n,j,h,o;if(a&&b[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n<j;n++){h=k[n];c.push(" ",h.name,'="',f(h.value,true),'"')}}if(!p||g){c[c.length]=">"}else{c[c.length]=" />"}if(p&&a&&d[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("</",h,">");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("<![CDATA[",h,"]]>")},comment:function(h){c.push("<!--",h,"-->")},pi:function(h,i){if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}if(a){c.push("\n")}},doctype:function(h){c.push("<!DOCTYPE",h,">",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n<m;n++){r=q.attributesOrder[n];if(r in s.map){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}for(n=0,m=s.length;n<m;n++){r=s[n].name;if(!(r in u.map)){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}s=u}e.start(k.name,s,o);if(!o){if((k=k.firstChild)){do{f(k)}while(k=k.next)}e.end(j)}}else{t(k)}}if(h.type==1&&!c.inner){f(h)}else{g[11](h)}return e.getContent()}}})(tinymce);tinymce.dom={};(function(b,h){var g=!!document.addEventListener;function c(k,j,l,i){if(k.addEventListener){k.addEventListener(j,l,i||false)}else{if(k.attachEvent){k.attachEvent("on"+j,l)}}}function e(k,j,l,i){if(k.removeEventListener){k.removeEventListener(j,l,i||false)}else{if(k.detachEvent){k.detachEvent("on"+j,l)}}}function a(n,l){var i,k=l||{};function j(){return false}function m(){return true}for(i in n){if(i!=="layerX"&&i!=="layerY"){k[i]=n[i]}}if(!k.target){k.target=k.srcElement||document}k.preventDefault=function(){k.isDefaultPrevented=m;if(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}}};k.stopPropagation=function(){k.isPropagationStopped=m;if(n){if(n.stopPropagation){n.stopPropagation()}else{n.cancelBubble=true}}};k.stopImmediatePropagation=function(){k.isImmediatePropagationStopped=m;k.stopPropagation()};if(!k.isDefaultPrevented){k.isDefaultPrevented=j;k.isPropagationStopped=j;k.isImmediatePropagationStopped=j}return k}function d(m,n,l){var k=m.document,j={type:"ready"};function i(){if(!l.domLoaded){l.domLoaded=true;n(j)}}if(g){c(m,"DOMContentLoaded",i)}else{c(k,"readystatechange",function(){if(k.readyState==="complete"){e(k,"readystatechange",arguments.callee);i()}});if(k.documentElement.doScroll&&m===m.top){(function(){try{k.documentElement.doScroll("left")}catch(o){setTimeout(arguments.callee,0);return}i()})()}}c(m,"load",i)}function f(k){var q=this,p={},i,o,n,m,l;m="onmouseenter" in document.documentElement;n="onfocusin" in document.documentElement;l={mouseenter:"mouseover",mouseleave:"mouseout"};i=1;q.domLoaded=false;q.events=p;function j(t,x){var s,u,r,v;s=p[x][t.type];if(s){for(u=0,r=s.length;u<r;u++){v=s[u];if(v&&v.func.call(v.scope,t)===false){t.preventDefault()}if(t.isImmediatePropagationStopped()){return}}}}q.bind=function(x,A,D,E){var s,t,u,r,B,z,C,v=window;function y(F){j(a(F||v.event),s)}if(!x||x.nodeType===3||x.nodeType===8){return}if(!x[h]){s=i++;x[h]=s;p[s]={}}else{s=x[h];if(!p[s]){p[s]={}}}E=E||x;A=A.split(" ");u=A.length;while(u--){r=A[u];z=y;B=C=false;if(r==="DOMContentLoaded"){r="ready"}if((q.domLoaded||x.readyState=="complete")&&r==="ready"){q.domLoaded=true;D.call(E,a({type:r}));continue}if(!m){B=l[r];if(B){z=function(F){var H,G;H=F.currentTarget;G=F.relatedTarget;if(G&&H.contains){G=H.contains(G)}else{while(G&&G!==H){G=G.parentNode}}if(!G){F=a(F||v.event);F.type=F.type==="mouseout"?"mouseleave":"mouseenter";F.target=H;j(F,s)}}}}if(!n&&(r==="focusin"||r==="focusout")){C=true;B=r==="focusin"?"focus":"blur";z=function(F){F=a(F||v.event);F.type=F.type==="focus"?"focusin":"focusout";j(F,s)}}t=p[s][r];if(!t){p[s][r]=t=[{func:D,scope:E}];t.fakeName=B;t.capture=C;t.nativeHandler=z;if(!g){t.proxyHandler=k(s)}if(r==="ready"){d(x,z,q)}else{c(x,B||r,g?z:t.proxyHandler,C)}}else{t.push({func:D,scope:E})}}x=t=0;return D};q.unbind=function(x,z,A){var s,u,v,B,r,t;if(!x||x.nodeType===3||x.nodeType===8){return q}s=x[h];if(s){t=p[s];if(z){z=z.split(" ");v=z.length;while(v--){r=z[v];u=t[r];if(u){if(A){B=u.length;while(B--){if(u[B].func===A){u.splice(B,1)}}}if(!A||u.length===0){delete t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}}}}else{for(r in t){u=t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}t={}}for(r in t){return q}delete p[s];try{delete x[h]}catch(y){x[h]=null}}return q};q.fire=function(u,s,r){var v,t;if(!u||u.nodeType===3||u.nodeType===8){return q}t=a(null,r);t.type=s;do{v=u[h];if(v){j(t,v)}u=u.parentNode||u.ownerDocument||u.defaultView||u.parentWindow}while(u&&!t.isPropagationStopped());return q};q.clean=function(u){var s,r,t=q.unbind;if(!u||u.nodeType===3||u.nodeType===8){return q}if(u[h]){t(u)}if(!u.getElementsByTagName){u=u.document}if(u&&u.getElementsByTagName){t(u);r=u.getElementsByTagName("*");s=r.length;while(s--){u=r[s];if(u[h]){t(u)}}}return q};q.callNativeHandler=function(s,r){if(p){p[s][r.type].nativeHandler(r)}};q.destory=function(){p={}};q.add=function(v,s,u,t){if(typeof(v)==="string"){v=document.getElementById(v)}if(v&&v instanceof Array){var r=v.length;while(r--){q.add(v[r],s,u,t)}return}if(s==="init"){s="ready"}return q.bind(v,s instanceof Array?s.join(" "):s,u,t)};q.remove=function(v,s,u,t){if(!v){return q}if(typeof(v)==="string"){v=document.getElementById(v)}if(v instanceof Array){var r=v.length;while(r--){q.remove(v[r],s,u,t)}return q}return q.unbind(v,s instanceof Array?s.join(" "):s,u)};q.clear=function(r){if(typeof(r)==="string"){r=document.getElementById(r)}return q.clean(r)};q.cancel=function(r){if(r){q.prevent(r);q.stop(r)}return false};q.prevent=function(r){if(!r.preventDefault){r=a(r)}r.preventDefault();return false};q.stop=function(r){if(!r.stopPropagation){r=a(r)}r.stopPropagation();return false}}b.EventUtils=f;b.Event=new f(function(i){return function(j){tinymce.dom.Event.callNativeHandler(i,j)}});b.Event.bind(window,"ready",function(){});b=0})(tinymce.dom,"data-mce-expando");tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(e){var g=e.each,d=e.is,f=e.isWebKit,b=e.isIE,h=e.html.Entities,c=/^([a-z0-9],?)+$/i,a=/^[ \t\r\n]*$/;e.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(o,l){var k=this,i,j,n;k.doc=o;k.win=window;k.files={};k.cssFlicker=false;k.counter=0;k.stdMode=!e.isIE||o.documentMode>=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+"</"+q+">"}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":b?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="<br />"+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="<br />"+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){g(s.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:q(s.styleSheet);break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab<aa){return -1}return 1}ac=X;while(ac&&ac.parentNode!=Z){ac=ac.parentNode}if(ac){Y=0;t=Z.firstChild;while(t!=ac&&Y<ab){Y++;t=t.nextSibling}if(ab<=Y){return -1}return 1}ac=Z;while(ac&&ac.parentNode!=X){ac=ac.parentNode}if(ac){Y=0;t=X.firstChild;while(t!=ac&&Y<aa){Y++;t=t.nextSibling}if(Y<aa){return -1}return 1}ad=c.findCommonAncestor(Z,X);af=Z;while(af&&af.parentNode!=ad){af=af.parentNode}if(!af){af=ad}ae=X;while(ae&&ae.parentNode!=ad){ae=ae.parentNode}if(!ae){ae=ad}if(af==ae){return 0}t=ad.firstChild;while(t){if(t==af){return -1}if(t==ae){return 1}t=t.nextSibling}}function C(X,aa,Z){var t,Y;if(X){O[h]=aa;O[W]=Z}else{O[Q]=aa;O[A]=Z}t=O[Q];while(t.parentNode){t=t.parentNode}Y=O[h];while(Y.parentNode){Y=Y.parentNode}if(Y==t){if(H(O[h],O[W],O[Q],O[A])>0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,v,q,t,s=d.dom.doc,m=s.body,r,u;function j(C){var y,B,x,A,z;x=h.create("a");y=C?k:v;B=C?p:q;A=n.duplicate();if(y==s||y==s.documentElement){y=m;B=0}if(y.nodeType==3){y.parentNode.insertBefore(x,y);A.moveToElementText(x);A.moveStart("character",B);h.remove(x);n.setEndPoint(C?"StartToStart":"EndToEnd",A)}else{z=y.childNodes;if(z.length){if(B>=z.length){h.insertAfter(x,z[z.length-1])}else{y.insertBefore(x,z[B])}A.moveToElementText(x)}else{if(y.canHaveHTML){y.innerHTML="<span>\uFEFF</span>";x=y.firstChild;A.moveToElementText(x);A.collapse(f)}}n.setEndPoint(C?"StartToStart":"EndToEnd",A);h.remove(x)}}k=i.startContainer;p=i.startOffset;v=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==v&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){t=k.previousSibling;if(t&&!t.hasChildNodes()&&h.isBlock(t)){t.innerHTML="\uFEFF"}else{t=null}k.innerHTML="<span>\uFEFF</span><span>\uFEFF</span>";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(t){t.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{u=k.childNodes[p];l=m.createControlRange();l.addElement(u);l.select();r=d.getRng();if(r.item&&u===r.item(0)){return}}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e<y.length;e++){if(y[e]===y[e-1]){y.splice(e--,1)}}}}return y};d.matches=function(e,y){return d(e,null,null,y)};d.matchesSelector=function(e,y){return d(y,null,null,[e]).length>0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z<B;z++){C=k.order[z];if((A=k.leftMatch[C].exec(E))){y=A[1];A.splice(1,1);if(y.substr(y.length-1)!=="\\"){A[1]=(A[1]||"").replace(q,"");D=k.find[C](A,e,F);if(D!=null){E=E.replace(k.match[C],"");break}}}}if(!D){D=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:D,expr:E}};d.filter=function(I,H,L,B){var D,e,G,N,K,y,A,C,J,z=I,M=[],F=H,E=H&&H[0]&&d.isXML(H[0]);while(I&&H.length){for(G in k.filter){if((D=k.leftMatch[G].exec(I))!=null&&D[2]){y=k.filter[G];A=D[1];e=false;D.splice(1,1);if(A.substr(A.length-1)==="\\"){continue}if(F===M){M=[]}if(k.preFilter[G]){D=k.preFilter[G](D,F,L,M,B,E);if(!D){e=N=true}else{if(D===true){continue}}}if(D){for(C=0;(K=F[C])!=null;C++){if(K){N=y(K,D,C,F);J=B^N;if(L&&N!=null){if(J){e=true}else{F[C]=false}}else{if(J){M.push(K);e=true}}}}}if(N!==undefined){if(!L){F=M}I=I.replace(k.match[G],"");if(!e){return[]}break}}}if(I===z){if(e==null){d.error(I)}else{break}}z=I}return F};d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var b=d.getText=function(B){var z,A,e=B.nodeType,y="";if(e){if(e===1||e===9||e===11){if(typeof B.textContent==="string"){return B.textContent}else{if(typeof B.innerText==="string"){return B.innerText.replace(u,"")}else{for(B=B.firstChild;B;B=B.nextSibling){y+=b(B)}}}}else{if(e===3||e===4){return B.nodeValue}}}else{for(z=0;(A=B[z]);z++){if(A.nodeType!==8){y+=b(A)}}}return y};var k=d.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(D,y){var A=typeof y==="string",C=A&&!x.test(y),E=A&&!C;if(C){y=y.toLowerCase()}for(var z=0,e=D.length,B;z<e;z++){if((B=D[z])){while((B=B.previousSibling)&&B.nodeType!==1){}D[z]=E||B&&B.nodeName.toLowerCase()===y?B||false:B===y}}if(E){d.filter(y,D,true)}},">":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z<e;z++){C=D[z];if(C){var A=C.parentNode;D[z]=A.nodeName.toLowerCase()===y?A:false}}}else{for(;z<e;z++){C=D[z];if(C){D[z]=B?C.parentNode:C.parentNode===y}}if(B){d.filter(y,D,true)}}},"":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("parentNode",y,z,A,B,C)},"~":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("previousSibling",y,z,A,B,C)}},find:{ID:function(y,z,A){if(typeof z.getElementById!=="undefined"&&!A){var e=z.getElementById(y[1]);return e&&e.parentNode?[e]:[]}},NAME:function(z,C){if(typeof C.getElementsByName!=="undefined"){var y=[],B=C.getElementsByName(z[1]);for(var A=0,e=B.length;A<e;A++){if(B[A].getAttribute("name")===z[1]){y.push(B[A])}}return y.length===0?null:y}},TAG:function(e,y){if(typeof y.getElementsByTagName!=="undefined"){return y.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(A,y,z,e,D,E){A=" "+A[1].replace(q,"")+" ";if(E){return A}for(var B=0,C;(C=y[B])!=null;B++){if(C){if(D^(C.className&&(" "+C.className+" ").replace(/[\t\n\r]/g," ").indexOf(A)>=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return y<e[3]-0},gt:function(z,y,e){return y>e[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C<B;C++){if(A[C]===z){return false}}return true}else{d.error(e)}}}},CHILD:function(z,B){var A,H,D,G,e,C,F,E=B[1],y=z;switch(E){case"only":case"first":while((y=y.previousSibling)){if(y.nodeType===1){return false}}if(E==="first"){return true}y=z;case"last":while((y=y.nextSibling)){if(y.nodeType===1){return false}}return true;case"nth":A=B[2];H=B[3];if(A===1&&H===0){return true}D=B[0];G=z.parentNode;if(G&&(G[i]!==D||!z.nodeIndex)){C=0;for(y=G.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++C}}G[i]=D}F=z.nodeIndex-H;if(A===0){return F===0}else{return(F%A===0&&F/A>=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z<e;z++){y.push(B[z])}}else{for(;B[z];z++){y.push(B[z])}}}return y}}var p,m;if(document.documentElement.compareDocumentPosition){p=function(y,e){if(y===e){h=true;return 0}if(!y.compareDocumentPosition||!e.compareDocumentPosition){return y.compareDocumentPosition?-1:1}return y.compareDocumentPosition(e)&4?-1:1}}else{p=function(F,E){if(F===E){h=true;return 0}else{if(F.sourceIndex&&E.sourceIndex){return F.sourceIndex-E.sourceIndex}}var C,y,z=[],e=[],B=F.parentNode,D=E.parentNode,G=B;if(B===D){return m(F,E)}else{if(!B){return -1}else{if(!D){return 1}}}while(G){z.unshift(G);G=G.parentNode}G=D;while(G){e.unshift(G);G=G.parentNode}C=z.length;y=e.length;for(var A=0;A<C&&A<y;A++){if(z[A]!==e[A]){return m(z[A],e[A])}}return A===C?m(F,e[A],-1):m(z[A],E,1)};m=function(y,e,z){if(y===e){return z}var A=y.nextSibling;while(A){if(A===e){return -1}A=A.nextSibling}return 1}}(function(){var y=document.createElement("div"),z="script"+(new Date()).getTime(),e=document.documentElement;y.innerHTML="<a name='"+z+"'/>";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="<p class='TEST'></p>";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1&&!F){e[i]=C;e.sizset=A}if(e.nodeName.toLowerCase()===D){B=e;break}e=e[y]}G[A]=B}}}function t(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1){if(!F){e[i]=C;e.sizset=A}if(typeof D!=="string"){if(e===D){B=true;break}}else{if(d.filter(D,[e]).length>0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A<y;A++){d(z,F[A],E,D)}return d.filter(B,E)};window.tinymce.dom.Sizzle=d})();(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j<arguments.length;j++){h.push(arguments[j])}h=e[g].apply(e,h);b.update(g);return h}});a.extend(b,{on:function(i,h,g){return a.dom.Event.add(b.id,i,h,g)},getXY:function(){return{x:parseInt(b.getStyle("left")),y:parseInt(b.getStyle("top"))}},getSize:function(){var g=e.get(b.id);return{w:parseInt(b.getStyle("width")||g.clientWidth),h:parseInt(b.getStyle("height")||g.clientHeight)}},moveTo:function(g,h){b.setStyles({left:g,top:h})},moveBy:function(g,i){var h=b.getXY();b.moveTo(h.x+g,h.y+i)},resizeTo:function(g,i){b.setStyles({width:g,height:i})},resizeBy:function(g,j){var i=b.getSize();b.resizeTo(i.w+g,i.h+j)},update:function(h){var g;if(a.isIE6&&d.blocker){h=h||"";if(h.indexOf("get")===0||h.indexOf("has")===0||h.indexOf("is")===0){return}if(h=="remove"){e.remove(b.blocker);return}if(!b.blocker){b.blocker=e.uniqueId();g=e.add(d.container||e.getRoot(),"iframe",{id:b.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});e.setStyle(g,"opacity",0)}else{g=e.get(b.blocker)}e.setStyles(g,{left:b.getStyle("left",1),top:b.getStyle("top",1),width:b.getStyle("width",1),height:b.getStyle("height",1),display:b.getStyle("display",1),zIndex:parseInt(b.getStyle("zIndex",1)||0)-1})}}})}})(tinymce);(function(d){function f(g){return g.replace(/[\n\r]+/g,"")}var c=d.is,b=d.isIE,e=d.each,a=d.dom.TreeWalker;d.create("tinymce.dom.Selection",{Selection:function(k,j,i,h){var g=this;g.dom=k;g.win=j;g.serializer=i;g.editor=h;e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(l){g[l]=new d.util.Dispatcher(g)});if(!g.win.getSelection){g.tridentSel=new d.dom.TridentSelection(g)}if(d.isIE&&k.boxModel){this._fixIESelection()}d.addUnload(g.destroy,g)},setCursorLocation:function(i,j){var g=this;var h=g.dom.createRng();h.setStart(i,j);h.setEnd(i,j);g.setRng(h);g.collapse(false)},getContent:function(h){var g=this,i=g.getRng(),m=g.dom.create("body"),k=g.getSel(),j,l,o;h=h||{};j=l="";h.get=true;h.format=h.format||"html";h.forced_root_block="";g.onBeforeGetContent.dispatch(g,h);if(h.format=="text"){return g.isCollapsed()?"":(i.text||(k.toString?k.toString():""))}if(i.cloneContents){o=i.cloneContents();if(o){m.appendChild(o)}}else{if(c(i.item)||c(i.htmlText)){m.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='<span id="__caret">_</span>';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('<span id="__mce_tmp">_</span>'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){return{rng:y.getRng()}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_start" style="'+x+'">'+m+"</span>");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_end" style="'+x+'">'+m+"</span>")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(o){var s=this,m=s.dom,j,i,g,r,k,u,p,q;function h(A){var t=o[A?"start":"end"],x,y,z,v;if(t){z=t[0];for(y=r,x=t.length-1;x>=1;x--){v=y.childNodes;if(t[x]>v.length-1){return}y=v[t[x]]}if(y.nodeType===3){z=Math.min(t[0],y.nodeValue.length)}if(y.nodeType===1){z=Math.min(t[0],y.childNodes.length)}if(A){g.setStart(y,z)}else{g.setEnd(y,z)}}return true}function l(B){var v=m.get(o.id+"_"+B),A,t,y,z,x=o.keep;if(v){A=v.parentNode;if(B=="start"){if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}k=u=A;p=q=t}else{if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}u=A;q=t}if(!x){z=v.previousSibling;y=v.nextSibling;e(d.grep(v.childNodes),function(C){if(C.nodeType==3){C.nodeValue=C.nodeValue.replace(/\uFEFF/g,"")}});while(v=m.get(o.id+"_"+B)){m.remove(v,1)}if(z&&y&&z.nodeType==y.nodeType&&z.nodeType==3&&!d.isOpera){t=z.nodeValue.length;z.appendData(y.nodeValue);m.remove(y);if(B=="start"){k=u=z;p=q=t}else{u=z;q=t}}}}}function n(t){if(m.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='<br data-mce-bogus="1" />'}return t}if(o){if(o.start){g=m.createRng();r=m.getRoot();if(s.tridentSel){return s.tridentSel.moveToBookmark(o)}if(h(true)&&h()){s.setRng(g)}}else{if(o.id){l("start");l("end");if(k){g=m.createRng();g.setStart(n(k),p);g.setEnd(n(u),q);s.setRng(g)}}else{if(o.name){s.select(m.select(o.name)[o.index])}else{if(o.rng){s.setRng(o.rng)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},destroy:function(h){var g=this;g.win=null;if(!h){d.removeUnload(g.destroy)}},_fixIESelection:function(){var h=this.dom,n=h.doc,i=n.body,k,o,g;function j(p,s){var q=i.createTextRange();try{q.moveToPoint(p,s)}catch(r){q=null}return q}function m(q){var p;if(q.button){p=j(q.x,q.y);if(p){if(p.compareEndPoints("StartToStart",o)>0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// <![CDATA[\n"+j(o)+"\n// ]]>"}}else{if(o.length>0){n.firstChild.value="<!--\n"+j(o)+"\n-->"}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&d<h.nodeValue.length){i=f(h,d);h=i.previousSibling;if(g>d){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d<h.nodeValue.length){h=f(h,d);d=0}if(i.nodeType==3&&g>0&&g<i.nodeValue.length){i=f(i,g).previousSibling;g=i.nodeValue.length}}return{startContainer:h,startOffset:d,endContainer:i,endOffset:g}}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var q=this,n=e.root,m=e.items,o=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,l=e.excludeFromTabOrder,k,h,p,d,g;f=f||b.DOM;k=function(r){g=r.target.id};h=function(r){f.setAttrib(r.target.id,"tabindex","-1")};d=function(r){var s=f.get(g);f.setAttrib(s,"tabindex","0");s.focus()};q.focus=function(){f.get(g).focus()};q.destroy=function(){c(m,function(s){var t=f.get(s.id);f.unbind(t,"focus",k);f.unbind(t,"blur",h)});var r=f.get(n);f.unbind(r,"focus",d);f.unbind(r,"keydown",p);m=f=n=q.focus=k=h=p=d=null;q.destroy=function(){}};q.moveFocus=function(v,s){var r=-1,u=q.controls,t;if(!g){return}c(m,function(y,x){if(y.id===g){r=x;return false}});r+=v;if(r<0){r=m.length-1}else{if(r>=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}break;case u:if(i){q.moveFocus(1)}break;case y:if(o){q.moveFocus(-1)}break;case A:if(o){q.moveFocus(1)}break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeight<j.max_height){c.setStyle(l,"overflow","hidden")}}},showMenu:function(p,n,r){var z=this,A=z.settings,o,g=c.getViewPort(),u,l,v,q,i=2,k,j,m=z.classPrefix;z.collapse(1);if(z.isMenuVisible){return}if(!z.rendered){o=c.add(z.settings.container,z.renderNode());f(z.items,function(h){h.postRender()});z.element=new b("menu_"+z.id,{blocker:1,container:A.container})}else{o=c.get("menu_"+z.id)}if(!e.isOpera){c.setStyles(o,{left:-65535,top:-65535})}c.show(o);z.update();p+=A.offset_x||0;n+=A.offset_y||0;g.w-=4;g.h-=4;if(A.constrain){u=o.clientWidth-i;l=o.clientHeight-i;v=g.x+g.w;q=g.y+g.h;if((p+A.vp_offset_x+u)>v){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+a.encode(e.title)+'">';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+='<span class="mceIcon '+e["class"]+'"><img class="mceIcon" src="'+e.image+'" alt="'+a.encode(e.title)+'" /></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+e.title+"</span>";d+="</a>";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='<span role="listbox" aria-haspopup="true" aria-labelledby="'+g.id+'_voiceDesc" aria-describedby="'+g.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+g.id+'" cellpadding="0" cellspacing="0" class="'+k+" "+k+"Enabled"+(i["class"]?(" "+i["class"]):"")+'"><tbody><tr>';j+="<td>"+d.createHTML("span",{id:g.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},g.settings.title);j+=d.createHTML("a",{id:g.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+"</td>";j+="<td>"+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span></span>')+"</td>";j+="</tr></tbody></table></span>";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(l){var k;b.remove(h.id,"change",i);j=false;k=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",k)});if(e.isWebKit&&(l.keyCode==37||l.keyCode==39)){return b.prevent(l)}if(l.keyCode==13||l.keyCode==32){g(l);return b.cancel(l)}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="<tbody><tr>";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span>');i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('<div id="'+f.id+'" role="group" aria-labelledby="'+f.id+'_voice">');i.push("<span role='application'>");i.push('<span id="'+f.id+'_voice" class="mceVoiceLabel" style="display:none;">'+d.encode(g.name)+"</span>");j(e,function(h){i.push(h.renderHTML())});i.push("</span>");i.push("</div>");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e<l.length;e++){k=l[e];d=l[e-1];g=l[e+1];if(e===0){j="mceToolbarStart";if(k.Button){j+=" mceToolbarStartButton"}else{if(k.SplitButton){j+=" mceToolbarStartSplitButton"}else{if(k.ListBox){j+=" mceToolbarStartListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,"<!-- IE -->"))}}if(c.stdMode){f+='<td style="position: relative">'+k.renderHTML()+"</td>"}else{f+="<td>"+k.renderHTML()+"</td>"}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,"<!-- IE -->"))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+f+"</tr></tbody>")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l<o.length;l++){if(o[l]==n){o.splice(l,1);break}}if(m.activeEditor==n){m._setActive(o[0])}n.destroy();m.onRemoveEditor.dispatch(m,n);return n},execCommand:function(r,p,o){var q=this,n=q.get(o),l;function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}switch(r){case"mceFocus":n.focus();return true;case"mceAddEditor":case"mceAddControl":if(!q.get(o)){new j.Editor(o,q.settings).render()}return true;case"mceAddFrameControl":l=o.window;l.tinyMCE=tinyMCE;l.tinymce=j;j.DOM.doc=l.document;j.DOM.win=l;n=new j.Editor(o.element_id,o);n.render();if(j.isIE){l.attachEvent("onunload",m)}o.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(n){n.remove()}return true;case"mceToggleEditor":if(!n){q.execCommand("mceAddControl",0,o);return true}if(n.isHidden()){n.show()}else{n.hide()}return true}if(q.activeEditor){return q.activeEditor.execCommand(r,p,o)}return false},execInstanceCommand:function(p,o,n,m){var l=this.get(p);if(l){return l.execCommand(o,n,m)}return false},triggerSave:function(){g(this.editors,function(l){l.save()})},addI18n:function(n,q){var l,m=this.i18n;if(!j.is(n,"string")){g(n,function(r,p){g(r,function(t,s){g(t,function(v,u){if(s==="common"){m[p+"."+u]=v}else{m[p+"."+s+"."+u]=v}})})})}else{g(q,function(r,p){m[n+"."+p]=r})}},_setActive:function(l){this.selectedInstance=this.activeEditor=l}})})(tinymce);(function(k){var l=k.DOM,j=k.dom.Event,f=k.extend,i=k.each,a=k.isGecko,b=k.isIE,e=k.isWebKit,d=k.is,h=k.ThemeManager,c=k.PluginManager,g=k.explode;k.create("tinymce.Editor",{Editor:function(p,o){var m=this,n=true;m.settings=o=f({id:p,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:k.documentBaseURL,add_form_submit_trigger:n,submit_patch:n,add_unload_trigger:n,convert_urls:n,relative_urls:n,remove_script_host:n,table_inline_editing:false,object_resizing:n,accessibility_focus:n,doctype:k.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y<z){y=z}}else{p=H.theme(G,C);if(p.editorContainer.nodeType){p.editorContainer=p.editorContainer.id=p.editorContainer.id||G.id+"_parent"}if(p.iframeContainer.nodeType){p.iframeContainer=p.iframeContainer.id=p.iframeContainer.id||G.id+"_iframecontainer"}y=p.iframeHeight||C.offsetHeight;if(b){G.onInit.add(function(n){n.dom.bind(n.getBody(),"beforedeactivate keydown",function(){n.lastIERng=n.selection.getRng()})})}}G.editorContainer=p.editorContainer}if(H.content_css){i(g(H.content_css),function(n){G.contentCSS.push(G.documentBaseURI.toAbsolute(n))})}if(H.content_style){G.contentStyles.push(H.content_style)}if(H.content_editable){C=q=p=null;return G.initContentBody()}if(document.domain&&location.hostname!=document.domain){k.relaxedDomain=document.domain}G.iframeHTML=H.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+='<base href="'+G.documentBaseURI.getURI()+'" />'}if(H.ie7_compat){G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'}else{G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />'}G.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(x=0;x<G.contentCSS.length;x++){G.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+G.contentCSS[x]+'" />'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='</head><body id="'+v+'" class="mceContentBody '+B+'" onload="window.parent.tinyMCE.get(\''+G.id+"').onLoad.dispatch();\"><br></body></html>";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return"<!--mce:protected "+escape(x)+"-->"})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(<p[^>]*>( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.lastIERng){t.setRng(u.lastIERng)}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();l.hide(m.getContainer());l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'><br data-mce-bogus="1"></'+q+">"}else{r='<br data-mce-bogus="1">'}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(o){var n=this,p,m=n.getBody();o=o||{};o.format=o.format||"html";o.get=true;o.getInner=true;if(!o.no_events){n.onBeforeGetContent.dispatch(n,o)}if(o.format=="raw"){p=m.innerHTML}else{if(o.format=="text"){p=m.innerText||m.textContent}else{p=n.serializer.serialize(m,o)}}if(o.format!="text"){o.content=k.trim(p)}else{o.content=p}if(!o.no_events){n.onGetContent.dispatch(n,o)}return o.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,n=m.getContainer();if(!m.removed){m.removed=1;m.hide();if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(n);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(n)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=p.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.y<L.y)||(C.x>L.x+L.w||C.x<L.x)){H=d.isIE?n.getDoc().documentElement:n.getBody();H.scrollLeft=C.x;H.scrollTop=C.y-L.h+25}x=m.createRng();A=D.previousSibling;if(A&&A.nodeType==3){x.setStart(A,A.nodeValue.length)}else{x.setStartBefore(D);x.setEndBefore(D)}m.remove(D);p.setRng(x);p.onSetContent.dispatch(p,G);n.addVisual()},mceInsertRawHTML:function(y,x,v){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return v}))},mceToggleFormat:function(y,x,v){s(v)},mceSetContent:function(y,x,v){n.setContent(v)},"Indent,Outdent":function(z){var x,v,y;x=k.indentation;v=/[a-z%]+$/i.exec(x);x=parseInt(x);if(!l("InsertUnorderedList")&&!l("InsertOrderedList")){if(!k.forced_root_block&&!m.getParent(p.getNode(),m.isBlock)){q.apply("div")}e(p.getSelectedBlocks(),function(A){if(z=="outdent"){y=Math.max(0,parseInt(A.style.paddingLeft||0)-x);m.setStyle(A,"paddingLeft",y?y+v:"")}else{m.setStyle(A,"paddingLeft",(parseInt(A.style.paddingLeft||0)+x)+v)}})}else{f(z)}},mceRepaint:function(){var x;if(d.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(v){}}},mceToggleFormat:function(y,x,v){q.toggle(v)},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",false,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();if(p.getRng().setStart){v.setStart(x,0);v.setEnd(x,x.childNodes.length);p.setRng(v)}else{f("SelectAll")}}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(x){var v=m.getParent(p.getNode(),"ul,ol");return v&&(x==="insertunorderedlist"&&v.tagName==="UL"||x==="insertorderedlist"&&v.tagName==="OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getDoc(),b.isGecko?"blur":"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m<e.length-1;m++){e[m]=e[m+1]}e.length--;i=e.length}}p.bookmark=h.selection.getBookmark(2,true);if(i<e.length-1){e.length=i+1}e.push(p);i=e.length-1;l.onAdd.dispatch(l,p);h.isNotDirty=0;return p},undo:function(){var n,m;if(l.typing){l.add();l.typing=false}if(i>0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i<e.length-1){m=e[++i];h.setContent(m.content,{format:"raw"});h.selection.moveToBookmark(m.bookmark);l.onRedo.dispatch(l,m)}return m},clear:function(){e=[];i=0;l.typing=false},hasUndo:function(){return i>0||this.typing},hasRedo:function(){return i<e.length-1&&!this.typing}};return l}})(tinymce);tinymce.ForceBlocks=function(c){var b=c.settings,e=c.dom,a=c.selection,d=c.schema.getBlockElements();function f(){var j=a.getStart(),h=c.getBody(),g,k,o,s,q,i,l,m=-16777215,p,r;if(!j||j.nodeType!==1||!b.forced_root_block){return}while(j&&j!=h){if(d[j.nodeName]){return}j=j.parentNode}g=a.getRng();if(g.setStart){k=g.startContainer;o=g.startOffset;s=g.endContainer;q=g.endOffset}else{if(g.item){j=g.item(0);g=c.getDoc().body.createTextRange();g.moveToElementText(j)}r=g.parentElement().ownerDocument===c.getDoc();tmpRng=g.duplicate();tmpRng.collapse(true);o=tmpRng.move("character",m)*-1;if(!tmpRng.collapsed){tmpRng=g.duplicate();tmpRng.collapse(false);q=(tmpRng.move("character",m)*-1)-o}}j=h.firstChild;while(j){if(j.nodeType===3||(j.nodeType==1&&!d[j.nodeName])){if(j.nodeType===3&&j.nodeValue.length==0){l=j;j=j.nextSibling;e.remove(l);continue}if(!i){i=e.create(b.forced_root_block);j.parentNode.insertBefore(i,j);p=true}l=j;j=j.nextSibling;i.appendChild(l)}else{i=null;j=j.nextSibling}}if(p){if(g.setStart){g.setStart(k,o);g.setEnd(s,q);a.setRng(g)}else{if(r){try{g=c.getDoc().body.createTextRange();g.moveToElementText(h);g.collapse(true);g.moveStart("character",o);if(q>0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k<g;k++){o=n[k].createControl(j,h);if(o){return h.add(o)}}if(j==="|"||j==="separator"){return h.createSeparator()}if(m.buttons&&(o=m.buttons[j])){return h.createButton(j,o)}return h.add(o)},createDropMenu:function(f,n,h){var m=this,i=m.editor,j,g,k,l;n=e({"class":"mceDropDown",constrain:i.settings.constrain_menus},n);n["class"]=n["class"]+" "+i.getParam("skin")+"Skin";if(k=i.getParam("skin_variant")){n["class"]+=" "+i.getParam("skin")+"Skin"+k.substring(0,1).toUpperCase()+k.substring(1)}n["class"]+=i.settings.directionality=="rtl"?" mceRtl":"";f=m.prefix+f;l=h||m._cls.dropmenu||c.ui.DropMenu;j=m.controls[f]=new l(f,n);j.onAddItem.add(function(r,q){var p=q.settings;p.title=i.getLang(p.title,p.title);if(!p.onclick){p.onclick=function(o){if(p.cmd){i.execCommand(p.cmd,p.ui||false,p.value)}}}});i.onRemove.add(function(){j.destroy()});if(c.isIE){j.onShowMenu.add(function(){i.focus();g=i.selection.getBookmark(1)});j.onHideMenu.add(function(){if(g){i.selection.moveToBookmark(g);g=0}})}return m.add(j)},createListBox:function(f,n,h){var l=this,j=l.editor,i,k,m;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,scope:n.scope,control_manager:l},n);f=l.prefix+f;function g(o){return o.settings.use_accessible_selects&&!c.isGecko}if(j.settings.use_native_selects||g(j)){k=new c.ui.NativeListBox(f,n)}else{m=h||l._cls.listbox||c.ui.ListBox;k=new m(f,n,j)}l.controls[f]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){j.bookmark=j.selection.getBookmark(1)});a.add(o,"focus",function(){j.selection.moveToBookmark(j.bookmark);j.bookmark=null})})}if(k.hideMenu){j.onMouseDown.add(k.hideMenu,k)}return l.add(k)},createButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.label=g.translate(i.label);i.scope=i.scope||g;if(!i.onclick&&!i.menu_button){i.onclick=function(){g.execCommand(i.cmd,i.ui||false,i.value)}}i=e({title:i.title,"class":"mce_"+m,unavailable_prefix:g.getLang("unavailable",""),scope:i.scope,control_manager:h},i);m=h.prefix+m;if(i.menu_button){f=l||h._cls.menubutton||c.ui.MenuButton;k=new f(m,i,g);g.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i,g)}return h.add(k)},createMenuButton:function(h,f,g){f=f||{};f.menu_button=1;return this.createButton(h,f,g)},createSplitButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.scope=i.scope||g;if(!i.onclick){i.onclick=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}if(!i.onselect){i.onselect=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}i=e({title:i.title,"class":"mce_"+m,scope:i.scope,control_manager:h},i);m=h.prefix+m;f=l||h._cls.splitbutton||c.ui.SplitButton;k=h.add(new f(m,i,g));g.onMouseDown.add(k.hideMenu,k);return k},createColorSplitButton:function(f,n,h){var l=this,j=l.editor,i,k,m,g;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onclick){n.onclick=function(o){if(c.isIE){g=j.selection.getBookmark(1)}j.execCommand(n.cmd,n.ui||false,o||n.value)}}if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,menu_class:j.getParam("skin")+"Skin",scope:n.scope,more_colors_title:j.getLang("more_colors")},n);f=l.prefix+f;m=h||l._cls.colorsplitbutton||c.ui.ColorSplitButton;k=new m(f,n,j);j.onMouseDown.add(k.hideMenu,k);j.onRemove.add(function(){k.destroy()});if(c.isIE){k.onShowMenu.add(function(){j.focus();g=j.selection.getBookmark(1)});k.onHideMenu.add(function(){if(g){j.selection.moveToBookmark(g);g=0}})}return l.add(k)},createToolbar:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||g._cls.toolbar||c.ui.Toolbar;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createToolbarGroup:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||this._cls.toolbarGroup||c.ui.ToolbarGroup;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createSeparator:function(g){var f=g||this._cls.separator||c.ui.Separator;return new f()},setControlType:function(g,f){return this._cls[g.toLowerCase()]=f},destroy:function(){d(this.controls,function(f){f.destroy()});this.controls=null}})})(tinymce);(function(d){var a=d.util.Dispatcher,e=d.each,c=d.isIE,b=d.isOpera;d.create("tinymce.WindowManager",{WindowManager:function(f){var g=this;g.editor=f;g.onOpen=new a(g);g.onClose=new a(g);g.params={};g.features={}},open:function(z,h){var v=this,k="",n,m,i=v.editor.settings.dialog_type=="modal",q,o,j,g=d.DOM.getViewPort(),r;z=z||{};h=h||{};o=b?g.w:screen.width;j=b?g.h:screen.height;z.name=z.name||"mc_"+new Date().getTime();z.width=parseInt(z.width||320);z.height=parseInt(z.height||240);z.resizable=true;z.left=z.left||parseInt(o/2)-(z.width/2);z.top=z.top||parseInt(j/2)-(z.height/2);h.inline=false;h.mce_width=z.width;h.mce_height=z.height;h.mce_auto_focus=z.auto_focus;if(i){if(c){z.center=true;z.help=false;z.dialogWidth=z.width+"px";z.dialogHeight=z.height+"px";z.scroll=z.scrollbars||false}}e(z,function(p,f){if(d.is(p,"boolean")){p=p?"yes":"no"}if(!/^(name|url)$/.test(f)){if(c&&i){k+=(k?";":"")+f+":"+p}else{k+=(k?",":"")+f+"="+p}}});v.features=z;v.params=h;v.onOpen.dispatch(v,z,h);r=z.url||z.file;r=d._addVer(r);try{if(c&&i){q=1;window.showModalDialog(r,window,k)}else{q=window.open(r,z.name,k)}}catch(l){}if(!q){alert(v.editor.getLang("popup_blocked"))}},close:function(f){f.close();this.onClose.dispatch(this)},createInstance:function(i,h,g,m,l,k){var j=d.resolve(i);return new j(h,g,m,l,k)},confirm:function(h,f,i,g){g=g||window;f.call(i||this,g.confirm(this._decode(this.editor.getLang(h,h))))},alert:function(h,f,j,g){var i=this;g=g||window;g.alert(i._decode(i.editor.getLang(h,h)));if(f){f.call(j||i)}},resizeBy:function(f,g,h){h.resizeBy(f,g)},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){a.Formatter=function(aa){var Q={},T=a.each,c=aa.dom,r=aa.selection,t=a.dom.TreeWalker,N=new a.dom.RangeUtils(c),d=aa.schema.isValidChild,H=c.isBlock,m=aa.settings.forced_root_block,s=c.nodeIndex,G="\uFEFF",e=/^(src|href|style)$/,X=false,C=true,P,D,x=c.getContentEditable;function A(ab){return ab instanceof Array}function n(ac,ab){return c.getParents(ac,ab,c.getRoot())}function b(ab){return ab.nodeType===1&&ab.id==="_mce_caret"}function j(){l({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(ab){return true},onformat:function(ad,ab,ac){T(ac,function(af,ae){c.setAttrib(ad,ae,af)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});T("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(ab){l(ab,{block:ab,remove:"all"})});l(aa.settings.formats)}function W(){aa.addShortcut("ctrl+b","bold_desc","Bold");aa.addShortcut("ctrl+i","italic_desc","Italic");aa.addShortcut("ctrl+u","underline_desc","Underline");for(var ab=1;ab<=6;ab++){aa.addShortcut("ctrl+"+ab,"",["FormatBlock",false,"h"+ab])}aa.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);aa.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);aa.addShortcut("ctrl+9","",["FormatBlock",false,"address"])}function V(ab){return ab?Q[ab]:Q}function l(ab,ac){if(ab){if(typeof(ab)!=="string"){T(ab,function(ae,ad){l(ad,ae)})}else{ac=ac.length?ac:[ac];T(ac,function(ad){if(ad.deep===D){ad.deep=!ad.selector}if(ad.split===D){ad.split=!ad.selector||ad.inline}if(ad.remove===D&&ad.selector&&!ad.inline){ad.remove="none"}if(ad.selector&&ad.inline){ad.mixed=true;ad.block_expand=true}if(typeof(ad.classes)==="string"){ad.classes=ad.classes.split(/\s+/)}});Q[ab]=ac}}}var i=function(ac){var ab;aa.dom.getParent(ac,function(ad){ab=aa.dom.getStyle(ad,"text-decoration");return ab&&ab!=="none"});return ab};var L=function(ab){var ac;if(ab.nodeType===1&&ab.parentNode&&ab.parentNode.nodeType===1){ac=i(ab.parentNode);if(aa.dom.getStyle(ab,"color")&&ac){aa.dom.setStyle(ab,"text-decoration",ac)}else{if(aa.dom.getStyle(ab,"textdecoration")===ac){aa.dom.setStyle(ab,"text-decoration",null)}}}};function Y(ae,al,ag){var ah=V(ae),am=ah[0],ak,ac,aj,ai=r.isCollapsed();function ab(aq,ap){ap=ap||am;if(aq){if(ap.onformat){ap.onformat(aq,ap,al,ag)}T(ap.styles,function(at,ar){c.setStyle(aq,ar,q(at,al))});T(ap.attributes,function(at,ar){c.setAttrib(aq,ar,q(at,al))});T(ap.classes,function(ar){ar=q(ar,al);if(!c.hasClass(aq,ar)){c.addClass(aq,ar)}})}}function af(){function ar(ay,aw){var ax=new t(aw);for(ag=ax.current();ag;ag=ax.prev()){if(ag.childNodes.length>1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aA<ar&&au>ar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aA<ar&&aB<ar)||(aA>ar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aA<ar){at.insertBefore(az,ax)}else{if(aA>ar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB<az.length;aB++){aA.appendChild(az[aB])}aC.appendChild(aA)}T(a.grep(aC.childNodes),ay)}ay(ax)})}T(ap,function(az){var ax;function aA(aC){var aB=0;T(aC.childNodes,function(aD){if(!f(aD)&&!K(aD)){aB++}});return aB}function ay(aB){var aD,aC;T(aB.childNodes,function(aE){if(aE.nodeType==1&&!K(aE)&&!b(aE)){aD=aE;return X}});if(aD&&h(aD,am)){aC=c.clone(aD,X);ab(aC);c.replace(aC,aB,C);c.remove(aD,1)}return aC||aB}ax=aA(az);if((ap.length>1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at<ar;at++){if(Z(ag[at],am,av,av)){break}}}if(ao.deep){if(au.length){for(at=0,ar=au.length;at<ar;at++){ae(au[at])}if(aw){al=ax}}}}function ah(aq){var ar;T(n(aq.parentNode).reverse(),function(at){var au;if(!ar&&at.id!="_start"&&at.id!="_end"){au=y(at,ad,am);if(au&&au.split!==false){ar=at}}});return ar}function ab(au,aq,aw,az){var aA,ay,ax,at,av,ar;if(au){ar=au.parentNode;for(aA=aq.parentNode;aA&&aA!=ar;aA=aA.parentNode){ay=c.clone(aA,X);for(av=0;av<ag.length;av++){if(Z(ag[av],am,ay,ay)){ay=0;break}}if(ay){if(ax){ay.appendChild(ax)}if(!at){at=ay}ax=ay}}if(az&&(!ao.mixed||!H(au))){aq=c.split(au,aq)}if(ax){aw.parentNode.insertBefore(ax,aw);at.appendChild(aw)}}return aq}function an(aq){return ab(ah(aq),aq,aq,true)}function ai(at){var ar=c.get(at?"_start":"_end"),aq=ar[at?"firstChild":"lastChild"];if(K(aq)){aq=aq[at?"firstChild":"lastChild"]}c.remove(ar,true);return aq}function ap(aq){var at,au,ar;aq=p(aq,ag,C);if(ao.split){at=M(aq,C);au=M(aq);if(at!=au){if(/^(TR|TD)$/.test(at.nodeName)&&at.firstChild){at=(at.nodeName=="TD"?at.firstChild:at.firstChild.firstChild)||at}at=S(at,"span",{id:"_start","data-mce-type":"bookmark"});au=S(au,"span",{id:"_end","data-mce-type":"bookmark"});an(at);an(au);at=ai(C);au=ai()}else{at=au=an(at)}aq.startContainer=at.parentNode;aq.startOffset=s(at);aq.endContainer=au.parentNode;aq.endOffset=s(au)+1}N.walk(aq,function(av){T(av,function(aw){ae(aw);if(aw.nodeType===1&&aa.dom.getStyle(aw,"text-decoration")==="underline"&&aw.parentNode&&i(aw.parentNode)==="underline"){Z({deep:false,exact:true,inline:"span",styles:{textDecoration:"underline"}},null,aw)}})})}if(af){if(af.nodeType){ac=c.createRng();ac.setStartBefore(af);ac.setEndAfter(af);ap(ac)}else{ap(af)}return}if(!r.isCollapsed()||!ao.inline||c.select("td.mceSelected,th.mceSelected").length){ak=r.getBookmark();ap(r.getRng(C));r.moveToBookmark(ak);if(ao.inline&&k(ad,am,r.getStart())){R(r.getRng(true))}aa.nodeChanged()}else{U("remove",ad,am)}}function F(ac,ae,ad){var ab=V(ac);if(k(ac,ae,ad)&&(!("toggle" in ab[0])||ab[0].toggle)){B(ac,ae,ad)}else{Y(ac,ae,ad)}}function y(ac,ab,ah,af){var ad=V(ab),ai,ag,ae;function aj(an,ap,aq){var am,ao,ak=ap[aq],al;if(ap.onmatch){return ap.onmatch(an,ap,aq)}if(ak){if(ak.length===D){for(am in ak){if(ak.hasOwnProperty(am)){if(aq==="attributes"){ao=c.getAttrib(an,am)}else{ao=O(an,am)}if(af&&!ao&&!ap.exact){return}if((!af||ap.exact)&&!g(ao,q(ak[am],ah))){return}}}}else{for(al=0;al<ak.length;al++){if(aq==="attributes"?c.getAttrib(an,ak[al]):O(an,ak[al])){return ap}}}}return ap}if(ad&&ac){for(ag=0;ag<ad.length;ag++){ai=ad[ag];if(h(ac,ai)&&aj(ac,ai,"attributes")&&aj(ac,ai,"styles")){if(ae=ai.classes){for(ag=0;ag<ae.length;ag++){if(!c.hasClass(ac,ae[ag])){return}}}return ai}}}}function k(ad,af,ae){var ac;function ab(ag){ag=c.getParent(ag,function(ah){return !!y(ah,ad,af,true)});return y(ag,ad,af)}if(ae){return ab(ae)}ae=r.getNode();if(ab(ae)){return C}ac=r.getStart();if(ac!=ae){if(ab(ac)){return C}}return X}function v(ai,ah){var af,ag=[],ae={},ad,ac,ab;af=r.getStart();c.getParent(af,function(al){var ak,aj;for(ak=0;ak<ai.length;ak++){aj=ai[ak];if(!ae[aj]&&y(al,aj,ah)){ae[aj]=true;ag.push(aj)}}},c.getRoot());return ag}function z(af){var ah=V(af),ae,ad,ag,ac,ab;if(ah){ae=r.getStart();ad=n(ae);for(ac=ah.length-1;ac>=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ae,ac){var ad;if(!P){P={};ad={};aa.onNodeChange.addToTop(function(ag,af,ai){var ah=n(ai),aj={};T(P,function(ak,al){T(ah,function(am){if(y(am,al,{},ak.similar)){if(!ad[al]){T(ak,function(an){an(true,{node:am,format:al,parents:ah})});ad[al]=ak}aj[al]=ak;return false}})});T(ad,function(ak,al){if(!aj[al]){delete ad[al];T(ak,function(am){am(false,{node:ai,format:al,parents:ah})})}})})}T(ab.split(","),function(af){if(!P[af]){P[af]=[];P[af].similar=ac}P[af].push(ae)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(az){var au,ax,ay,aw,av,at;au=ax=az?ad:ar;av=az?"previousSibling":"nextSibling";at=c.getRoot();if(au.nodeType==3&&!f(au)){if(az?ai>0:ak<au.nodeValue.length){return au}}for(;;){if(!am[0].block_expand&&H(ax)){return ax}for(aw=ax[av];aw;aw=aw[av]){if(!K(aw)&&!f(aw)){return ax}}if(ax.parentNode==at){au=ax;break}ax=ax.parentNode}return au}function ag(at,au){if(au===D){au=at.nodeType===3?at.length:at.childNodes.length}while(at&&at.hasChildNodes()){at=at.childNodes[au];if(at){au=at.nodeType===3?at.length:at.childNodes.length}}return{node:at,offset:au}}if(ad.nodeType==1&&ad.hasChildNodes()){an=ad.childNodes.length-1;ad=ad.childNodes[ai>an?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF<aB)?aF:aB}return aF}if(au.nodeType===3){az=aw(au,ay);if(az!==-1){return{container:au,offset:az}}at=au}ax=new t(au,c.getParent(au,H)||aa.getBody());while(av=ax[aA?"prev":"next"]()){if(av.nodeType===3){at=av;az=aw(av);if(az!==-1){return{container:av,offset:az}}}else{if(H(av)){break}}}if(at){if(aA){ay=0}else{ay=at.length}return{container:at,offset:ay}}}function af(au,at){var av,aw,ay,ax;if(au.nodeType==3&&au.nodeValue.length===0&&au[at]){au=au[at]}av=n(au);for(aw=0;aw<av.length;aw++){for(ay=0;ay<am.length;ay++){ax=am[ay];if("collapsed" in ax&&ax.collapsed!==ab.collapsed){continue}if(c.is(av[aw],ax.selector)){return av[aw]}}}return au}function ac(au,at,aw){var av;if(!am[0].wrapper){av=c.getParent(au,am[0].block)}if(!av){av=c.getParent(au.nodeType==3?au.parentNode:au,H)}if(av&&am[0].wrapper){av=n(av,"ul,ol").reverse()[0]||av}if(!av){av=au;while(av[at]&&!H(av[at])){av=av[at];if(g(av,"br")){break}}}return av||au}ad=aq(ad);ar=aq(ar);if(K(ad.parentNode)||K(ad)){ad=K(ad)?ad:ad.parentNode;ad=ad.nextSibling||ad;if(ad.nodeType==3){ai=0}}if(K(ar.parentNode)||K(ar)){ar=K(ar)?ar:ar.parentNode;ar=ar.previousSibling||ar;if(ar.nodeType==3){ak=ar.length}}if(am[0].inline){if(ab.collapsed){al=aj(ad,ai,true);if(al){ad=al.container;ai=al.offset}al=aj(ar,ak);if(al){ar=al.container;ak=al.offset}}ah=ag(ar,ak);if(ah.node){while(ah.node&&ah.offset===0&&ah.node.previousSibling){ah=ag(ah.node.previousSibling)}if(ah.node&&ah.offset>0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;ad<ac.length;ad++){if(ac[ad].nodeName.indexOf("_")!==0){return X}}}if(ah.remove!="none"){o(ae,ah);return C}}function o(ad,ae){var ab=ad.parentNode,ac;function af(ah,ag,ai){ah=E(ah,ag,ai);return !ah||(ah.nodeName=="BR"||H(ah))}if(ae.block){if(!m){if(H(ad)&&!H(ab)){if(!af(ad,X)&&!af(ad.firstChild,C,1)){ad.insertBefore(c.create("br"),ad.firstChild)}if(!af(ad,C)&&!af(ad.lastChild,X,1)){ad.appendChild(c.create("br"))}}}else{if(ab==c.getRoot()){if(!ae.list_block||!g(ad,ae.list_block)){T(a.grep(ad.childNodes),function(ag){if(d(m,ag.nodeName.toLowerCase())){if(!ac){ac=S(ag,m)}else{ac.appendChild(ag)}}else{ac=0}})}}}}if(ae.selector&&ae.inline&&!g(ae.inline,ad)){return}c.remove(ad,1)}function E(ac,ab,ad){if(ac){ab=ab?"nextSibling":"previousSibling";for(ac=ad?ac:ac[ab];ac;ac=ac[ab]){if(ac.nodeType==1||!f(ac)){return ac}}}}function K(ab){return ab&&ab.nodeType==1&&ab.getAttribute("data-mce-type")=="bookmark"}function u(af,ae){var ab,ad,ac;function ah(ak,aj){if(ak.nodeName!=aj.nodeName){return X}function ai(am){var an={};T(c.getAttribs(am),function(ao){var ap=ao.nodeName.toLowerCase();if(ap.indexOf("_")!==0&&ap!=="style"){an[ap]=c.getAttrib(am,ap)}});return an}function al(ap,ao){var an,am;for(am in ap){if(ap.hasOwnProperty(am)){an=ao[am];if(an===D){return X}if(ap[am]!=an){return X}delete ao[am]}}for(am in ao){if(ao.hasOwnProperty(am)){return X}}return C}if(!al(ai(ak),ai(aj))){return X}if(!al(c.parseStyle(c.getAttrib(ak,"style")),c.parseStyle(c.getAttrib(aj,"style")))){return X}return C}function ag(aj,ai){for(ad=aj;ad;ad=ad[ai]){if(ad.nodeType==3&&ad.nodeValue.length!==0){return aj}if(ad.nodeType==1&&!K(ad)){return ad}}return aj}if(af&&ae){af=ag(af,"previousSibling");ae=ag(ae,"nextSibling");if(ah(af,ae)){for(ad=af.nextSibling;ad&&ad!=ae;){ac=ad;ad=ad.nextSibling;af.appendChild(ac)}c.remove(ae);T(a.grep(ae.childNodes),function(ai){af.appendChild(ai)});return af}}return ae}function I(ab){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(ab)}function M(ac,ag){var ab,af,ad,ae;ab=ac[ag?"startContainer":"endContainer"];af=ac[ag?"startOffset":"endOffset"];if(ab.nodeType==1){ad=ab.childNodes.length-1;if(!ag&&af){af--}ab=ab.childNodes[af>ad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au<at.length&&/\w/.test(at.charAt(au))&&/\w/.test(at.charAt(au-1))){ar=r.getBookmark();aq.collapse(true);aq=p(aq,V(ab));aq=N.split(aq);Y(ab,ai,aq);r.moveToBookmark(ar)}else{if(!ao||av.nodeValue!==G){ao=ad(true);av=ao.firstChild;aq.insertNode(ao);au=1;Y(ab,ai,ao)}else{Y(ab,ai,ao)}r.setCursorLocation(av,au)}}function am(){var ao=r.getRng(true),ap,ar,av,au,aq,ay,ax=[],at,aw;ap=ao.startContainer;ar=ao.startOffset;aq=ap;if(ap.nodeType==3){if(ar!=ap.nodeValue.length||ap.nodeValue===G){au=true}aq=aq.parentNode}while(aq){if(y(aq,ab,ai)){ay=aq;break}if(aq.nextSibling){au=true}ax.push(aq);aq=aq.parentNode}if(!ay){return}if(au){av=r.getBookmark();ao.collapse(true);ao=p(ao,V(ab),true);ao=N.split(ao);B(ab,ai,ao);r.moveToBookmark(av)}else{aw=ad();aq=aw;for(at=ax.length-1;at>=0;at--){aq.appendChild(c.clone(ax[at],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;c.insertAfter(aw,ay);r.setCursorLocation(aq,1)}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(A){var v=e.getRng(true),G,j,z,u,p,M,B,o,k,n,t,J,x,C;function E(N){return N&&i.isBlock(N)&&!/^(TD|TH|CAPTION|FORM)$/.test(N.nodeName)&&!/^(fixed|absolute)/i.test(N.style.position)&&i.getContentEditable(N)!=="true"}function F(O){var N;if(b.isIE&&i.isBlock(O)){N=e.getRng();O.appendChild(i.create("span",null,"\u00a0"));e.select(O);O.lastChild.outerHTML="";e.setRng(N)}}function y(P){var O=P,Q=[],N;while(O=O.firstChild){if(i.isBlock(O)){return}if(O.nodeType==1&&!c[O.nodeName.toLowerCase()]){Q.push(O)}}N=Q.length;while(N--){O=Q[N];if(!O.hasChildNodes()||(O.firstChild==O.lastChild&&O.firstChild.nodeValue==="")){i.remove(O)}else{if(O.nodeName=="A"&&(O.innerText||O.textContent)===" "){i.remove(O)}}}}function m(O){var T,R,N,U,S,Q=O,P;N=i.createRng();if(O.hasChildNodes()){T=new a(O,O);while(R=T.current()){if(R.nodeType==3){N.setStart(R,0);N.setEnd(R,0);break}if(c[R.nodeName.toLowerCase()]){N.setStartBefore(R);N.setEndBefore(R);break}Q=R;R=T.next()}if(!R){N.setStart(Q,0);N.setEnd(Q,0)}}else{if(O.nodeName=="BR"){if(O.nextSibling&&i.isBlock(O.nextSibling)){if(!M||M<9){P=i.create("br");O.parentNode.insertBefore(P,O)}N.setStartBefore(O);N.setEndBefore(O)}else{N.setStartAfter(O);N.setEndAfter(O)}}else{N.setStart(O,0);N.setEnd(O,0)}}e.setRng(N);i.remove(P);S=i.getViewPort(f.getWin());U=i.getPos(O).y;if(U<S.y||U+25>S.y+S.h){f.getWin().scrollTo(0,U<S.y?U:U-S.h+25)}}function r(O){var P=z,R,Q,N;R=O||t=="TABLE"?i.create(O||x):p.cloneNode(false);N=R;if(d.keep_styles!==false){do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(P.nodeName)){Q=P.cloneNode(false);i.setAttrib(Q,"id","");if(R.hasChildNodes()){Q.appendChild(R.firstChild);R.appendChild(Q)}else{N=Q;R.appendChild(Q)}}}while(P=P.parentNode)}if(!b.isIE){N.innerHTML="<br>"}return R}function q(Q){var P,O,N;if(z.nodeType==3&&(Q?u>0:u<z.nodeValue.length)){return false}if(z.parentNode==p&&C&&!Q){return true}if(Q&&z.nodeType==1&&z==p.firstChild){return true}if(z.nodeName==="TABLE"||(z.previousSibling&&z.previousSibling.nodeName=="TABLE")){return(C&&!Q)||(!C&&Q)}P=new a(z,p);if(z.nodeType==3){if(Q&&u==0){P.prev()}else{if(!Q&&u==z.nodeValue.length){P.next()}}}while(O=P.current()){if(O.nodeType===1){if(!O.getAttribute("data-mce-bogus")){N=O.nodeName.toLowerCase();if(c[N]&&N!=="br"){return false}}}else{if(O.nodeType===3&&!/^[ \t\r\n]*$/.test(O.nodeValue)){return false}}if(Q){P.prev()}else{P.next()}}return true}function l(N,T){var U,S,P,R,Q,O=x||"P";S=i.getParent(N,i.isBlock);if(!S||!E(S)){S=S||j;if(!S.hasChildNodes()){U=i.create(O);S.appendChild(U);v.setStart(U,0);v.setEnd(U,0);return U}R=N;while(R.parentNode!=S){R=R.parentNode}while(R&&!i.isBlock(R)){P=R;R=R.previousSibling}if(P){U=i.create(O);P.parentNode.insertBefore(U,P);R=P;while(R&&!i.isBlock(R)){Q=R.nextSibling;U.appendChild(R);R=Q}v.setStart(N,T);v.setEnd(N,T)}}return N}function H(){function N(P){var O=n[P?"firstChild":"lastChild"];while(O){if(O.nodeType==1){break}O=O[P?"nextSibling":"previousSibling"]}return O===p}o=x?r(x):i.create("BR");if(N(true)&&N()){i.replace(o,n)}else{if(N(true)){n.parentNode.insertBefore(o,n)}else{if(N()){i.insertAfter(o,n);F(o)}else{G=v.cloneRange();G.setStartAfter(p);G.setEndAfter(n);k=G.extractContents();i.insertAfter(k,n);i.insertAfter(o,n)}}}i.remove(p);m(o);h.add()}function D(){var O=new a(z,p),N;while(N=O.current()){if(N.nodeName=="BR"){return true}N=O.next()}}function L(){var O,N;if(z&&z.nodeType==3&&u>=z.nodeValue.length){if(!b.isIE&&!D()){O=i.create("br");v.insertNode(O);v.setStartAfter(O);v.setEndAfter(O);N=true}}O=i.create("br");v.insertNode(O);if(b.isIE&&t=="PRE"&&(!M||M<8)){O.parentNode.insertBefore(i.doc.createTextNode("\r"),O)}if(!N){v.setStartAfter(O);v.setEndAfter(O)}else{v.setStartBefore(O);v.setEndBefore(O)}e.setRng(v);h.add()}function s(N){do{if(N.nodeType===3){N.nodeValue=N.nodeValue.replace(/^[\r\n]+/,"")}N=N.firstChild}while(N)}function K(P){var N=i.getRoot(),O,Q;O=P;while(O!==N&&i.getContentEditable(O)!=="false"){if(i.getContentEditable(O)==="true"){Q=O}O=O.parentNode}return O!==N?Q:N}function I(O){var N;if(!b.isIE){O.normalize();N=O.lastChild;if(!N||(/^(left|right)$/gi.test(i.getStyle(N,"float",true)))){i.add(O,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(A.isDefaultPrevented()){return}z=v.startContainer;u=v.startOffset;x=(d.force_p_newlines?"p":"")||d.forced_root_block;x=x?x.toUpperCase():"";M=i.doc.documentMode;B=A.shiftKey;if(z.nodeType==1&&z.hasChildNodes()){C=u>z.childNodes.length-1;z=z.childNodes[Math.min(u,z.childNodes.length-1)]||z;if(C&&z.nodeType==3){u=z.nodeValue.length}else{u=0}}j=K(z);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||B){L()}return}if((x&&!B)||(!x&&B)){z=l(z,u)}p=i.getParent(z,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";J=n?n.nodeName.toUpperCase():"";if(t=="LI"){if(!x&&B){L();return}if(i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}H();return}}if(t=="PRE"&&d.br_in_pre!==false){if(!B){L();return}}else{if((!x&&!B&&t!="LI")||(x&&B)){L();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&J!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&E(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{G=v.cloneRange();G.setEndAfter(p);k=G.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);y(o);I(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce);
\ No newline at end of file +(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.10",releaseDate:"2013-10-24",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isIE11=g.indexOf("Trident/")!=-1&&(g.indexOf("rv:")!=-1||o.appName.indexOf("Netscape")!=-1);s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName)||s.isIE11;s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&!s.isIE11&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){r=f[m].href;if(r){if(/^https?:\/\/[^\/]+$/.test(r)){r+="/"}k=r?r.match(/.*\//)[0]:""}}function h(i){if(i.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(i.src)){if(/_(src|dev)\.js/g.test(i.src)){s.suffix="_src"}if((j=i.src.indexOf("?"))!=-1){s.query=i.src.substring(j+1)}s.baseURL=i.src.substring(0,i.src.lastIndexOf("/"));if(k&&s.baseURL.indexOf("://")==-1&&s.baseURL.indexOf("/")!==0){s.baseURL=k+s.baseURL}return s.baseURL}return null}f=q.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}l=q.getElementsByTagName("head")[0];if(l){f=l.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}}return},is:function(g,f){if(!f){return g!==b}if(f=="array"&&c.isArray(g)){return true}return typeof(g)==f},isArray:Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},makeMap:function(f,j,h){var g;f=f||[];j=j||",";if(typeof(f)=="string"){f=f.split(j)}h=h||{};g=f.length;while(g--){h[f[g]]={}}return h},each:function(i,f,h){var j,g;if(!i){return 0}h=h||i;if(i.length!==b){for(j=0,g=i.length;j<g;j++){if(f.call(h,i[j],j,i)===false){return 0}}}else{for(j in i){if(i.hasOwnProperty(j)){if(f.call(h,i[j],j,i)===false){return 0}}}}return 1},map:function(g,h){var i=[];c.each(g,function(f){i.push(h(f))});return i},grep:function(g,h){var i=[];c.each(g,function(f){if(!h||h(f)){i.push(f)}});return i},inArray:function(g,h){var j,f;if(g){for(j=0,f=g.length;j<f;j++){if(g[j]===h){return j}}}return -1},extend:function(n,k){var j,f,h,g=arguments,m;for(j=1,f=g.length;j<f;j++){k=g[j];for(h in k){if(k.hasOwnProperty(h)){m=k[h];if(m!==b){n[h]=m}}}}return n},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(o,f,j){var n=this,g,i,k,l,h,m=0;o=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(o);k=o[3].match(/(^|\.)(\w+)$/i)[2];i=n.createNS(o[3].replace(/\.\w+$/,""),j);if(i[k]){return}if(o[2]=="static"){i[k]=f;if(this.onCreate){this.onCreate(o[2],o[3],i[k])}return}if(!f[k]){f[k]=function(){};m=1}i[k]=f[k];n.extend(i[k].prototype,f);if(o[5]){g=n.resolve(o[5]).prototype;l=o[5].match(/\.(\w+)$/i)[1];h=i[k];if(m){i[k]=function(){return g[l].apply(this,arguments)}}else{i[k]=function(){this.parent=g[l];return h.apply(this,arguments)}}i[k].prototype[k]=i[k];n.each(g,function(p,q){i[k].prototype[q]=g[q]});n.each(f,function(p,q){if(g[q]){i[k].prototype[q]=function(){this.parent=g[q];return p.apply(this,arguments)}}else{if(q!=k){i[k].prototype[q]=p}}})}n.each(f["static"],function(p,q){i[k][q]=p});if(this.onCreate){this.onCreate(o[2],o[3],i[k].prototype)}},walk:function(i,h,j,g){g=g||this;if(i){if(j){i=i[j]}c.each(i,function(k,f){if(h.call(g,k,f,j)===false){return false}c.walk(k,h,j,g)})}},createNS:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0;g<j.length;g++){f=j[g];if(!h[f]){h[f]={}}h=h[f]}return h},resolve:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0,f=j.length;g<f;g++){h=h[j[g]];if(!h){break}}return h},addUnload:function(j,i){var h=this,g;g=function(){var f=h.unloads,l,m;if(f){for(m in f){l=f[m];if(l&&l.func){l.func.call(l.scope,1)}}if(e.detachEvent){e.detachEvent("onbeforeunload",k);e.detachEvent("onunload",g)}else{if(e.removeEventListener){e.removeEventListener("unload",g,false)}}h.unloads=l=f=w=g=0;if(e.CollectGarbage){CollectGarbage()}}};function k(){var l=document;function f(){l.detachEvent("onstop",f);if(g){g()}l=0}if(l.readyState=="interactive"){if(l){l.attachEvent("onstop",f)}e.setTimeout(function(){if(l){l.detachEvent("onstop",f)}},0)}}j={func:j,scope:i||this};if(!h.unloads){if(e.attachEvent){e.attachEvent("onunload",g);e.attachEvent("onbeforeunload",k)}else{if(e.addEventListener){e.addEventListener("unload",g,false)}}h.unloads=[j]}else{h.unloads.push(j)}return j},removeUnload:function(i){var g=this.unloads,h=null;c.each(g,function(j,f){if(j&&j.func==i){g.splice(f,1);h=i;return false}});return h},explode:function(f,g){if(!f||c.is(f,"array")){return f}return c.map(f.split(g||","),c.trim)},_addVer:function(g){var f;if(!this.query){return g}f=(g.indexOf("?")==-1?"?":"&")+this.query;if(g.indexOf("#")==-1){return g+f}return g.replace("#",f+"#")},_replace:function(h,f,g){if(d){return g.replace(h,function(){var l=f,j=arguments,k;for(k=0;k<j.length-2;k++){if(j[k]===b){l=l.replace(new RegExp("\\$"+k,"g"),"")}else{l=l.replace(new RegExp("\\$"+k,"g"),j[k])}}return l})}return g.replace(h,f)}};c._init();e.tinymce=e.tinyMCE=c})(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:false,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(b,a){this.listeners.push({cb:b,scope:a||this.scope});return b},addToTop:function(d,b){var a=this,c={cb:d,scope:b||a.scope};if(a.inDispatch){a.listeners=[c].concat(a.listeners)}else{a.listeners.unshift(c)}return d},remove:function(c){var b=this.listeners,a=null;tinymce.each(b,function(e,d){if(c==e.cb){a=e;b.splice(d,1);return false}});return a},dispatch:function(){var a=this,e,b=arguments,c,d=a.listeners,f;a.inDispatch=true;for(c=0;c<d.length;c++){f=d[c];e=f.cb.apply(f.scope,b.length>0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e<b;e++){if(e>=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length<c.length){for(e=0,b=c.length;e<b;e++){if(e>=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e<b;e++){d+="../"}for(e=f-1,b=c.length;e<b;e++){if(e!=f-1){d+="/"+c[e]}else{d+=c[e]}}return d},toAbsPath:function(e,f){var c,b=0,h=[],d,g;d=/\/$/.test(f)?"/":"";e=e.split("/");f=f.split("/");a(e,function(i){if(i){h.push(i)}});e=h;for(c=f.length-1,h=[];c>=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&Object.prototype.toString.call(o)==="[object Array]"){for(i=0,v="[";i<o.length;i++){v+=(i>0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey&&!b.altKey}}})(tinymce);tinymce.util.Quirks=function(a){var j=tinymce.VK,f=j.BACKSPACE,k=j.DELETE,e=a.dom,m=a.selection,I=a.settings,x=a.parser,p=a.serializer,F=tinymce.each;function B(O,N){try{a.getDoc().execCommand(O,false,N)}catch(M){}}function o(){var M=a.getDoc().documentMode;return M?M:6}function A(M){return M.isDefaultPrevented()}function K(){function M(S){var O,Q,N,T,P,R,U;function V(){if(P.nodeType==3){if(S&&R==P.length){return true}if(!S&&R===0){return true}}}O=m.getRng();var W=[O.startContainer,O.startOffset,O.endContainer,O.endOffset];if(!O.collapsed){S=true}P=O[(S?"start":"end")+"Container"];R=O[(S?"start":"end")+"Offset"];if(P.nodeType==3){Q=e.getParent(O.startContainer,e.isBlock);if(S){Q=e.getNext(Q,e.isBlock)}if(Q&&(V()||!O.collapsed)){N=e.create("em",{id:"__mceDel"});F(tinymce.grep(Q.childNodes),function(X){N.appendChild(X)});Q.appendChild(N)}}O=e.createRng();O.setStart(W[0],W[1]);O.setEnd(W[2],W[3]);m.setRng(O);a.getDoc().execCommand(S?"ForwardDelete":"Delete",false,null);if(N){T=m.getBookmark();while(U=e.get("__mceDel")){e.remove(U,true)}m.moveToBookmark(T)}}a.onKeyDown.add(function(N,P){var O;O=P.keyCode==k;if(!A(P)&&(O||P.keyCode==f)&&!j.modifierPressed(P)){P.preventDefault();M(O)}});a.addCommand("Delete",function(){M()})}function r(){function M(P){var O=e.create("body");var Q=P.cloneContents();O.appendChild(Q);return m.serializer.serialize(O,{format:"html"})}function N(O){var Q=M(O);var R=e.createRng();R.selectNode(a.getBody());var P=M(R);return Q===P}a.onKeyDown.add(function(P,R){var Q=R.keyCode,O;if(!A(R)&&(Q==k||Q==f)){O=P.selection.isCollapsed();if(O&&!e.isEmpty(P.getBody())){return}if(tinymce.isIE&&!O){return}if(!O&&!N(P.selection.getRng())){return}P.setContent("");P.selection.setCursorLocation(P.getBody(),0);P.nodeChanged()}})}function J(){a.onKeyDown.add(function(M,N){if(!A(N)&&N.keyCode==65&&j.metaKeyPressed(N)){N.preventDefault();M.execCommand("SelectAll")}})}function L(){if(!a.settings.content_editable){e.bind(a.getDoc(),"focusin",function(M){m.setRng(m.getRng())});e.bind(a.getDoc(),"mousedown",function(M){if(M.target==a.getDoc().documentElement){a.getWin().focus();m.setRng(m.getRng())}})}}function C(){a.onKeyDown.add(function(M,P){if(!A(P)&&P.keyCode===f){if(m.isCollapsed()&&m.getRng(true).startOffset===0){var O=m.getNode();var N=O.previousSibling;if(N&&N.nodeName&&N.nodeName.toLowerCase()==="hr"){e.remove(N);tinymce.dom.Event.cancel(P)}}}})}function z(){if(!Range.prototype.getClientRects){a.onMouseDown.add(function(N,O){if(!A(O)&&O.target.nodeName==="HTML"){var M=N.getBody();M.blur();setTimeout(function(){M.focus()},0)}})}}function h(){a.onClick.add(function(M,N){N=N.target;if(/^(IMG|HR)$/.test(N.nodeName)){m.getSel().setBaseAndExtent(N,0,N,1)}if(N.nodeName=="A"&&e.hasClass(N,"mceItemAnchor")){m.select(N)}M.nodeChanged()})}function c(){function N(){var P=e.getAttribs(m.getStart().cloneNode(false));return function(){var Q=m.getStart();if(Q!==a.getBody()){e.setAttrib(Q,"style",null);F(P,function(R){Q.setAttributeNode(R.cloneNode(true))})}}}function M(){return !m.isCollapsed()&&e.getParent(m.getStart(),e.isBlock)!=e.getParent(m.getEnd(),e.isBlock)}function O(P,Q){Q.preventDefault();return false}a.onKeyPress.add(function(P,R){var Q;if(!A(R)&&(R.keyCode==8||R.keyCode==46)&&M()){Q=N();P.getDoc().execCommand("delete",false,null);Q();R.preventDefault();return false}});e.bind(a.getDoc(),"cut",function(Q){var P;if(!A(Q)&&M()){P=N();a.onKeyUp.addToTop(O);setTimeout(function(){P();a.onKeyUp.remove(O)},0)}})}function b(){var N,M;e.bind(a.getDoc(),"selectionchange",function(){if(M){clearTimeout(M);M=0}M=window.setTimeout(function(){var O=m.getRng();if(!N||!tinymce.dom.RangeUtils.compareRanges(O,N)){a.nodeChanged();N=O}},50)})}function y(){document.body.setAttribute("role","application")}function u(){a.onKeyDown.add(function(M,O){if(!A(O)&&O.keyCode===f){if(m.isCollapsed()&&m.getRng(true).startOffset===0){var N=m.getNode().previousSibling;if(N&&N.nodeName&&N.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(O)}}}})}function D(){if(o()>7){return}B("RespectVisibilityInDesign",true);a.contentStyles.push(".mceHideBrInPre pre br {display: none}");e.addClass(a.getBody(),"mceHideBrInPre");x.addNodeFilter("pre",function(M,O){var P=M.length,R,N,S,Q;while(P--){R=M[P].getAll("br");N=R.length;while(N--){S=R[N];Q=S.prev;if(Q&&Q.type===3&&Q.value.charAt(Q.value-1)!="\n"){Q.value+="\n"}else{S.parent.insert(new tinymce.html.Node("#text",3),S,true).value="\n"}}}});p.addNodeFilter("pre",function(M,O){var P=M.length,R,N,S,Q;while(P--){R=M[P].getAll("br");N=R.length;while(N--){S=R[N];Q=S.prev;if(Q&&Q.type==3){Q.value=Q.value.replace(/\r?\n$/,"")}}}})}function g(){e.bind(a.getBody(),"mouseup",function(O){var N,M=m.getNode();if(M.nodeName=="IMG"){if(N=e.getStyle(M,"width")){e.setAttrib(M,"width",N.replace(/[^0-9%]+/g,""));e.setStyle(M,"width","")}if(N=e.getStyle(M,"height")){e.setAttrib(M,"height",N.replace(/[^0-9%]+/g,""));e.setStyle(M,"height","")}}})}function d(){a.onKeyDown.add(function(S,T){var R,M,N,P,Q,U,O;R=T.keyCode==k;if(!A(T)&&(R||T.keyCode==f)&&!j.modifierPressed(T)){M=m.getRng();N=M.startContainer;P=M.startOffset;O=M.collapsed;if(N.nodeType==3&&N.nodeValue.length>0&&((P===0&&!O)||(O&&P===(R?0:1)))){U=N.previousSibling;if(U&&U.nodeName=="IMG"){return}nonEmptyElements=S.schema.getNonEmptyElements();T.preventDefault();Q=e.create("br",{id:"__tmp"});N.parentNode.insertBefore(Q,N);S.getDoc().execCommand(R?"ForwardDelete":"Delete",false,null);N=m.getRng().startContainer;U=N.previousSibling;if(U&&U.nodeType==1&&!e.isBlock(U)&&e.isEmpty(U)&&!nonEmptyElements[U.nodeName.toLowerCase()]){e.remove(U)}e.remove("__tmp")}}})}function H(){a.onKeyDown.add(function(Q,R){var O,N,S,M,P;if(A(R)||R.keyCode!=j.BACKSPACE){return}O=m.getRng();N=O.startContainer;S=O.startOffset;M=e.getRoot();P=N;if(!O.collapsed||S!==0){return}while(P&&P.parentNode&&P.parentNode.firstChild==P&&P.parentNode!=M){P=P.parentNode}if(P.tagName==="BLOCKQUOTE"){Q.formatter.toggle("blockquote",null,P);O=e.createRng();O.setStart(N,0);O.setEnd(N,0);m.setRng(O)}})}function G(){function M(){a._refreshContentEditable();B("StyleWithCSS",false);B("enableInlineTableEditing",false);if(!I.object_resizing){B("enableObjectResizing",false)}}if(!I.readonly){a.onBeforeExecCommand.add(M);a.onMouseDown.add(M)}}function t(){function M(N,O){F(e.select("a"),function(R){var P=R.parentNode,Q=e.getRoot();if(P.lastChild===R){while(P&&!e.isBlock(P)){if(P.parentNode.lastChild!==P||P===Q){return}P=P.parentNode}e.add(P,"br",{"data-mce-bogus":1})}})}a.onExecCommand.add(function(N,O){if(O==="CreateLink"){M(N)}});a.onSetContent.add(m.onSetContent.add(M))}function n(){if(I.forced_root_block){a.onInit.add(function(){B("DefaultParagraphSeparator",I.forced_root_block)})}}function q(){function M(O,N){if(!O||!N.initial){a.execCommand("mceRepaint")}}a.onUndo.add(M);a.onRedo.add(M);a.onSetContent.add(M)}function i(){a.onKeyDown.add(function(N,O){var M;if(!A(O)&&O.keyCode==f){M=N.getDoc().selection.createRange();if(M&&M.item){O.preventDefault();N.undoManager.beforeChange();e.remove(M.item(0));N.undoManager.add()}}})}function s(){var M;if(o()>=10){M="";F("p div h1 h2 h3 h4 h5 h6".split(" "),function(N,O){M+=(O>0?",":"")+N+":empty"});a.contentStyles.push(M+"{padding-right: 1px !important}")}}function v(){var O,N,ae,M,Z,ac,aa,ad,P,Q,ab,X,W,Y=document,U=a.getDoc();if(!I.object_resizing||I.webkit_fake_resize===false){return}B("enableObjectResizing",false);ab={n:[0.5,0,0,-1],e:[1,0.5,1,0],s:[0.5,1,0,1],w:[0,0.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};function S(ai){var ah,ag;ah=ai.screenX-ac;ag=ai.screenY-aa;X=ah*Z[2]+ad;W=ag*Z[3]+P;X=X<5?5:X;W=W<5?5:W;if(j.modifierPressed(ai)||(ae.nodeName=="IMG"&&Z[2]*Z[3]!==0)){X=Math.round(W/Q);W=Math.round(X*Q)}e.setStyles(M,{width:X,height:W});if(Z[2]<0&&M.clientWidth<=X){e.setStyle(M,"left",O+(ad-X))}if(Z[3]<0&&M.clientHeight<=W){e.setStyle(M,"top",N+(P-W))}}function af(){function ag(ah,ai){if(ai){if(ae.style[ah]||!a.schema.isValid(ae.nodeName.toLowerCase(),ah)){e.setStyle(ae,ah,ai)}else{e.setAttrib(ae,ah,ai)}}}ag("width",X);ag("height",W);e.unbind(U,"mousemove",S);e.unbind(U,"mouseup",af);if(Y!=U){e.unbind(Y,"mousemove",S);e.unbind(Y,"mouseup",af)}e.remove(M);R(ae)}function R(aj){var ah,ai,ag;T();ah=e.getPos(aj);O=ah.x;N=ah.y;ai=aj.offsetWidth;ag=aj.offsetHeight;if(ae!=aj){ae=aj;X=W=0}F(ab,function(am,ak){var al;al=e.get("mceResizeHandle"+ak);if(!al){al=e.add(U.documentElement,"div",{id:"mceResizeHandle"+ak,"class":"mceResizeHandle",style:"cursor:"+ak+"-resize; margin:0; padding:0"});e.bind(al,"mousedown",function(an){an.preventDefault();af();ac=an.screenX;aa=an.screenY;ad=ae.clientWidth;P=ae.clientHeight;Q=P/ad;Z=am;M=ae.cloneNode(true);e.addClass(M,"mceClonedResizable");e.setStyles(M,{left:O,top:N,margin:0});U.documentElement.appendChild(M);e.bind(U,"mousemove",S);e.bind(U,"mouseup",af);if(Y!=U){e.bind(Y,"mousemove",S);e.bind(Y,"mouseup",af)}})}else{e.show(al)}e.setStyles(al,{left:(ai*am[0]+O)-(al.offsetWidth/2),top:(ag*am[1]+N)-(al.offsetHeight/2)})});if(!tinymce.isOpera&&ae.nodeName=="IMG"){ae.setAttribute("data-mce-selected","1")}}function T(){if(ae){ae.removeAttribute("data-mce-selected")}for(var ag in ab){e.hide("mceResizeHandle"+ag)}}a.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}");function V(){var ag=e.getParent(m.getNode(),"table,img");F(e.select("img[data-mce-selected]"),function(ah){ah.removeAttribute("data-mce-selected")});if(ag){R(ag)}else{T()}}a.onNodeChange.add(V);e.bind(U,"selectionchange",V);a.serializer.addAttributeFilter("data-mce-selected",function(ag,ah){var ai=ag.length;while(ai--){ag[ai].attr(ah,null)}})}function E(){if(o()<9){x.addNodeFilter("noscript",function(M){var N=M.length,O,P;while(N--){O=M[N];P=O.firstChild;if(P){O.attr("data-mce-innertext",P.value)}}});p.addNodeFilter("noscript",function(M){var N=M.length,O,Q,P;while(N--){O=M[N];Q=M[N].firstChild;if(Q){Q.value=tinymce.html.Entities.decode(Q.value)}else{P=O.attributes.map["data-mce-innertext"];if(P){O.attr("data-mce-innertext",null);Q=new tinymce.html.Node("#text",3);Q.value=P;Q.raw=true;O.append(Q)}}}})}}function l(){a.contentStyles.push("body {min-height: 100px}");a.onClick.add(function(M,N){if(N.target.nodeName=="HTML"){a.execCommand("SelectAll");a.selection.collapse(true);a.nodeChanged()}})}u();H();r();if(tinymce.isWebKit){d();K();L();h();n();if(tinymce.isIDevice){b()}else{v();J()}}if(tinymce.isIE&&!tinymce.isIE11){C();y();D();g();i();s();E()}if(tinymce.isIE11){l()}if(tinymce.isGecko&&!tinymce.isIE11){C();z();c();G();t();q()}if(tinymce.isOpera){v()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n<m.length;n+=2){o=String.fromCharCode(parseInt(m[n],p));if(!g[o]){l="&"+m[n+1]+";";q[o]=l;q[l]=o}}return q}}a=e("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);j.html=j.html||{};j.html.Entities={encodeRaw:function(m,l){return m.replace(l?k:b,function(n){return g[n]||n})},encodeAllRaw:function(l){return(""+l).replace(f,function(m){return g[m]||m})},encodeNumeric:function(m,l){return m.replace(l?k:b,function(n){if(n.length>1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g<j.length;g++){a[j[g]]="\uFEFF"+g;a["\uFEFF"+g]=j[g]}function c(n,q,p,i){function o(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;if(z["border-image"]==="none"){delete z["border-image"]}F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u<s;u++){t=x[u];v=p[t];if(v!==e&&v.length>0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script noscript style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object script",z);textBlockElementsMap=m("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure");v=m("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup",textBlockElementsMap);function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K<G;K++){F=N.exec(L[K]);if(F){W=F[1];Q=F[2];E=F[3];X=F[4];O={};J=[];I={attributes:O,attributesOrder:J};if(W==="#"){I.paddEmpty=true}if(W==="-"){I.removeEmpty=true}if(S){for(ad in S){O[ad]=S[ad]}J.push.apply(J,H)}if(X){X=d(X,"|");for(Z=0,V=X.length;Z<V;Z++){F=R.exec(X[Z]);if(F){U={};ac=F[1];Y=F[2].replace(/::/g,":");W=F[3];T=F[4];if(ac==="!"){I.attributesRequired=I.attributesRequired||[];I.attributesRequired.push(Y);U.required=true}if(ac==="-"){delete O[Y];J.splice(f.inArray(J,Y),1);continue}if(W){if(W==="="){I.attributesDefault=I.attributesDefault||[];I.attributesDefault.push({name:Y,value:T});U.defaultValue=T}if(W===":"){I.attributesForced=I.attributesForced||[];I.attributesForced.push({name:Y,value:T});U.forcedValue=T}if(W==="<"){U.validValues=e(T,"?")}}if(M.test(Y)){I.attributePatterns=I.attributePatterns||[];U.pattern=i(Y);I.attributePatterns.push(U)}else{if(!O[Y]){J.push(Y)}O[Y]=U}}}}if(!S&&Q=="@"){S=O;H=J}if(E){I.outputName=Q;s[E]=I}if(M.test(Q)){I.pattern=i(Q);j.push(I)}else{s[Q]=I}}}}}function t(E){s={};j=[];C(E);g(y,function(G,F){k[F]=G.children})}function l(F){var E=/^(~)?(.+)$/;if(F){g(d(F),function(J){var H=E.exec(J),I=H[1]==="~",K=I?"span":"div",G=H[2];k[G]=k[K];p[G]=K;if(!I){v[G.toUpperCase()]={};v[G]={}}if(!s[G]){s[G]=s[K]}g(k,function(L,M){if(L[K]){L[G]=L[K]}})})}}function x(F){var E=/^([+\-]?)(\w+)\[([^\]]+)\]$/;if(F){g(d(F),function(J){var I=E.exec(J),G,H;if(I){H=I[1];if(H){G=k[I[2]]}else{G=k[I[2]]={"#comment":{}}}G=k[I[2]];g(d(I[3],"|"),function(K){if(H==="-"){delete G[K]}else{G[K]={}}})}})}}function B(E){var G=s[E],F;if(G){return G}F=j.length;while(F--){G=j[F];if(G.pattern.test(E)){return G}}}if(!A.valid_elements){g(y,function(F,E){s[E]={attributes:F.attributes,attributesOrder:F.attributesOrder};k[E]=F.children});if(A.schema!="html5"){g(d("strong/b,em/i"),function(E){E=d(E,"/");s[E[1]].outputName=E[0]})}s.img.attributesDefault=[{name:"alt",value:""}];g(d("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(E){if(s[E]){s[E].removeEmpty=true}});g(d("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(E){s[E].paddEmpty=true})}else{t(A.valid_elements)}l(A.custom_elements);x(A.valid_children);C(A.extended_valid_elements);x("+ol[ul|ol],+ul[ul|ol]");if(A.invalid_elements){f.each(f.explode(A.invalid_elements),function(E){if(s[E]){delete s[E]}})}if(!B("span")){C("span[!data-mce-type|*]")}u.children=k;u.styles=D;u.getBoolAttrs=function(){return r};u.getBlockElements=function(){return v};u.getTextBlockElements=function(){return textBlockElementsMap};u.getShortEndedElements=function(){return z};u.getSelfClosingElements=function(){return q};u.getNonEmptyElements=function(){return n};u.getWhiteSpaceElements=function(){return o};u.isValidChild=function(E,G){var F=k[E];return !!(F&&F[G])};u.isValid=function(F,E){var H,G,I=B(F);if(I){if(E){if(I.attributes[E]){return true}H=I.attributePatterns;if(H){G=H.length;while(G--){if(H[G].pattern.test(F)){return true}}}}else{return true}}return false};u.getElementRule=B;u.getCustomElements=function(){return p};u.addValidElements=C;u.setValidElements=t;u.addCustomElements=l;u.addValidChildren=x;u.elements=s}})(tinymce);(function(a){a.html.SaxParser=function(c,e){var b=this,d=function(){};c=c||{};b.schema=e=e||new a.html.Schema();if(c.fix_self_closing!==false){c.fix_self_closing=true}a.each("comment cdata text start end pi doctype".split(" "),function(f){if(f){b[f]=c[f]||d}});b.parse=function(E){var n=this,g,G=0,I,B,A=[],N,Q,C,r,z,s,M,H,O,v,m,k,t,R,o,P,F,S,L,f,J,l,D,K,h,x=0,j=a.html.Entities.decode,y,q;function u(T){var V,U;V=A.length;while(V--){if(A[V].name===T){break}}if(V>=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G<g.index){n.text(j(E.substr(G,g.index-G)))}if(I=g[6]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}u(I)}else{if(I=g[7]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}O=I in M;if(y&&J[I]&&A.length>0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G<E.length){n.text(j(E.substr(G)))}for(Q=A.length-1;Q>=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h<f;h++){j=m[h];if(j.name!=="id"){k[k.length]={name:j.name,value:j.value};k.map[j.name]=j.value}}n.attributes=k}n.value=g.value;n.shortEnded=g.shortEnded;return n},wrap:function(g){var f=this;f.parent.insert(g,f);g.append(f);return f},unwrap:function(){var f=this,h,g;for(h=f.firstChild;h;){g=h.next;f.insert(h,f,true);h=g}f.remove()},remove:function(){var f=this,h=f.parent,g=f.next,i=f.prev;if(h){if(h.firstChild===f){h.firstChild=g;if(g){g.prev=null}}else{i.next=g}if(h.lastChild===f){h.lastChild=i;if(i){i.next=null}}else{g.prev=i}f.parent=f.next=f.prev=null}return f},append:function(h){var f=this,g;if(h.parent){h.remove()}g=f.lastChild;if(g){g.next=h;h.prev=g;f.lastChild=h}else{f.lastChild=f.firstChild=h}h.parent=f;return h},insert:function(h,f,i){var g;if(h.parent){h.remove()}g=f.parent||this;if(i){if(f===g.firstChild){g.firstChild=h}else{f.prev.next=h}h.prev=f.prev;h.next=f;f.prev=h}else{if(f===g.lastChild){g.lastChild=h}else{f.next.prev=h}h.next=f.next;h.prev=f;f.next=h}h.parent=g;return h},getAll:function(g){var f=this,h,i=[];for(h=f.firstChild;h;h=a(h,f)){if(h.name===g){i.push(h)}}return i},empty:function(){var g=this,f,h,j;if(g.firstChild){f=[];for(j=g.firstChild;j;j=a(j,g)){f.push(j)}h=f.length;while(h--){j=f[h];j.parent=j.firstChild=j.lastChild=j.next=j.prev=null}}g.firstChild=g.lastChild=null;return g},isEmpty:function(k){var f=this,j=f.firstChild,h,g;if(j){do{if(j.type===1){if(j.attributes.map["data-mce-bogus"]){continue}if(k[j.name]){return false}h=j.attributes.length;while(h--){g=j.attributes[h].name;if(g==="name"||g.indexOf("data-mce-")===0){return false}}}if(j.type===8){return false}if((j.type===3&&!c.test(j.value))){return false}}while(j=a(j,f))}return true},walk:function(f){return a(this,null,f)}});d.extend(b,{create:function(g,f){var i,h;i=new b(g,e[g]||1);if(f){for(h in f){i.attr(h,f[h])}}return i}});d.html.Node=b})(tinymce);(function(b){var a=b.html.Node;b.html.DomParser=function(g,h){var f=this,e={},d=[],i={},c={};g=g||{};g.validate="validate" in g?g.validate:true;g.root_name=g.root_name||"body";f.schema=h=h||new b.html.Schema();function j(n){var p,q,y,x,A,o,r,l,u,v,k,t,m,z,s;t=b.makeMap("tr,td,th,tbody,thead,tfoot,table");k=h.getNonEmptyElements();m=h.getTextBlockElements();for(p=0;p<n.length;p++){q=n[p];if(!q.parent||q.fixed){continue}if(m[q.name]&&q.parent.name=="li"){z=q.next;while(z){if(m[z.name]){z.name="li";z.fixed=true;q.parent.insert(z,q.parent)}else{break}z=z.next}q.unwrap(q);continue}x=[q];for(y=q.parent;y&&!h.isValidChild(y.name,q.name)&&!t[y.name];y=y.parent){x.push(y)}if(y&&x.length>1){x.reverse();A=o=f.filterNode(x[0].clone());for(u=0;u<x.length-1;u++){if(h.isValidChild(o.name,x[u].name)){r=f.filterNode(x[u].clone());o.append(r)}else{r=o}for(l=x[u].firstChild;l&&l!=x[u+1];){s=l.next;r.append(l);l=s}o=r}if(!A.isEmpty(k)){y.insert(A,x[0],true);y.insert(q,A)}else{y.insert(q,x[0],true)}y=x[0];if(y.isEmpty(k)||y.firstChild===y.lastChild&&y.firstChild.name==="br"){y.empty().remove()}}else{if(q.parent){if(q.name==="li"){z=q.prev;if(z&&(z.name==="ul"||z.name==="ul")){z.append(q);continue}z=q.next;if(z&&(z.name==="ul"||z.name==="ul")){z.insert(q,z.firstChild,true);continue}q.wrap(f.filterNode(new a("ul",1)));continue}if(h.isValidChild(q.parent.name,"div")&&h.isValidChild("div",q.name)){q.wrap(f.filterNode(new a("div",1)))}else{if(q.name==="style"||q.name==="script"){q.empty().remove()}else{q.unwrap()}}}}}}f.filterNode=function(m){var l,k,n;if(k in e){n=i[k];if(n){n.push(m)}else{i[k]=[m]}}l=d.length;while(l--){k=d[l].name;if(k in m.attributes.map){n=c[k];if(n){n.push(m)}else{c[k]=[m]}}}return m};f.addNodeFilter=function(k,l){b.each(b.explode(k),function(m){var n=e[m];if(!n){e[m]=n=[]}n.push(l)})};f.addAttributeFilter=function(k,l){b.each(b.explode(k),function(m){var n;for(n=0;n<d.length;n++){if(d[n].name===m){d[n].callbacks.push(l);return}}d.push({name:m,callbacks:[l]})})};f.parse=function(v,m){var n,J,B,A,D,C,x,r,F,N,z,o,E,M=[],L,t,k,y,s,p,u,q;m=m||{};i={};c={};o=b.extend(b.makeMap("script,style,head,html,body,title,meta,param"),h.getBlockElements());u=h.getNonEmptyElements();p=h.children;z=g.validate;q="forced_root_block" in m?m.forced_root_block:g.forced_root_block;s=h.getWhiteSpaceElements();E=/^[ \t\r\n]+/;t=/[ \t\r\n]+$/;k=/[ \t\r\n]+/g;y=/^[ \t\r\n]+$/;function G(){var O=J.firstChild,l,P;while(O){l=O.next;if(O.type==3||(O.type==1&&O.name!=="p"&&!o[O.name]&&!O.attr("data-mce-type"))){if(!P){P=K(q,1);J.insert(P,O);P.append(O)}else{P.append(O)}}else{P=null}O=l}}function K(l,O){var P=new a(l,O),Q;if(l in e){Q=i[l];if(Q){Q.push(P)}else{i[l]=[P]}}return P}function I(P){var Q,l,O;for(Q=P.prev;Q&&Q.type===3;){l=Q.value.replace(t,"");if(l.length>0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D<C;D++){F[D](A,N,m)}}for(D=0,C=d.length;D<C;D++){F=d[D];if(F.name in c){A=c[F.name];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(x=0,r=F.callbacks.length;x<r;x++){F.callbacks[x](A,F.name,m)}}}}return J};if(g.remove_trailing_brs){f.addNodeFilter("br",function(n,m){var r,q=n.length,o,v=b.extend({},h.getBlockElements()),k=h.getNonEmptyElements(),t,s,p,u;v.body=1;for(r=0;r<q;r++){o=n[r];t=o.parent;if(v[o.parent.name]&&o===t.lastChild){p=o.prev;while(p){u=p.name;if(u!=="span"||p.attr("data-mce-type")!=="bookmark"){if(u!=="br"){break}if(u==="br"){o=null;break}}p=p.prev}if(o){o.remove();if(t.isEmpty(k)){elementRule=h.getElementRule(t.name);if(elementRule){if(elementRule.removeEmpty){t.remove()}else{if(elementRule.paddEmpty){t.empty().append(new b.html.Node("#text",3)).value="\u00a0"}}}}}}else{s=o;while(t.firstChild===s&&t.lastChild===s){s=t;if(v[t.name]){break}t=t.parent}if(s===t){textNode=new b.html.Node("#text",3);textNode.value="\u00a0";o.replace(textNode)}}}})}if(!g.allow_html_in_named_anchor){f.addAttributeFilter("id,name",function(k,l){var n=k.length,p,m,o,q;while(n--){q=k[n];if(q.name==="a"&&q.firstChild&&!q.attr("href")){o=q.parent;p=q.lastChild;do{m=p.prev;o.insert(p,q);p=m}while(p)}}})}}})(tinymce);tinymce.html.Writer=function(e){var c=[],a,b,d,f,g;e=e||{};a=e.indent;b=tinymce.makeMap(e.indent_before||"");d=tinymce.makeMap(e.indent_after||"");f=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities);g=e.element_format=="html";return{start:function(m,k,p){var n,j,h,o;if(a&&b[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n<j;n++){h=k[n];c.push(" ",h.name,'="',f(h.value,true),'"')}}if(!p||g){c[c.length]=">"}else{c[c.length]=" />"}if(p&&a&&d[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("</",h,">");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("<![CDATA[",h,"]]>")},comment:function(h){c.push("<!--",h,"-->")},pi:function(h,i){if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}if(a){c.push("\n")}},doctype:function(h){c.push("<!DOCTYPE",h,">",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n<m;n++){r=q.attributesOrder[n];if(r in s.map){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}for(n=0,m=s.length;n<m;n++){r=s[n].name;if(!(r in u.map)){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}s=u}e.start(k.name,s,o);if(!o){if((k=k.firstChild)){do{f(k)}while(k=k.next)}e.end(j)}}else{t(k)}}if(h.type==1&&!c.inner){f(h)}else{g[11](h)}return e.getContent()}}})(tinymce);tinymce.dom={};(function(b,h){var g=!!document.addEventListener;function c(k,j,l,i){if(k.addEventListener){k.addEventListener(j,l,i||false)}else{if(k.attachEvent){k.attachEvent("on"+j,l)}}}function e(k,j,l,i){if(k.removeEventListener){k.removeEventListener(j,l,i||false)}else{if(k.detachEvent){k.detachEvent("on"+j,l)}}}function a(n,l){var i,k=l||{};function j(){return false}function m(){return true}for(i in n){if(i!=="layerX"&&i!=="layerY"){k[i]=n[i]}}if(!k.target){k.target=k.srcElement||document}k.preventDefault=function(){k.isDefaultPrevented=m;if(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}}};k.stopPropagation=function(){k.isPropagationStopped=m;if(n){if(n.stopPropagation){n.stopPropagation()}else{n.cancelBubble=true}}};k.stopImmediatePropagation=function(){k.isImmediatePropagationStopped=m;k.stopPropagation()};if(!k.isDefaultPrevented){k.isDefaultPrevented=j;k.isPropagationStopped=j;k.isImmediatePropagationStopped=j}return k}function d(m,n,l){var k=m.document,j={type:"ready"};function i(){if(!l.domLoaded){l.domLoaded=true;n(j)}}if(k.readyState=="complete"){i();return}if(g){c(m,"DOMContentLoaded",i)}else{c(k,"readystatechange",function(){if(k.readyState==="complete"){e(k,"readystatechange",arguments.callee);i()}});if(k.documentElement.doScroll&&m===m.top){(function(){try{k.documentElement.doScroll("left")}catch(o){setTimeout(arguments.callee,0);return}i()})()}}c(m,"load",i)}function f(k){var q=this,p={},i,o,n,m,l;m="onmouseenter" in document.documentElement;n="onfocusin" in document.documentElement;l={mouseenter:"mouseover",mouseleave:"mouseout"};i=1;q.domLoaded=false;q.events=p;function j(t,x){var s,u,r,v;s=p[x][t.type];if(s){for(u=0,r=s.length;u<r;u++){v=s[u];if(v&&v.func.call(v.scope,t)===false){t.preventDefault()}if(t.isImmediatePropagationStopped()){return}}}}q.bind=function(x,A,D,E){var s,t,u,r,B,z,C,v=window;function y(F){j(a(F||v.event),s)}if(!x||x.nodeType===3||x.nodeType===8){return}if(!x[h]){s=i++;x[h]=s;p[s]={}}else{s=x[h];if(!p[s]){p[s]={}}}E=E||x;A=A.split(" ");u=A.length;while(u--){r=A[u];z=y;B=C=false;if(r==="DOMContentLoaded"){r="ready"}if((q.domLoaded||x.readyState=="complete")&&r==="ready"){q.domLoaded=true;D.call(E,a({type:r}));continue}if(!m){B=l[r];if(B){z=function(F){var H,G;H=F.currentTarget;G=F.relatedTarget;if(G&&H.contains){G=H.contains(G)}else{while(G&&G!==H){G=G.parentNode}}if(!G){F=a(F||v.event);F.type=F.type==="mouseout"?"mouseleave":"mouseenter";F.target=H;j(F,s)}}}}if(!n&&(r==="focusin"||r==="focusout")){C=true;B=r==="focusin"?"focus":"blur";z=function(F){F=a(F||v.event);F.type=F.type==="focus"?"focusin":"focusout";j(F,s)}}t=p[s][r];if(!t){p[s][r]=t=[{func:D,scope:E}];t.fakeName=B;t.capture=C;t.nativeHandler=z;if(!g){t.proxyHandler=k(s)}if(r==="ready"){d(x,z,q)}else{c(x,B||r,g?z:t.proxyHandler,C)}}else{t.push({func:D,scope:E})}}x=t=0;return D};q.unbind=function(x,z,A){var s,u,v,B,r,t;if(!x||x.nodeType===3||x.nodeType===8){return q}s=x[h];if(s){t=p[s];if(z){z=z.split(" ");v=z.length;while(v--){r=z[v];u=t[r];if(u){if(A){B=u.length;while(B--){if(u[B].func===A){u.splice(B,1)}}}if(!A||u.length===0){delete t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}}}}else{for(r in t){u=t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}t={}}for(r in t){return q}delete p[s];try{delete x[h]}catch(y){x[h]=null}}return q};q.fire=function(u,s,r){var v,t;if(!u||u.nodeType===3||u.nodeType===8){return q}t=a(null,r);t.type=s;do{v=u[h];if(v){j(t,v)}u=u.parentNode||u.ownerDocument||u.defaultView||u.parentWindow}while(u&&!t.isPropagationStopped());return q};q.clean=function(u){var s,r,t=q.unbind;if(!u||u.nodeType===3||u.nodeType===8){return q}if(u[h]){t(u)}if(!u.getElementsByTagName){u=u.document}if(u&&u.getElementsByTagName){t(u);r=u.getElementsByTagName("*");s=r.length;while(s--){u=r[s];if(u[h]){t(u)}}}return q};q.callNativeHandler=function(s,r){if(p){p[s][r.type].nativeHandler(r)}};q.destory=function(){p={}};q.add=function(v,s,u,t){if(typeof(v)==="string"){v=document.getElementById(v)}if(v&&v instanceof Array){var r=v.length;while(r--){q.add(v[r],s,u,t)}return}if(s==="init"){s="ready"}return q.bind(v,s instanceof Array?s.join(" "):s,u,t)};q.remove=function(v,s,u,t){if(!v){return q}if(typeof(v)==="string"){v=document.getElementById(v)}if(v instanceof Array){var r=v.length;while(r--){q.remove(v[r],s,u,t)}return q}return q.unbind(v,s instanceof Array?s.join(" "):s,u)};q.clear=function(r){if(typeof(r)==="string"){r=document.getElementById(r)}return q.clean(r)};q.cancel=function(r){if(r){q.prevent(r);q.stop(r)}return false};q.prevent=function(r){if(!r.preventDefault){r=a(r)}r.preventDefault();return false};q.stop=function(r){if(!r.stopPropagation){r=a(r)}r.stopPropagation();return false}}b.EventUtils=f;b.Event=new f(function(i){return function(j){tinymce.dom.Event.callNativeHandler(i,j)}});b.Event.bind(window,"ready",function(){});b=0})(tinymce.dom,"data-mce-expando");tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(e){var g=e.each,d=e.is,f=e.isWebKit,b=e.isIE,h=e.html.Entities,c=/^([a-z0-9],?)+$/i,a=/^[ \t\r\n]*$/;e.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(o,l){var k=this,i,j,n;k.doc=o;k.win=window;k.files={};k.cssFlicker=false;k.counter=0;k.stdMode=!e.isIE||o.documentMode>=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){if(!q){return false}var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&!e.isIE11&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||e.isIE11||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+"</"+q+">"}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b&&!e.isIE11){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":(b&&!e.isIE11)?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&!e.isIE11&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="<br />"+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="<br />"+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(t){switch(t.type||1){case 1:if(t.selectorText){g(t.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:try{q(t.styleSheet)}catch(s){}break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab<aa){return -1}return 1}ac=X;while(ac&&ac.parentNode!=Z){ac=ac.parentNode}if(ac){Y=0;t=Z.firstChild;while(t!=ac&&Y<ab){Y++;t=t.nextSibling}if(ab<=Y){return -1}return 1}ac=Z;while(ac&&ac.parentNode!=X){ac=ac.parentNode}if(ac){Y=0;t=X.firstChild;while(t!=ac&&Y<aa){Y++;t=t.nextSibling}if(Y<aa){return -1}return 1}ad=c.findCommonAncestor(Z,X);af=Z;while(af&&af.parentNode!=ad){af=af.parentNode}if(!af){af=ad}ae=X;while(ae&&ae.parentNode!=ad){ae=ae.parentNode}if(!ae){ae=ad}if(af==ae){return 0}t=ad.firstChild;while(t){if(t==af){return -1}if(t==ae){return 1}t=t.nextSibling}}function C(X,aa,Z){var t,Y;if(X){O[h]=aa;O[W]=Z}else{O[Q]=aa;O[A]=Z}t=O[Q];while(t.parentNode){t=t.parentNode}Y=O[h];while(Y.parentNode){Y=Y.parentNode}if(Y==t){if(H(O[h],O[W],O[Q],O[A])>0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,v,q,t,s=d.dom.doc,m=s.body,r,u;function j(C){var y,B,x,A,z;x=h.create("a");y=C?k:v;B=C?p:q;A=n.duplicate();if(y==s||y==s.documentElement){y=m;B=0}if(y.nodeType==3){y.parentNode.insertBefore(x,y);A.moveToElementText(x);A.moveStart("character",B);h.remove(x);n.setEndPoint(C?"StartToStart":"EndToEnd",A)}else{z=y.childNodes;if(z.length){if(B>=z.length){h.insertAfter(x,z[z.length-1])}else{y.insertBefore(x,z[B])}A.moveToElementText(x)}else{if(y.canHaveHTML){y.innerHTML="<span>\uFEFF</span>";x=y.firstChild;A.moveToElementText(x);A.collapse(f)}}n.setEndPoint(C?"StartToStart":"EndToEnd",A);h.remove(x)}}k=i.startContainer;p=i.startOffset;v=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==v&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){t=k.previousSibling;if(t&&!t.hasChildNodes()&&h.isBlock(t)){t.innerHTML="\uFEFF"}else{t=null}k.innerHTML="<span>\uFEFF</span><span>\uFEFF</span>";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(t){t.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{u=k.childNodes[p];l=m.createControlRange();l.addElement(u);l.select();r=d.getRng();if(r.item&&u===r.item(0)){return}}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e<y.length;e++){if(y[e]===y[e-1]){y.splice(e--,1)}}}}return y};d.matches=function(e,y){return d(e,null,null,y)};d.matchesSelector=function(e,y){return d(y,null,null,[e]).length>0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z<B;z++){C=k.order[z];if((A=k.leftMatch[C].exec(E))){y=A[1];A.splice(1,1);if(y.substr(y.length-1)!=="\\"){A[1]=(A[1]||"").replace(q,"");D=k.find[C](A,e,F);if(D!=null){E=E.replace(k.match[C],"");break}}}}if(!D){D=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:D,expr:E}};d.filter=function(I,H,L,B){var D,e,G,N,K,y,A,C,J,z=I,M=[],F=H,E=H&&H[0]&&d.isXML(H[0]);while(I&&H.length){for(G in k.filter){if((D=k.leftMatch[G].exec(I))!=null&&D[2]){y=k.filter[G];A=D[1];e=false;D.splice(1,1);if(A.substr(A.length-1)==="\\"){continue}if(F===M){M=[]}if(k.preFilter[G]){D=k.preFilter[G](D,F,L,M,B,E);if(!D){e=N=true}else{if(D===true){continue}}}if(D){for(C=0;(K=F[C])!=null;C++){if(K){N=y(K,D,C,F);J=B^N;if(L&&N!=null){if(J){e=true}else{F[C]=false}}else{if(J){M.push(K);e=true}}}}}if(N!==undefined){if(!L){F=M}I=I.replace(k.match[G],"");if(!e){return[]}break}}}if(I===z){if(e==null){d.error(I)}else{break}}z=I}return F};d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var b=d.getText=function(B){var z,A,e=B.nodeType,y="";if(e){if(e===1||e===9||e===11){if(typeof B.textContent==="string"){return B.textContent}else{if(typeof B.innerText==="string"){return B.innerText.replace(u,"")}else{for(B=B.firstChild;B;B=B.nextSibling){y+=b(B)}}}}else{if(e===3||e===4){return B.nodeValue}}}else{for(z=0;(A=B[z]);z++){if(A.nodeType!==8){y+=b(A)}}}return y};var k=d.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(D,y){var A=typeof y==="string",C=A&&!x.test(y),E=A&&!C;if(C){y=y.toLowerCase()}for(var z=0,e=D.length,B;z<e;z++){if((B=D[z])){while((B=B.previousSibling)&&B.nodeType!==1){}D[z]=E||B&&B.nodeName.toLowerCase()===y?B||false:B===y}}if(E){d.filter(y,D,true)}},">":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z<e;z++){C=D[z];if(C){var A=C.parentNode;D[z]=A.nodeName.toLowerCase()===y?A:false}}}else{for(;z<e;z++){C=D[z];if(C){D[z]=B?C.parentNode:C.parentNode===y}}if(B){d.filter(y,D,true)}}},"":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("parentNode",y,z,A,B,C)},"~":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("previousSibling",y,z,A,B,C)}},find:{ID:function(y,z,A){if(typeof z.getElementById!=="undefined"&&!A){var e=z.getElementById(y[1]);return e&&e.parentNode?[e]:[]}},NAME:function(z,C){if(typeof C.getElementsByName!=="undefined"){var y=[],B=C.getElementsByName(z[1]);for(var A=0,e=B.length;A<e;A++){if(B[A].getAttribute("name")===z[1]){y.push(B[A])}}return y.length===0?null:y}},TAG:function(e,y){if(typeof y.getElementsByTagName!=="undefined"){return y.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(A,y,z,e,D,E){A=" "+A[1].replace(q,"")+" ";if(E){return A}for(var B=0,C;(C=y[B])!=null;B++){if(C){if(D^(C.className&&(" "+C.className+" ").replace(/[\t\n\r]/g," ").indexOf(A)>=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return y<e[3]-0},gt:function(z,y,e){return y>e[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C<B;C++){if(A[C]===z){return false}}return true}else{d.error(e)}}}},CHILD:function(z,B){var A,H,D,G,e,C,F,E=B[1],y=z;switch(E){case"only":case"first":while((y=y.previousSibling)){if(y.nodeType===1){return false}}if(E==="first"){return true}y=z;case"last":while((y=y.nextSibling)){if(y.nodeType===1){return false}}return true;case"nth":A=B[2];H=B[3];if(A===1&&H===0){return true}D=B[0];G=z.parentNode;if(G&&(G[i]!==D||!z.nodeIndex)){C=0;for(y=G.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++C}}G[i]=D}F=z.nodeIndex-H;if(A===0){return F===0}else{return(F%A===0&&F/A>=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z<e;z++){y.push(B[z])}}else{for(;B[z];z++){y.push(B[z])}}}return y}}var p,m;if(document.documentElement.compareDocumentPosition){p=function(y,e){if(y===e){h=true;return 0}if(!y.compareDocumentPosition||!e.compareDocumentPosition){return y.compareDocumentPosition?-1:1}return y.compareDocumentPosition(e)&4?-1:1}}else{p=function(F,E){if(F===E){h=true;return 0}else{if(F.sourceIndex&&E.sourceIndex){return F.sourceIndex-E.sourceIndex}}var C,y,z=[],e=[],B=F.parentNode,D=E.parentNode,G=B;if(B===D){return m(F,E)}else{if(!B){return -1}else{if(!D){return 1}}}while(G){z.unshift(G);G=G.parentNode}G=D;while(G){e.unshift(G);G=G.parentNode}C=z.length;y=e.length;for(var A=0;A<C&&A<y;A++){if(z[A]!==e[A]){return m(z[A],e[A])}}return A===C?m(F,e[A],-1):m(z[A],E,1)};m=function(y,e,z){if(y===e){return z}var A=y.nextSibling;while(A){if(A===e){return -1}A=A.nextSibling}return 1}}(function(){var y=document.createElement("div"),z="script"+(new Date()).getTime(),e=document.documentElement;y.innerHTML="<a name='"+z+"'/>";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="<p class='TEST'></p>";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1&&!F){e[i]=C;e.sizset=A}if(e.nodeName.toLowerCase()===D){B=e;break}e=e[y]}G[A]=B}}}function t(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1){if(!F){e[i]=C;e.sizset=A}if(typeof D!=="string"){if(e===D){B=true;break}}else{if(d.filter(D,[e]).length>0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A<y;A++){d(z,F[A],E,D)}return d.filter(B,E)};window.tinymce.dom.Sizzle=d})();(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j<arguments.length;j++){h.push(arguments[j])}h=e[g].apply(e,h);b.update(g);return h}});a.extend(b,{on:function(i,h,g){return a.dom.Event.add(b.id,i,h,g)},getXY:function(){return{x:parseInt(b.getStyle("left")),y:parseInt(b.getStyle("top"))}},getSize:function(){var g=e.get(b.id);return{w:parseInt(b.getStyle("width")||g.clientWidth),h:parseInt(b.getStyle("height")||g.clientHeight)}},moveTo:function(g,h){b.setStyles({left:g,top:h})},moveBy:function(g,i){var h=b.getXY();b.moveTo(h.x+g,h.y+i)},resizeTo:function(g,i){b.setStyles({width:g,height:i})},resizeBy:function(g,j){var i=b.getSize();b.resizeTo(i.w+g,i.h+j)},update:function(h){var g;if(a.isIE6&&d.blocker){h=h||"";if(h.indexOf("get")===0||h.indexOf("has")===0||h.indexOf("is")===0){return}if(h=="remove"){e.remove(b.blocker);return}if(!b.blocker){b.blocker=e.uniqueId();g=e.add(d.container||e.getRoot(),"iframe",{id:b.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});e.setStyle(g,"opacity",0)}else{g=e.get(b.blocker)}e.setStyles(g,{left:b.getStyle("left",1),top:b.getStyle("top",1),width:b.getStyle("width",1),height:b.getStyle("height",1),display:b.getStyle("display",1),zIndex:parseInt(b.getStyle("zIndex",1)||0)-1})}}})}})(tinymce);(function(d){function f(g){return g.replace(/[\n\r]+/g,"")}var c=d.is,b=d.isIE,e=d.each,a=d.dom.TreeWalker;d.create("tinymce.dom.Selection",{Selection:function(k,j,i,h){var g=this;g.dom=k;g.win=j;g.serializer=i;g.editor=h;e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(l){g[l]=new d.util.Dispatcher(g)});if(!g.win.getSelection){g.tridentSel=new d.dom.TridentSelection(g)}if(d.isIE&&!d.isIE11&&k.boxModel){this._fixIESelection()}d.addUnload(g.destroy,g)},setCursorLocation:function(i,j){var g=this;var h=g.dom.createRng();h.setStart(i,j);h.setEnd(i,j);g.setRng(h);g.collapse(false)},getContent:function(h){var g=this,i=g.getRng(),m=g.dom.create("body"),k=g.getSel(),j,l,o;h=h||{};j=l="";h.get=true;h.format=h.format||"html";h.forced_root_block="";g.onBeforeGetContent.dispatch(g,h);if(h.format=="text"){return g.isCollapsed()?"":(i.text||(k.toString?k.toString():""))}if(i.cloneContents){o=i.cloneContents();if(o){m.appendChild(o)}}else{if(c(i.item)||c(i.htmlText)){m.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='<span id="__caret">_</span>';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('<span id="__mce_tmp">_</span>'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){h=y.getRng();if(h.setStart){h={startContainer:h.startContainer,startOffset:h.startOffset,endContainer:h.endContainer,endOffset:h.endOffset}}return{rng:h}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_start" style="'+x+'">'+m+"</span>");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_end" style="'+x+'">'+m+"</span>")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(q){var v=this,n=v.dom,l,j,g,i,u,k,x,r,s;function h(C){var t=q[C?"start":"end"],z,A,B,y;if(t){B=t[0];for(A=u,z=t.length-1;z>=1;z--){y=A.childNodes;if(t[z]>y.length-1){return}A=y[t[z]]}if(A.nodeType===3){B=Math.min(t[0],A.nodeValue.length)}if(A.nodeType===1){B=Math.min(t[0],A.childNodes.length)}if(C){g.setStart(A,B)}else{g.setEnd(A,B)}}return true}function m(D){var y=n.get(q.id+"_"+D),C,t,A,B,z=q.keep;if(y){C=y.parentNode;if(D=="start"){if(!z){t=n.nodeIndex(y)}else{C=y.firstChild;t=1}k=x=C;r=s=t}else{if(!z){t=n.nodeIndex(y)}else{C=y.firstChild;t=1}x=C;s=t}if(!z){B=y.previousSibling;A=y.nextSibling;e(d.grep(y.childNodes),function(E){if(E.nodeType==3){E.nodeValue=E.nodeValue.replace(/\uFEFF/g,"")}});while(y=n.get(q.id+"_"+D)){n.remove(y,1)}if(B&&A&&B.nodeType==A.nodeType&&B.nodeType==3&&!d.isOpera){t=B.nodeValue.length;B.appendData(A.nodeValue);n.remove(A);if(D=="start"){k=x=B;r=s=t}else{x=B;s=t}}}}}function o(t){if(n.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='<br data-mce-bogus="1" />'}return t}if(q){if(q.start){g=n.createRng();u=n.getRoot();if(v.tridentSel){return v.tridentSel.moveToBookmark(q)}if(h(true)&&h()){v.setRng(g)}}else{if(q.id){m("start");m("end");if(k){g=n.createRng();g.setStart(o(k),r);g.setEnd(o(x),s);v.setRng(g)}}else{if(q.name){v.select(n.select(q.name)[q.index])}else{if(q.rng){g=q.rng;if(g.startContainer){i=v.dom.createRng();try{i.setStart(g.startContainer,g.startOffset);i.setEnd(g.endContainer,g.endOffset)}catch(p){}g=i}v.setRng(g)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&!d.isIE11&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},scrollIntoView:function(k){var j,h,g=this,i=g.dom;h=i.getViewPort(g.editor.getWin());j=i.getPos(k).y;if(j<h.y||j+25>h.y+h.h){g.editor.getWin().scrollTo(0,j<h.y?j:j-h.h+25)}},destroy:function(h){var g=this;g.win=null;if(!h){d.removeUnload(g.destroy)}},_fixIESelection:function(){var h=this.dom,n=h.doc,i=n.body,k,o,g;function j(p,s){var q=i.createTextRange();try{q.moveToPoint(p,s)}catch(r){q=null}return q}function m(q){var p;if(q.button){p=j(q.x,q.y);if(p){if(p.compareEndPoints("StartToStart",o)>0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("noscript",function(j){var k=j.length,l;while(k--){l=j[k].firstChild;if(l){l.value=a.html.Entities.decode(l.value)}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// <![CDATA[\n"+j(o)+"\n// ]]>"}}else{if(o.length>0){n.firstChild.value="<!--\n"+j(o)+"\n-->"}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE||a.isIE11){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&d<h.nodeValue.length){i=f(h,d);h=i.previousSibling;if(g>d){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d<h.nodeValue.length){h=f(h,d);d=0}if(i.nodeType==3&&g>0&&g<i.nodeValue.length){i=f(i,g).previousSibling;g=i.nodeValue.length}}return{startContainer:h,startOffset:d,endContainer:i,endOffset:g}}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var q=this,n=e.root,m=e.items,o=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,l=e.excludeFromTabOrder,k,h,p,d,g;f=f||b.DOM;k=function(r){g=r.target.id};h=function(r){f.setAttrib(r.target.id,"tabindex","-1")};d=function(r){var s=f.get(g);f.setAttrib(s,"tabindex","0");s.focus()};q.focus=function(){f.get(g).focus()};q.destroy=function(){c(m,function(s){var t=f.get(s.id);f.unbind(t,"focus",k);f.unbind(t,"blur",h)});var r=f.get(n);f.unbind(r,"focus",d);f.unbind(r,"keydown",p);m=f=n=q.focus=k=h=p=d=null;q.destroy=function(){}};q.moveFocus=function(v,s){var r=-1,u=q.controls,t;if(!g){return}c(m,function(y,x){if(y.id===g){r=x;return false}});r+=v;if(r<0){r=m.length-1}else{if(r>=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}a.cancel(z);break;case u:if(i){q.moveFocus(1)}a.cancel(z);break;case y:if(o){q.moveFocus(-1)}a.cancel(z);break;case A:if(o){q.moveFocus(1)}a.cancel(z);break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeight<j.max_height){c.setStyle(l,"overflow","hidden")}}},showMenu:function(p,n,r){var z=this,A=z.settings,o,g=c.getViewPort(),u,l,v,q,i=2,k,j,m=z.classPrefix;z.collapse(1);if(z.isMenuVisible){return}if(!z.rendered){o=c.add(z.settings.container,z.renderNode());f(z.items,function(h){h.postRender()});z.element=new b("menu_"+z.id,{blocker:1,container:A.container})}else{o=c.get("menu_"+z.id)}if(!e.isOpera){c.setStyles(o,{left:-65535,top:-65535})}c.show(o);z.update();p+=A.offset_x||0;n+=A.offset_y||0;g.w-=4;g.h-=4;if(A.constrain){u=o.clientWidth-i;l=o.clientHeight-i;v=g.x+g.w;q=g.y+g.h;if((p+A.vp_offset_x+u)>v){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+a.encode(e.title)+'">';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+='<span class="mceIcon '+e["class"]+'"><img class="mceIcon" src="'+e.image+'" alt="'+a.encode(e.title)+'" /></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+e.title+"</span>";d+="</a>";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keydown",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){b.dom.Event.cancel(f);return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='<span role="listbox" aria-haspopup="true" aria-labelledby="'+g.id+'_voiceDesc" aria-describedby="'+g.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+g.id+'" cellpadding="0" cellspacing="0" class="'+k+" "+k+"Enabled"+(i["class"]?(" "+i["class"]):"")+'"><tbody><tr>';j+="<td>"+d.createHTML("span",{id:g.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},g.settings.title);j+=d.createHTML("a",{id:g.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+"</td>";j+="<td>"+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span></span>')+"</td>";j+="</tr></tbody></table></span>";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(q){var n,p=37,m=39,l=38,r=40,k=13,o=32;b.remove(h.id,"change",i);j=false;n=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",n)});if(q.keyCode==k||q.keyCode==o){g(q);return b.cancel(q)}else{if(q.keyCode==r||q.keyCode==l){q.stopImmediatePropagation()}}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="<tbody><tr>";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span>');i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('<div id="'+f.id+'" role="group" aria-labelledby="'+f.id+'_voice">');i.push("<span role='application'>");i.push('<span id="'+f.id+'_voice" class="mceVoiceLabel" style="display:none;">'+d.encode(g.name)+"</span>");j(e,function(h){i.push(h.renderHTML())});i.push("</span>");i.push("</div>");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e<l.length;e++){k=l[e];d=l[e-1];g=l[e+1];if(e===0){j="mceToolbarStart";if(k.Button){j+=" mceToolbarStartButton"}else{if(k.SplitButton){j+=" mceToolbarStartSplitButton"}else{if(k.ListBox){j+=" mceToolbarStartListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,"<!-- IE -->"))}}if(c.stdMode){f+='<td style="position: relative">'+k.renderHTML()+"</td>"}else{f+="<td>"+k.renderHTML()+"</td>"}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,"<!-- IE -->"))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+f+"</tr></tbody>")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}if(!this.editors.hasOwnProperty(l)){return a}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l<o.length;l++){if(o[l]==n){o.splice(l,1);break}}if(m.activeEditor==n){m._setActive(o[0])}n.destroy();m.onRemoveEditor.dispatch(m,n);return n},execCommand:function(r,p,o){var q=this,n=q.get(o),l;function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}switch(r){case"mceFocus":n.focus();return true;case"mceAddEditor":case"mceAddControl":if(!q.get(o)){new j.Editor(o,q.settings).render()}return true;case"mceAddFrameControl":l=o.window;l.tinyMCE=tinyMCE;l.tinymce=j;j.DOM.doc=l.document;j.DOM.win=l;n=new j.Editor(o.element_id,o);n.render();if(j.isIE&&!j.isIE11){l.attachEvent("onunload",m)}o.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(n){n.remove()}return true;case"mceToggleEditor":if(!n){q.execCommand("mceAddControl",0,o);return true}if(n.isHidden()){n.show()}else{n.hide()}return true}if(q.activeEditor){return q.activeEditor.execCommand(r,p,o)}return false},execInstanceCommand:function(p,o,n,m){var l=this.get(p);if(l){return l.execCommand(o,n,m)}return false},triggerSave:function(){g(this.editors,function(l){l.save()})},addI18n:function(n,q){var l,m=this.i18n;if(!j.is(n,"string")){g(n,function(r,p){g(r,function(t,s){g(t,function(v,u){if(s==="common"){m[p+"."+u]=v}else{m[p+"."+s+"."+u]=v}})})})}else{g(q,function(r,p){m[n+"."+p]=r})}},_setActive:function(l){this.selectedInstance=this.activeEditor=l}})})(tinymce);(function(k){var l=k.DOM,j=k.dom.Event,f=k.extend,i=k.each,a=k.isGecko,b=k.isIE,e=k.isWebKit,d=k.is,h=k.ThemeManager,c=k.PluginManager,g=k.explode;k.create("tinymce.Editor",{Editor:function(p,o){var m=this,n=true;m.settings=o=f({id:p,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:k.documentBaseURL,add_form_submit_trigger:n,submit_patch:n,add_unload_trigger:n,convert_urls:n,relative_urls:n,remove_script_host:n,table_inline_editing:false,object_resizing:n,accessibility_focus:n,doctype:k.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y<z){y=z}}else{p=H.theme(G,C);if(p.editorContainer.nodeType){p.editorContainer=p.editorContainer.id=p.editorContainer.id||G.id+"_parent"}if(p.iframeContainer.nodeType){p.iframeContainer=p.iframeContainer.id=p.iframeContainer.id||G.id+"_iframecontainer"}y=p.iframeHeight||C.offsetHeight;if(b){G.onInit.add(function(n){n.dom.bind(n.getBody(),"beforedeactivate keydown keyup",function(){n.bookmark=n.selection.getBookmark(1)})});G.onNodeChange.add(function(n){if(document.activeElement.id==n.id+"_ifr"){n.bookmark=n.selection.getBookmark(1)}})}}G.editorContainer=p.editorContainer}if(H.content_css){i(g(H.content_css),function(n){G.contentCSS.push(G.documentBaseURI.toAbsolute(n))})}if(H.content_style){G.contentStyles.push(H.content_style)}if(H.content_editable){C=q=p=null;return G.initContentBody()}if(document.domain&&location.hostname!=document.domain){k.relaxedDomain=document.domain}G.iframeHTML=H.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+='<base href="'+G.documentBaseURI.getURI()+'" />'}if(k.isIE8){if(H.ie7_compat){G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'}else{G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />'}}G.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(x=0;x<G.contentCSS.length;x++){G.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+G.contentCSS[x]+'" />'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='</head><body id="'+v+'" class="mceContentBody '+B+'" onload="window.parent.tinyMCE.get(\''+G.id+"').onLoad.dispatch();\"><br></body></html>";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return"<!--mce:protected "+escape(x)+"-->"})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(<p[^>]*>( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.bookmark){t.moveToBookmark(u.bookmark);u.bookmark=null}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive&&!k.isIE11){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();l.hide(m.getContainer());l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'><br data-mce-bogus="1"></'+q+">"}else{r='<br data-mce-bogus="1">'}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(o){var n=this,p,m=n.getBody();o=o||{};o.format=o.format||"html";o.get=true;o.getInner=true;if(!o.no_events){n.onBeforeGetContent.dispatch(n,o)}if(o.format=="raw"){p=m.innerHTML}else{if(o.format=="text"){p=m.innerText||m.textContent}else{p=n.serializer.serialize(m,o)}}if(o.format!="text"){o.content=k.trim(p)}else{o.content=p}if(!o.no_events){n.onGetContent.dispatch(n,o)}return o.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,o=m.getContainer(),n=m.getDoc();if(!m.removed){m.removed=1;if(b&&n){n.execCommand("SelectAll")}m.save();l.setStyle(m.id,"display",m.orgDisplay);if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(o);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(o)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=p.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.y<L.y)||(C.x>L.x+L.w||C.x<L.x)){H=d.isIE?n.getDoc().documentElement:n.getBody();H.scrollLeft=C.x;H.scrollTop=C.y-L.h+25}x=m.createRng();A=D.previousSibling;if(A&&A.nodeType==3){x.setStart(A,A.nodeValue.length)}else{x.setStartBefore(D);x.setEndBefore(D)}m.remove(D);p.setRng(x);p.onSetContent.dispatch(p,G);n.addVisual()},mceInsertRawHTML:function(y,x,v){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return v}))},mceToggleFormat:function(y,x,v){s(v)},mceSetContent:function(y,x,v){n.setContent(v)},"Indent,Outdent":function(z){var x,v,y;x=k.indentation;v=/[a-z%]+$/i.exec(x);x=parseInt(x);if(!l("InsertUnorderedList")&&!l("InsertOrderedList")){if(!k.forced_root_block&&!m.getParent(p.getNode(),m.isBlock)){q.apply("div")}e(p.getSelectedBlocks(),function(A){if(z=="outdent"){y=Math.max(0,parseInt(A.style.paddingLeft||0)-x);m.setStyle(A,"paddingLeft",y?y+v:"")}else{m.setStyle(A,"paddingLeft",(parseInt(A.style.paddingLeft||0)+x)+v)}})}else{f(z)}},mceRepaint:function(){var x;if(d.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(v){}}},mceToggleFormat:function(y,x,v){q.toggle(v)},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",false,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();if(p.getRng().setStart){v.setStart(x,0);v.setEnd(x,x.childNodes.length);p.setRng(v)}else{f("SelectAll")}}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(x){var v=m.getParent(p.getNode(),"ul,ol");return v&&(x==="insertunorderedlist"&&v.tagName==="UL"||x==="insertorderedlist"&&v.tagName==="OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getBody(),"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m<e.length-1;m++){e[m]=e[m+1]}e.length--;i=e.length}}p.bookmark=h.selection.getBookmark(2,true);if(i<e.length-1){e.length=i+1}e.push(p);i=e.length-1;l.onAdd.dispatch(l,p);h.isNotDirty=0;return p},undo:function(){var n,m;if(l.typing){l.add();l.typing=false}if(i>0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i<e.length-1){m=e[++i];h.setContent(m.content,{format:"raw"});h.selection.moveToBookmark(m.bookmark);l.onRedo.dispatch(l,m)}return m},clear:function(){e=[];i=0;l.typing=false},hasUndo:function(){return i>0||this.typing},hasRedo:function(){return i<e.length-1&&!this.typing}};return l}})(tinymce);tinymce.ForceBlocks=function(c){var b=c.settings,e=c.dom,a=c.selection,d=c.schema.getBlockElements();function f(){var j=a.getStart(),h=c.getBody(),g,k,o,s,q,i,l,m=-16777215,p,r;if(!j||j.nodeType!==1||!b.forced_root_block){return}while(j&&j!=h){if(d[j.nodeName]){return}j=j.parentNode}g=a.getRng();if(g.setStart){k=g.startContainer;o=g.startOffset;s=g.endContainer;q=g.endOffset}else{if(g.item){j=g.item(0);g=c.getDoc().body.createTextRange();g.moveToElementText(j)}r=g.parentElement().ownerDocument===c.getDoc();tmpRng=g.duplicate();tmpRng.collapse(true);o=tmpRng.move("character",m)*-1;if(!tmpRng.collapsed){tmpRng=g.duplicate();tmpRng.collapse(false);q=(tmpRng.move("character",m)*-1)-o}}j=h.firstChild;while(j){if(j.nodeType===3||(j.nodeType==1&&!d[j.nodeName])){if(j.nodeType===3&&j.nodeValue.length==0){l=j;j=j.nextSibling;e.remove(l);continue}if(!i){i=e.create(b.forced_root_block);j.parentNode.insertBefore(i,j);p=true}l=j;j=j.nextSibling;i.appendChild(l)}else{i=null;j=j.nextSibling}}if(p){if(g.setStart){g.setStart(k,o);g.setEnd(s,q);a.setRng(g)}else{if(r){try{g=c.getDoc().body.createTextRange();g.moveToElementText(h);g.collapse(true);g.moveStart("character",o);if(q>0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k<g;k++){o=n[k].createControl(j,h);if(o){return h.add(o)}}if(j==="|"||j==="separator"){return h.createSeparator()}if(m.buttons&&(o=m.buttons[j])){return h.createButton(j,o)}return h.add(o)},createDropMenu:function(f,n,h){var m=this,i=m.editor,j,g,k,l;n=e({"class":"mceDropDown",constrain:i.settings.constrain_menus},n);n["class"]=n["class"]+" "+i.getParam("skin")+"Skin";if(k=i.getParam("skin_variant")){n["class"]+=" "+i.getParam("skin")+"Skin"+k.substring(0,1).toUpperCase()+k.substring(1)}n["class"]+=i.settings.directionality=="rtl"?" mceRtl":"";f=m.prefix+f;l=h||m._cls.dropmenu||c.ui.DropMenu;j=m.controls[f]=new l(f,n);j.onAddItem.add(function(r,q){var p=q.settings;p.title=i.getLang(p.title,p.title);if(!p.onclick){p.onclick=function(o){if(p.cmd){i.execCommand(p.cmd,p.ui||false,p.value)}}}});i.onRemove.add(function(){j.destroy()});if(c.isIE){j.onShowMenu.add(function(){i.focus();g=i.selection.getBookmark(1)});j.onHideMenu.add(function(){if(g){i.selection.moveToBookmark(g);g=0}})}return m.add(j)},createListBox:function(f,n,h){var l=this,j=l.editor,i,k,m;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,scope:n.scope,control_manager:l},n);f=l.prefix+f;function g(o){return o.settings.use_accessible_selects&&!c.isGecko}if(j.settings.use_native_selects||g(j)){k=new c.ui.NativeListBox(f,n)}else{m=h||l._cls.listbox||c.ui.ListBox;k=new m(f,n,j)}l.controls[f]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){j.bookmark=j.selection.getBookmark(1)});a.add(o,"focus",function(){j.selection.moveToBookmark(j.bookmark);j.bookmark=null})})}if(k.hideMenu){j.onMouseDown.add(k.hideMenu,k)}return l.add(k)},createButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.label=g.translate(i.label);i.scope=i.scope||g;if(!i.onclick&&!i.menu_button){i.onclick=function(){g.execCommand(i.cmd,i.ui||false,i.value)}}i=e({title:i.title,"class":"mce_"+m,unavailable_prefix:g.getLang("unavailable",""),scope:i.scope,control_manager:h},i);m=h.prefix+m;if(i.menu_button){f=l||h._cls.menubutton||c.ui.MenuButton;k=new f(m,i,g);g.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i,g)}return h.add(k)},createMenuButton:function(h,f,g){f=f||{};f.menu_button=1;return this.createButton(h,f,g)},createSplitButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.scope=i.scope||g;if(!i.onclick){i.onclick=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}if(!i.onselect){i.onselect=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}i=e({title:i.title,"class":"mce_"+m,scope:i.scope,control_manager:h},i);m=h.prefix+m;f=l||h._cls.splitbutton||c.ui.SplitButton;k=h.add(new f(m,i,g));g.onMouseDown.add(k.hideMenu,k);return k},createColorSplitButton:function(f,n,h){var l=this,j=l.editor,i,k,m,g;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onclick){n.onclick=function(o){if(c.isIE){g=j.selection.getBookmark(1)}j.execCommand(n.cmd,n.ui||false,o||n.value)}}if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,menu_class:j.getParam("skin")+"Skin",scope:n.scope,more_colors_title:j.getLang("more_colors")},n);f=l.prefix+f;m=h||l._cls.colorsplitbutton||c.ui.ColorSplitButton;k=new m(f,n,j);j.onMouseDown.add(k.hideMenu,k);j.onRemove.add(function(){k.destroy()});if(c.isIE){k.onShowMenu.add(function(){j.focus();g=j.selection.getBookmark(1)});k.onHideMenu.add(function(){if(g){j.selection.moveToBookmark(g);g=0}})}return l.add(k)},createToolbar:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||g._cls.toolbar||c.ui.Toolbar;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createToolbarGroup:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||this._cls.toolbarGroup||c.ui.ToolbarGroup;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createSeparator:function(g){var f=g||this._cls.separator||c.ui.Separator;return new f()},setControlType:function(g,f){return this._cls[g.toLowerCase()]=f},destroy:function(){d(this.controls,function(f){f.destroy()});this.controls=null}})})(tinymce);(function(d){var a=d.util.Dispatcher,e=d.each,c=d.isIE,b=d.isOpera;d.create("tinymce.WindowManager",{WindowManager:function(f){var g=this;g.editor=f;g.onOpen=new a(g);g.onClose=new a(g);g.params={};g.features={}},open:function(z,h){var v=this,k="",n,m,i=v.editor.settings.dialog_type=="modal",q,o,j,g=d.DOM.getViewPort(),r;z=z||{};h=h||{};o=b?g.w:screen.width;j=b?g.h:screen.height;z.name=z.name||"mc_"+new Date().getTime();z.width=parseInt(z.width||320);z.height=parseInt(z.height||240);z.resizable=true;z.left=z.left||parseInt(o/2)-(z.width/2);z.top=z.top||parseInt(j/2)-(z.height/2);h.inline=false;h.mce_width=z.width;h.mce_height=z.height;h.mce_auto_focus=z.auto_focus;if(i){if(c){z.center=true;z.help=false;z.dialogWidth=z.width+"px";z.dialogHeight=z.height+"px";z.scroll=z.scrollbars||false}}e(z,function(p,f){if(d.is(p,"boolean")){p=p?"yes":"no"}if(!/^(name|url)$/.test(f)){if(c&&i){k+=(k?";":"")+f+":"+p}else{k+=(k?",":"")+f+"="+p}}});v.features=z;v.params=h;v.onOpen.dispatch(v,z,h);r=z.url||z.file;r=d._addVer(r);try{if(c&&i){q=1;window.showModalDialog(r,window,k)}else{q=window.open(r,z.name,k)}}catch(l){}if(!q){alert(v.editor.getLang("popup_blocked"))}},close:function(f){f.close();this.onClose.dispatch(this)},createInstance:function(i,h,g,m,l,k){var j=d.resolve(i);return new j(h,g,m,l,k)},confirm:function(h,f,i,g){g=g||window;f.call(i||this,g.confirm(this._decode(this.editor.getLang(h,h))))},alert:function(h,f,j,g){var i=this;g=g||window;g.alert(i._decode(i.editor.getLang(h,h)));if(f){f.call(j||i)}},resizeBy:function(f,g,h){h.resizeBy(f,g)},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){a.Formatter=function(aa){var Q={},T=a.each,c=aa.dom,r=aa.selection,t=a.dom.TreeWalker,N=new a.dom.RangeUtils(c),d=aa.schema.isValidChild,A=a.isArray,H=c.isBlock,m=aa.settings.forced_root_block,s=c.nodeIndex,G="\uFEFF",e=/^(src|href|style)$/,X=false,C=true,P,D,x=c.getContentEditable;function I(ab){if(ab.nodeType){ab=ab.nodeName}return !!aa.schema.getTextBlockElements()[ab.toLowerCase()]}function n(ac,ab){return c.getParents(ac,ab,c.getRoot())}function b(ab){return ab.nodeType===1&&ab.id==="_mce_caret"}function j(){l({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(ab){return true},onformat:function(ad,ab,ac){T(ac,function(af,ae){c.setAttrib(ad,ae,af)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});T("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(ab){l(ab,{block:ab,remove:"all"})});l(aa.settings.formats)}function W(){aa.addShortcut("ctrl+b","bold_desc","Bold");aa.addShortcut("ctrl+i","italic_desc","Italic");aa.addShortcut("ctrl+u","underline_desc","Underline");for(var ab=1;ab<=6;ab++){aa.addShortcut("ctrl+"+ab,"",["FormatBlock",false,"h"+ab])}aa.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);aa.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);aa.addShortcut("ctrl+9","",["FormatBlock",false,"address"])}function V(ab){return ab?Q[ab]:Q}function l(ab,ac){if(ab){if(typeof(ab)!=="string"){T(ab,function(ae,ad){l(ad,ae)})}else{ac=ac.length?ac:[ac];T(ac,function(ad){if(ad.deep===D){ad.deep=!ad.selector}if(ad.split===D){ad.split=!ad.selector||ad.inline}if(ad.remove===D&&ad.selector&&!ad.inline){ad.remove="none"}if(ad.selector&&ad.inline){ad.mixed=true;ad.block_expand=true}if(typeof(ad.classes)==="string"){ad.classes=ad.classes.split(/\s+/)}});Q[ab]=ac}}}var i=function(ac){var ab;aa.dom.getParent(ac,function(ad){ab=aa.dom.getStyle(ad,"text-decoration");return ab&&ab!=="none"});return ab};var L=function(ab){var ac;if(ab.nodeType===1&&ab.parentNode&&ab.parentNode.nodeType===1){ac=i(ab.parentNode);if(aa.dom.getStyle(ab,"color")&&ac){aa.dom.setStyle(ab,"text-decoration",ac)}else{if(aa.dom.getStyle(ab,"textdecoration")===ac){aa.dom.setStyle(ab,"text-decoration",null)}}}};function Y(ae,al,ag){var ah=V(ae),am=ah[0],ak,ac,aj,ai=r.isCollapsed();function ab(aq,ap){ap=ap||am;if(aq){if(ap.onformat){ap.onformat(aq,ap,al,ag)}T(ap.styles,function(at,ar){c.setStyle(aq,ar,q(at,al))});T(ap.attributes,function(at,ar){c.setAttrib(aq,ar,q(at,al))});T(ap.classes,function(ar){ar=q(ar,al);if(!c.hasClass(aq,ar)){c.addClass(aq,ar)}})}}function af(){function ar(ay,aw){var ax=new t(aw);for(ag=ax.current();ag;ag=ax.prev()){if(ag.childNodes.length>1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aA<ar&&au>ar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aA<ar&&aB<ar)||(aA>ar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aA<ar){at.insertBefore(az,ax)}else{if(aA>ar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)&&(!am.inline||!H(aA))){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB<az.length;aB++){aA.appendChild(az[aB])}aC.appendChild(aA)}T(a.grep(aC.childNodes),ay)}ay(ax)})}T(ap,function(az){var ax;function aA(aC){var aB=0;T(aC.childNodes,function(aD){if(!f(aD)&&!K(aD)){aB++}});return aB}function ay(aB){var aD,aC;T(aB.childNodes,function(aE){if(aE.nodeType==1&&!K(aE)&&!b(aE)){aD=aE;return X}});if(aD&&h(aD,am)){aC=c.clone(aD,X);ab(aC);c.replace(aC,aB,C);c.remove(aD,1)}return aC||aB}ax=aA(az);if((ap.length>1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===3){return}if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at<ar;at++){if(Z(ag[at],am,av,av)){break}}}if(ao.deep){if(au.length){for(at=0,ar=au.length;at<ar;at++){ae(au[at])}if(aw){al=ax}}}}function ah(aq){var ar;T(n(aq.parentNode).reverse(),function(at){var au;if(!ar&&at.id!="_start"&&at.id!="_end"){au=y(at,ad,am);if(au&&au.split!==false){ar=at}}});return ar}function ab(au,aq,aw,az){var aA,ay,ax,at,av,ar;if(au){ar=au.parentNode;for(aA=aq.parentNode;aA&&aA!=ar;aA=aA.parentNode){ay=c.clone(aA,X);for(av=0;av<ag.length;av++){if(Z(ag[av],am,ay,ay)){ay=0;break}}if(ay){if(ax){ay.appendChild(ax)}if(!at){at=ay}ax=ay}}if(az&&(!ao.mixed||!H(au))){aq=c.split(au,aq)}if(ax){aw.parentNode.insertBefore(ax,aw);at.appendChild(aw)}}return aq}function an(aq){return ab(ah(aq),aq,aq,true)}function ai(at){var ar=c.get(at?"_start":"_end"),aq=ar[at?"firstChild":"lastChild"];if(K(aq)){aq=aq[at?"firstChild":"lastChild"]}c.remove(ar,true);return aq}function ap(aq){var at,au,ar;aq=p(aq,ag,C);if(ao.split){at=M(aq,C);au=M(aq);if(at!=au){if(/^(TR|TD)$/.test(at.nodeName)&&at.firstChild){at=(at.nodeName=="TD"?at.firstChild:at.firstChild.firstChild)||at}at=S(at,"span",{id:"_start","data-mce-type":"bookmark"});au=S(au,"span",{id:"_end","data-mce-type":"bookmark"});an(at);an(au);at=ai(C);au=ai()}else{at=au=an(at)}aq.startContainer=at.parentNode;aq.startOffset=s(at);aq.endContainer=au.parentNode;aq.endOffset=s(au)+1}N.walk(aq,function(av){T(av,function(aw){ae(aw);if(aw.nodeType===1&&aa.dom.getStyle(aw,"text-decoration")==="underline"&&aw.parentNode&&i(aw.parentNode)==="underline"){Z({deep:false,exact:true,inline:"span",styles:{textDecoration:"underline"}},null,aw)}})})}if(af){if(af.nodeType){ac=c.createRng();ac.setStartBefore(af);ac.setEndAfter(af);ap(ac)}else{ap(af)}return}if(!r.isCollapsed()||!ao.inline||c.select("td.mceSelected,th.mceSelected").length){ak=r.getBookmark();ap(r.getRng(C));r.moveToBookmark(ak);if(ao.inline&&k(ad,am,r.getStart())){R(r.getRng(true))}aa.nodeChanged()}else{U("remove",ad,am)}}function F(ac,ae,ad){var ab=V(ac);if(k(ac,ae,ad)&&(!("toggle" in ab[0])||ab[0].toggle)){B(ac,ae,ad)}else{Y(ac,ae,ad)}}function y(ac,ab,ah,af){var ad=V(ab),ai,ag,ae;function aj(an,ap,aq){var am,ao,ak=ap[aq],al;if(ap.onmatch){return ap.onmatch(an,ap,aq)}if(ak){if(ak.length===D){for(am in ak){if(ak.hasOwnProperty(am)){if(aq==="attributes"){ao=c.getAttrib(an,am)}else{ao=O(an,am)}if(af&&!ao&&!ap.exact){return}if((!af||ap.exact)&&!g(ao,q(ak[am],ah))){return}}}}else{for(al=0;al<ak.length;al++){if(aq==="attributes"?c.getAttrib(an,ak[al]):O(an,ak[al])){return ap}}}}return ap}if(ad&&ac){for(ag=0;ag<ad.length;ag++){ai=ad[ag];if(h(ac,ai)&&aj(ac,ai,"attributes")&&aj(ac,ai,"styles")){if(ae=ai.classes){for(ag=0;ag<ae.length;ag++){if(!c.hasClass(ac,ae[ag])){return}}}return ai}}}}function k(ad,af,ae){var ac;function ab(ag){ag=c.getParent(ag,function(ah){return !!y(ah,ad,af,true)});return y(ag,ad,af)}if(ae){return ab(ae)}ae=r.getNode();if(ab(ae)){return C}ac=r.getStart();if(ac!=ae){if(ab(ac)){return C}}return X}function v(ai,ah){var af,ag=[],ae={},ad,ac,ab;af=r.getStart();c.getParent(af,function(al){var ak,aj;for(ak=0;ak<ai.length;ak++){aj=ai[ak];if(!ae[aj]&&y(al,aj,ah)){ae[aj]=true;ag.push(aj)}}},c.getRoot());return ag}function z(af){var ah=V(af),ae,ad,ag,ac,ab;if(ah){ae=r.getStart();ad=n(ae);for(ac=ah.length-1;ac>=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ae,ac){var ad;if(!P){P={};ad={};aa.onNodeChange.addToTop(function(ag,af,ai){var ah=n(ai),aj={};T(P,function(ak,al){T(ah,function(am){if(y(am,al,{},ak.similar)){if(!ad[al]){T(ak,function(an){an(true,{node:am,format:al,parents:ah})});ad[al]=ak}aj[al]=ak;return false}})});T(ad,function(ak,al){if(!aj[al]){delete ad[al];T(ak,function(am){am(false,{node:ai,format:al,parents:ah})})}})})}T(ab.split(","),function(af){if(!P[af]){P[af]=[];P[af].similar=ac}P[af].push(ae)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(aA){var au,ax,az,aw,av,at;au=ax=aA?ad:ar;av=aA?"previousSibling":"nextSibling";at=c.getRoot();function ay(aB){return aB.nodeName=="BR"&&aB.getAttribute("data-mce-bogus")&&!aB.nextSibling}if(au.nodeType==3&&!f(au)){if(aA?ai>0:ak<au.nodeValue.length){return au}}for(;;){if(!am[0].block_expand&&H(ax)){return ax}for(aw=ax[av];aw;aw=aw[av]){if(!K(aw)&&!f(aw)&&!ay(aw)){return ax}}if(ax.parentNode==at){au=ax;break}ax=ax.parentNode}return au}function ag(at,au){if(au===D){au=at.nodeType===3?at.length:at.childNodes.length}while(at&&at.hasChildNodes()){at=at.childNodes[au];if(at){au=at.nodeType===3?at.length:at.childNodes.length}}return{node:at,offset:au}}if(ad.nodeType==1&&ad.hasChildNodes()){an=ad.childNodes.length-1;ad=ad.childNodes[ai>an?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF<aB)?aF:aB}return aF}if(au.nodeType===3){az=aw(au,ay);if(az!==-1){return{container:au,offset:az}}at=au}ax=new t(au,c.getParent(au,H)||aa.getBody());while(av=ax[aA?"prev":"next"]()){if(av.nodeType===3){at=av;az=aw(av);if(az!==-1){return{container:av,offset:az}}}else{if(H(av)){break}}}if(at){if(aA){ay=0}else{ay=at.length}return{container:at,offset:ay}}}function af(au,at){var av,aw,ay,ax;if(au.nodeType==3&&au.nodeValue.length===0&&au[at]){au=au[at]}av=n(au);for(aw=0;aw<av.length;aw++){for(ay=0;ay<am.length;ay++){ax=am[ay];if("collapsed" in ax&&ax.collapsed!==ab.collapsed){continue}if(c.is(av[aw],ax.selector)){return av[aw]}}}return au}function ac(au,at,aw){var av;if(!am[0].wrapper){av=c.getParent(au,am[0].block)}if(!av){av=c.getParent(au.nodeType==3?au.parentNode:au,I)}if(av&&am[0].wrapper){av=n(av,"ul,ol").reverse()[0]||av}if(!av){av=au;while(av[at]&&!H(av[at])){av=av[at];if(g(av,"br")){break}}}return av||au}ad=aq(ad);ar=aq(ar);if(K(ad.parentNode)||K(ad)){ad=K(ad)?ad:ad.parentNode;ad=ad.nextSibling||ad;if(ad.nodeType==3){ai=0}}if(K(ar.parentNode)||K(ar)){ar=K(ar)?ar:ar.parentNode;ar=ar.previousSibling||ar;if(ar.nodeType==3){ak=ar.length}}if(am[0].inline){if(ab.collapsed){al=aj(ad,ai,true);if(al){ad=al.container;ai=al.offset}al=aj(ar,ak);if(al){ar=al.container;ak=al.offset}}ah=ag(ar,ak);if(ah.node){while(ah.node&&ah.offset===0&&ah.node.previousSibling){ah=ag(ah.node.previousSibling)}if(ah.node&&ah.offset>0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;ad<ac.length;ad++){if(ac[ad].nodeName.indexOf("_")!==0){return X}}}if(ah.remove!="none"){o(ae,ah);return C}}function o(ad,ae){var ab=ad.parentNode,ac;function af(ah,ag,ai){ah=E(ah,ag,ai);return !ah||(ah.nodeName=="BR"||H(ah))}if(ae.block){if(!m){if(H(ad)&&!H(ab)){if(!af(ad,X)&&!af(ad.firstChild,C,1)){ad.insertBefore(c.create("br"),ad.firstChild)}if(!af(ad,C)&&!af(ad.lastChild,X,1)){ad.appendChild(c.create("br"))}}}else{if(ab==c.getRoot()){if(!ae.list_block||!g(ad,ae.list_block)){T(a.grep(ad.childNodes),function(ag){if(d(m,ag.nodeName.toLowerCase())){if(!ac){ac=S(ag,m)}else{ac.appendChild(ag)}}else{ac=0}})}}}}if(ae.selector&&ae.inline&&!g(ae.inline,ad)){return}c.remove(ad,1)}function E(ac,ab,ad){if(ac){ab=ab?"nextSibling":"previousSibling";for(ac=ad?ac:ac[ab];ac;ac=ac[ab]){if(ac.nodeType==1||!f(ac)){return ac}}}}function K(ab){return ab&&ab.nodeType==1&&ab.getAttribute("data-mce-type")=="bookmark"}function u(af,ae){var ab,ad,ac;function ah(ak,aj){if(ak.nodeName!=aj.nodeName){return X}function ai(am){var an={};T(c.getAttribs(am),function(ao){var ap=ao.nodeName.toLowerCase();if(ap.indexOf("_")!==0&&ap!=="style"){an[ap]=c.getAttrib(am,ap)}});return an}function al(ap,ao){var an,am;for(am in ap){if(ap.hasOwnProperty(am)){an=ao[am];if(an===D){return X}if(ap[am]!=an){return X}delete ao[am]}}for(am in ao){if(ao.hasOwnProperty(am)){return X}}return C}if(!al(ai(ak),ai(aj))){return X}if(!al(c.parseStyle(c.getAttrib(ak,"style")),c.parseStyle(c.getAttrib(aj,"style")))){return X}return C}function ag(aj,ai){for(ad=aj;ad;ad=ad[ai]){if(ad.nodeType==3&&ad.nodeValue.length!==0){return aj}if(ad.nodeType==1&&!K(ad)){return ad}}return aj}if(af&&ae){af=ag(af,"previousSibling");ae=ag(ae,"nextSibling");if(ah(af,ae)){for(ad=af.nextSibling;ad&&ad!=ae;){ac=ad;ad=ad.nextSibling;af.appendChild(ac)}c.remove(ae);T(a.grep(ae.childNodes),function(ai){af.appendChild(ai)});return af}}return ae}function M(ac,ag){var ab,af,ad,ae;ab=ac[ag?"startContainer":"endContainer"];af=ac[ag?"startOffset":"endOffset"];if(ab.nodeType==1){ad=ab.childNodes.length-1;if(!ag&&af){af--}ab=ab.childNodes[af>ad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au<at.length&&/\w/.test(at.charAt(au))&&/\w/.test(at.charAt(au-1))){ar=r.getBookmark();aq.collapse(true);aq=p(aq,V(ab));aq=N.split(aq);Y(ab,ai,aq);r.moveToBookmark(ar)}else{if(!ao||av.nodeValue!==G){ao=ad(true);av=ao.firstChild;aq.insertNode(ao);au=1;Y(ab,ai,ao)}else{Y(ab,ai,ao)}r.setCursorLocation(av,au)}}function am(){var ao=r.getRng(true),ap,at,aw,av,aq,az,ay=[],au,ax;ap=ao.startContainer;at=ao.startOffset;aq=ap;if(ap.nodeType==3){if(at!=ap.nodeValue.length||ap.nodeValue===G){av=true}aq=aq.parentNode}while(aq){if(y(aq,ab,ai)){az=aq;break}if(aq.nextSibling){av=true}ay.push(aq);aq=aq.parentNode}if(!az){return}if(av){aw=r.getBookmark();ao.collapse(true);ao=p(ao,V(ab),true);ao=N.split(ao);B(ab,ai,ao);r.moveToBookmark(aw)}else{ax=ad();aq=ax;for(au=ay.length-1;au>=0;au--){aq.appendChild(c.clone(ay[au],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;var ar=c.getParent(az,I);if(ar&&c.isEmpty(ar)){az.parentNode.replaceChild(ax,az)}else{c.insertAfter(ax,az)}r.setCursorLocation(aq,1);if(c.isEmpty(az)){c.remove(az)}}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(B){var v=e.getRng(true),G,j,A,u,p,M,C,o,k,n,t,J,x,D;function E(N){return N&&i.isBlock(N)&&!/^(TD|TH|CAPTION|FORM)$/.test(N.nodeName)&&!/^(fixed|absolute)/i.test(N.style.position)&&i.getContentEditable(N)!=="true"}function F(O){var N;if(b.isIE&&!b.isIE11&&i.isBlock(O)){N=e.getRng();O.appendChild(i.create("span",null,"\u00a0"));e.select(O);O.lastChild.outerHTML="";e.setRng(N)}}function z(P){var O=P,Q=[],N;while(O=O.firstChild){if(i.isBlock(O)){return}if(O.nodeType==1&&!c[O.nodeName.toLowerCase()]){Q.push(O)}}N=Q.length;while(N--){O=Q[N];if(!O.hasChildNodes()||(O.firstChild==O.lastChild&&O.firstChild.nodeValue==="")){i.remove(O)}else{if(O.nodeName=="A"&&(O.innerText||O.textContent)===" "){i.remove(O)}}}}function m(O){var T,R,N,U,S,Q=O,P;N=i.createRng();if(O.hasChildNodes()){T=new a(O,O);while(R=T.current()){if(R.nodeType==3){N.setStart(R,0);N.setEnd(R,0);break}if(c[R.nodeName.toLowerCase()]){N.setStartBefore(R);N.setEndBefore(R);break}Q=R;R=T.next()}if(!R){N.setStart(Q,0);N.setEnd(Q,0)}}else{if(O.nodeName=="BR"){if(O.nextSibling&&i.isBlock(O.nextSibling)){if(!M||M<9){P=i.create("br");O.parentNode.insertBefore(P,O)}N.setStartBefore(O);N.setEndBefore(O)}else{N.setStartAfter(O);N.setEndAfter(O)}}else{N.setStart(O,0);N.setEnd(O,0)}}e.setRng(N);i.remove(P);S=i.getViewPort(f.getWin());U=i.getPos(O).y;if(U<S.y||U+25>S.y+S.h){f.getWin().scrollTo(0,U<S.y?U:U-S.h+25)}}function r(O){var P=A,R,Q,N;R=O||t=="TABLE"?i.create(O||x):p.cloneNode(false);N=R;if(d.keep_styles!==false){do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(P.nodeName)){if(P.id=="_mce_caret"){continue}Q=P.cloneNode(false);i.setAttrib(Q,"id","");if(R.hasChildNodes()){Q.appendChild(R.firstChild);R.appendChild(Q)}else{N=Q;R.appendChild(Q)}}}while(P=P.parentNode)}if(!b.isIE||b.isIE11){N.innerHTML='<br data-mce-bogus="1">'}return R}function q(Q){var P,O,N;if(A.nodeType==3&&(Q?u>0:u<A.nodeValue.length)){return false}if(A.parentNode==p&&D&&!Q){return true}if(Q&&A.nodeType==1&&A==p.firstChild){return true}if(A.nodeName==="TABLE"||(A.previousSibling&&A.previousSibling.nodeName=="TABLE")){return(D&&!Q)||(!D&&Q)}P=new a(A,p);if(A.nodeType==3){if(Q&&u==0){P.prev()}else{if(!Q&&u==A.nodeValue.length){P.next()}}}while(O=P.current()){if(O.nodeType===1){if(!O.getAttribute("data-mce-bogus")){N=O.nodeName.toLowerCase();if(c[N]&&N!=="br"){return false}}}else{if(O.nodeType===3&&!/^[ \t\r\n]*$/.test(O.nodeValue)){return false}}if(Q){P.prev()}else{P.next()}}return true}function l(N,T){var U,S,P,R,Q,O=x||"P";S=i.getParent(N,i.isBlock);if(!S||!E(S)){S=S||j;if(!S.hasChildNodes()){U=i.create(O);S.appendChild(U);v.setStart(U,0);v.setEnd(U,0);return U}R=N;while(R.parentNode!=S){R=R.parentNode}while(R&&!i.isBlock(R)){P=R;R=R.previousSibling}if(P){U=i.create(O);P.parentNode.insertBefore(U,P);R=P;while(R&&!i.isBlock(R)){Q=R.nextSibling;U.appendChild(R);R=Q}v.setStart(N,T);v.setEnd(N,T)}}return N}function H(){function N(P){var O=n[P?"firstChild":"lastChild"];while(O){if(O.nodeType==1){break}O=O[P?"nextSibling":"previousSibling"]}return O===p}o=x?r(x):i.create("BR");if(N(true)&&N()){i.replace(o,n)}else{if(N(true)){n.parentNode.insertBefore(o,n)}else{if(N()){i.insertAfter(o,n);F(o)}else{G=v.cloneRange();G.setStartAfter(p);G.setEndAfter(n);k=G.extractContents();i.insertAfter(k,n);i.insertAfter(o,n)}}}i.remove(p);m(o);h.add()}function y(){var O=new a(A,p),N;while(N=O.next()){if(c[N.nodeName.toLowerCase()]||N.length>0){return true}}}function L(){var P,O,N;if(A&&A.nodeType==3&&u>=A.nodeValue.length){if((!b.isIE||b.isIE11)&&!y()){P=i.create("br");v.insertNode(P);v.setStartAfter(P);v.setEndAfter(P);O=true}}P=i.create("br");v.insertNode(P);if((b.isIE&&!b.isIE11)&&t=="PRE"&&(!M||M<8)){P.parentNode.insertBefore(i.doc.createTextNode("\r"),P)}N=i.create("span",{}," ");P.parentNode.insertBefore(N,P);e.scrollIntoView(N);i.remove(N);if(!O){v.setStartAfter(P);v.setEndAfter(P)}else{v.setStartBefore(P);v.setEndBefore(P)}e.setRng(v);h.add()}function s(N){do{if(N.nodeType===3){N.nodeValue=N.nodeValue.replace(/^[\r\n]+/,"")}N=N.firstChild}while(N)}function K(P){var N=i.getRoot(),O,Q;O=P;while(O!==N&&i.getContentEditable(O)!=="false"){if(i.getContentEditable(O)==="true"){Q=O}O=O.parentNode}return O!==N?Q:N}function I(O){var N;if(!b.isIE||b.isIE11){O.normalize();N=O.lastChild;if(!N||(/^(left|right)$/gi.test(i.getStyle(N,"float",true)))){i.add(O,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(B.isDefaultPrevented()){return}A=v.startContainer;u=v.startOffset;x=(d.force_p_newlines?"p":"")||d.forced_root_block;x=x?x.toUpperCase():"";M=i.doc.documentMode;C=B.shiftKey;if(A.nodeType==1&&A.hasChildNodes()){D=u>A.childNodes.length-1;A=A.childNodes[Math.min(u,A.childNodes.length-1)]||A;if(D&&A.nodeType==3){u=A.nodeValue.length}else{u=0}}j=K(A);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||C){L()}return}if((x&&!C)||(!x&&C)){A=l(A,u)}p=i.getParent(A,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";J=n?n.nodeName.toUpperCase():"";if(J=="LI"&&!B.ctrlKey){p=n;t=J}if(t=="LI"){if(!x&&C){L();return}if(i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}H();return}}if(t=="PRE"&&d.br_in_pre!==false){if(!C){L();return}}else{if((!x&&!C&&t!="LI")||(x&&C)){L();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&J!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&E(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{G=v.cloneRange();G.setEndAfter(p);k=G.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);z(o);I(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce);
\ No newline at end of file diff --git a/program/js/tiny_mce/tiny_mce_popup.js b/program/js/tiny_mce/tiny_mce_popup.js index bb8e58c88..0808f8f9b 100644 --- a/program/js/tiny_mce/tiny_mce_popup.js +++ b/program/js/tiny_mce/tiny_mce_popup.js @@ -2,4 +2,4 @@ // Uncomment and change this document.domain value if you are loading the script cross subdomains // document.domain = 'moxiecode.com'; -var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init();
\ No newline at end of file +var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(a){var a=(a&&a.target)||window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE&&!tinymce.isIE11){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}else{if(tinymce.isIE11){document.addEventListener("mouseup",tinyMCEPopup._restoreSelection,false)}}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init();
\ No newline at end of file diff --git a/program/js/tiny_mce/tiny_mce_src.js b/program/js/tiny_mce/tiny_mce_src.js index e38fb7efb..86b162b75 100644 --- a/program/js/tiny_mce/tiny_mce_src.js +++ b/program/js/tiny_mce/tiny_mce_src.js @@ -6,18 +6,20 @@ var tinymce = {
majorVersion : '3',
- minorVersion : '5.6',
+ minorVersion : '5.10',
- releaseDate : '2012-07-26',
+ releaseDate : '2013-10-24',
_init : function() {
var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v;
+ t.isIE11 = ua.indexOf('Trident/') != -1 && (ua.indexOf('rv:') != -1 || na.appName.indexOf('Netscape') != -1);
+
t.isOpera = win.opera && opera.buildNumber;
t.isWebKit = /WebKit/.test(ua);
- t.isIE = !t.isWebKit && !t.isOpera && (/MSIE/gi).test(ua) && (/Explorer/gi).test(na.appName);
+ t.isIE = !t.isWebKit && !t.isOpera && (/MSIE/gi).test(ua) && (/Explorer/gi).test(na.appName) || t.isIE11;
t.isIE6 = t.isIE && /MSIE [56]/.test(ua);
@@ -27,7 +29,7 @@ t.isIE9 = t.isIE && /MSIE [9]/.test(ua);
- t.isGecko = !t.isWebKit && /Gecko/.test(ua);
+ t.isGecko = !t.isWebKit && !t.isIE11 && /Gecko/.test(ua);
t.isMac = ua.indexOf('Mac') != -1;
@@ -107,12 +109,16 @@ if (!t)
return o !== undef;
- if (t == 'array' && (o.hasOwnProperty && o instanceof Array))
+ if (t == 'array' && tinymce.isArray(o))
return true;
return typeof(o) == t;
},
+ isArray: Array.isArray || function(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]";
+ },
+
makeMap : function(items, delim, map) {
var i;
@@ -921,7 +927,7 @@ tinymce.create('tinymce.util.Dispatcher', { }
if (t == 'object') {
- if (o.hasOwnProperty && o instanceof Array) {
+ if (o.hasOwnProperty && Object.prototype.toString.call(o) === '[object Array]') {
for (i=0, v = '['; i<o.length; i++)
v += (i > 0 ? ',' : '') + serialize(o[i], quote);
@@ -1093,7 +1099,8 @@ tinymce.create('static tinymce.util.XHR', { })(tinymce);
tinymce.util.Quirks = function(editor) {
- var VK = tinymce.VK, BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection, settings = editor.settings;
+ var VK = tinymce.VK, BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection,
+ settings = editor.settings, parser = editor.parser, serializer = editor.serializer, each = tinymce.each;
function setEditorCommandState(cmd, state) {
try {
@@ -1109,56 +1116,81 @@ tinymce.util.Quirks = function(editor) { return documentMode ? documentMode : 6;
};
+ function isDefaultPrevented(e) {
+ return e.isDefaultPrevented();
+ };
+
function cleanupStylesWhenDeleting() {
function removeMergedFormatSpans(isDelete) {
- var rng, blockElm, node, clonedSpan;
+ var rng, blockElm, wrapperElm, bookmark, container, offset, elm;
+
+ function isAtStartOrEndOfElm() {
+ if (container.nodeType == 3) {
+ if (isDelete && offset == container.length) {
+ return true;
+ }
+
+ if (!isDelete && offset === 0) {
+ return true;
+ }
+ }
+ }
rng = selection.getRng();
+ var tmpRng = [rng.startContainer, rng.startOffset, rng.endContainer, rng.endOffset];
+
+ if (!rng.collapsed) {
+ isDelete = true;
+ }
- // Find root block
- blockElm = dom.getParent(rng.startContainer, dom.isBlock);
+ container = rng[(isDelete ? 'start' : 'end') + 'Container'];
+ offset = rng[(isDelete ? 'start' : 'end') + 'Offset'];
- // On delete clone the root span of the next block element
- if (isDelete)
- blockElm = dom.getNext(blockElm, dom.isBlock);
+ if (container.nodeType == 3) {
+ blockElm = dom.getParent(rng.startContainer, dom.isBlock);
- // Locate root span element and clone it since it would otherwise get merged by the "apple-style-span" on delete/backspace
- if (blockElm) {
- node = blockElm.firstChild;
+ // On delete clone the root span of the next block element
+ if (isDelete) {
+ blockElm = dom.getNext(blockElm, dom.isBlock);
+ }
- // Ignore empty text nodes
- while (node && node.nodeType == 3 && node.nodeValue.length === 0)
- node = node.nextSibling;
+ if (blockElm && (isAtStartOrEndOfElm() || !rng.collapsed)) {
+ // Wrap children of block in a EM and let WebKit stick is
+ // runtime styles junk into that EM
+ wrapperElm = dom.create('em', {'id': '__mceDel'});
+
+ each(tinymce.grep(blockElm.childNodes), function(node) {
+ wrapperElm.appendChild(node);
+ });
- if (node && node.nodeName === 'SPAN') {
- clonedSpan = node.cloneNode(false);
+ blockElm.appendChild(wrapperElm);
}
}
// Do the backspace/delete action
+ rng = dom.createRng();
+ rng.setStart(tmpRng[0], tmpRng[1]);
+ rng.setEnd(tmpRng[2], tmpRng[3]);
+ selection.setRng(rng);
editor.getDoc().execCommand(isDelete ? 'ForwardDelete' : 'Delete', false, null);
- // Find all odd apple-style-spans
- blockElm = dom.getParent(rng.startContainer, dom.isBlock);
- tinymce.each(dom.select('span.Apple-style-span,font.Apple-style-span', blockElm), function(span) {
- var bm = selection.getBookmark();
+ // Remove temp wrapper element
+ if (wrapperElm) {
+ bookmark = selection.getBookmark();
- if (clonedSpan) {
- dom.replace(clonedSpan.cloneNode(false), span, true);
- } else {
- dom.remove(span, true);
+ while (elm = dom.get('__mceDel')) {
+ dom.remove(elm, true);
}
- // Restore the selection
- selection.moveToBookmark(bm);
- });
- };
+ selection.moveToBookmark(bookmark);
+ }
+ }
editor.onKeyDown.add(function(editor, e) {
var isDelete;
isDelete = e.keyCode == DELETE;
- if (!e.isDefaultPrevented() && (isDelete || e.keyCode == BACKSPACE) && !VK.modifierPressed(e)) {
+ if (!isDefaultPrevented(e) && (isDelete || e.keyCode == BACKSPACE) && !VK.modifierPressed(e)) {
e.preventDefault();
removeMergedFormatSpans(isDelete);
}
@@ -1189,7 +1221,7 @@ tinymce.util.Quirks = function(editor) { var keyCode = e.keyCode, isCollapsed;
// Empty the editor if it's needed for example backspace at <p><b>|</b></p>
- if (!e.isDefaultPrevented() && (keyCode == DELETE || keyCode == BACKSPACE)) {
+ if (!isDefaultPrevented(e) && (keyCode == DELETE || keyCode == BACKSPACE)) {
isCollapsed = editor.selection.isCollapsed();
// Selection is collapsed but the editor isn't empty
@@ -1217,7 +1249,7 @@ tinymce.util.Quirks = function(editor) { function selectAll() {
editor.onKeyDown.add(function(editor, e) {
- if (e.keyCode == 65 && VK.metaKeyPressed(e)) {
+ if (!isDefaultPrevented(e) && e.keyCode == 65 && VK.metaKeyPressed(e)) {
e.preventDefault();
editor.execCommand('SelectAll');
}
@@ -1243,7 +1275,7 @@ tinymce.util.Quirks = function(editor) { function removeHrOnBackspace() {
editor.onKeyDown.add(function(editor, e) {
- if (!e.isDefaultPrevented() && e.keyCode === BACKSPACE) {
+ if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
if (selection.isCollapsed() && selection.getRng(true).startOffset === 0) {
var node = selection.getNode();
var previousSibling = node.previousSibling;
@@ -1262,7 +1294,7 @@ tinymce.util.Quirks = function(editor) { // wouldn't get proper focus if the user clicked on the HTML element
if (!Range.prototype.getClientRects) { // Detect getClientRects got introduced in FF 4
editor.onMouseDown.add(function(editor, e) {
- if (e.target.nodeName === "HTML") {
+ if (!isDefaultPrevented(e) && e.target.nodeName === "HTML") {
var body = editor.getBody();
// Blur the body it's focused but not correctly focused
@@ -1306,7 +1338,7 @@ tinymce.util.Quirks = function(editor) { if (target !== editor.getBody()) {
dom.setAttrib(target, "style", null);
- tinymce.each(template, function(attr) {
+ each(template, function(attr) {
target.setAttributeNode(attr.cloneNode(true));
});
}
@@ -1325,7 +1357,7 @@ tinymce.util.Quirks = function(editor) { editor.onKeyPress.add(function(editor, e) {
var applyAttributes;
- if ((e.keyCode == 8 || e.keyCode == 46) && isSelectionAcrossElements()) {
+ if (!isDefaultPrevented(e) && (e.keyCode == 8 || e.keyCode == 46) && isSelectionAcrossElements()) {
applyAttributes = getAttributeApplyFunction();
editor.getDoc().execCommand('delete', false, null);
applyAttributes();
@@ -1337,7 +1369,7 @@ tinymce.util.Quirks = function(editor) { dom.bind(editor.getDoc(), 'cut', function(e) {
var applyAttributes;
- if (isSelectionAcrossElements()) {
+ if (!isDefaultPrevented(e) && isSelectionAcrossElements()) {
applyAttributes = getAttributeApplyFunction();
editor.onKeyUp.addToTop(blockEvent);
@@ -1376,7 +1408,7 @@ tinymce.util.Quirks = function(editor) { function disableBackspaceIntoATable() {
editor.onKeyDown.add(function(editor, e) {
- if (!e.isDefaultPrevented() && e.keyCode === BACKSPACE) {
+ if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
if (selection.isCollapsed() && selection.getRng(true).startOffset === 0) {
var previousSibling = selection.getNode().previousSibling;
if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === "table") {
@@ -1400,7 +1432,7 @@ tinymce.util.Quirks = function(editor) { dom.addClass(editor.getBody(), 'mceHideBrInPre');
// Adds a \n before all BR elements in PRE to get them visual
- editor.parser.addNodeFilter('pre', function(nodes, name) {
+ parser.addNodeFilter('pre', function(nodes, name) {
var i = nodes.length, brNodes, j, brElm, sibling;
while (i--) {
@@ -1421,7 +1453,7 @@ tinymce.util.Quirks = function(editor) { });
// Removes any \n before BR elements in PRE since other browsers and in contentEditable=false mode they will be visible
- editor.serializer.addNodeFilter('pre', function(nodes, name) {
+ serializer.addNodeFilter('pre', function(nodes, name) {
var i = nodes.length, brNodes, j, brElm, sibling;
while (i--) {
@@ -1464,7 +1496,7 @@ tinymce.util.Quirks = function(editor) { var isDelete, rng, container, offset, brElm, sibling, collapsed;
isDelete = e.keyCode == DELETE;
- if (!e.isDefaultPrevented() && (isDelete || e.keyCode == BACKSPACE) && !VK.modifierPressed(e)) {
+ if (!isDefaultPrevented(e) && (isDelete || e.keyCode == BACKSPACE) && !VK.modifierPressed(e)) {
rng = selection.getRng();
container = rng.startContainer;
offset = rng.startOffset;
@@ -1473,6 +1505,12 @@ tinymce.util.Quirks = function(editor) { // Override delete if the start container is a text node and is at the beginning of text or
// just before/after the last character to be deleted in collapsed mode
if (container.nodeType == 3 && container.nodeValue.length > 0 && ((offset === 0 && !collapsed) || (collapsed && offset === (isDelete ? 0 : 1)))) {
+ // Edge case when deleting <p><b><img> |x</b></p>
+ sibling = container.previousSibling;
+ if (sibling && sibling.nodeName == "IMG") {
+ return;
+ }
+
nonEmptyElements = editor.schema.getNonEmptyElements();
// Prevent default logic since it's broken
@@ -1504,7 +1542,7 @@ tinymce.util.Quirks = function(editor) { editor.onKeyDown.add(function(editor, e) {
var rng, container, offset, root, parent;
- if (e.isDefaultPrevented() || e.keyCode != VK.BACKSPACE) {
+ if (isDefaultPrevented(e) || e.keyCode != VK.BACKSPACE) {
return;
}
@@ -1528,10 +1566,10 @@ tinymce.util.Quirks = function(editor) { editor.formatter.toggle('blockquote', null, parent);
// Move the caret to the beginning of container
+ rng = dom.createRng();
rng.setStart(container, 0);
rng.setEnd(container, 0);
selection.setRng(rng);
- selection.collapse(false);
}
});
};
@@ -1556,7 +1594,7 @@ tinymce.util.Quirks = function(editor) { function addBrAfterLastLinks() {
function fixLinks(editor, o) {
- tinymce.each(dom.select('a'), function(node) {
+ each(dom.select('a'), function(node) {
var parentNode = node.parentNode, root = dom.getRoot();
if (parentNode.lastChild === node) {
@@ -1606,7 +1644,7 @@ tinymce.util.Quirks = function(editor) { editor.onKeyDown.add(function(editor, e) {
var rng;
- if (!e.isDefaultPrevented() && e.keyCode == BACKSPACE) {
+ if (!isDefaultPrevented(e) && e.keyCode == BACKSPACE) {
rng = editor.getDoc().selection.createRange();
if (rng && rng.item) {
e.preventDefault();
@@ -1624,7 +1662,7 @@ tinymce.util.Quirks = function(editor) { // IE10+
if (getDocumentMode() >= 10) {
emptyBlocksCSS = '';
- tinymce.each('p div h1 h2 h3 h4 h5 h6'.split(' '), function(name, i) {
+ each('p div h1 h2 h3 h4 h5 h6'.split(' '), function(name, i) {
emptyBlocksCSS += (i > 0 ? ',' : '') + name + ':empty';
});
@@ -1741,7 +1779,7 @@ tinymce.util.Quirks = function(editor) { width = height = 0;
}
- tinymce.each(resizeHandles, function(handle, name) {
+ each(resizeHandles, function(handle, name) {
var handleElm;
// Get existing or render resize handle
@@ -1838,7 +1876,7 @@ tinymce.util.Quirks = function(editor) { var controlElm = dom.getParent(selection.getNode(), 'table,img');
// Remove data-mce-selected from all elements since they might have been copied using Ctrl+c/v
- tinymce.each(dom.select('img[data-mce-selected]'), function(img) {
+ each(dom.select('img[data-mce-selected]'), function(img) {
img.removeAttribute('data-mce-selected');
});
@@ -1865,6 +1903,57 @@ tinymce.util.Quirks = function(editor) { });
}
+ function keepNoScriptContents() {
+ if (getDocumentMode() < 9) {
+ parser.addNodeFilter('noscript', function(nodes) {
+ var i = nodes.length, node, textNode;
+
+ while (i--) {
+ node = nodes[i];
+ textNode = node.firstChild;
+
+ if (textNode) {
+ node.attr('data-mce-innertext', textNode.value);
+ }
+ }
+ });
+
+ serializer.addNodeFilter('noscript', function(nodes) {
+ var i = nodes.length, node, textNode, value;
+
+ while (i--) {
+ node = nodes[i];
+ textNode = nodes[i].firstChild;
+
+ if (textNode) {
+ textNode.value = tinymce.html.Entities.decode(textNode.value);
+ } else {
+ // Old IE can't retain noscript value so an attribute is used to store it
+ value = node.attributes.map['data-mce-innertext'];
+ if (value) {
+ node.attr('data-mce-innertext', null);
+ textNode = new tinymce.html.Node('#text', 3);
+ textNode.value = value;
+ textNode.raw = true;
+ node.append(textNode);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ function bodyHeight() {
+ editor.contentStyles.push('body {min-height: 100px}');
+ editor.onClick.add(function(ed, e) {
+ if (e.target.nodeName == 'HTML') {
+ editor.execCommand('SelectAll');
+ editor.selection.collapse(true);
+ editor.nodeChanged();
+ }
+ });
+ }
+
// All browsers
disableBackspaceIntoATable();
removeBlockQuoteOnBackSpace();
@@ -1888,17 +1977,23 @@ tinymce.util.Quirks = function(editor) { }
// IE
- if (tinymce.isIE) {
+ if (tinymce.isIE && !tinymce.isIE11) {
removeHrOnBackspace();
ensureBodyHasRoleApplication();
addNewLinesBeforeBrInPre();
removePreSerializedStylesWhenSelectingControls();
deleteControlItemOnBackSpace();
renderEmptyBlocksFix();
+ keepNoScriptContents();
+ }
+
+ // IE 11+
+ if (tinymce.isIE11) {
+ bodyHeight();
}
// Gecko
- if (tinymce.isGecko) {
+ if (tinymce.isGecko && !tinymce.isIE11) {
removeHrOnBackspace();
focusBody();
removeStylesWhenDeletingAccrossBlockElements();
@@ -2135,6 +2230,12 @@ tinymce.html.Styles = function(settings, schema) { function compress(prefix, suffix) {
var top, right, bottom, left;
+ // IE 11 will produce a border-image: none when getting the style attribute from <p style="border: 1px solid red"></p>
+ // So lets asume it shouldn't be there
+ if (styles['border-image'] === 'none') {
+ delete styles['border-image'];
+ }
+
// Get values and check it it needs compressing
top = styles[prefix + '-top' + suffix];
if (!top)
@@ -2449,7 +2550,7 @@ tinymce.html.Styles = function(settings, schema) { 'form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]' +
'fieldset[A|disabled|form|name][C|legend]' +
'label[A|form|for][B]' +
- 'input[A|type|accept|alt|autocomplete|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|' +
+ 'input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|' +
'multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]' +
'button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]' +
'select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]' +
@@ -2653,14 +2754,15 @@ tinymce.html.Styles = function(settings, schema) { }
// Setup map objects
- whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script style textarea');
+ whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script noscript style textarea');
selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');
shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link meta param embed source wbr');
boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls');
- nonEmptyElementsMap = createLookupTable('non_empty_elements', 'td th iframe video audio object', shortEndedElementsMap);
- blockElementsMap = createLookupTable('block_elements', 'h1 h2 h3 h4 h5 h6 hr p div address pre form table tbody thead tfoot ' +
- 'th tr td li ol ul caption blockquote center dl dt dd dir fieldset ' +
- 'noscript menu isindex samp header footer article section hgroup aside nav figure option datalist select optgroup');
+ nonEmptyElementsMap = createLookupTable('non_empty_elements', 'td th iframe video audio object script', shortEndedElementsMap);
+ textBlockElementsMap = createLookupTable('text_block_elements', 'h1 h2 h3 h4 h5 h6 p div address pre form ' +
+ 'blockquote center dir fieldset header footer article section hgroup aside nav figure');
+ blockElementsMap = createLookupTable('block_elements', 'hr table tbody thead tfoot ' +
+ 'th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup', textBlockElementsMap);
// Converts a wildcard expression string to a regexp for example *a will become /.*a/.
function patternToRegExp(str) {
@@ -2834,8 +2936,15 @@ tinymce.html.Styles = function(settings, schema) { customElementsMap[name] = cloneName;
// If it's not marked as inline then add it to valid block elements
- if (!inline)
+ if (!inline) {
+ blockElementsMap[name.toUpperCase()] = {};
blockElementsMap[name] = {};
+ }
+
+ // Add elements clone if needed
+ if (!elements[name]) {
+ elements[name] = elements[cloneName];
+ }
// Add custom elements at span/div positions
each(children, function(element, child) {
@@ -2960,6 +3069,10 @@ tinymce.html.Styles = function(settings, schema) { return blockElementsMap;
};
+ self.getTextBlockElements = function() {
+ return textBlockElementsMap;
+ };
+
self.getShortEndedElements = function() {
return shortEndedElementsMap;
};
@@ -3025,6 +3138,8 @@ tinymce.html.Styles = function(settings, schema) { self.addCustomElements = addCustomElements;
self.addValidChildren = addValidChildren;
+
+ self.elements = elements;
};
})(tinymce);
@@ -3123,10 +3238,10 @@ tinymce.html.Styles = function(settings, schema) { '(?:!DOCTYPE([\\w\\W]*?)>)|' + // DOCTYPE
'(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + // PI
'(?:\\/([^>]+)>)|' + // End element
- '(?:([A-Za-z0-9\\-\\:]+)((?:\\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\\/|\\s+)>)' + // Start element
+ '(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\\/|\\s+)>)' + // Start element
')', 'g');
- attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;
+ attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;
specialElements = {
'script' : /<\/script[^>]*>/gi,
'style' : /<\/style[^>]*>/gi,
@@ -3609,7 +3724,7 @@ tinymce.html.Styles = function(settings, schema) { i = node.attributes.length;
while (i--) {
name = node.attributes[i].name;
- if (name === "name" || name.indexOf('data-') === 0)
+ if (name === "name" || name.indexOf('data-mce-') === 0)
return false;
}
}
@@ -3665,17 +3780,40 @@ tinymce.html.Styles = function(settings, schema) { function fixInvalidChildren(nodes) {
var ni, node, parent, parents, newParent, currentNode, tempNode, childNode, i,
- childClone, nonEmptyElements, nonSplitableElements, sibling, nextNode;
+ childClone, nonEmptyElements, nonSplitableElements, textBlockElements, sibling, nextNode;
nonSplitableElements = tinymce.makeMap('tr,td,th,tbody,thead,tfoot,table');
nonEmptyElements = schema.getNonEmptyElements();
+ textBlockElements = schema.getTextBlockElements();
for (ni = 0; ni < nodes.length; ni++) {
node = nodes[ni];
- // Already removed
- if (!node.parent)
+ // Already removed or fixed
+ if (!node.parent || node.fixed)
+ continue;
+
+ // If the invalid element is a text block and the text block is within a parent LI element
+ // Then unwrap the first text block and convert other sibling text blocks to LI elements similar to Word/Open Office
+ if (textBlockElements[node.name] && node.parent.name == 'li') {
+ // Move sibling text blocks after LI element
+ sibling = node.next;
+ while (sibling) {
+ if (textBlockElements[sibling.name]) {
+ sibling.name = 'li';
+ sibling.fixed = true;
+ node.parent.insert(sibling, node.parent);
+ } else {
+ break;
+ }
+
+ sibling = sibling.next;
+ }
+
+ // Unwrap current text block
+ node.unwrap(node);
continue;
+ }
// Get list of all parent nodes until we find a valid parent to stick the child into
parents = [node];
@@ -4054,7 +4192,8 @@ tinymce.html.Styles = function(settings, schema) { }
// Trim start white space
- textNode = node.prev;
+ // Removed due to: #5424
+ /*textNode = node.prev;
if (textNode && textNode.type === 3) {
text = textNode.value.replace(startWhiteSpaceRegExp, '');
@@ -4062,7 +4201,7 @@ tinymce.html.Styles = function(settings, schema) { textNode.value = text;
else
textNode.remove();
- }
+ }*/
}
// Check if we exited a whitespace preserved element
@@ -4572,6 +4711,12 @@ tinymce.dom = {}; }
}
+ // Page already loaded then fire it directly
+ if (doc.readyState == "complete") {
+ readyHandler();
+ return;
+ }
+
// Use W3C method
if (w3cEventModel) {
addEvent(win, 'DOMContentLoaded', readyHandler);
@@ -5115,6 +5260,11 @@ tinymce.dom.TreeWalker = function(start_node, root_node) { blockElementsMap = s.schema ? s.schema.getBlockElements() : {};
t.isBlock = function(node) {
+ // Fix for #5446
+ if (!node) {
+ return false;
+ }
+
// This function is called in module pattern style since it might be executed with the wrong this scope
var type = node.nodeType;
@@ -5129,7 +5279,7 @@ tinymce.dom.TreeWalker = function(start_node, root_node) { fixDoc: function(doc) {
var settings = this.settings, name;
- if (isIE && settings.schema) {
+ if (isIE && !tinymce.isIE11 && settings.schema) {
// Add missing HTML 4/5 elements to IE
('abbr article aside audio canvas ' +
'details figcaption figure footer ' +
@@ -5150,7 +5300,7 @@ tinymce.dom.TreeWalker = function(start_node, root_node) { var self = this, clone, doc;
// TODO: Add feature detection here in the future
- if (!isIE || node.nodeType !== 1 || deep) {
+ if (!isIE || tinymce.isIE11 || node.nodeType !== 1 || deep) {
return node.cloneNode(deep);
}
@@ -5423,7 +5573,7 @@ tinymce.dom.TreeWalker = function(start_node, root_node) { switch (na) {
case 'opacity':
// IE specific opacity
- if (isIE) {
+ if (isIE && ! tinymce.isIE11) {
s.filter = v === '' ? '' : "alpha(opacity=" + (v * 100) + ")";
if (!n.currentStyle || !n.currentStyle.hasLayout)
@@ -5435,7 +5585,7 @@ tinymce.dom.TreeWalker = function(start_node, root_node) { break;
case 'float':
- isIE ? s.styleFloat = v : s.cssFloat = v;
+ (isIE && ! tinymce.isIE11) ? s.styleFloat = v : s.cssFloat = v;
break;
default:
@@ -5801,7 +5951,7 @@ tinymce.dom.TreeWalker = function(start_node, root_node) { // IE 8 has a bug where dynamically loading stylesheets would produce a 1 item remaining bug
// This fix seems to resolve that issue by realcing the document ones a stylesheet finishes loading
// It's ugly but it seems to work fine.
- if (isIE && d.documentMode && d.recalc) {
+ if (isIE && !tinymce.isIE11 && d.documentMode && d.recalc) {
link.onload = function() {
if (d.recalc)
d.recalc();
@@ -6120,7 +6270,12 @@ tinymce.dom.TreeWalker = function(start_node, root_node) { // Import
case 3:
- addClasses(r.styleSheet);
+ try {
+ addClasses(r.styleSheet);
+ } catch (ex) {
+ // Ignore
+ }
+
break;
}
});
@@ -9222,7 +9377,7 @@ window.tinymce.dom.Sizzle = Sizzle; if (!t.win.getSelection)
t.tridentSel = new tinymce.dom.TridentSelection(t);
- if (tinymce.isIE && dom.boxModel)
+ if (tinymce.isIE && ! tinymce.isIE11 && dom.boxModel)
this._fixIESelection();
// Prevent leaks
@@ -9514,8 +9669,20 @@ window.tinymce.dom.Sizzle = Sizzle; }
// Handle simple range
- if (type)
- return {rng : t.getRng()};
+ if (type) {
+ rng = t.getRng();
+
+ if (rng.setStart) {
+ rng = {
+ startContainer: rng.startContainer,
+ startOffset: rng.startOffset,
+ endContainer: rng.endContainer,
+ endOffset: rng.endOffset
+ };
+ }
+
+ return {rng : rng};
+ }
rng = t.getRng();
id = dom.uniqueId();
@@ -9581,7 +9748,7 @@ window.tinymce.dom.Sizzle = Sizzle; },
moveToBookmark : function(bookmark) {
- var t = this, dom = t.dom, marker1, marker2, rng, root, startContainer, endContainer, startOffset, endOffset;
+ var t = this, dom = t.dom, marker1, marker2, rng, rng2, root, startContainer, endContainer, startOffset, endOffset;
function setEndPoint(start) {
var point = bookmark[start ? 'start' : 'end'], i, node, offset, children;
@@ -9711,8 +9878,24 @@ window.tinymce.dom.Sizzle = Sizzle; }
} else if (bookmark.name) {
t.select(dom.select(bookmark.name)[bookmark.index]);
- } else if (bookmark.rng)
- t.setRng(bookmark.rng);
+ } else if (bookmark.rng) {
+ rng = bookmark.rng;
+
+ if (rng.startContainer) {
+ rng2 = t.dom.createRng();
+
+ try {
+ rng2.setStart(rng.startContainer, rng.startOffset);
+ rng2.setEnd(rng.endContainer, rng.endOffset);
+ } catch (e) {
+ // Might fail with index error
+ }
+
+ rng = rng2;
+ }
+
+ t.setRng(rng);
+ }
}
},
@@ -9811,7 +9994,7 @@ window.tinymce.dom.Sizzle = Sizzle; }
// We have W3C ranges and it's IE then fake control selection since IE9 doesn't handle that correctly yet
- if (tinymce.isIE && rng && rng.setStart && doc.selection.createRange().item) {
+ if (tinymce.isIE && ! tinymce.isIE11 && rng && rng.setStart && doc.selection.createRange().item) {
elm = doc.selection.createRange().item(0);
rng = doc.createRange();
rng.setStartBefore(elm);
@@ -10224,6 +10407,16 @@ window.tinymce.dom.Sizzle = Sizzle; return self;
},
+ scrollIntoView: function(elm) {
+ var y, viewPort, self = this, dom = self.dom;
+
+ viewPort = dom.getViewPort(self.editor.getWin());
+ y = dom.getPos(elm).y;
+ if (y < viewPort.y || y + 25 > viewPort.y + viewPort.h) {
+ self.editor.getWin().scrollTo(0, y < viewPort.y ? y : y - viewPort.h + 25);
+ }
+ },
+
destroy : function(manual) {
var self = this;
@@ -10396,6 +10589,18 @@ window.tinymce.dom.Sizzle = Sizzle; }
});
+ htmlParser.addNodeFilter('noscript', function(nodes) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i].firstChild;
+
+ if (node) {
+ node.value = tinymce.html.Entities.decode(node.value);
+ }
+ }
+ });
+
// Force script into CDATA sections and remove the mce- prefix also add comments around styles
htmlParser.addNodeFilter('script,style', function(nodes, name) {
var i = nodes.length, node, value;
@@ -10654,7 +10859,7 @@ window.tinymce.dom.Sizzle = Sizzle; // Add onload listener for non IE browsers since IE9
// fires onload event before the script is parsed and executed
- if (!tinymce.isIE)
+ if (!tinymce.isIE || tinymce.isIE11)
elm.onload = done;
// Add onerror event will get fired on some browsers but not all of them
@@ -11067,18 +11272,22 @@ window.tinymce.dom.Sizzle = Sizzle; switch (evt.keyCode) {
case DOM_VK_LEFT:
if (enableLeftRight) t.moveFocus(-1);
+ Event.cancel(evt);
break;
case DOM_VK_RIGHT:
if (enableLeftRight) t.moveFocus(1);
+ Event.cancel(evt);
break;
case DOM_VK_UP:
if (enableUpDown) t.moveFocus(-1);
+ Event.cancel(evt);
break;
case DOM_VK_DOWN:
if (enableUpDown) t.moveFocus(1);
+ Event.cancel(evt);
break;
case DOM_VK_ESCAPE:
@@ -11775,7 +11984,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { else
h += '<span class="mceIcon ' + s['class'] + '"></span>' + (l ? '<span class="' + cp + 'Label">' + l + '</span>' : '');
- h += '<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="' + this.id + '_voice">' + s.title + '</span>';
+ h += '<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="' + this.id + '_voice">' + s.title + '</span>';
h += '</a>';
return h;
},
@@ -11800,9 +12009,11 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { return s.onclick.call(s.scope, e);
}
});
- tinymce.dom.Event.add(t.id, 'keyup', function(e) {
- if (!t.isDisabled() && e.keyCode==tinymce.VK.SPACEBAR)
+ tinymce.dom.Event.add(t.id, 'keydown', function(e) {
+ if (!t.isDisabled() && e.keyCode==tinymce.VK.SPACEBAR) {
+ tinymce.dom.Event.cancel(e);
return s.onclick.call(s.scope, e);
+ }
});
}
});
@@ -12215,7 +12426,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { // Accessibility keyhandler
Event.add(t.id, 'keydown', function(e) {
- var bf;
+ var bf, DOM_VK_LEFT = 37, DOM_VK_RIGHT = 39, DOM_VK_UP = 38, DOM_VK_DOWN = 40, DOM_VK_RETURN = 13, DOM_VK_SPACE = 32;
Event.remove(t.id, 'change', ch);
changeListenerAdded = false;
@@ -12227,14 +12438,12 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { Event.remove(t.id, 'blur', bf);
});
- //prevent default left and right keys on chrome - so that the keyboard navigation is used.
- if (tinymce.isWebKit && (e.keyCode==37 ||e.keyCode==39)) {
- return Event.prevent(e);
- }
-
- if (e.keyCode == 13 || e.keyCode == 32) {
+ if (e.keyCode == DOM_VK_RETURN || e.keyCode == DOM_VK_SPACE) {
onChange(e);
return Event.cancel(e);
+ } else if (e.keyCode == DOM_VK_DOWN || e.keyCode == DOM_VK_UP) {
+ // allow native implementation (navigate select element options)
+ e.stopImmediatePropagation();
}
});
@@ -13037,6 +13246,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (id === undef)
return this.editors;
+ if (!this.editors.hasOwnProperty(id))
+ return undef;
+
return this.editors[id];
},
@@ -13120,7 +13332,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { ed.render();
// Fix IE memory leaks
- if (tinymce.isIE) {
+ if (tinymce.isIE && ! tinymce.isIE11) {
w.attachEvent('onunload', clr);
}
@@ -13518,10 +13730,16 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Store away the selection when it's changed to it can be restored later with a editor.focus() call
if (isIE) {
t.onInit.add(function(ed) {
- ed.dom.bind(ed.getBody(), 'beforedeactivate keydown', function() {
- ed.lastIERng = ed.selection.getRng();
+ ed.dom.bind(ed.getBody(), 'beforedeactivate keydown keyup', function() {
+ ed.bookmark = ed.selection.getBookmark(1);
});
});
+
+ t.onNodeChange.add(function(ed) {
+ if (document.activeElement.id == ed.id + "_ifr") {
+ ed.bookmark = ed.selection.getBookmark(1);
+ }
+ });
}
}
@@ -13558,10 +13776,12 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.iframeHTML += '<base href="' + t.documentBaseURI.getURI() + '" />';
// IE8 doesn't support carets behind images setting ie7_compat would force IE8+ to run in IE7 compat mode.
- if (s.ie7_compat)
- t.iframeHTML += '<meta http-equiv="X-UA-Compatible" content="IE=7" />';
- else
- t.iframeHTML += '<meta http-equiv="X-UA-Compatible" content="IE=edge" />';
+ if (tinymce.isIE8) {
+ if (s.ie7_compat)
+ t.iframeHTML += '<meta http-equiv="X-UA-Compatible" content="IE=7" />';
+ else
+ t.iframeHTML += '<meta http-equiv="X-UA-Compatible" content="IE=edge" />';
+ }
t.iframeHTML += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
@@ -13839,8 +14059,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var oed, self = this, selection = self.selection, contentEditable = self.settings.content_editable, ieRng, controlElm, doc = self.getDoc(), body;
if (!skip_focus) {
- if (self.lastIERng) {
- selection.setRng(self.lastIERng);
+ if (self.bookmark) {
+ selection.moveToBookmark(self.bookmark);
+ self.bookmark = null;
}
// Get selected control element
@@ -13861,7 +14082,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { body = self.getBody();
// Check for setActive since it doesn't scroll to the element
- if (body.setActive) {
+ if (body.setActive && ! tinymce.isIE11) {
body.setActive();
} else {
body.focus();
@@ -14189,6 +14410,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // We must save before we hide so Safari doesn't crash
self.save();
+
+ // defer the call to hide to prevent an IE9 crash #4921
DOM.hide(self.getContainer());
DOM.setStyle(self.id, 'display', self.orgDisplay);
},
@@ -14468,11 +14691,19 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { },
remove : function() {
- var self = this, elm = self.getContainer();
+ var self = this, elm = self.getContainer(), doc = self.getDoc();
if (!self.removed) {
self.removed = 1; // Cancels post remove event execution
- self.hide();
+
+ // Fixed bug where IE has a blinking cursor left from the editor
+ if (isIE && doc)
+ doc.execCommand('SelectAll');
+
+ // We must save before we hide so Safari doesn't crash
+ self.save();
+
+ DOM.setStyle(self.id, 'display', self.orgDisplay);
// Don't clear the window or document if content editable
// is enabled since other instances might still be present
@@ -15465,7 +15696,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Add undo level on save contents, drag end and blur/focusout
editor.onSaveContent.add(addNonTypingUndoLevel);
editor.dom.bind(editor.dom.getRoot(), 'dragend', addNonTypingUndoLevel);
- editor.dom.bind(editor.getDoc(), tinymce.isGecko ? 'blur' : 'focusout', function(e) {
+ editor.dom.bind(editor.getBody(), 'focusout', function(e) {
if (!editor.removed && self.typing) {
addNonTypingUndoLevel();
}
@@ -16248,6 +16479,7 @@ tinymce.ForceBlocks = function(editor) { TreeWalker = tinymce.dom.TreeWalker,
rangeUtils = new tinymce.dom.RangeUtils(dom),
isValid = ed.schema.isValidChild,
+ isArray = tinymce.isArray,
isBlock = dom.isBlock,
forcedRootBlock = ed.settings.forced_root_block,
nodeIndex = dom.nodeIndex,
@@ -16259,9 +16491,13 @@ tinymce.ForceBlocks = function(editor) { undef,
getContentEditable = dom.getContentEditable;
- function isArray(obj) {
- return obj instanceof Array;
- };
+ function isTextBlock(name) {
+ if (name.nodeType) {
+ name = name.nodeName;
+ }
+
+ return !!ed.schema.getTextBlockElements()[name.toLowerCase()];
+ }
function getParents(node, selector) {
return dom.getParents(node, selector, dom.getRoot());
@@ -16621,7 +16857,7 @@ tinymce.ForceBlocks = function(editor) { // Is it valid to wrap this item
if (contentEditable && !hasContentEditableState && isValid(wrapName, nodeName) && isValid(parentName, wrapName) &&
- !(!node_specific && node.nodeType === 3 && node.nodeValue.length === 1 && node.nodeValue.charCodeAt(0) === 65279) && !isCaretNode(node)) {
+ !(!node_specific && node.nodeType === 3 && node.nodeValue.length === 1 && node.nodeValue.charCodeAt(0) === 65279) && !isCaretNode(node) && (!format.inline || !isBlock(node))) {
// Start wrapping
if (!currentWrapElm) {
// Wrap the node
@@ -16827,6 +17063,11 @@ tinymce.ForceBlocks = function(editor) { function process(node) {
var children, i, l, localContentEditable, lastContentEditable, hasContentEditableState;
+ // Skip on text nodes as they have neither format to remove nor children
+ if (node.nodeType === 3) {
+ return;
+ }
+
// Node has a contentEditable value
if (node.nodeType === 1 && getContentEditable(node)) {
lastContentEditable = contentEditable;
@@ -17320,6 +17561,10 @@ tinymce.ForceBlocks = function(editor) { siblingName = start ? 'previousSibling' : 'nextSibling';
root = dom.getRoot();
+ function isBogusBr(node) {
+ return node.nodeName == "BR" && node.getAttribute('data-mce-bogus') && !node.nextSibling;
+ };
+
// If it's a text node and the offset is inside the text
if (container.nodeType == 3 && !isWhiteSpaceNode(container)) {
if (start ? startOffset > 0 : endOffset < container.nodeValue.length) {
@@ -17334,7 +17579,7 @@ tinymce.ForceBlocks = function(editor) { // Walk left/right
for (sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) {
- if (!isBookmarkNode(sibling) && !isWhiteSpaceNode(sibling)) {
+ if (!isBookmarkNode(sibling) && !isWhiteSpaceNode(sibling) && !isBogusBr(sibling)) {
return parent;
}
}
@@ -17493,7 +17738,7 @@ tinymce.ForceBlocks = function(editor) { // Expand to first wrappable block element or any block element
if (!node)
- node = dom.getParent(container.nodeType == 3 ? container.parentNode : container, isBlock);
+ node = dom.getParent(container.nodeType == 3 ? container.parentNode : container, isTextBlock);
// Exclude inner lists from wrapping
if (node && format[0].wrapper)
@@ -17892,10 +18137,6 @@ tinymce.ForceBlocks = function(editor) { return next;
};
- function isTextBlock(name) {
- return /^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(name);
- };
-
function getContainer(rng, start) {
var container, offset, lastIdx, walker;
@@ -18131,11 +18372,23 @@ tinymce.ForceBlocks = function(editor) { node.appendChild(dom.doc.createTextNode(INVISIBLE_CHAR));
node = node.firstChild;
- // Insert caret container after the formated node
- dom.insertAfter(caretContainer, formatNode);
+ var block = dom.getParent(formatNode, isTextBlock);
+
+ if (block && dom.isEmpty(block)) {
+ // Replace formatNode with caretContainer when removing format from empty block like <p><b>|</b></p>
+ formatNode.parentNode.replaceChild(caretContainer, formatNode);
+ } else {
+ // Insert caret container after the formated node
+ dom.insertAfter(caretContainer, formatNode);
+ }
// Move selection to text node
selection.setCursorLocation(node, 1);
+
+ // If the formatNode is empty, we can remove it safely.
+ if (dom.isEmpty(formatNode)) {
+ dom.remove(formatNode);
+ }
}
};
@@ -18325,7 +18578,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) { function renderBlockOnIE(block) {
var oldRng;
- if (tinymce.isIE && dom.isBlock(block)) {
+ if (tinymce.isIE && !tinymce.isIE11 && dom.isBlock(block)) {
oldRng = selection.getRng();
block.appendChild(dom.create('span', null, '\u00a0'));
selection.select(block);
@@ -18440,6 +18693,11 @@ tinymce.onAddEditor.add(function(tinymce, ed) { if (settings.keep_styles !== false) {
do {
if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(node.nodeName)) {
+ // Never clone a caret containers
+ if (node.id == '_mce_caret') {
+ continue;
+ }
+
clonedNode = node.cloneNode(false);
dom.setAttrib(clonedNode, 'id', ''); // Remove ID since it needs to be document unique
@@ -18455,8 +18713,8 @@ tinymce.onAddEditor.add(function(tinymce, ed) { }
// BR is needed in empty blocks on non IE browsers
- if (!tinymce.isIE) {
- caretNode.innerHTML = '<br>';
+ if (!tinymce.isIE || tinymce.isIE11) {
+ caretNode.innerHTML = '<br data-mce-bogus="1">';
}
return block;
@@ -18617,26 +18875,24 @@ tinymce.onAddEditor.add(function(tinymce, ed) { undoManager.add();
};
- // Walks the parent block to the right and look for BR elements
- function hasRightSideBr() {
+ // Walks the parent block to the right and look for any contents
+ function hasRightSideContent() {
var walker = new TreeWalker(container, parentBlock), node;
- while (node = walker.current()) {
- if (node.nodeName == 'BR') {
+ while (node = walker.next()) {
+ if (nonEmptyElementsMap[node.nodeName.toLowerCase()] || node.length > 0) {
return true;
}
-
- node = walker.next();
}
}
-
+
// Inserts a BR element if the forced_root_block option is set to false or empty string
function insertBr() {
- var brElm, extraBr;
+ var brElm, extraBr, marker;
if (container && container.nodeType == 3 && offset >= container.nodeValue.length) {
// Insert extra BR element at the end block elements
- if (!tinymce.isIE && !hasRightSideBr()) {
+ if ((!tinymce.isIE || tinymce.isIE11) && !hasRightSideContent()) {
brElm = dom.create('br');
rng.insertNode(brElm);
rng.setStartAfter(brElm);
@@ -18649,10 +18905,16 @@ tinymce.onAddEditor.add(function(tinymce, ed) { rng.insertNode(brElm);
// Rendering modes below IE8 doesn't display BR elements in PRE unless we have a \n before it
- if (tinymce.isIE && parentBlockName == 'PRE' && (!documentMode || documentMode < 8)) {
+ if ((tinymce.isIE && !tinymce.isIE11) && parentBlockName == 'PRE' && (!documentMode || documentMode < 8)) {
brElm.parentNode.insertBefore(dom.doc.createTextNode('\r'), brElm);
}
+ // Insert temp marker and scroll to that
+ marker = dom.create('span', {}, ' ');
+ brElm.parentNode.insertBefore(marker, brElm);
+ selection.scrollIntoView(marker);
+ dom.remove(marker);
+
if (!extraBr) {
rng.setStartAfter(brElm);
rng.setEndAfter(brElm);
@@ -18697,7 +18959,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) { var lastChild;
// IE will render the blocks correctly other browsers needs a BR
- if (!tinymce.isIE) {
+ if (!tinymce.isIE || tinymce.isIE11) {
block.normalize(); // Remove empty text nodes that got left behind by the extract
// Check if the block is empty or contains a floated last child
@@ -18772,6 +19034,12 @@ tinymce.onAddEditor.add(function(tinymce, ed) { parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5
containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5
+ // Enter inside block contained within a LI then split or insert before/after LI
+ if (containerBlockName == 'LI' && !evt.ctrlKey) {
+ parentBlock = containerBlock;
+ parentBlockName = containerBlockName;
+ }
+
// Handle enter in LI
if (parentBlockName == 'LI') {
if (!newBlockName && shiftKey) {
diff --git a/program/js/treelist.js b/program/js/treelist.js index 5913f44b4..d940e396c 100644 --- a/program/js/treelist.js +++ b/program/js/treelist.js @@ -28,6 +28,9 @@ function rcube_treelist_widget(node, p) id_prefix: '', autoexpand: 1000, selectable: false, + scroll_delay: 500, + scroll_step: 5, + scroll_speed: 20, check_droptarget: function(node){ return !node.virtual } }, p || {}); @@ -42,6 +45,7 @@ function rcube_treelist_widget(node, p) autoexpand_item, body_scroll_top = 0, list_scroll_top = 0, + scroll_timer, me = this; @@ -461,6 +465,7 @@ function rcube_treelist_widget(node, p) body_scroll_top = bw.ie ? 0 : window.pageYOffset; list_scroll_top = container.parent().scrollTop(); + pos.top += list_scroll_top; drag_active = true; box_coords = { @@ -476,6 +481,7 @@ function rcube_treelist_widget(node, p) item = li.children().first().get(0); if (height = item.offsetHeight) { pos = $(item).offset(); + pos.top += list_scroll_top; item_coords[id] = { x1: pos.left, y1: pos.top, @@ -485,6 +491,38 @@ function rcube_treelist_widget(node, p) }; } } + + // enable auto-scrolling of list container + if (container.height() > container.parent().height()) { + container.parent() + .mousemove(function(e) { + var scroll = 0, + mouse = rcube_event.get_mouse_pos(e); + mouse.y -= container.parent().offset().top; + + if (mouse.y < 25 && list_scroll_top > 0) { + scroll = -1; // up + } + else if (mouse.y > container.parent().height() - 25) { + scroll = 1; // down + } + + if (drag_active && scroll != 0) { + if (!scroll_timer) + scroll_timer = window.setTimeout(function(){ drag_scroll(scroll); }, p.scroll_delay); + } + else if (scroll_timer) { + window.clearTimeout(scroll_timer); + scroll_timer = null; + } + }) + .mouseleave(function() { + if (scroll_timer) { + window.clearTimeout(scroll_timer); + scroll_timer = null; + } + }); + } } /** @@ -493,6 +531,7 @@ function rcube_treelist_widget(node, p) function drag_end() { drag_active = false; + scroll_timer = null; if (autoexpand_timer) { clearTimeout(autoexpand_timer); @@ -504,16 +543,33 @@ function rcube_treelist_widget(node, p) } /** + * Scroll list container in the given direction + */ + function drag_scroll(dir) + { + if (!drag_active) + return; + + var old_top = list_scroll_top; + container.parent().get(0).scrollTop += p.scroll_step * dir; + list_scroll_top = container.parent().scrollTop(); + scroll_timer = null; + + if (list_scroll_top != old_top) + scroll_timer = window.setTimeout(function(){ drag_scroll(dir); }, p.scroll_speed); + } + + /** * Determine if the given mouse coords intersect the list and one if its items */ function intersects(mouse, highlight) { // offsets to compensate for scrolling while dragging a message var boffset = bw.ie ? -document.documentElement.scrollTop : body_scroll_top, - moffset = list_scroll_top - container.parent().scrollTop(), + moffset = container.parent().scrollTop(), result = null; - mouse.top = mouse.y + -moffset - boffset; + mouse.top = mouse.y + moffset - boffset; // no intersection with list bounding box if (mouse.x < box_coords.x1 || mouse.x >= box_coords.x2 || mouse.top < box_coords.y1 || mouse.top >= box_coords.y2) { diff --git a/program/lib/Crypt/GPG.php b/program/lib/Crypt/GPG.php index 6e8e717e8..5c2231289 100644 --- a/program/lib/Crypt/GPG.php +++ b/program/lib/Crypt/GPG.php @@ -47,15 +47,20 @@ * @package Crypt_GPG * @author Nathan Fredrickson <nathan@silverorange.com> * @author Michael Gauthier <mike@silverorange.com> - * @copyright 2005-2010 silverorange + * @copyright 2005-2013 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: GPG.php 302814 2010-08-26 15:43:07Z gauthierm $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Crypt_GPG * @link http://pear.php.net/manual/en/package.encryption.crypt-gpg.php * @link http://www.gnupg.org/ */ /** + * Base class for GPG methods + */ +require_once 'Crypt/GPGAbstract.php'; + +/** * Signature handler class */ require_once 'Crypt/GPG/VerifyStatusHandler.php'; @@ -65,31 +70,6 @@ require_once 'Crypt/GPG/VerifyStatusHandler.php'; */ require_once 'Crypt/GPG/DecryptStatusHandler.php'; -/** - * GPG key class - */ -require_once 'Crypt/GPG/Key.php'; - -/** - * GPG sub-key class - */ -require_once 'Crypt/GPG/SubKey.php'; - -/** - * GPG user id class - */ -require_once 'Crypt/GPG/UserId.php'; - -/** - * GPG process and I/O engine class - */ -require_once 'Crypt/GPG/Engine.php'; - -/** - * GPG exception classes - */ -require_once 'Crypt/GPG/Exceptions.php'; - // {{{ class Crypt_GPG /** @@ -104,82 +84,13 @@ require_once 'Crypt/GPG/Exceptions.php'; * @package Crypt_GPG * @author Nathan Fredrickson <nathan@silverorange.com> * @author Michael Gauthier <mike@silverorange.com> - * @copyright 2005-2010 silverorange + * @copyright 2005-2013 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 * @link http://pear.php.net/package/Crypt_GPG * @link http://www.gnupg.org/ */ -class Crypt_GPG +class Crypt_GPG extends Crypt_GPGAbstract { - // {{{ class error constants - - /** - * Error code returned when there is no error. - */ - const ERROR_NONE = 0; - - /** - * Error code returned when an unknown or unhandled error occurs. - */ - const ERROR_UNKNOWN = 1; - - /** - * Error code returned when a bad passphrase is used. - */ - const ERROR_BAD_PASSPHRASE = 2; - - /** - * Error code returned when a required passphrase is missing. - */ - const ERROR_MISSING_PASSPHRASE = 3; - - /** - * Error code returned when a key that is already in the keyring is - * imported. - */ - const ERROR_DUPLICATE_KEY = 4; - - /** - * Error code returned the required data is missing for an operation. - * - * This could be missing key data, missing encrypted data or missing - * signature data. - */ - const ERROR_NO_DATA = 5; - - /** - * Error code returned when an unsigned key is used. - */ - const ERROR_UNSIGNED_KEY = 6; - - /** - * Error code returned when a key that is not self-signed is used. - */ - const ERROR_NOT_SELF_SIGNED = 7; - - /** - * Error code returned when a public or private key that is not in the - * keyring is used. - */ - const ERROR_KEY_NOT_FOUND = 8; - - /** - * Error code returned when an attempt to delete public key having a - * private key is made. - */ - const ERROR_DELETE_PRIVATE_KEY = 9; - - /** - * Error code returned when one or more bad signatures are detected. - */ - const ERROR_BAD_SIGNATURE = 10; - - /** - * Error code returned when there is a problem reading GnuPG data files. - */ - const ERROR_FILE_PERMISSIONS = 11; - - // }}} // {{{ class constants for data signing modes /** @@ -249,12 +160,27 @@ class Crypt_GPG const FORMAT_X509 = 3; // }}} - // {{{ other class constants + // {{{ class constants for boolean options + + /** + * Use to specify ASCII armored mode for returned data + */ + const ARMOR_ASCII = true; + + /** + * Use to specify binary mode for returned data + */ + const ARMOR_BINARY = false; + + /** + * Use to specify that line breaks in signed text should be normalized + */ + const TEXT_NORMALIZED = true; /** - * URI at which package bugs may be reported. + * Use to specify that line breaks in signed text should not be normalized */ - const BUG_URI = 'http://pear.php.net/bugs/report.php?package=Crypt_GPG'; + const TEXT_RAW = false; // }}} // {{{ protected class properties @@ -326,88 +252,6 @@ class Crypt_GPG protected $decryptKeys = array(); // }}} - // {{{ __construct() - - /** - * Creates a new GPG object - * - * Available options are: - * - * - <kbd>string homedir</kbd> - the directory where the GPG - * keyring files are stored. If not - * specified, Crypt_GPG uses the - * default of <kbd>~/.gnupg</kbd>. - * - <kbd>string publicKeyring</kbd> - the file path of the public - * keyring. Use this if the public - * keyring is not in the homedir, or - * if the keyring is in a directory - * not writable by the process - * invoking GPG (like Apache). Then - * you can specify the path to the - * keyring with this option - * (/foo/bar/pubring.gpg), and specify - * a writable directory (like /tmp) - * using the <i>homedir</i> option. - * - <kbd>string privateKeyring</kbd> - the file path of the private - * keyring. Use this if the private - * keyring is not in the homedir, or - * if the keyring is in a directory - * not writable by the process - * invoking GPG (like Apache). Then - * you can specify the path to the - * keyring with this option - * (/foo/bar/secring.gpg), and specify - * a writable directory (like /tmp) - * using the <i>homedir</i> option. - * - <kbd>string trustDb</kbd> - the file path of the web-of-trust - * database. Use this if the trust - * database is not in the homedir, or - * if the database is in a directory - * not writable by the process - * invoking GPG (like Apache). Then - * you can specify the path to the - * trust database with this option - * (/foo/bar/trustdb.gpg), and specify - * a writable directory (like /tmp) - * using the <i>homedir</i> option. - * - <kbd>string binary</kbd> - the location of the GPG binary. If - * not specified, the driver attempts - * to auto-detect the GPG binary - * location using a list of known - * default locations for the current - * operating system. The option - * <kbd>gpgBinary</kbd> is a - * deprecated alias for this option. - * - <kbd>boolean debug</kbd> - whether or not to use debug mode. - * When debug mode is on, all - * communication to and from the GPG - * subprocess is logged. This can be - * - * @param array $options optional. An array of options used to create the - * GPG object. All options are optional and are - * represented as key-value pairs. - * - * @throws Crypt_GPG_FileException if the <kbd>homedir</kbd> does not exist - * and cannot be created. This can happen if <kbd>homedir</kbd> is - * not specified, Crypt_GPG is run as the web user, and the web - * user has no home directory. This exception is also thrown if any - * of the options <kbd>publicKeyring</kbd>, - * <kbd>privateKeyring</kbd> or <kbd>trustDb</kbd> options are - * specified but the files do not exist or are are not readable. - * This can happen if the user running the Crypt_GPG process (for - * example, the Apache user) does not have permission to read the - * files. - * - * @throws PEAR_Exception if the provided <kbd>binary</kbd> is invalid, or - * if no <kbd>binary</kbd> is provided and no suitable binary could - * be found. - */ - public function __construct(array $options = array()) - { - $this->setEngine(new Crypt_GPG_Engine($options)); - } - - // }}} // {{{ importKey() /** @@ -520,7 +364,9 @@ class Crypt_GPG if ($fingerprint === null) { throw new Crypt_GPG_KeyNotFoundException( 'Public key not found: ' . $keyId, - Crypt_GPG::ERROR_KEY_NOT_FOUND, $keyId); + self::ERROR_KEY_NOT_FOUND, + $keyId + ); } $keyData = ''; @@ -534,11 +380,13 @@ class Crypt_GPG $code = $this->engine->getErrorCode(); - if ($code !== Crypt_GPG::ERROR_NONE) { + if ($code !== self::ERROR_NONE) { throw new Crypt_GPG_Exception( 'Unknown error exporting public key. Please use the ' . '\'debug\' option when creating the Crypt_GPG object, and ' . - 'file a bug report at ' . self::BUG_URI, $code); + 'file a bug report at ' . self::BUG_URI, + $code + ); } return $keyData; @@ -583,7 +431,9 @@ class Crypt_GPG if ($fingerprint === null) { throw new Crypt_GPG_KeyNotFoundException( 'Public key not found: ' . $keyId, - Crypt_GPG::ERROR_KEY_NOT_FOUND, $keyId); + self::ERROR_KEY_NOT_FOUND, + $keyId + ); } $operation = '--delete-key ' . escapeshellarg($fingerprint); @@ -599,17 +449,22 @@ class Crypt_GPG $code = $this->engine->getErrorCode(); switch ($code) { - case Crypt_GPG::ERROR_NONE: + case self::ERROR_NONE: break; - case Crypt_GPG::ERROR_DELETE_PRIVATE_KEY: + case self::ERROR_DELETE_PRIVATE_KEY: throw new Crypt_GPG_DeletePrivateKeyException( 'Private key must be deleted before public key can be ' . - 'deleted.', $code, $keyId); + 'deleted.', + $code, + $keyId + ); default: throw new Crypt_GPG_Exception( 'Unknown error deleting public key. Please use the ' . '\'debug\' option when creating the Crypt_GPG object, and ' . - 'file a bug report at ' . self::BUG_URI, $code); + 'file a bug report at ' . self::BUG_URI, + $code + ); } } @@ -647,7 +502,9 @@ class Crypt_GPG if ($fingerprint === null) { throw new Crypt_GPG_KeyNotFoundException( 'Private key not found: ' . $keyId, - Crypt_GPG::ERROR_KEY_NOT_FOUND, $keyId); + self::ERROR_KEY_NOT_FOUND, + $keyId + ); } $operation = '--delete-secret-key ' . escapeshellarg($fingerprint); @@ -663,17 +520,21 @@ class Crypt_GPG $code = $this->engine->getErrorCode(); switch ($code) { - case Crypt_GPG::ERROR_NONE: + case self::ERROR_NONE: break; - case Crypt_GPG::ERROR_KEY_NOT_FOUND: + case self::ERROR_KEY_NOT_FOUND: throw new Crypt_GPG_KeyNotFoundException( 'Private key not found: ' . $keyId, - $code, $keyId); + $code, + $keyId + ); default: throw new Crypt_GPG_Exception( 'Unknown error deleting private key. Please use the ' . '\'debug\' option when creating the Crypt_GPG object, and ' . - 'file a bug report at ' . self::BUG_URI, $code); + 'file a bug report at ' . self::BUG_URI, + $code + ); } } @@ -705,161 +566,7 @@ class Crypt_GPG */ public function getKeys($keyId = '') { - // get private key fingerprints - if ($keyId == '') { - $operation = '--list-secret-keys'; - } else { - $operation = '--list-secret-keys ' . escapeshellarg($keyId); - } - - // According to The file 'doc/DETAILS' in the GnuPG distribution, using - // double '--with-fingerprint' also prints the fingerprint for subkeys. - $arguments = array( - '--with-colons', - '--with-fingerprint', - '--with-fingerprint', - '--fixed-list-mode' - ); - - $output = ''; - - $this->engine->reset(); - $this->engine->setOutput($output); - $this->engine->setOperation($operation, $arguments); - $this->engine->run(); - - $code = $this->engine->getErrorCode(); - - switch ($code) { - case Crypt_GPG::ERROR_NONE: - case Crypt_GPG::ERROR_KEY_NOT_FOUND: - // ignore not found key errors - break; - case Crypt_GPG::ERROR_FILE_PERMISSIONS: - $filename = $this->engine->getErrorFilename(); - if ($filename) { - throw new Crypt_GPG_FileException(sprintf( - 'Error reading GnuPG data file \'%s\'. Check to make ' . - 'sure it is readable by the current user.', $filename), - $code, $filename); - } - throw new Crypt_GPG_FileException( - 'Error reading GnuPG data file. Check to make GnuPG data ' . - 'files are readable by the current user.', $code); - default: - throw new Crypt_GPG_Exception( - 'Unknown error getting keys. Please use the \'debug\' option ' . - 'when creating the Crypt_GPG object, and file a bug report ' . - 'at ' . self::BUG_URI, $code); - } - - $privateKeyFingerprints = array(); - - $lines = explode(PHP_EOL, $output); - foreach ($lines as $line) { - $lineExp = explode(':', $line); - if ($lineExp[0] == 'fpr') { - $privateKeyFingerprints[] = $lineExp[9]; - } - } - - // get public keys - if ($keyId == '') { - $operation = '--list-public-keys'; - } else { - $operation = '--list-public-keys ' . escapeshellarg($keyId); - } - - $output = ''; - - $this->engine->reset(); - $this->engine->setOutput($output); - $this->engine->setOperation($operation, $arguments); - $this->engine->run(); - - $code = $this->engine->getErrorCode(); - - switch ($code) { - case Crypt_GPG::ERROR_NONE: - case Crypt_GPG::ERROR_KEY_NOT_FOUND: - // ignore not found key errors - break; - case Crypt_GPG::ERROR_FILE_PERMISSIONS: - $filename = $this->engine->getErrorFilename(); - if ($filename) { - throw new Crypt_GPG_FileException(sprintf( - 'Error reading GnuPG data file \'%s\'. Check to make ' . - 'sure it is readable by the current user.', $filename), - $code, $filename); - } - throw new Crypt_GPG_FileException( - 'Error reading GnuPG data file. Check to make GnuPG data ' . - 'files are readable by the current user.', $code); - default: - throw new Crypt_GPG_Exception( - 'Unknown error getting keys. Please use the \'debug\' option ' . - 'when creating the Crypt_GPG object, and file a bug report ' . - 'at ' . self::BUG_URI, $code); - } - - $keys = array(); - - $key = null; // current key - $subKey = null; // current sub-key - - $lines = explode(PHP_EOL, $output); - foreach ($lines as $line) { - $lineExp = explode(':', $line); - - if ($lineExp[0] == 'pub') { - - // new primary key means last key should be added to the array - if ($key !== null) { - $keys[] = $key; - } - - $key = new Crypt_GPG_Key(); - - $subKey = Crypt_GPG_SubKey::parse($line); - $key->addSubKey($subKey); - - } elseif ($lineExp[0] == 'sub') { - - $subKey = Crypt_GPG_SubKey::parse($line); - $key->addSubKey($subKey); - - } elseif ($lineExp[0] == 'fpr') { - - $fingerprint = $lineExp[9]; - - // set current sub-key fingerprint - $subKey->setFingerprint($fingerprint); - - // if private key exists, set has private to true - if (in_array($fingerprint, $privateKeyFingerprints)) { - $subKey->setHasPrivate(true); - } - - } elseif ($lineExp[0] == 'uid') { - - $string = stripcslashes($lineExp[9]); // as per documentation - $userId = new Crypt_GPG_UserId($string); - - if ($lineExp[1] == 'r') { - $userId->setRevoked(true); - } - - $key->addUserId($userId); - - } - } - - // add last key - if ($key !== null) { - $keys[] = $key; - } - - return $keys; + return parent::_getKeys($keyId); } // }}} @@ -895,7 +602,7 @@ class Crypt_GPG * Use the <kbd>debug</kbd> option and file a bug report if these * exceptions occur. */ - public function getFingerprint($keyId, $format = Crypt_GPG::FORMAT_NONE) + public function getFingerprint($keyId, $format = self::FORMAT_NONE) { $output = ''; $operation = '--list-keys ' . escapeshellarg($keyId); @@ -912,15 +619,17 @@ class Crypt_GPG $code = $this->engine->getErrorCode(); switch ($code) { - case Crypt_GPG::ERROR_NONE: - case Crypt_GPG::ERROR_KEY_NOT_FOUND: + case self::ERROR_NONE: + case self::ERROR_KEY_NOT_FOUND: // ignore not found key errors break; default: throw new Crypt_GPG_Exception( 'Unknown error getting key fingerprint. Please use the ' . '\'debug\' option when creating the Crypt_GPG object, and ' . - 'file a bug report at ' . self::BUG_URI, $code); + 'file a bug report at ' . self::BUG_URI, + $code + ); } $fingerprint = null; @@ -932,13 +641,13 @@ class Crypt_GPG $fingerprint = $lineExp[9]; switch ($format) { - case Crypt_GPG::FORMAT_CANONICAL: + case self::FORMAT_CANONICAL: $fingerprintExp = str_split($fingerprint, 4); $format = '%s %s %s %s %s %s %s %s %s %s'; $fingerprint = vsprintf($format, $fingerprintExp); break; - case Crypt_GPG::FORMAT_X509: + case self::FORMAT_X509: $fingerprintExp = str_split($fingerprint, 2); $fingerprint = implode(':', $fingerprintExp); break; @@ -976,7 +685,7 @@ class Crypt_GPG * * @sensitive $data */ - public function encrypt($data, $armor = true) + public function encrypt($data, $armor = self::ARMOR_ASCII) { return $this->_encrypt($data, false, null, $armor); } @@ -1012,8 +721,11 @@ class Crypt_GPG * Use the <kbd>debug</kbd> option and file a bug report if these * exceptions occur. */ - public function encryptFile($filename, $encryptedFile = null, $armor = true) - { + public function encryptFile( + $filename, + $encryptedFile = null, + $armor = self::ARMOR_ASCII + ) { return $this->_encrypt($filename, true, $encryptedFile, $armor); } @@ -1052,7 +764,7 @@ class Crypt_GPG * * @see Crypt_GPG::decryptAndVerify() */ - public function encryptAndSign($data, $armor = true) + public function encryptAndSign($data, $armor = self::ARMOR_ASCII) { return $this->_encryptAndSign($data, false, null, $armor); } @@ -1103,8 +815,10 @@ class Crypt_GPG * * @see Crypt_GPG::decryptAndVerifyFile() */ - public function encryptAndSignFile($filename, $signedFile = null, - $armor = true + public function encryptAndSignFile( + $filename, + $signedFile = null, + $armor = self::ARMOR_ASCII ) { return $this->_encryptAndSign($filename, true, $signedFile, $armor); } @@ -1315,8 +1029,11 @@ class Crypt_GPG * Use the <kbd>debug</kbd> option and file a bug report if these * exceptions occur. */ - public function sign($data, $mode = Crypt_GPG::SIGN_MODE_NORMAL, - $armor = true, $textmode = false + public function sign( + $data, + $mode = self::SIGN_MODE_NORMAL, + $armor = self::ARMOR_ASCII, + $textmode = self::TEXT_RAW ) { return $this->_sign($data, false, null, $mode, $armor, $textmode); } @@ -1376,8 +1093,12 @@ class Crypt_GPG * Use the <kbd>debug</kbd> option and file a bug report if these * exceptions occur. */ - public function signFile($filename, $signedFile = null, - $mode = Crypt_GPG::SIGN_MODE_NORMAL, $armor = true, $textmode = false + public function signFile( + $filename, + $signedFile = null, + $mode = self::SIGN_MODE_NORMAL, + $armor = self::ARMOR_ASCII, + $textmode = self::TEXT_RAW ) { return $this->_sign( $filename, @@ -1472,7 +1193,7 @@ class Crypt_GPG * @param string $passphrase optional. The passphrase of the key required * for decryption. * - * @return void + * @return Crypt_GPG the current object, for fluent interface. * * @see Crypt_GPG::decrypt() * @see Crypt_GPG::decryptFile() @@ -1485,6 +1206,7 @@ class Crypt_GPG public function addDecryptKey($key, $passphrase = null) { $this->_addKey($this->decryptKeys, true, false, $key, $passphrase); + return $this; } // }}} @@ -1498,7 +1220,7 @@ class Crypt_GPG * {@link Crypt_GPG_SubKey}. The key must be able to * encrypt. * - * @return void + * @return Crypt_GPG the current object, for fluent interface. * * @see Crypt_GPG::encrypt() * @see Crypt_GPG::encryptFile() @@ -1508,6 +1230,7 @@ class Crypt_GPG public function addEncryptKey($key) { $this->_addKey($this->encryptKeys, true, false, $key); + return $this; } // }}} @@ -1523,7 +1246,7 @@ class Crypt_GPG * @param string $passphrase optional. The passphrase of the key required * for signing. * - * @return void + * @return Crypt_GPG the current object, for fluent interface. * * @see Crypt_GPG::sign() * @see Crypt_GPG::signFile() @@ -1536,6 +1259,7 @@ class Crypt_GPG public function addSignKey($key, $passphrase = null) { $this->_addKey($this->signKeys, false, true, $key, $passphrase); + return $this; } // }}} @@ -1544,7 +1268,7 @@ class Crypt_GPG /** * Clears all decryption keys * - * @return void + * @return Crypt_GPG the current object, for fluent interface. * * @see Crypt_GPG::decrypt() * @see Crypt_GPG::addDecryptKey() @@ -1552,6 +1276,7 @@ class Crypt_GPG public function clearDecryptKeys() { $this->decryptKeys = array(); + return $this; } // }}} @@ -1560,7 +1285,7 @@ class Crypt_GPG /** * Clears all encryption keys * - * @return void + * @return Crypt_GPG the current object, for fluent interface. * * @see Crypt_GPG::encrypt() * @see Crypt_GPG::addEncryptKey() @@ -1568,6 +1293,7 @@ class Crypt_GPG public function clearEncryptKeys() { $this->encryptKeys = array(); + return $this; } // }}} @@ -1576,7 +1302,7 @@ class Crypt_GPG /** * Clears all signing keys * - * @return void + * @return Crypt_GPG the current object, for fluent interface. * * @see Crypt_GPG::sign() * @see Crypt_GPG::addSignKey() @@ -1584,6 +1310,7 @@ class Crypt_GPG public function clearSignKeys() { $this->signKeys = array(); + return $this; } // }}} @@ -1658,24 +1385,6 @@ class Crypt_GPG } // }}} - // {{{ setEngine() - - /** - * Sets the I/O engine to use for GnuPG operations - * - * Normally this method does not need to be used. It provides a means for - * dependency injection. - * - * @param Crypt_GPG_Engine $engine the engine to use. - * - * @return void - */ - public function setEngine(Crypt_GPG_Engine $engine) - { - $this->engine = $engine; - } - - // }}} // {{{ _addKey() /** @@ -1698,7 +1407,7 @@ class Crypt_GPG * * @sensitive $passphrase */ - private function _addKey(array &$array, $encrypt, $sign, $key, + protected function _addKey(array &$array, $encrypt, $sign, $key, $passphrase = null ) { $subKeys = array(); @@ -1707,7 +1416,10 @@ class Crypt_GPG $keys = $this->getKeys($key); if (count($keys) == 0) { throw new Crypt_GPG_KeyNotFoundException( - 'Key "' . $key . '" not found.', 0, $key); + 'Key "' . $key . '" not found.', + 0, + $key + ); } $key = $keys[0]; } @@ -1715,12 +1427,14 @@ class Crypt_GPG if ($key instanceof Crypt_GPG_Key) { if ($encrypt && !$key->canEncrypt()) { throw new InvalidArgumentException( - 'Key "' . $key . '" cannot encrypt.'); + 'Key "' . $key . '" cannot encrypt.' + ); } if ($sign && !$key->canSign()) { throw new InvalidArgumentException( - 'Key "' . $key . '" cannot sign.'); + 'Key "' . $key . '" cannot sign.' + ); } foreach ($key->getSubKeys() as $subKey) { @@ -1741,18 +1455,21 @@ class Crypt_GPG if (count($subKeys) === 0) { throw new InvalidArgumentException( - 'Key "' . $key . '" is not in a recognized format.'); + 'Key "' . $key . '" is not in a recognized format.' + ); } foreach ($subKeys as $subKey) { if ($encrypt && !$subKey->canEncrypt()) { throw new InvalidArgumentException( - 'Key "' . $key . '" cannot encrypt.'); + 'Key "' . $key . '" cannot encrypt.' + ); } if ($sign && !$subKey->canSign()) { throw new InvalidArgumentException( - 'Key "' . $key . '" cannot sign.'); + 'Key "' . $key . '" cannot sign.' + ); } $array[$subKey->getId()] = array( @@ -1763,6 +1480,37 @@ class Crypt_GPG } // }}} + // {{{ _setPinEntryEnv() + + /** + * Sets the PINENTRY_USER_DATA environment variable with the currently + * added keys and passphrases + * + * Keys and pasphrases are stored as an indexed array of associative + * arrays that is JSON encoded to a flat string. + * + * For GnuPG 2.x this is how passphrases are passed. For GnuPG 1.x the + * environment variable is set but not used. + * + * @param array $keys the internal key array to use. + * + * @return void + */ + protected function _setPinEntryEnv(array $keys) + { + $envKeys = array(); + foreach ($keys as $id => $key) { + $envKeys[] = array( + 'keyId' => $id, + 'fingerprint' => $key['fingerprint'], + 'passphrase' => $key['passphrase'] + ); + } + $envKeys = json_encode($envKeys); + $_ENV['PINENTRY_USER_DATA'] = $envKeys; + } + + // }}} // {{{ _importKey() /** @@ -1792,21 +1540,26 @@ class Crypt_GPG * Use the <kbd>debug</kbd> option and file a bug report if these * exceptions occur. */ - private function _importKey($key, $isFile) + protected function _importKey($key, $isFile) { $result = array(); if ($isFile) { $input = @fopen($key, 'rb'); if ($input === false) { - throw new Crypt_GPG_FileException('Could not open key file "' . - $key . '" for importing.', 0, $key); + throw new Crypt_GPG_FileException( + 'Could not open key file "' . $key . '" for importing.', + 0, + $key + ); } } else { $input = strval($key); if ($input == '') { throw new Crypt_GPG_NoDataException( - 'No valid GPG key data found.', Crypt_GPG::ERROR_NO_DATA); + 'No valid GPG key data found.', + self::ERROR_NO_DATA + ); } } @@ -1836,18 +1589,22 @@ class Crypt_GPG $code = $this->engine->getErrorCode(); switch ($code) { - case Crypt_GPG::ERROR_DUPLICATE_KEY: - case Crypt_GPG::ERROR_NONE: + case self::ERROR_DUPLICATE_KEY: + case self::ERROR_NONE: // ignore duplicate key import errors break; - case Crypt_GPG::ERROR_NO_DATA: + case self::ERROR_NO_DATA: throw new Crypt_GPG_NoDataException( - 'No valid GPG key data found.', $code); + 'No valid GPG key data found.', + $code + ); default: throw new Crypt_GPG_Exception( 'Unknown error importing GPG key. Please use the \'debug\' ' . 'option when creating the Crypt_GPG object, and file a bug ' . - 'report at ' . self::BUG_URI, $code); + 'report at ' . self::BUG_URI, + $code + ); } return $result; @@ -1880,18 +1637,23 @@ class Crypt_GPG * Use the <kbd>debug</kbd> option and file a bug report if these * exceptions occur. */ - private function _encrypt($data, $isFile, $outputFile, $armor) + protected function _encrypt($data, $isFile, $outputFile, $armor) { if (count($this->encryptKeys) === 0) { throw new Crypt_GPG_KeyNotFoundException( - 'No encryption keys specified.'); + 'No encryption keys specified.' + ); } if ($isFile) { $input = @fopen($data, 'rb'); if ($input === false) { - throw new Crypt_GPG_FileException('Could not open input file "' . - $data . '" for encryption.', 0, $data); + throw new Crypt_GPG_FileException( + 'Could not open input file "' . $data . + '" for encryption.', + 0, + $data + ); } } else { $input = strval($data); @@ -1905,9 +1667,12 @@ class Crypt_GPG if ($isFile) { fclose($input); } - throw new Crypt_GPG_FileException('Could not open output ' . - 'file "' . $outputFile . '" for storing encrypted data.', - 0, $outputFile); + throw new Crypt_GPG_FileException( + 'Could not open output file "' . $outputFile . + '" for storing encrypted data.', + 0, + $outputFile + ); } } @@ -1932,11 +1697,13 @@ class Crypt_GPG $code = $this->engine->getErrorCode(); - if ($code !== Crypt_GPG::ERROR_NONE) { + if ($code !== self::ERROR_NONE) { throw new Crypt_GPG_Exception( 'Unknown error encrypting data. Please use the \'debug\' ' . 'option when creating the Crypt_GPG object, and file a bug ' . - 'report at ' . self::BUG_URI, $code); + 'report at ' . self::BUG_URI, + $code + ); } if ($outputFile === null) { @@ -1976,20 +1743,26 @@ class Crypt_GPG * Use the <kbd>debug</kbd> option and file a bug report if these * exceptions occur. */ - private function _decrypt($data, $isFile, $outputFile) + protected function _decrypt($data, $isFile, $outputFile) { if ($isFile) { $input = @fopen($data, 'rb'); if ($input === false) { - throw new Crypt_GPG_FileException('Could not open input file "' . - $data . '" for decryption.', 0, $data); + throw new Crypt_GPG_FileException( + 'Could not open input file "' . $data . + '" for decryption.', + 0, + $data + ); } } else { $input = strval($data); if ($input == '') { throw new Crypt_GPG_NoDataException( 'Cannot decrypt data. No PGP encrypted data was found in '. - 'the provided data.', Crypt_GPG::ERROR_NO_DATA); + 'the provided data.', + self::ERROR_NO_DATA + ); } } @@ -2001,14 +1774,22 @@ class Crypt_GPG if ($isFile) { fclose($input); } - throw new Crypt_GPG_FileException('Could not open output ' . - 'file "' . $outputFile . '" for storing decrypted data.', - 0, $outputFile); + throw new Crypt_GPG_FileException( + 'Could not open output file "' . $outputFile . + '" for storing decrypted data.', + 0, + $outputFile + ); } } - $handler = new Crypt_GPG_DecryptStatusHandler($this->engine, - $this->decryptKeys); + $handler = new Crypt_GPG_DecryptStatusHandler( + $this->engine, + $this->decryptKeys + ); + + // If using gpg-agent, set the decrypt pins used by the pinentry + $this->_setPinEntryEnv($this->decryptKeys); $this->engine->reset(); $this->engine->addStatusHandler(array($handler, 'handle')); @@ -2080,19 +1861,23 @@ class Crypt_GPG * Use the <kbd>debug</kbd> option and file a bug report if these * exceptions occur. */ - private function _sign($data, $isFile, $outputFile, $mode, $armor, + protected function _sign($data, $isFile, $outputFile, $mode, $armor, $textmode ) { if (count($this->signKeys) === 0) { throw new Crypt_GPG_KeyNotFoundException( - 'No signing keys specified.'); + 'No signing keys specified.' + ); } if ($isFile) { $input = @fopen($data, 'rb'); if ($input === false) { - throw new Crypt_GPG_FileException('Could not open input ' . - 'file "' . $data . '" for signing.', 0, $data); + throw new Crypt_GPG_FileException( + 'Could not open input file "' . $data . '" for signing.', + 0, + $data + ); } } else { $input = strval($data); @@ -2106,20 +1891,23 @@ class Crypt_GPG if ($isFile) { fclose($input); } - throw new Crypt_GPG_FileException('Could not open output ' . - 'file "' . $outputFile . '" for storing signed ' . - 'data.', 0, $outputFile); + throw new Crypt_GPG_FileException( + 'Could not open output file "' . $outputFile . + '" for storing signed data.', + 0, + $outputFile + ); } } switch ($mode) { - case Crypt_GPG::SIGN_MODE_DETACHED: + case self::SIGN_MODE_DETACHED: $operation = '--detach-sign'; break; - case Crypt_GPG::SIGN_MODE_CLEAR: + case self::SIGN_MODE_CLEAR: $operation = '--clearsign'; break; - case Crypt_GPG::SIGN_MODE_NORMAL: + case self::SIGN_MODE_NORMAL: default: $operation = '--sign'; break; @@ -2139,6 +1927,9 @@ class Crypt_GPG escapeshellarg($key['fingerprint']); } + // If using gpg-agent, set the sign pins used by the pinentry + $this->_setPinEntryEnv($this->signKeys); + $this->engine->reset(); $this->engine->addStatusHandler(array($this, 'handleSignStatus')); $this->engine->setInput($input); @@ -2157,24 +1948,32 @@ class Crypt_GPG $code = $this->engine->getErrorCode(); switch ($code) { - case Crypt_GPG::ERROR_NONE: + case self::ERROR_NONE: break; - case Crypt_GPG::ERROR_KEY_NOT_FOUND: + case self::ERROR_KEY_NOT_FOUND: throw new Crypt_GPG_KeyNotFoundException( 'Cannot sign data. Private key not found. Import the '. - 'private key before trying to sign data.', $code, - $this->engine->getErrorKeyId()); - case Crypt_GPG::ERROR_BAD_PASSPHRASE: + 'private key before trying to sign data.', + $code, + $this->engine->getErrorKeyId() + ); + case self::ERROR_BAD_PASSPHRASE: throw new Crypt_GPG_BadPassphraseException( - 'Cannot sign data. Incorrect passphrase provided.', $code); - case Crypt_GPG::ERROR_MISSING_PASSPHRASE: + 'Cannot sign data. Incorrect passphrase provided.', + $code + ); + case self::ERROR_MISSING_PASSPHRASE: throw new Crypt_GPG_BadPassphraseException( - 'Cannot sign data. No passphrase provided.', $code); + 'Cannot sign data. No passphrase provided.', + $code + ); default: throw new Crypt_GPG_Exception( 'Unknown error signing data. Please use the \'debug\' option ' . 'when creating the Crypt_GPG object, and file a bug report ' . - 'at ' . self::BUG_URI, $code); + 'at ' . self::BUG_URI, + $code + ); } if ($outputFile === null) { @@ -2216,25 +2015,30 @@ class Crypt_GPG * Use the <kbd>debug</kbd> option and file a bug report if these * exceptions occur. */ - private function _encryptAndSign($data, $isFile, $outputFile, $armor) + protected function _encryptAndSign($data, $isFile, $outputFile, $armor) { if (count($this->signKeys) === 0) { throw new Crypt_GPG_KeyNotFoundException( - 'No signing keys specified.'); + 'No signing keys specified.' + ); } if (count($this->encryptKeys) === 0) { throw new Crypt_GPG_KeyNotFoundException( - 'No encryption keys specified.'); + 'No encryption keys specified.' + ); } if ($isFile) { $input = @fopen($data, 'rb'); if ($input === false) { - throw new Crypt_GPG_FileException('Could not open input ' . - 'file "' . $data . '" for encrypting and signing.', 0, - $data); + throw new Crypt_GPG_FileException( + 'Could not open input file "' . $data . + '" for encrypting and signing.', + 0, + $data + ); } } else { $input = strval($data); @@ -2248,9 +2052,12 @@ class Crypt_GPG if ($isFile) { fclose($input); } - throw new Crypt_GPG_FileException('Could not open output ' . - 'file "' . $outputFile . '" for storing encrypted, ' . - 'signed data.', 0, $outputFile); + throw new Crypt_GPG_FileException( + 'Could not open output file "' . $outputFile . + '" for storing encrypted, signed data.', + 0, + $outputFile + ); } } @@ -2261,6 +2068,9 @@ class Crypt_GPG escapeshellarg($key['fingerprint']); } + // If using gpg-agent, set the sign pins used by the pinentry + $this->_setPinEntryEnv($this->signKeys); + foreach ($this->encryptKeys as $key) { $arguments[] = '--recipient ' . escapeshellarg($key['fingerprint']); } @@ -2283,25 +2093,32 @@ class Crypt_GPG $code = $this->engine->getErrorCode(); switch ($code) { - case Crypt_GPG::ERROR_NONE: + case self::ERROR_NONE: break; - case Crypt_GPG::ERROR_KEY_NOT_FOUND: + case self::ERROR_KEY_NOT_FOUND: throw new Crypt_GPG_KeyNotFoundException( 'Cannot sign encrypted data. Private key not found. Import '. 'the private key before trying to sign the encrypted data.', - $code, $this->engine->getErrorKeyId()); - case Crypt_GPG::ERROR_BAD_PASSPHRASE: + $code, + $this->engine->getErrorKeyId() + ); + case self::ERROR_BAD_PASSPHRASE: throw new Crypt_GPG_BadPassphraseException( 'Cannot sign encrypted data. Incorrect passphrase provided.', - $code); - case Crypt_GPG::ERROR_MISSING_PASSPHRASE: + $code + ); + case self::ERROR_MISSING_PASSPHRASE: throw new Crypt_GPG_BadPassphraseException( - 'Cannot sign encrypted data. No passphrase provided.', $code); + 'Cannot sign encrypted data. No passphrase provided.', + $code + ); default: throw new Crypt_GPG_Exception( 'Unknown error encrypting and signing data. Please use the ' . '\'debug\' option when creating the Crypt_GPG object, and ' . - 'file a bug report at ' . self::BUG_URI, $code); + 'file a bug report at ' . self::BUG_URI, + $code + ); } if ($outputFile === null) { @@ -2335,7 +2152,7 @@ class Crypt_GPG * * @see Crypt_GPG_Signature */ - private function _verify($data, $isFile, $signature) + protected function _verify($data, $isFile, $signature) { if ($signature == '') { $operation = '--verify'; @@ -2352,14 +2169,19 @@ class Crypt_GPG if ($isFile) { $input = @fopen($data, 'rb'); if ($input === false) { - throw new Crypt_GPG_FileException('Could not open input ' . - 'file "' . $data . '" for verifying.', 0, $data); + throw new Crypt_GPG_FileException( + 'Could not open input file "' . $data . '" for verifying.', + 0, + $data + ); } } else { $input = strval($data); if ($input == '') { throw new Crypt_GPG_NoDataException( - 'No valid signature data found.', Crypt_GPG::ERROR_NO_DATA); + 'No valid signature data found.', + self::ERROR_NO_DATA + ); } } @@ -2385,21 +2207,27 @@ class Crypt_GPG $code = $this->engine->getErrorCode(); switch ($code) { - case Crypt_GPG::ERROR_NONE: - case Crypt_GPG::ERROR_BAD_SIGNATURE: + case self::ERROR_NONE: + case self::ERROR_BAD_SIGNATURE: break; - case Crypt_GPG::ERROR_NO_DATA: + case self::ERROR_NO_DATA: throw new Crypt_GPG_NoDataException( - 'No valid signature data found.', $code); - case Crypt_GPG::ERROR_KEY_NOT_FOUND: + 'No valid signature data found.', + $code + ); + case self::ERROR_KEY_NOT_FOUND: throw new Crypt_GPG_KeyNotFoundException( 'Public key required for data verification not in keyring.', - $code, $this->engine->getErrorKeyId()); + $code, + $this->engine->getErrorKeyId() + ); default: throw new Crypt_GPG_Exception( 'Unknown error validating signature details. Please use the ' . '\'debug\' option when creating the Crypt_GPG object, and ' . - 'file a bug report at ' . self::BUG_URI, $code); + 'file a bug report at ' . self::BUG_URI, + $code + ); } return $handler->getSignatures(); @@ -2445,21 +2273,25 @@ class Crypt_GPG * * @see Crypt_GPG_Signature */ - private function _decryptAndVerify($data, $isFile, $outputFile) + protected function _decryptAndVerify($data, $isFile, $outputFile) { if ($isFile) { $input = @fopen($data, 'rb'); if ($input === false) { - throw new Crypt_GPG_FileException('Could not open input ' . - 'file "' . $data . '" for decrypting and verifying.', 0, - $data); + throw new Crypt_GPG_FileException( + 'Could not open input file "' . $data . + '" for decrypting and verifying.', + 0, + $data + ); } } else { $input = strval($data); if ($input == '') { throw new Crypt_GPG_NoDataException( 'No valid encrypted signed data found.', - Crypt_GPG::ERROR_NO_DATA); + self::ERROR_NO_DATA + ); } } @@ -2471,16 +2303,24 @@ class Crypt_GPG if ($isFile) { fclose($input); } - throw new Crypt_GPG_FileException('Could not open output ' . - 'file "' . $outputFile . '" for storing decrypted data.', - 0, $outputFile); + throw new Crypt_GPG_FileException( + 'Could not open output file "' . $outputFile . + '" for storing decrypted data.', + 0, + $outputFile + ); } } $verifyHandler = new Crypt_GPG_VerifyStatusHandler(); - $decryptHandler = new Crypt_GPG_DecryptStatusHandler($this->engine, - $this->decryptKeys); + $decryptHandler = new Crypt_GPG_DecryptStatusHandler( + $this->engine, + $this->decryptKeys + ); + + // If using gpg-agent, set the decrypt pins used by the pinentry + $this->_setPinEntryEnv($this->decryptKeys); $this->engine->reset(); $this->engine->addStatusHandler(array($verifyHandler, 'handle')); @@ -2515,13 +2355,17 @@ class Crypt_GPG 'is in the keyring or the public key required for data ' . 'verification is not in the keyring. Import a suitable ' . 'key before trying to decrypt and verify this data.', - self::ERROR_KEY_NOT_FOUND, $this->engine->getErrorKeyId()); + self::ERROR_KEY_NOT_FOUND, + $this->engine->getErrorKeyId() + ); } if ($e instanceof Crypt_GPG_NoDataException) { throw new Crypt_GPG_NoDataException( 'Cannot decrypt and verify data. No PGP encrypted data ' . - 'was found in the provided data.', self::ERROR_NO_DATA); + 'was found in the provided data.', + self::ERROR_NO_DATA + ); } throw $e; diff --git a/program/lib/Crypt/GPG/ByteUtils.php b/program/lib/Crypt/GPG/ByteUtils.php new file mode 100644 index 000000000..342905471 --- /dev/null +++ b/program/lib/Crypt/GPG/ByteUtils.php @@ -0,0 +1,105 @@ +<?php + +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * A class for performing byte-wise string operations + * + * GPG I/O streams are managed using bytes rather than characters. + * + * PHP version 5 + * + * LICENSE: + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id$ + * @link http://pear.php.net/package/Crypt_GPG + */ + +// {{{ class Crypt_GPG_ByteUtils + +/** + * A class for performing byte-wise string operations + * + * GPG I/O streams are managed using bytes rather than characters. This class + * requires the mbstring extension to be available. + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/Crypt_GPG + * @link http://php.net/mbstring + */ +class Crypt_GPG_ByteUtils +{ + // {{{ strlen() + + /** + * Gets the length of a string in bytes + * + * This is used for stream-based communication with the GPG subprocess. + * + * @param string $string the string for which to get the length. + * + * @return integer the length of the string in bytes. + */ + public static function strlen($string) + { + return mb_strlen($string, '8bit'); + } + + // }}} + // {{{ substr() + + /** + * Gets the substring of a string in bytes + * + * This is used for stream-based communication with the GPG subprocess. + * + * @param string $string the input string. + * @param integer $start the starting point at which to get the substring. + * @param integer $length optional. The length of the substring. + * + * @return string the extracted part of the string. Unlike the default PHP + * <kbd>substr()</kbd> function, the returned value is + * always a string and never false. + */ + public static function substr($string, $start, $length = null) + { + if ($length === null) { + return mb_substr( + $string, + $start, + self::strlen($string) - $start, '8bit' + ); + } + + return mb_substr($string, $start, $length, '8bit'); + } + + // }}} +} + +// }}} + +?> diff --git a/program/lib/Crypt/GPG/DecryptStatusHandler.php b/program/lib/Crypt/GPG/DecryptStatusHandler.php index 40e8d50ed..67c0dd74b 100644 --- a/program/lib/Crypt/GPG/DecryptStatusHandler.php +++ b/program/lib/Crypt/GPG/DecryptStatusHandler.php @@ -3,9 +3,9 @@ /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** - * Crypt_GPG is a package to use GPG from PHP + * Crypt_GPG is a package to use GnuPG from PHP * - * This file contains an object that handles GPG's status output for the + * This file contains an object that handles GnuPG's status output for the * decrypt operation. * * PHP version 5 @@ -29,9 +29,9 @@ * @category Encryption * @package Crypt_GPG * @author Michael Gauthier <mike@silverorange.com> - * @copyright 2008-2009 silverorange + * @copyright 2008-2013 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: DecryptStatusHandler.php 302814 2010-08-26 15:43:07Z gauthierm $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Crypt_GPG * @link http://www.gnupg.org/ */ @@ -42,7 +42,7 @@ require_once 'Crypt/GPG.php'; /** - * GPG exception classes + * Crypt_GPG exception classes */ require_once 'Crypt/GPG/Exceptions.php'; @@ -55,8 +55,8 @@ require_once 'Crypt/GPG/Exceptions.php'; * * This class is responsible for sending the passphrase commands when required * by the {@link Crypt_GPG::decrypt()} method. See <b>doc/DETAILS</b> in the - * {@link http://www.gnupg.org/download/ GPG distribution} for detailed - * information on GPG's status output for the decrypt operation. + * {@link http://www.gnupg.org/download/ GnuPG distribution} for detailed + * information on GnuPG's status output for the decrypt operation. * * This class is also responsible for parsing error status and throwing a * meaningful exception in the event that decryption fails. @@ -64,7 +64,7 @@ require_once 'Crypt/GPG/Exceptions.php'; * @category Encryption * @package Crypt_GPG * @author Michael Gauthier <mike@silverorange.com> - * @copyright 2008 silverorange + * @copyright 2008-2013 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 * @link http://pear.php.net/package/Crypt_GPG * @link http://www.gnupg.org/ @@ -293,8 +293,10 @@ class Crypt_GPG_DecryptStatusHandler throw new Crypt_GPG_KeyNotFoundException( 'Cannot decrypt data. No suitable private key is in the ' . 'keyring. Import a suitable private key before trying to ' . - 'decrypt this data.', $code, $keyId); - + 'decrypt this data.', + $code, + $keyId + ); case Crypt_GPG::ERROR_BAD_PASSPHRASE: $badPassphrases = array_diff_key( $this->badPassphrases, @@ -316,17 +318,23 @@ class Crypt_GPG_DecryptStatusHandler implode('", "', $badPassphrases) . '".'; } - throw new Crypt_GPG_BadPassphraseException($message, $code, - $badPassphrases, $missingPassphrases); - + throw new Crypt_GPG_BadPassphraseException( + $message, + $code, + $badPassphrases, + $missingPassphrases + ); case Crypt_GPG::ERROR_NO_DATA: throw new Crypt_GPG_NoDataException( 'Cannot decrypt data. No PGP encrypted data was found in '. - 'the provided data.', $code); - + 'the provided data.', + $code + ); default: throw new Crypt_GPG_Exception( - 'Unknown error decrypting data.', $code); + 'Unknown error decrypting data.', + $code + ); } } diff --git a/program/lib/Crypt/GPG/Engine.php b/program/lib/Crypt/GPG/Engine.php index 081be8e21..601541443 100644 --- a/program/lib/Crypt/GPG/Engine.php +++ b/program/lib/Crypt/GPG/Engine.php @@ -30,9 +30,9 @@ * @package Crypt_GPG * @author Nathan Fredrickson <nathan@silverorange.com> * @author Michael Gauthier <mike@silverorange.com> - * @copyright 2005-2010 silverorange + * @copyright 2005-2013 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Engine.php 302822 2010-08-26 17:30:57Z gauthierm $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Crypt_GPG * @link http://www.gnupg.org/ */ @@ -48,6 +48,16 @@ require_once 'Crypt/GPG.php'; require_once 'Crypt/GPG/Exceptions.php'; /** + * Byte string operations. + */ +require_once 'Crypt/GPG/ByteUtils.php'; + +/** + * Process control methods. + */ +require_once 'Crypt/GPG/ProcessControl.php'; + +/** * Standard PEAR exception is used if GPG binary is not found. */ require_once 'PEAR/Exception.php'; @@ -70,7 +80,7 @@ require_once 'PEAR/Exception.php'; * @package Crypt_GPG * @author Nathan Fredrickson <nathan@silverorange.com> * @author Michael Gauthier <mike@silverorange.com> - * @copyright 2005-2010 silverorange + * @copyright 2005-2013 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 * @link http://pear.php.net/package/Crypt_GPG * @link http://www.gnupg.org/ @@ -163,6 +173,17 @@ class Crypt_GPG_Engine private $_binary = ''; /** + * Location of GnuPG agent binary + * + * Only used for GnuPG 2.x + * + * @var string + * @see Crypt_GPG_Engine::__construct() + * @see Crypt_GPG_Engine::_getAgent() + */ + private $_agent = ''; + + /** * Directory containing the GPG key files * * This property only contains the path when the <i>homedir</i> option @@ -228,6 +249,15 @@ class Crypt_GPG_Engine private $_pipes = array(); /** + * Array of pipes used for communication with the gpg-agent binary + * + * This is an array of file descriptor resources. + * + * @var array + */ + private $_agentPipes = array(); + + /** * Array of currently opened pipes * * This array is used to keep track of remaining opened pipes so they can @@ -248,6 +278,20 @@ class Crypt_GPG_Engine private $_process = null; /** + * A handle for the gpg-agent process + * + * @var resource + */ + private $_agentProcess = null; + + /** + * GPG agent daemon socket and PID for running gpg-agent + * + * @var string + */ + private $_agentInfo = null; + + /** * Whether or not the operating system is Darwin (OS X) * * @var boolean @@ -367,18 +411,6 @@ class Crypt_GPG_Engine */ private $_version = ''; - /** - * Cached value indicating whether or not mbstring function overloading is - * on for strlen - * - * This is cached for optimal performance inside the I/O loop. - * - * @var boolean - * @see Crypt_GPG_Engine::_byteLength() - * @see Crypt_GPG_Engine::_byteSubstring() - */ - private static $_mbStringOverload = null; - // }}} // {{{ __construct() @@ -432,6 +464,14 @@ class Crypt_GPG_Engine * operating system. The option * <kbd>gpgBinary</kbd> is a * deprecated alias for this option. + * - <kbd>string agent</kbd> - the location of the GnuPG agent + * binary. The gpg-agent is only + * used for GnuPG 2.x. If not + * specified, the engine attempts + * to auto-detect the gpg-agent + * binary location using a list of + * know default locations for the + * current operating system. * - <kbd>boolean debug</kbd> - whether or not to use debug mode. * When debug mode is on, all * communication to and from the GPG @@ -457,24 +497,38 @@ class Crypt_GPG_Engine * @throws PEAR_Exception if the provided <kbd>binary</kbd> is invalid, or * if no <kbd>binary</kbd> is provided and no suitable binary could * be found. + * + * @throws PEAR_Exception if the provided <kbd>agent</kbd> is invalid, or + * if no <kbd>agent</kbd> is provided and no suitable gpg-agent + * cound be found. */ public function __construct(array $options = array()) { $this->_isDarwin = (strncmp(strtoupper(PHP_OS), 'DARWIN', 6) === 0); - // populate mbstring overloading cache if not set - if (self::$_mbStringOverload === null) { - self::$_mbStringOverload = (extension_loaded('mbstring') - && (ini_get('mbstring.func_overload') & 0x02) === 0x02); - } - // get homedir if (array_key_exists('homedir', $options)) { $this->_homedir = (string)$options['homedir']; } else { - // note: this requires the package OS dep exclude 'windows' - $info = posix_getpwuid(posix_getuid()); - $this->_homedir = $info['dir'].'/.gnupg'; + if (extension_loaded('posix')) { + // note: this requires the package OS dep exclude 'windows' + $info = posix_getpwuid(posix_getuid()); + $this->_homedir = $info['dir'].'/.gnupg'; + } else { + if (isset($_SERVER['HOME'])) { + $this->_homedir = $_SERVER['HOME']; + } else { + $this->_homedir = getenv('HOME'); + } + } + + if ($this->_homedir === false) { + throw new Crypt_GPG_FileException( + 'Could not locate homedir. Please specify the homedir ' . + 'to use with the \'homedir\' option when instantiating ' . + 'the Crypt_GPG object.' + ); + } } // attempt to create homedir if it does not exist @@ -484,16 +538,40 @@ class Crypt_GPG_Engine // with 0777, homedir is set to 0700. chmod($this->_homedir, 0700); } else { - throw new Crypt_GPG_FileException('The \'homedir\' "' . - $this->_homedir . '" is not readable or does not exist '. - 'and cannot be created. This can happen if \'homedir\' '. - 'is not specified in the Crypt_GPG options, Crypt_GPG is '. - 'run as the web user, and the web user has no home '. - 'directory.', - 0, $this->_homedir); + throw new Crypt_GPG_FileException( + 'The \'homedir\' "' . $this->_homedir . '" is not ' . + 'readable or does not exist and cannot be created. This ' . + 'can happen if \'homedir\' is not specified in the ' . + 'Crypt_GPG options, Crypt_GPG is run as the web user, ' . + 'and the web user has no home directory.', + 0, + $this->_homedir + ); } } + // check homedir permissions (See Bug #19833) + if (!is_executable($this->_homedir)) { + throw new Crypt_GPG_FileException( + 'The \'homedir\' "' . $this->_homedir . '" is not enterable ' . + 'by the current user. Please check the permissions on your ' . + 'homedir and make sure the current user can both enter and ' . + 'write to the directory.', + 0, + $this->_homedir + ); + } + if (!is_writeable($this->_homedir)) { + throw new Crypt_GPG_FileException( + 'The \'homedir\' "' . $this->_homedir . '" is not writable ' . + 'by the current user. Please check the permissions on your ' . + 'homedir and make sure the current user can both enter and ' . + 'write to the directory.', + 0, + $this->_homedir + ); + } + // get binary if (array_key_exists('binary', $options)) { $this->_binary = (string)$options['binary']; @@ -505,9 +583,26 @@ class Crypt_GPG_Engine } if ($this->_binary == '' || !is_executable($this->_binary)) { - throw new PEAR_Exception('GPG binary not found. If you are sure '. - 'the GPG binary is installed, please specify the location of '. - 'the GPG binary using the \'binary\' driver option.'); + throw new PEAR_Exception( + 'GPG binary not found. If you are sure the GPG binary is ' . + 'installed, please specify the location of the GPG binary ' . + 'using the \'binary\' driver option.' + ); + } + + // get agent + if (array_key_exists('agent', $options)) { + $this->_agent = (string)$options['agent']; + } else { + $this->_agent = $this->_getAgent(); + } + + if ($this->_agent == '' || !is_executable($this->_agent)) { + throw new PEAR_Exception( + 'gpg-agent binary not found. If you are sure the gpg-agent ' . + 'is installed, please specify the location of the gpg-agent ' . + 'binary using the \'agent\' driver option.' + ); } /* @@ -891,7 +986,7 @@ class Crypt_GPG_Engine } $matches = array(); - $expression = '/gpg \(GnuPG\) (\S+)/'; + $expression = '#gpg \(GnuPG[A-Za-z0-9/]*?\) (\S+)#'; if (preg_match($expression, $info, $matches) === 1) { $this->_version = $matches[1]; @@ -1114,6 +1209,9 @@ class Crypt_GPG_Engine $fdCommand = $this->_pipes[self::FD_COMMAND]; $fdMessage = $this->_pipes[self::FD_MESSAGE]; + // select loop delay in milliseconds + $delay = 0; + while (true) { $inputStreams = array(); @@ -1166,15 +1264,15 @@ class Crypt_GPG_Engine $outputStreams[] = $this->_output; } - if ($this->_commandBuffer != '') { + if ($this->_commandBuffer != '' && is_resource($fdCommand)) { $outputStreams[] = $fdCommand; } - if ($messageBuffer != '') { + if ($messageBuffer != '' && is_resource($fdMessage)) { $outputStreams[] = $fdMessage; } - if ($inputBuffer != '') { + if ($inputBuffer != '' && is_resource($fdInput)) { $outputStreams[] = $fdInput; } @@ -1209,33 +1307,41 @@ class Crypt_GPG_Engine } // write input (to GPG) - if (in_array($fdInput, $outputStreams)) { + if (in_array($fdInput, $outputStreams, true)) { $this->_debug('GPG is ready for input'); - $chunk = self::_byteSubstring( + $chunk = Crypt_GPG_ByteUtils::substr( $inputBuffer, 0, self::CHUNK_SIZE ); - $length = self::_byteLength($chunk); + $length = Crypt_GPG_ByteUtils::strlen($chunk); $this->_debug( '=> about to write ' . $length . ' bytes to GPG input' ); $length = fwrite($fdInput, $chunk, $length); - - $this->_debug('=> wrote ' . $length . ' bytes'); - - $inputBuffer = self::_byteSubstring( - $inputBuffer, - $length - ); + if ($length === 0) { + // If we wrote 0 bytes it was either EAGAIN or EPIPE. Since + // the pipe was seleted for writing, we assume it was EPIPE. + // There's no way to get the actual erorr code in PHP. See + // PHP Bug #39598. https://bugs.php.net/bug.php?id=39598 + $this->_debug('=> broken pipe on GPG input'); + $this->_debug('=> closing pipe GPG input'); + $this->_closePipe(self::FD_INPUT); + } else { + $this->_debug('=> wrote ' . $length . ' bytes'); + $inputBuffer = Crypt_GPG_ByteUtils::substr( + $inputBuffer, + $length + ); + } } // read input (from PHP stream) - if (in_array($this->_input, $inputStreams)) { + if (in_array($this->_input, $inputStreams, true)) { $this->_debug('input stream is ready for reading'); $this->_debug( '=> about to read ' . self::CHUNK_SIZE . @@ -1243,36 +1349,48 @@ class Crypt_GPG_Engine ); $chunk = fread($this->_input, self::CHUNK_SIZE); - $length = self::_byteLength($chunk); + $length = Crypt_GPG_ByteUtils::strlen($chunk); $inputBuffer .= $chunk; $this->_debug('=> read ' . $length . ' bytes'); } // write message (to GPG) - if (in_array($fdMessage, $outputStreams)) { + if (in_array($fdMessage, $outputStreams, true)) { $this->_debug('GPG is ready for message data'); - $chunk = self::_byteSubstring( + $chunk = Crypt_GPG_ByteUtils::substr( $messageBuffer, 0, self::CHUNK_SIZE ); - $length = self::_byteLength($chunk); + $length = Crypt_GPG_ByteUtils::strlen($chunk); $this->_debug( '=> about to write ' . $length . ' bytes to GPG message' ); $length = fwrite($fdMessage, $chunk, $length); - $this->_debug('=> wrote ' . $length . ' bytes'); - - $messageBuffer = self::_byteSubstring($messageBuffer, $length); + if ($length === 0) { + // If we wrote 0 bytes it was either EAGAIN or EPIPE. Since + // the pipe was seleted for writing, we assume it was EPIPE. + // There's no way to get the actual erorr code in PHP. See + // PHP Bug #39598. https://bugs.php.net/bug.php?id=39598 + $this->_debug('=> broken pipe on GPG message'); + $this->_debug('=> closing pipe GPG message'); + $this->_closePipe(self::FD_MESSAGE); + } else { + $this->_debug('=> wrote ' . $length . ' bytes'); + $messageBuffer = Crypt_GPG_ByteUtils::substr( + $messageBuffer, + $length + ); + } } // read message (from PHP stream) - if (in_array($this->_message, $inputStreams)) { + if (in_array($this->_message, $inputStreams, true)) { $this->_debug('message stream is ready for reading'); $this->_debug( '=> about to read ' . self::CHUNK_SIZE . @@ -1280,14 +1398,14 @@ class Crypt_GPG_Engine ); $chunk = fread($this->_message, self::CHUNK_SIZE); - $length = self::_byteLength($chunk); + $length = Crypt_GPG_ByteUtils::strlen($chunk); $messageBuffer .= $chunk; $this->_debug('=> read ' . $length . ' bytes'); } // read output (from GPG) - if (in_array($fdOutput, $inputStreams)) { + if (in_array($fdOutput, $inputStreams, true)) { $this->_debug('GPG output stream ready for reading'); $this->_debug( '=> about to read ' . self::CHUNK_SIZE . @@ -1295,23 +1413,23 @@ class Crypt_GPG_Engine ); $chunk = fread($fdOutput, self::CHUNK_SIZE); - $length = self::_byteLength($chunk); + $length = Crypt_GPG_ByteUtils::strlen($chunk); $outputBuffer .= $chunk; $this->_debug('=> read ' . $length . ' bytes'); } // write output (to PHP stream) - if (in_array($this->_output, $outputStreams)) { + if (in_array($this->_output, $outputStreams, true)) { $this->_debug('output stream is ready for data'); - $chunk = self::_byteSubstring( + $chunk = Crypt_GPG_ByteUtils::substr( $outputBuffer, 0, self::CHUNK_SIZE ); - $length = self::_byteLength($chunk); + $length = Crypt_GPG_ByteUtils::strlen($chunk); $this->_debug( '=> about to write ' . $length . ' bytes to output stream' @@ -1321,11 +1439,14 @@ class Crypt_GPG_Engine $this->_debug('=> wrote ' . $length . ' bytes'); - $outputBuffer = self::_byteSubstring($outputBuffer, $length); + $outputBuffer = Crypt_GPG_ByteUtils::substr( + $outputBuffer, + $length + ); } // read error (from GPG) - if (in_array($fdError, $inputStreams)) { + if (in_array($fdError, $inputStreams, true)) { $this->_debug('GPG error stream ready for reading'); $this->_debug( '=> about to read ' . self::CHUNK_SIZE . @@ -1333,14 +1454,14 @@ class Crypt_GPG_Engine ); $chunk = fread($fdError, self::CHUNK_SIZE); - $length = self::_byteLength($chunk); + $length = Crypt_GPG_ByteUtils::strlen($chunk); $errorBuffer .= $chunk; $this->_debug('=> read ' . $length . ' bytes'); // pass lines to error handlers while (($pos = strpos($errorBuffer, PHP_EOL)) !== false) { - $line = self::_byteSubstring($errorBuffer, 0, $pos); + $line = Crypt_GPG_ByteUtils::substr($errorBuffer, 0, $pos); foreach ($this->_errorHandlers as $handler) { array_unshift($handler['args'], $line); call_user_func_array( @@ -1350,15 +1471,15 @@ class Crypt_GPG_Engine array_shift($handler['args']); } - $errorBuffer = self::_byteSubString( + $errorBuffer = Crypt_GPG_ByteUtils::substr( $errorBuffer, - $pos + self::_byteLength(PHP_EOL) + $pos + Crypt_GPG_ByteUtils::strlen(PHP_EOL) ); } } // read status (from GPG) - if (in_array($fdStatus, $inputStreams)) { + if (in_array($fdStatus, $inputStreams, true)) { $this->_debug('GPG status stream ready for reading'); $this->_debug( '=> about to read ' . self::CHUNK_SIZE . @@ -1366,17 +1487,17 @@ class Crypt_GPG_Engine ); $chunk = fread($fdStatus, self::CHUNK_SIZE); - $length = self::_byteLength($chunk); + $length = Crypt_GPG_ByteUtils::strlen($chunk); $statusBuffer .= $chunk; $this->_debug('=> read ' . $length . ' bytes'); // pass lines to status handlers while (($pos = strpos($statusBuffer, PHP_EOL)) !== false) { - $line = self::_byteSubstring($statusBuffer, 0, $pos); + $line = Crypt_GPG_ByteUtils::substr($statusBuffer, 0, $pos); // only pass lines beginning with magic prefix - if (self::_byteSubstring($line, 0, 9) == '[GNUPG:] ') { - $line = self::_byteSubstring($line, 9); + if (Crypt_GPG_ByteUtils::substr($line, 0, 9) == '[GNUPG:] ') { + $line = Crypt_GPG_ByteUtils::substr($line, 9); foreach ($this->_statusHandlers as $handler) { array_unshift($handler['args'], $line); call_user_func_array( @@ -1387,38 +1508,60 @@ class Crypt_GPG_Engine array_shift($handler['args']); } } - $statusBuffer = self::_byteSubString( + $statusBuffer = Crypt_GPG_ByteUtils::substr( $statusBuffer, - $pos + self::_byteLength(PHP_EOL) + $pos + Crypt_GPG_ByteUtils::strlen(PHP_EOL) ); } } // write command (to GPG) - if (in_array($fdCommand, $outputStreams)) { + if (in_array($fdCommand, $outputStreams, true)) { $this->_debug('GPG is ready for command data'); // send commands - $chunk = self::_byteSubstring( + $chunk = Crypt_GPG_ByteUtils::substr( $this->_commandBuffer, 0, self::CHUNK_SIZE ); - $length = self::_byteLength($chunk); + $length = Crypt_GPG_ByteUtils::strlen($chunk); $this->_debug( '=> about to write ' . $length . ' bytes to GPG command' ); $length = fwrite($fdCommand, $chunk, $length); + if ($length === 0) { + // If we wrote 0 bytes it was either EAGAIN or EPIPE. Since + // the pipe was seleted for writing, we assume it was EPIPE. + // There's no way to get the actual erorr code in PHP. See + // PHP Bug #39598. https://bugs.php.net/bug.php?id=39598 + $this->_debug('=> broken pipe on GPG command'); + $this->_debug('=> closing pipe GPG command'); + $this->_closePipe(self::FD_COMMAND); + } else { + $this->_debug('=> wrote ' . $length); + $this->_commandBuffer = Crypt_GPG_ByteUtils::substr( + $this->_commandBuffer, + $length + ); + } + } - $this->_debug('=> wrote ' . $length); + if (count($outputStreams) === 0 || count($inputStreams) === 0) { + // we have an I/O imbalance, increase the select loop delay + // to smooth things out + $delay += 10; + } else { + // things are running smoothly, decrease the delay + $delay -= 8; + $delay = max(0, $delay); + } - $this->_commandBuffer = self::_byteSubstring( - $this->_commandBuffer, - $length - ); + if ($delay > 0) { + usleep($delay); } } // end loop while streams are open @@ -1449,12 +1592,83 @@ class Crypt_GPG_Engine { $version = $this->getVersion(); + // Binary operations will not work on Windows with PHP < 5.2.6. This is + // in case stream_select() ever works on Windows. + $rb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'r' : 'rb'; + $wb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'w' : 'wb'; + $env = $_ENV; // Newer versions of GnuPG return localized results. Crypt_GPG only // works with English, so set the locale to 'C' for the subprocess. $env['LC_ALL'] = 'C'; + // If using GnuPG 2.x start the gpg-agent + if (version_compare($version, '2.0.0', 'ge')) { + $agentCommandLine = $this->_agent; + + $agentArguments = array( + '--options /dev/null', // ignore any saved options + '--csh', // output is easier to parse + '--keep-display', // prevent passing --display to pinentry + '--no-grab', + '--ignore-cache-for-signing', + '--pinentry-touch-file /dev/null', + '--disable-scdaemon', + '--no-use-standard-socket', + '--pinentry-program ' . escapeshellarg($this->_getPinEntry()) + ); + + if ($this->_homedir) { + $agentArguments[] = '--homedir ' . + escapeshellarg($this->_homedir); + } + + + $agentCommandLine .= ' ' . implode(' ', $agentArguments) + . ' --daemon'; + + $agentDescriptorSpec = array( + self::FD_INPUT => array('pipe', $rb), // stdin + self::FD_OUTPUT => array('pipe', $wb), // stdout + self::FD_ERROR => array('pipe', $wb) // stderr + ); + + $this->_debug('OPENING GPG-AGENT SUBPROCESS WITH THE FOLLOWING COMMAND:'); + $this->_debug($agentCommandLine); + + $this->_agentProcess = proc_open( + $agentCommandLine, + $agentDescriptorSpec, + $this->_agentPipes, + null, + $env, + array('binary_pipes' => true) + ); + + if (!is_resource($this->_agentProcess)) { + throw new Crypt_GPG_OpenSubprocessException( + 'Unable to open gpg-agent subprocess.', + 0, + $agentCommandLine + ); + } + + // Get GPG_AGENT_INFO and set environment variable for gpg process. + // This is a blocking read, but is only 1 line. + $agentInfo = fread( + $this->_agentPipes[self::FD_OUTPUT], + self::CHUNK_SIZE + ); + + $agentInfo = explode(' ', $agentInfo, 3); + $this->_agentInfo = $agentInfo[2]; + $env['GPG_AGENT_INFO'] = $this->_agentInfo; + + // gpg-agent daemon is started, we can close the launching process + $this->_closeAgentLaunchProcess(); + } + $commandLine = $this->_binary; $defaultArguments = array( @@ -1511,11 +1725,6 @@ class Crypt_GPG_Engine $commandLine .= ' ' . implode(' ', $arguments) . ' ' . $this->_operation; - // Binary operations will not work on Windows with PHP < 5.2.6. This is - // in case stream_select() ever works on Windows. - $rb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'r' : 'rb'; - $wb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'w' : 'wb'; - $descriptorSpec = array( self::FD_INPUT => array('pipe', $rb), // stdin self::FD_OUTPUT => array('pipe', $wb), // stdout @@ -1525,7 +1734,7 @@ class Crypt_GPG_Engine self::FD_MESSAGE => array('pipe', $rb) // message ); - $this->_debug('OPENING SUBPROCESS WITH THE FOLLOWING COMMAND:'); + $this->_debug('OPENING GPG SUBPROCESS WITH THE FOLLOWING COMMAND:'); $this->_debug($commandLine); $this->_process = proc_open( @@ -1542,6 +1751,11 @@ class Crypt_GPG_Engine 'Unable to open GPG subprocess.', 0, $commandLine); } + // Set streams as non-blocking. See Bug #18618. + foreach ($this->_pipes as $pipe) { + stream_set_blocking($pipe, 0); + } + $this->_openPipes = $this->_pipes; $this->_errorCode = Crypt_GPG::ERROR_NONE; } @@ -1562,8 +1776,11 @@ class Crypt_GPG_Engine */ private function _closeSubprocess() { + // clear PINs from environment if they were set + $_ENV['PINENTRY_USER_DATA'] = null; + if (is_resource($this->_process)) { - $this->_debug('CLOSING SUBPROCESS'); + $this->_debug('CLOSING GPG SUBPROCESS'); // close remaining open pipes foreach (array_keys($this->_openPipes) as $pipeNumber) { @@ -1590,9 +1807,55 @@ class Crypt_GPG_Engine $this->_process = null; $this->_pipes = array(); } + + $this->_closeAgentLaunchProcess(); + + if ($this->_agentInfo !== null) { + $this->_debug('STOPPING GPG-AGENT DAEMON'); + + $parts = explode(':', $this->_agentInfo, 3); + $pid = $parts[1]; + $process = new Crypt_GPG_ProcessControl($pid); + + // terminate agent daemon + $process->terminate(); + + while ($process->isRunning()) { + usleep(10000); // 10 ms + $process->terminate(); + } + + $this->_agentInfo = null; + + $this->_debug('GPG-AGENT DAEMON STOPPED'); + } } // }}} + // {{ _closeAgentLaunchProcess() + + private function _closeAgentLaunchProcess() + { + if (is_resource($this->_agentProcess)) { + $this->_debug('CLOSING GPG-AGENT LAUNCH PROCESS'); + + // close agent pipes + foreach ($this->_agentPipes as $pipe) { + fflush($pipe); + fclose($pipe); + } + + // close agent launching process + proc_close($this->_agentProcess); + + $this->_agentProcess = null; + $this->_agentPipes = array(); + + $this->_debug('GPG-AGENT LAUNCH PROCESS CLOSED'); + } + } + + // }} // {{{ _closePipe() /** @@ -1658,6 +1921,55 @@ class Crypt_GPG_Engine } // }}} + // {{ _getAgent() + + private function _getAgent() + { + $agent = ''; + + if ($this->_isDarwin) { + $agentFiles = array( + '/opt/local/bin/gpg-agent', // MacPorts + '/usr/local/bin/gpg-agent', // Mac GPG + '/sw/bin/gpg-agent', // Fink + '/usr/bin/gpg-agent' + ); + } else { + $agentFiles = array( + '/usr/bin/gpg-agent', + '/usr/local/bin/gpg-agent' + ); + } + + foreach ($agentFiles as $agentFile) { + if (is_executable($agentFile)) { + $agent = $agentFile; + break; + } + } + + return $agent; + } + + // }} + // {{ _getPinEntry() + + private function _getPinEntry() + { + // Check if we're running directly from git or if we're using a + // PEAR-packaged version + $pinEntry = '@bin-dir@' . DIRECTORY_SEPARATOR . 'crypt-gpg-pinentry'; + + if ($pinEntry[0] === '@') { + $pinEntry = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' + . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'scripts' + . DIRECTORY_SEPARATOR . 'crypt-gpg-pinentry'; + } + + return $pinEntry; + } + + // }} // {{{ _debug() /** @@ -1672,7 +1984,7 @@ class Crypt_GPG_Engine private function _debug($text) { if ($this->_debug) { - if (array_key_exists('SHELL', $_ENV)) { + if (php_sapi_name() === 'cli') { foreach (explode(PHP_EOL, $text) as $line) { echo "Crypt_GPG DEBUG: ", $line, PHP_EOL; } @@ -1687,70 +1999,6 @@ class Crypt_GPG_Engine } // }}} - // {{{ _byteLength() - - /** - * Gets the length of a string in bytes even if mbstring function - * overloading is turned on - * - * This is used for stream-based communication with the GPG subprocess. - * - * @param string $string the string for which to get the length. - * - * @return integer the length of the string in bytes. - * - * @see Crypt_GPG_Engine::$_mbStringOverload - */ - private static function _byteLength($string) - { - if (self::$_mbStringOverload) { - return mb_strlen($string, '8bit'); - } - - return strlen((binary)$string); - } - - // }}} - // {{{ _byteSubstring() - - /** - * Gets the substring of a string in bytes even if mbstring function - * overloading is turned on - * - * This is used for stream-based communication with the GPG subprocess. - * - * @param string $string the input string. - * @param integer $start the starting point at which to get the substring. - * @param integer $length optional. The length of the substring. - * - * @return string the extracted part of the string. Unlike the default PHP - * <kbd>substr()</kbd> function, the returned value is - * always a string and never false. - * - * @see Crypt_GPG_Engine::$_mbStringOverload - */ - private static function _byteSubstring($string, $start, $length = null) - { - if (self::$_mbStringOverload) { - if ($length === null) { - return mb_substr( - $string, - $start, - self::_byteLength($string) - $start, '8bit' - ); - } - - return mb_substr($string, $start, $length, '8bit'); - } - - if ($length === null) { - return (string)substr((binary)$string, $start); - } - - return (string)substr((binary)$string, $start, $length); - } - - // }}} } // }}} diff --git a/program/lib/Crypt/GPG/Exceptions.php b/program/lib/Crypt/GPG/Exceptions.php index 744acf5d4..0ca917db6 100644 --- a/program/lib/Crypt/GPG/Exceptions.php +++ b/program/lib/Crypt/GPG/Exceptions.php @@ -32,9 +32,9 @@ * @package Crypt_GPG * @author Nathan Fredrickson <nathan@silverorange.com> * @author Michael Gauthier <mike@silverorange.com> - * @copyright 2005 silverorange + * @copyright 2005-2011 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Exceptions.php 273745 2009-01-18 05:24:25Z gauthierm $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Crypt_GPG */ @@ -469,5 +469,130 @@ class Crypt_GPG_DeletePrivateKeyException extends Crypt_GPG_Exception } // }}} +// {{{ class Crypt_GPG_KeyNotCreatedException + +/** + * An exception thrown when an attempt is made to generate a key and the + * attempt fails + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2011 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/Crypt_GPG + */ +class Crypt_GPG_KeyNotCreatedException extends Crypt_GPG_Exception +{ +} + +// }}} +// {{{ class Crypt_GPG_InvalidKeyParamsException + +/** + * An exception thrown when an attempt is made to generate a key and the + * key parameters set on the key generator are invalid + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2011 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/Crypt_GPG + */ +class Crypt_GPG_InvalidKeyParamsException extends Crypt_GPG_Exception +{ + // {{{ private class properties + + /** + * The key algorithm + * + * @var integer + */ + private $_algorithm = 0; + + /** + * The key size + * + * @var integer + */ + private $_size = 0; + + /** + * The key usage + * + * @var integer + */ + private $_usage = 0; + + // }}} + // {{{ __construct() + + /** + * Creates a new Crypt_GPG_InvalidKeyParamsException + * + * @param string $message an error message. + * @param integer $code a user defined error code. + * @param string $algorithm the key algorithm. + * @param string $size the key size. + * @param string $usage the key usage. + */ + public function __construct( + $message, + $code = 0, + $algorithm = 0, + $size = 0, + $usage = 0 + ) { + parent::__construct($message, $code); + + $this->_algorithm = $algorithm; + $this->_size = $size; + $this->_usage = $usage; + } + + // }}} + // {{{ getAlgorithm() + + /** + * Gets the key algorithm + * + * @return integer the key algorithm. + */ + public function getAlgorithm() + { + return $this->_algorithm; + } + + // }}} + // {{{ getSize() + + /** + * Gets the key size + * + * @return integer the key size. + */ + public function getSize() + { + return $this->_size; + } + + // }}} + // {{{ getUsage() + + /** + * Gets the key usage + * + * @return integer the key usage. + */ + public function getUsage() + { + return $this->_usage; + } + + // }}} +} + +// }}} ?> diff --git a/program/lib/Crypt/GPG/Key.php b/program/lib/Crypt/GPG/Key.php index 67a4b9c7d..6ecb538bc 100644 --- a/program/lib/Crypt/GPG/Key.php +++ b/program/lib/Crypt/GPG/Key.php @@ -28,7 +28,7 @@ * @author Michael Gauthier <mike@silverorange.com> * @copyright 2008-2010 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Key.php 295621 2010-03-01 04:18:54Z gauthierm $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Crypt_GPG */ diff --git a/program/lib/Crypt/GPG/KeyGenerator.php b/program/lib/Crypt/GPG/KeyGenerator.php new file mode 100644 index 000000000..f59c0ee3a --- /dev/null +++ b/program/lib/Crypt/GPG/KeyGenerator.php @@ -0,0 +1,790 @@ +<?php + +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * Crypt_GPG is a package to use GPG from PHP + * + * This file contains an object that handles GnuPG key generation. + * + * PHP version 5 + * + * LICENSE: + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2011-2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id:$ + * @link http://pear.php.net/package/Crypt_GPG + * @link http://www.gnupg.org/ + */ + +/** + * Base class for GPG methods + */ +require_once 'Crypt/GPGAbstract.php'; + +/** + * Status output handler for key generation + */ +require_once 'Crypt/GPG/KeyGeneratorStatusHandler.php'; + +/** + * Error output handler for key generation + */ +require_once 'Crypt/GPG/KeyGeneratorErrorHandler.php'; + +// {{{ class Crypt_GPG_KeyGenerator + +/** + * GnuPG key generator + * + * This class provides an object oriented interface for generating keys with + * the GNU Privacy Guard (GPG). + * + * Secure key generation requires true random numbers, and as such can be slow. + * If the operating system runs out of entropy, key generation will block until + * more entropy is available. + * + * If quick key generation is important, a hardware entropy generator, or an + * entropy gathering daemon may be installed. For example, administrators of + * Debian systems may want to install the 'randomsound' package. + * + * This class uses the experimental automated key generation support available + * in GnuPG. See <b>doc/DETAILS</b> in the + * {@link http://www.gnupg.org/download/ GPG distribution} for detailed + * information on the key generation format. + * + * @category Encryption + * @package Crypt_GPG + * @author Nathan Fredrickson <nathan@silverorange.com> + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2005-2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/Crypt_GPG + * @link http://www.gnupg.org/ + */ +class Crypt_GPG_KeyGenerator extends Crypt_GPGAbstract +{ + // {{{ protected properties + + /** + * The expiration date of generated keys + * + * @var integer + * + * @see Crypt_GPG_KeyGenerator::setExpirationDate() + */ + protected $expirationDate = 0; + + /** + * The passphrase of generated keys + * + * @var string + * + * @see Crypt_GPG_KeyGenerator::setPassphrase() + */ + protected $passphrase = ''; + + /** + * The algorithm for generated primary keys + * + * @var integer + * + * @see Crypt_GPG_KeyGenerator::setKeyParams() + */ + protected $keyAlgorithm = Crypt_GPG_SubKey::ALGORITHM_DSA; + + /** + * The size of generated primary keys + * + * @var integer + * + * @see Crypt_GPG_KeyGenerator::setKeyParams() + */ + protected $keySize = 1024; + + /** + * The usages of generated primary keys + * + * This is a bitwise combination of the usage constants in + * {@link Crypt_GPG_SubKey}. + * + * @var integer + * + * @see Crypt_GPG_KeyGenerator::setKeyParams() + */ + protected $keyUsage = 6; // USAGE_SIGN | USAGE_CERTIFY + + /** + * The algorithm for generated sub-keys + * + * @var integer + * + * @see Crypt_GPG_KeyGenerator::setSubKeyParams() + */ + protected $subKeyAlgorithm = Crypt_GPG_SubKey::ALGORITHM_ELGAMAL_ENC; + + /** + * The size of generated sub-keys + * + * @var integer + * + * @see Crypt_GPG_KeyGenerator::setSubKeyParams() + */ + protected $subKeySize = 2048; + + /** + * The usages of generated sub-keys + * + * This is a bitwise combination of the usage constants in + * {@link Crypt_GPG_SubKey}. + * + * @var integer + * + * @see Crypt_GPG_KeyGenerator::setSubKeyParams() + */ + protected $subKeyUsage = Crypt_GPG_SubKey::USAGE_ENCRYPT; + + /** + * The GnuPG status handler to use for key generation + * + * @var Crypt_GPG_KeyGeneratorStatusHandler + * + * @see Crypt_GPG_KeyGenerator::setStatusHandler() + */ + protected $statusHandler = null; + + /** + * The GnuPG error handler to use for key generation + * + * @var Crypt_GPG_KeyGeneratorErrorHandler + * + * @see Crypt_GPG_KeyGenerator::setErrorHandler() + */ + protected $errorHandler = null; + + // }}} + // {{{ __construct() + + /** + * Creates a new GnuPG key generator + * + * Available options are: + * + * - <kbd>string homedir</kbd> - the directory where the GPG + * keyring files are stored. If not + * specified, Crypt_GPG uses the + * default of <kbd>~/.gnupg</kbd>. + * - <kbd>string publicKeyring</kbd> - the file path of the public + * keyring. Use this if the public + * keyring is not in the homedir, or + * if the keyring is in a directory + * not writable by the process + * invoking GPG (like Apache). Then + * you can specify the path to the + * keyring with this option + * (/foo/bar/pubring.gpg), and specify + * a writable directory (like /tmp) + * using the <i>homedir</i> option. + * - <kbd>string privateKeyring</kbd> - the file path of the private + * keyring. Use this if the private + * keyring is not in the homedir, or + * if the keyring is in a directory + * not writable by the process + * invoking GPG (like Apache). Then + * you can specify the path to the + * keyring with this option + * (/foo/bar/secring.gpg), and specify + * a writable directory (like /tmp) + * using the <i>homedir</i> option. + * - <kbd>string trustDb</kbd> - the file path of the web-of-trust + * database. Use this if the trust + * database is not in the homedir, or + * if the database is in a directory + * not writable by the process + * invoking GPG (like Apache). Then + * you can specify the path to the + * trust database with this option + * (/foo/bar/trustdb.gpg), and specify + * a writable directory (like /tmp) + * using the <i>homedir</i> option. + * - <kbd>string binary</kbd> - the location of the GPG binary. If + * not specified, the driver attempts + * to auto-detect the GPG binary + * location using a list of known + * default locations for the current + * operating system. The option + * <kbd>gpgBinary</kbd> is a + * deprecated alias for this option. + * - <kbd>string agent</kbd> - the location of the GnuPG agent + * binary. The gpg-agent is only + * used for GnuPG 2.x. If not + * specified, the engine attempts + * to auto-detect the gpg-agent + * binary location using a list of + * know default locations for the + * current operating system. + * - <kbd>boolean debug</kbd> - whether or not to use debug mode. + * When debug mode is on, all + * communication to and from the GPG + * subprocess is logged. This can be + * + * @param array $options optional. An array of options used to create the + * GPG object. All options are optional and are + * represented as key-value pairs. + * + * @throws Crypt_GPG_FileException if the <kbd>homedir</kbd> does not exist + * and cannot be created. This can happen if <kbd>homedir</kbd> is + * not specified, Crypt_GPG is run as the web user, and the web + * user has no home directory. This exception is also thrown if any + * of the options <kbd>publicKeyring</kbd>, + * <kbd>privateKeyring</kbd> or <kbd>trustDb</kbd> options are + * specified but the files do not exist or are are not readable. + * This can happen if the user running the Crypt_GPG process (for + * example, the Apache user) does not have permission to read the + * files. + * + * @throws PEAR_Exception if the provided <kbd>binary</kbd> is invalid, or + * if no <kbd>binary</kbd> is provided and no suitable binary could + * be found. + * + * @throws PEAR_Exception if the provided <kbd>agent</kbd> is invalid, or + * if no <kbd>agent</kbd> is provided and no suitable gpg-agent + * cound be found. + */ + public function __construct(array $options = array()) + { + parent::__construct($options); + + $this->statusHandler = new Crypt_GPG_KeyGeneratorStatusHandler(); + $this->errorHandler = new Crypt_GPG_KeyGeneratorErrorHandler(); + } + + // }}} + // {{{ setExpirationDate() + + /** + * Sets the expiration date of generated keys + * + * @param string|integer $date either a string that may be parsed by + * PHP's strtotime() function, or an integer + * timestamp representing the number of seconds + * since the UNIX epoch. This date must be at + * least one date in the future. Keys that + * expire in the past may not be generated. Use + * an expiration date of 0 for keys that do not + * expire. + * + * @throws InvalidArgumentException if the date is not a valid format, or + * if the date is not at least one day in + * the future, or if the date is greater + * than 2038-01-19T03:14:07. + * + * @return Crypt_GPG_KeyGenerator the current object, for fluent interface. + */ + public function setExpirationDate($date) + { + if (is_int($date) || ctype_digit(strval($date))) { + $expirationDate = intval($date); + } else { + $expirationDate = strtotime($date); + } + + if ($expirationDate === false) { + throw new InvalidArgumentException( + sprintf( + 'Invalid expiration date format: "%s". Please use a ' . + 'format compatible with PHP\'s strtotime().', + $date + ) + ); + } + + if ($expirationDate !== 0 && $expirationDate < time() + 86400) { + throw new InvalidArgumentException( + 'Expiration date must be at least a day in the future.' + ); + } + + // GnuPG suffers from the 2038 bug + if ($expirationDate > 2147483647) { + throw new InvalidArgumentException( + 'Expiration date must not be greater than 2038-01-19T03:14:07.' + ); + } + + $this->expirationDate = $expirationDate; + + return $this; + } + + // }}} + // {{{ setPassphrase() + + /** + * Sets the passphrase of generated keys + * + * @param string $passphrase the passphrase to use for generated keys. Use + * null or an empty string for no passphrase. + * + * @return Crypt_GPG_KeyGenerator the current object, for fluent interface. + */ + public function setPassphrase($passphrase) + { + $this->passphrase = strval($passphrase); + return $this; + } + + // }}} + // {{{ setKeyParams() + + /** + * Sets the parameters for the primary key of generated key-pairs + * + * @param integer $algorithm the algorithm used by the key. This should be + * one of the Crypt_GPG_SubKey::ALGORITHM_* + * constants. + * @param integer $size optional. The size of the key. Different + * algorithms have different size requirements. + * If not specified, the default size for the + * specified algorithm will be used. If an + * invalid key size is used, GnuPG will do its + * best to round it to a valid size. + * @param integer $usage optional. A bitwise combination of key usages. + * If not specified, the primary key will be used + * only to sign and certify. This is the default + * behavior of GnuPG in interactive mode. Use + * the Crypt_GPG_SubKey::USAGE_* constants here. + * The primary key may be used to certify even + * if the certify usage is not specified. + * + * @return Crypt_GPG_KeyGenerator the current object, for fluent interface. + */ + public function setKeyParams($algorithm, $size = 0, $usage = 0) + { + $apgorithm = intval($algorithm); + + if ($algorithm === Crypt_GPG_SubKey::ALGORITHM_ELGAMAL_ENC) { + throw new Crypt_GPG_InvalidKeyParamsException( + 'Primary key algorithm must be capable of signing. The ' . + 'Elgamal algorithm can only encrypt.', + 0, + $algorithm, + $size, + $usage + ); + } + + if ($size != 0) { + $size = intval($size); + } + + if ($usage != 0) { + $usage = intval($usage); + } + + $usageEncrypt = Crypt_GPG_SubKey::USAGE_ENCRYPT; + + if ( $algorithm === Crypt_GPG_SubKey::ALGORITHM_DSA + && ($usage & $usageEncrypt) === $usageEncrypt + ) { + throw new Crypt_GPG_InvalidKeyParamsException( + 'The DSA algorithm is not capable of encrypting. Please ' . + 'specify a different algorithm or do not include encryption ' . + 'as a usage for the primary key.', + 0, + $algorithm, + $size, + $usage + ); + } + + $this->keyAlgorithm = $algorithm; + + if ($size != 0) { + $this->keySize = $size; + } + + if ($usage != 0) { + $this->keyUsage = $usage; + } + + return $this; + } + + // }}} + // {{{ setSubKeyParams() + + /** + * Sets the parameters for the sub-key of generated key-pairs + * + * @param integer $algorithm the algorithm used by the key. This should be + * one of the Crypt_GPG_SubKey::ALGORITHM_* + * constants. + * @param integer $size optional. The size of the key. Different + * algorithms have different size requirements. + * If not specified, the default size for the + * specified algorithm will be used. If an + * invalid key size is used, GnuPG will do its + * best to round it to a valid size. + * @param integer $usage optional. A bitwise combination of key usages. + * If not specified, the sub-key will be used + * only to encrypt. This is the default behavior + * of GnuPG in interactive mode. Use the + * Crypt_GPG_SubKey::USAGE_* constants here. + * + * @return Crypt_GPG_KeyGenerator the current object, for fluent interface. + */ + public function setSubKeyParams($algorithm, $size = '', $usage = 0) + { + $apgorithm = intval($algorithm); + + if ($size != 0) { + $size = intval($size); + } + + if ($usage != 0) { + $usage = intval($usage); + } + + $usageSign = Crypt_GPG_SubKey::USAGE_SIGN; + + if ( $algorithm === Crypt_GPG_SubKey::ALGORITHM_ELGAMAL_ENC + && ($usage & $usageSign) === $usageSign + ) { + throw new Crypt_GPG_InvalidKeyParamsException( + 'The Elgamal algorithm is not capable of signing. Please ' . + 'specify a different algorithm or do not include signing ' . + 'as a usage for the sub-key.', + 0, + $algorithm, + $size, + $usage + ); + } + + $usageEncrypt = Crypt_GPG_SubKey::USAGE_ENCRYPT; + + if ( $algorithm === Crypt_GPG_SubKey::ALGORITHM_DSA + && ($usage & $usageEncrypt) === $usageEncrypt + ) { + throw new Crypt_GPG_InvalidKeyParamsException( + 'The DSA algorithm is not capable of encrypting. Please ' . + 'specify a different algorithm or do not include encryption ' . + 'as a usage for the sub-key.', + 0, + $algorithm, + $size, + $usage + ); + } + + $this->subKeyAlgorithm = $algorithm; + + if ($size != 0) { + $this->subKeySize = $size; + } + + if ($usage != 0) { + $this->subKeyUsage = $usage; + } + + return $this; + } + + // }}} + // {{{ setStatusHandler() + + /** + * Sets the status handler to use for key generation + * + * Normally this method does not need to be used. It provides a means for + * dependency injection. + * + * @param Crypt_GPG_KeyStatusHandler $handler the key status handler to + * use. + * + * @return Crypt_GPG_KeyGenerator the current object, for fluent interface. + */ + public function setStatusHandler( + Crypt_GPG_KeyGeneratorStatusHandler $handler + ) { + $this->statusHandler = $handler; + return $this; + } + + // }}} + // {{{ setErrorHandler() + + /** + * Sets the error handler to use for key generation + * + * Normally this method does not need to be used. It provides a means for + * dependency injection. + * + * @param Crypt_GPG_KeyErrorHandler $handler the key error handler to + * use. + * + * @return Crypt_GPG_KeyGenerator the current object, for fluent interface. + */ + public function setErrorHandler( + Crypt_GPG_KeyGeneratorErrorHandler $handler + ) { + $this->errorHandler = $handler; + return $this; + } + + // }}} + // {{{ generateKey() + + /** + * Generates a new key-pair in the current keyring + * + * Secure key generation requires true random numbers, and as such can be + * solw. If the operating system runs out of entropy, key generation will + * block until more entropy is available. + * + * If quick key generation is important, a hardware entropy generator, or + * an entropy gathering daemon may be installed. For example, + * administrators of Debian systems may want to install the 'randomsound' + * package. + * + * @param string|Crypt_GPG_UserId $name either a {@link Crypt_GPG_UserId} + * object, or a string containing + * the name of the user id. + * @param string $email optional. If <i>$name</i> is + * specified as a string, this is + * the email address of the user id. + * @param string $comment optional. If <i>$name</i> is + * specified as a string, this is + * the comment of the user id. + * + * @return Crypt_GPG_Key the newly generated key. + * + * @throws Crypt_GPG_KeyNotCreatedException if the key parameters are + * incorrect, if an unknown error occurs during key generation, or + * if the newly generated key is not found in the keyring. + * + * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs. + * Use the <kbd>debug</kbd> option and file a bug report if these + * exceptions occur. + */ + public function generateKey($name, $email = '', $comment = '') + { + $handle = uniqid('key', true); + + $userId = $this->getUserId($name, $email, $comment); + + $keyParams = array( + 'Key-Type' => $this->keyAlgorithm, + 'Key-Length' => $this->keySize, + 'Key-Usage' => $this->getUsage($this->keyUsage), + 'Subkey-Type' => $this->subKeyAlgorithm, + 'Subkey-Length' => $this->subKeySize, + 'Subkey-Usage' => $this->getUsage($this->subKeyUsage), + 'Name-Real' => $userId->getName(), + 'Handle' => $handle, + ); + + if ($this->expirationDate != 0) { + // GnuPG only accepts granularity of days + $expirationDate = date('Y-m-d', $this->expirationDate); + $keyParams['Expire-Date'] = $expirationDate; + } + + if ($this->passphrase != '') { + $keyParams['Passphrase'] = $this->passphrase; + } + + if ($userId->getEmail() != '') { + $keyParams['Name-Email'] = $userId->getEmail(); + } + + if ($userId->getComment() != '') { + $keyParams['Name-Comment'] = $userId->getComment(); + } + + + $keyParamsFormatted = array(); + foreach ($keyParams as $name => $value) { + $keyParamsFormatted[] = $name . ': ' . $value; + } + + $input = implode("\n", $keyParamsFormatted) . "\n%commit\n"; + + $statusHandler = clone $this->statusHandler; + $statusHandler->setHandle($handle); + + $errorHandler = clone $this->errorHandler; + + $this->engine->reset(); + $this->engine->addStatusHandler(array($statusHandler, 'handle')); + $this->engine->addErrorHandler(array($errorHandler, 'handle')); + $this->engine->setInput($input); + $this->engine->setOutput($output); + $this->engine->setOperation('--gen-key', array('--batch')); + $this->engine->run(); + + $code = $errorHandler->getErrorCode(); + switch ($code) { + case self::ERROR_BAD_KEY_PARAMS: + switch ($errorHandler->getLineNumber()) { + case 1: + throw new Crypt_GPG_InvalidKeyParamsException( + 'Invalid primary key algorithm specified.', + 0, + $this->keyAlgorithm, + $this->keySize, + $this->keyUsage + ); + case 4: + throw new Crypt_GPG_InvalidKeyParamsException( + 'Invalid sub-key algorithm specified.', + 0, + $this->subKeyAlgorithm, + $this->subKeySize, + $this->subKeyUsage + ); + default: + throw new Crypt_GPG_InvalidKeyParamsException( + 'Invalid key algorithm specified.' + ); + } + } + + $code = $this->engine->getErrorCode(); + + switch ($code) { + case self::ERROR_NONE: + break; + default: + throw new Crypt_GPG_Exception( + 'Unknown error generating key-pair. Please use the \'debug\' ' . + 'option when creating the Crypt_GPG object, and file a bug ' . + 'report at ' . self::BUG_URI, + $code + ); + } + + $code = $statusHandler->getErrorCode(); + + switch ($code) { + case self::ERROR_NONE: + break; + case self::ERROR_KEY_NOT_CREATED: + throw new Crypt_GPG_KeyNotCreatedException( + 'Unable to create new key-pair. Invalid key parameters. ' . + 'Make sure the specified key algorithms and sizes are ' . + 'correct.', + $code + ); + } + + $fingerprint = $statusHandler->getKeyFingerprint(); + $keys = $this->_getKeys($fingerprint); + + if (count($keys) === 0) { + throw new Crypt_GPG_KeyNotCreatedException( + sprintf( + 'Newly created key "%s" not found in keyring.', + $fingerprint + ) + ); + } + + return $keys[0]; + } + + // }}} + // {{{ getUsage() + + /** + * Builds a GnuPG key usage string suitable for key generation + * + * See <b>doc/DETAILS</b> in the + * {@link http://www.gnupg.org/download/ GPG distribution} for detailed + * information on the key usage format. + * + * @param integer $usage a bitwise combination of the key usages. This is + * a combination of the Crypt_GPG_SubKey::USAGE_* + * constants. + * + * @return string the key usage string. + */ + protected function getUsage($usage) + { + $map = array( + Crypt_GPG_SubKey::USAGE_ENCRYPT => 'encrypt', + Crypt_GPG_SubKey::USAGE_SIGN => 'sign', + Crypt_GPG_SubKey::USAGE_CERTIFY => 'cert', + Crypt_GPG_SubKey::USAGE_AUTHENTICATION => 'auth', + ); + + // cert is always used for primary keys and does not need to be + // specified + $usage &= ~Crypt_GPG_SubKey::USAGE_CERTIFY; + + $usageArray = array(); + + foreach ($map as $key => $value) { + if (($usage & $key) === $key) { + $usageArray[] = $value; + } + } + + return implode(',', $usageArray); + } + + // }}} + // {{{ getUserId() + + /** + * Gets a user id object from parameters + * + * @param string|Crypt_GPG_UserId $name either a {@link Crypt_GPG_UserId} + * object, or a string containing + * the name of the user id. + * @param string $email optional. If <i>$name</i> is + * specified as a string, this is + * the email address of the user id. + * @param string $comment optional. If <i>$name</i> is + * specified as a string, this is + * the comment of the user id. + * + * @return Crypt_GPG_UserId a user id object for the specified parameters. + */ + protected function getUserId($name, $email = '', $comment = '') + { + if ($name instanceof Crypt_GPG_UserId) { + $userId = $name; + } else { + $userId = new Crypt_GPG_UserId(); + $userId->setName($name)->setEmail($email)->setComment($comment); + } + + return $userId; + } + + // }}} +} + +// }}} + +?> diff --git a/program/lib/Crypt/GPG/KeyGeneratorErrorHandler.php b/program/lib/Crypt/GPG/KeyGeneratorErrorHandler.php new file mode 100644 index 000000000..ad9ebf395 --- /dev/null +++ b/program/lib/Crypt/GPG/KeyGeneratorErrorHandler.php @@ -0,0 +1,121 @@ +<?php + +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * Crypt_GPG is a package to use GPG from PHP + * + * This file contains an object that handles GPG's error output for the + * key generation operation. + * + * PHP version 5 + * + * LICENSE: + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2011-2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id:$ + * @link http://pear.php.net/package/Crypt_GPG + * @link http://www.gnupg.org/ + */ + +/** + * Error line handler for the key generation operation + * + * This class is used internally by Crypt_GPG and does not need be used + * directly. See the {@link Crypt_GPG} class for end-user API. + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2011-2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/Crypt_GPG + * @link http://www.gnupg.org/ + */ +class Crypt_GPG_KeyGeneratorErrorHandler +{ + // {{{ protected properties + + /** + * Error code (if any) caused by key generation + * + * @var integer + */ + protected $errorCode = Crypt_GPG::ERROR_NONE; + + /** + * Line number at which the error occurred + * + * @var integer + */ + protected $lineNumber = null; + + // }}} + // {{{ handle() + + /** + * Handles an error line + * + * @param string $line the error line to handle. + * + * @return void + */ + public function handle($line) + { + $matches = array(); + $pattern = '/:([0-9]+): invalid algorithm$/'; + if (preg_match($pattern, $line, $matches) === 1) { + $this->errorCode = Crypt_GPG::ERROR_BAD_KEY_PARAMS; + $this->lineNumber = intval($matches[1]); + } + } + + // }}} + // {{{ getErrorCode() + + /** + * Gets the error code resulting from key gneration + * + * @return integer the error code resulting from key generation. + */ + public function getErrorCode() + { + return $this->errorCode; + } + + // }}} + // {{{ getLineNumber() + + /** + * Gets the line number at which the error occurred + * + * @return integer the line number at which the error occurred. Null if + * no error occurred. + */ + public function getLineNumber() + { + return $this->lineNumber; + } + + // }}} +} + +?> diff --git a/program/lib/Crypt/GPG/KeyGeneratorStatusHandler.php b/program/lib/Crypt/GPG/KeyGeneratorStatusHandler.php new file mode 100644 index 000000000..8b4c85c7a --- /dev/null +++ b/program/lib/Crypt/GPG/KeyGeneratorStatusHandler.php @@ -0,0 +1,173 @@ +<?php + +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * Crypt_GPG is a package to use GPG from PHP + * + * This file contains an object that handles GPG's status output for the + * key generation operation. + * + * PHP version 5 + * + * LICENSE: + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2011-2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id:$ + * @link http://pear.php.net/package/Crypt_GPG + * @link http://www.gnupg.org/ + */ + +/** + * Status line handler for the key generation operation + * + * This class is used internally by Crypt_GPG and does not need be used + * directly. See the {@link Crypt_GPG} class for end-user API. + * + * This class is responsible for parsing the final key fingerprint from the + * status output and for updating the key generation progress file. See + * <b>doc/DETAILS</b> in the + * {@link http://www.gnupg.org/download/ GPG distribution} for detailed + * information on GPG's status output for the batch key generation operation. + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2011-2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/Crypt_GPG + * @link http://www.gnupg.org/ + */ +class Crypt_GPG_KeyGeneratorStatusHandler +{ + // {{{ protected properties + + /** + * The key fingerprint + * + * Ths key fingerprint is emitted by GPG after the key generation is + * complete. + * + * @var string + */ + protected $keyFingerprint = ''; + + /** + * The unique key handle used by this handler + * + * The key handle is used to track GPG status output for a particular key + * before the key has its own identifier. + * + * @var string + * + * @see Crypt_GPG_KeyGeneratorStatusHandler::setHandle() + */ + protected $handle = ''; + + /** + * Error code (if any) caused by key generation + * + * @var integer + */ + protected $errorCode = Crypt_GPG::ERROR_NONE; + + // }}} + // {{{ setHandle() + + /** + * Sets the unique key handle used by this handler + * + * The key handle is used to track GPG status output for a particular key + * before the key has its own identifier. + * + * @param string $handle the key handle this status handle will use. + * + * @return Crypt_GPG_KeyGeneratorStatusHandler the current object, for + * fluent interface. + */ + public function setHandle($handle) + { + $this->handle = strval($handle); + return $this; + } + + // }}} + // {{{ handle() + + /** + * Handles a status line + * + * @param string $line the status line to handle. + * + * @return void + */ + public function handle($line) + { + $tokens = explode(' ', $line); + switch ($tokens[0]) { + case 'KEY_CREATED': + if ($tokens[3] == $this->handle) { + $this->keyFingerprint = $tokens[2]; + } + break; + + case 'KEY_NOT_CREATED': + if ($tokens[1] == $this->handle) { + $this->errorCode = Crypt_GPG::ERROR_KEY_NOT_CREATED; + } + break; + + case 'PROGRESS': + // todo: at some point, support reporting status async + break; + } + } + + // }}} + // {{{ getKeyFingerprint() + + /** + * Gets the key fingerprint parsed by this handler + * + * @return array the key fingerprint parsed by this handler. + */ + public function getKeyFingerprint() + { + return $this->keyFingerprint; + } + + // }}} + // {{{ getErrorCode() + + /** + * Gets the error code resulting from key gneration + * + * @return integer the error code resulting from key generation. + */ + public function getErrorCode() + { + return $this->errorCode; + } + + // }}} +} + +?> diff --git a/program/lib/Crypt/GPG/PinEntry.php b/program/lib/Crypt/GPG/PinEntry.php new file mode 100644 index 000000000..c09703617 --- /dev/null +++ b/program/lib/Crypt/GPG/PinEntry.php @@ -0,0 +1,875 @@ +<?php + +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * Contains a class implementing automatic pinentry for gpg-agent + * + * PHP version 5 + * + * LICENSE: + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id$ + * @link http://pear.php.net/package/Crypt_GPG + */ + +/** + * CLI user-interface and parser. + */ +require_once 'Console/CommandLine.php'; + +// {{{ class Crypt_GPG_PinEntry + +/** + * A command-line dummy pinentry program for use with gpg-agent and Crypt_GPG + * + * This pinentry receives passphrases through en environment variable and + * automatically enters the PIN in response to gpg-agent requests. No user- + * interaction required. + * + * Thie pinentry can be run independently for testing and debugging with the + * following syntax: + * + * <pre> + * Usage: + * crypt-gpg-pinentry [options] + * + * Options: + * -l log, --log=log Optional location to log pinentry activity. + * -v, --verbose Sets verbosity level. Use multiples for more detail + * (e.g. "-vv"). + * -h, --help show this help message and exit + * --version show the program version and exit + * </pre> + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/Crypt_GPG + * @see Crypt_GPG::getKeys() + */ +class Crypt_GPG_PinEntry +{ + // {{{ class constants + + /** + * Verbosity level for showing no output. + */ + const VERBOSITY_NONE = 0; + + /** + * Verbosity level for showing error output. + */ + const VERBOSITY_ERRORS = 1; + + /** + * Verbosity level for showing all output, including Assuan protocol + * messages. + */ + const VERBOSITY_ALL = 2; + + /** + * Length of buffer for reading lines from the Assuan server. + * + * PHP reads 8192 bytes. If this is set to less than 8192, PHP reads 8192 + * and buffers the rest so we might as well just read 8192. + * + * Using values other than 8192 also triggers PHP bugs. + * + * @see http://bugs.php.net/bug.php?id=35224 + */ + const CHUNK_SIZE = 8192; + + // }}} + // {{{ protected properties + + /** + * File handle for the input stream + * + * @var resource + */ + protected $stdin = null; + + /** + * File handle for the output stream + * + * @var resource + */ + protected $stdout = null; + + /** + * File handle for the log file if a log file is used + * + * @var resource + */ + protected $logFile = null; + + /** + * Whether or not this pinentry is finished and is exiting + * + * @var boolean + */ + protected $moribund = false; + + /** + * Verbosity level + * + * One of: + * - {@link Crypt_GPG_PinEntry::VERBOSITY_NONE}, + * - {@link Crypt_GPG_PinEntry::VERBOSITY_ERRORS}, or + * - {@link Crypt_GPG_PinEntry::VERBOSITY_ALL} + * + * @var integer + */ + protected $verbosity = self::VERBOSITY_NONE; + + /** + * The command-line interface parser for this pinentry + * + * @var Console_CommandLine + * + * @see Crypt_GPG_PinEntry::getParser() + */ + protected $parser = null; + + /** + * PINs to be entered by this pinentry + * + * An indexed array of associative arrays in the form: + * <code> + * <?php + * array( + * array( + * 'keyId' => $keyId, + * 'passphrase' => $passphrase + * ), + * ... + * ); + * ?> + * </code> + * + * This array is parsed from the environment variable + * <kbd>PINENTRY_USER_DATA</kbd>. + * + * @var array + * + * @see Crypt_GPG_PinEntry::initPinsFromENV() + */ + protected $pins = array(); + + /** + * PINs that have been tried for the current PIN + * + * This is an associative array indexed by the key identifier with + * values being the same as elements in the {@link Crypt_GPG_PinEntry::$pins} + * array. + * + * @var array + */ + protected $triedPins = array(); + + /** + * The PIN currently being requested by the Assuan server + * + * If set, this is an associative array in the form: + * <code> + * <?php + * array( + * 'keyId' => $shortKeyId, + * 'userId' => $userIdString + * ); + * ?> + * </code> + * + * @var array|null + */ + protected $currentPin = null; + + // }}} + // {{{ __invoke() + + /** + * Runs this pinentry + * + * @return void + */ + public function __invoke() + { + $this->parser = $this->getCommandLineParser(); + + try { + $result = $this->parser->parse(); + + $this->setVerbosity($result->options['verbose']); + $this->setLogFilename($result->options['log']); + + $this->connect(); + $this->initPinsFromENV(); + + while (($line = fgets($this->stdin, self::CHUNK_SIZE)) !== false) { + $this->parseCommand(mb_substr($line, 0, -1, '8bit')); + if ($this->moribund) { + break; + } + } + + $this->disconnect(); + + } catch (Console_CommandLineException $e) { + $this->log($e->getMessage() . PHP_EOL, slf::VERBOSITY_ERRORS); + exit(1); + } catch (Exception $e) { + $this->log($e->getMessage() . PHP_EOL, self::VERBOSITY_ERRORS); + $this->log($e->getTraceAsString() . PHP_EOL, self::VERBOSITY_ERRORS); + exit(1); + } + } + + // }}} + // {{{ setVerbosity() + + /** + * Sets the verbosity of logging for this pinentry + * + * Verbosity levels are: + * + * - {@link Crypt_GPG_PinEntry::VERBOSITY_NONE} - no logging. + * - {@link Crypt_GPG_PinEntry::VERBOSITY_ERRORS} - log errors only. + * - {@link Crypt_GPG_PinEntry::VERBOSITY_ALL} - log everything, including + * the assuan protocol. + * + * @param integer $verbosity the level of verbosity of this pinentry. + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + public function setVerbosity($verbosity) + { + $this->verbosity = (integer)$verbosity; + return $this; + } + + // }}} + // {{{ setLogFilename() + + /** + * Sets the log file location + * + * @param string $filename the new log filename to use. If an empty string + * is used, file-based logging is disabled. + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + public function setLogFilename($filename) + { + if (is_resource($this->logFile)) { + fflush($this->logFile); + fclose($this->logFile); + $this->logFile = null; + } + + if ($filename != '') { + if (($this->logFile = fopen($filename, 'w')) === false) { + $this->log( + 'Unable to open log file "' . $filename . '" ' + . 'for writing.' . PHP_EOL, + self::VERBOSITY_ERRORS + ); + exit(1); + } else { + stream_set_write_buffer($this->logFile, 0); + } + } + + return $this; + } + + // }}} + // {{{ getUIXML() + + /** + * Gets the CLI user-interface definition for this pinentry + * + * Detects whether or not this package is PEAR-installed and appropriately + * locates the XML UI definition. + * + * @return string the location of the CLI user-interface definition XML. + */ + protected function getUIXML() + { + $dir = '@data-dir@' . DIRECTORY_SEPARATOR + . '@package-name@' . DIRECTORY_SEPARATOR . 'data'; + + // Check if we're running directly from a git checkout or if we're + // running from a PEAR-packaged version. + if ($dir[0] == '@') { + $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' + . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'data'; + } + + return $dir . DIRECTORY_SEPARATOR . 'pinentry-cli.xml'; + } + + // }}} + // {{{ getCommandLineParser() + + /** + * Gets the CLI parser for this pinentry + * + * @return Console_CommandLine the CLI parser for this pinentry. + */ + protected function getCommandLineParser() + { + return Console_CommandLine::fromXmlFile($this->getUIXML()); + } + + // }}} + // {{{ log() + + /** + * Logs a message at the specified verbosity level + * + * If a log file is used, the message is written to the log. Otherwise, + * the message is sent to STDERR. + * + * @param string $data the message to log. + * @param integer $level the verbosity level above which the message should + * be logged. + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function log($data, $level) + { + if ($this->verbosity >= $level) { + if (is_resource($this->logFile)) { + fwrite($this->logFile, $data); + fflush($this->logFile); + } else { + $this->parser->outputter->stderr($data); + } + } + + return $this; + } + + // }}} + // {{{ connect() + + /** + * Connects this pinentry to the assuan server + * + * Opens I/O streams and sends initial handshake. + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function connect() + { + // Binary operations will not work on Windows with PHP < 5.2.6. + $rb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'r' : 'rb'; + $wb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'w' : 'wb'; + + $this->stdin = fopen('php://stdin', $rb); + $this->stdout = fopen('php://stdout', $wb); + + if (function_exists('stream_set_read_buffer')) { + stream_set_read_buffer($this->stdin, 0); + } + stream_set_write_buffer($this->stdout, 0); + + // initial handshake + $this->send($this->getOK('Crypt_GPG pinentry ready and waiting')); + + return $this; + } + + // }}} + // {{{ parseCommand() + + /** + * Parses an assuan command and performs the appropriate action + * + * Documentation of the assuan commands for pinentry is limited to + * non-existent. Most of these commands were taken from the C source code + * to gpg-agent and pinentry. + * + * Additional context was provided by using strace -f when calling the + * gpg-agent. + * + * @param string $line the assuan command line to parse + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function parseCommand($line) + { + $this->log('<- ' . $line . PHP_EOL, self::VERBOSITY_ALL); + + $parts = explode(' ', $line, 2); + + $command = $parts[0]; + + if (count($parts) === 2) { + $data = $parts[1]; + } else { + $data = null; + } + + switch ($command) { + case 'SETDESC': + return $this->sendSetDescription($data); + + case 'SETPROMPT': + case 'SETERROR': + case 'SETOK': + case 'SETNOTOK': + case 'SETCANCEL': + case 'SETQUALITYBAR': + case 'SETQUALITYBAR_TT': + case 'OPTION': + return $this->sendNotImplementedOK(); + + case 'MESSAGE': + return $this->sendMessage(); + + case 'CONFIRM': + return $this->sendConfirm(); + + case 'GETINFO': + return $this->sendGetInfo($data); + + case 'GETPIN': + return $this->sendGetPin($data); + + case 'RESET': + return $this->sendReset(); + + case 'BYE': + return $this->sendBye(); + } + } + + // }}} + // {{{ initPinsFromENV() + + /** + * Initializes the PINs to be entered by this pinentry from the environment + * variable PINENTRY_USER_DATA + * + * The PINs are parsed from a JSON-encoded string. + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function initPinsFromENV() + { + if (($userData = getenv('PINENTRY_USER_DATA')) !== false) { + $pins = json_decode($userData, true); + if ($pins === null) { + $this->log( + '-- failed to parse user data' . PHP_EOL, + self::VERBOSITY_ERRORS + ); + } else { + $this->pins = $pins; + $this->log( + '-- got user data [not showing passphrases]' . PHP_EOL, + self::VERBOSITY_ALL + ); + } + } + + return $this; + } + + // }}} + // {{{ disconnect() + + /** + * Disconnects this pinentry from the Assuan server + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function disconnect() + { + $this->log('-- disconnecting' . PHP_EOL, self::VERBOSITY_ALL); + + fflush($this->stdout); + fclose($this->stdout); + fclose($this->stdin); + + $this->stdin = null; + $this->stdout = null; + + $this->log('-- disconnected' . PHP_EOL, self::VERBOSITY_ALL); + + if (is_resource($this->logFile)) { + fflush($this->logFile); + fclose($this->logFile); + $this->logFile = null; + } + + return $this; + } + + // }}} + // {{{ sendNotImplementedOK() + + /** + * Sends an OK response for a not implemented feature + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendNotImplementedOK() + { + return $this->send($this->getOK()); + } + + // }}} + // {{{ sendSetDescription() + + /** + * Parses the currently requested key identifier and user identifier from + * the description passed to this pinentry + * + * @param string $text the raw description sent from gpg-agent. + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendSetDescription($text) + { + $text = rawurldecode($text); + $matches = array(); + // TODO: handle user id with quotation marks + $exp = '/\n"(.+)"\n.*\sID ([A-Z0-9]+),\n/mu'; + if (preg_match($exp, $text, $matches) === 1) { + $userId = $matches[1]; + $keyId = $matches[2]; + + // only reset tried pins for new requested pin + if ( $this->currentPin === null + || $this->currentPin['keyId'] !== $keyId + ) { + $this->currentPin = array( + 'userId' => $userId, + 'keyId' => $keyId + ); + $this->triedPins = array(); + $this->log( + '-- looking for PIN for ' . $keyId . PHP_EOL, + self::VERBOSITY_ALL + ); + } + } + + return $this->send($this->getOK()); + } + + // }}} + // {{{ sendConfirm() + + /** + * Tells the assuan server the PIN entry was confirmed (not cancelled) + * by pressing the fake 'close' button + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendConfirm() + { + return $this->sendButtonInfo('close'); + } + + // }}} + // {{{ sendMessage() + + /** + * Tells the assuan server that any requested pop-up messages were confirmed + * by pressing the fake 'close' button + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendMessage() + { + return $this->sendButtonInfo('close'); + } + + // }}} + // {{{ sendButtonInfo() + + /** + * Sends information about pressed buttons to the assuan server + * + * This is used to fake a user-interface for this pinentry. + * + * @param string $text the button status to send. + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendButtonInfo($text) + { + return $this->send('BUTTON_INFO ' . $text . "\n"); + } + + // }}} + // {{{ sendGetPin() + + /** + * Sends the PIN value for the currently requested key + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendGetPin() + { + $foundPin = ''; + + if (is_array($this->currentPin)) { + $keyIdLength = mb_strlen($this->currentPin['keyId'], '8bit'); + + // search for the pin + foreach ($this->pins as $pin) { + // only check pins we haven't tried + if (!isset($this->triedPins[$pin['keyId']])) { + + // get last X characters of key identifier to compare + $keyId = mb_substr( + $pin['keyId'], + -$keyIdLength, + mb_strlen($pin['keyId'], '8bit'), + '8bit' + ); + + if ($keyId === $this->currentPin['keyId']) { + $foundPin = $pin['passphrase']; + $this->triedPins[$pin['keyId']] = $pin; + break; + } + } + } + } + + return $this + ->send($this->getData($foundPin)) + ->send($this->getOK()); + } + + // }}} + // {{{ sendGetInfo() + + /** + * Sends information about this pinentry + * + * @param string $data the information requested by the assuan server. + * Currently only 'pid' is supported. Other requests + * return no information. + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendGetInfo($data) + { + $parts = explode(' ', $data, 2); + $command = reset($parts); + + switch ($command) { + case 'pid': + return $this->sendGetInfoPID(); + default: + return $this->send($this->getOK()); + } + + return $this; + } + // }}} + // {{{ sendGetInfoPID() + + /** + * Sends the PID of this pinentry to the assuan server + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendGetInfoPID() + { + return $this + ->send($this->getData(getmypid())) + ->send($this->getOK()); + } + + // }}} + // {{{ sendBye() + + /** + * Flags this pinentry for disconnection and sends an OK response + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendBye() + { + $return = $this->send($this->getOK('closing connection')); + $this->moribund = true; + return $return; + } + + // }}} + // {{{ sendReset() + + /** + * Resets this pinentry and sends an OK response + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function sendReset() + { + $this->currentPin = null; + $this->triedPins = array(); + return $this->send($this->getOK()); + } + + // }}} + // {{{ getOK() + + /** + * Gets an OK response to send to the assuan server + * + * @param string $data an optional message to include with the OK response. + * + * @return string the OK response. + */ + protected function getOK($data = null) + { + $return = 'OK'; + + if ($data) { + $return .= ' ' . $data; + } + + return $return . "\n"; + } + + // }}} + // {{{ getData() + + /** + * Gets data ready to send to the assuan server + * + * Data is appropriately escaped and long lines are wrapped. + * + * @param string $data the data to send to the assuan server. + * + * @return string the properly escaped, formatted data. + * + * @see http://www.gnupg.org/documentation/manuals/assuan/Server-responses.html + */ + protected function getData($data) + { + // Escape data. Only %, \n and \r need to be escaped but other + // values are allowed to be escaped. See + // http://www.gnupg.org/documentation/manuals/assuan/Server-responses.html + $data = rawurlencode($data); + $data = $this->getWordWrappedData($data, 'D'); + return $data; + } + + // }}} + // {{{ getComment() + + /** + * Gets a comment ready to send to the assuan server + * + * @param string $data the comment to send to the assuan server. + * + * @return string the properly formatted comment. + * + * @see http://www.gnupg.org/documentation/manuals/assuan/Server-responses.html + */ + protected function getComment($data) + { + return $this->getWordWrappedData($data, '#'); + } + + // }}} + // {{{ getWordWrappedData() + + /** + * Wraps strings at 1,000 bytes without splitting UTF-8 multibyte + * characters + * + * Each line is prepended with the specified line prefix. Wrapped lines + * are automatically appended with \ characters. + * + * Protocol strings are UTF-8 but maximum line length is 1,000 bytes. + * <kbd>mb_strcut()</kbd> is used so we can limit line length by bytes + * and not split characters across multiple lines. + * + * @param string $data the data to wrap. + * @param string $prefix a single character to use as the line prefix. For + * example, 'D' or '#'. + * + * @return string the word-wrapped, prefixed string. + * + * @see http://www.gnupg.org/documentation/manuals/assuan/Server-responses.html + */ + protected function getWordWrappedData($data, $prefix) + { + $lines = array(); + + do { + if (mb_strlen($data, '8bit') > 997) { + $line = $prefix . ' ' . mb_strcut($data, 0, 996, 'utf-8') . "\\\n"; + $lines[] = $line; + $lineLength = mb_strlen($line, '8bit') - 1; + $dataLength = mb_substr($data, '8bit'); + $data = mb_substr( + $data, + $lineLength, + $dataLength - $lineLength, + '8bit' + ); + } else { + $lines[] = $prefix . ' ' . $data . "\n"; + $data = ''; + } + } while ($data != ''); + + return implode('', $lines); + } + + // }}} + // {{{ send() + + /** + * Sends raw data to the assuan server + * + * @param string $data the data to send. + * + * @return Crypt_GPG_PinEntry the current object, for fluent interface. + */ + protected function send($data) + { + $this->log('-> ' . $data, self::VERBOSITY_ALL); + fwrite($this->stdout, $data); + fflush($this->stdout); + return $this; + } + + // }}} +} + +// }}} + +?> diff --git a/program/lib/Crypt/GPG/ProcessControl.php b/program/lib/Crypt/GPG/ProcessControl.php new file mode 100644 index 000000000..d6dae0325 --- /dev/null +++ b/program/lib/Crypt/GPG/ProcessControl.php @@ -0,0 +1,150 @@ +<?php + +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * A class for monitoring and terminating processes + * + * PHP version 5 + * + * LICENSE: + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id$ + * @link http://pear.php.net/package/Crypt_GPG + */ + +// {{{ class Crypt_GPG_ProcessControl + +/** + * A class for monitoring and terminating processes by PID + * + * This is used to safely terminate the gpg-agent for GnuPG 2.x. This class + * is limited in its abilities and can only check if a PID is running and + * send a PID SIGTERM. + * + * @category Encryption + * @package Crypt_GPG + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/Crypt_GPG + */ +class Crypt_GPG_ProcessControl +{ + // {{{ protected properties + + /** + * The PID (process identifier) being monitored + * + * @var integer + */ + protected $pid; + + // }}} + // {{{ __construct() + + /** + * Creates a new process controller from the given PID (process identifier) + * + * @param integer $pid the PID (process identifier). + */ + public function __construct($pid) + { + $this->pid = $pid; + } + + // }}} + // {{{ public function getPid() + + /** + * Gets the PID (process identifier) being controlled + * + * @return integer the PID being controlled. + */ + public function getPid() + { + return $this->pid; + } + + // }}} + // {{{ isRunning() + + /** + * Checks if the process is running + * + * Uses <kbd>ps</kbd> on UNIX-like systems and <kbd>tasklist</kbd> on + * Windows. + * + * @return boolean true if the process is running, false if not. + */ + public function isRunning() + { + $running = false; + + if (PHP_OS === 'WINNT') { + $command = 'tasklist /fo csv /nh /fi ' + . escapeshellarg('PID eq ' . $this->pid); + + $result = exec($command); + $parts = explode(',', $result); + $running = (count($parts) > 1 && trim($parts[1], '"') == $this->pid); + } else { + $result = exec('ps -p ' . escapeshellarg($this->pid) . ' -o pid='); + $running = (trim($result) == $this->pid); + } + + return $running; + } + + // }}} + // {{{ terminate() + + /** + * Ends the process gracefully + * + * The signal SIGTERM is sent to the process. The gpg-agent process will + * end gracefully upon receiving the SIGTERM signal. Upon 3 consecutive + * SIGTERM signals the gpg-agent will forcefully shut down. + * + * If the <kbd>posix</kbd> extension is available, <kbd>posix_kill()</kbd> + * is used. Otherwise <kbd>kill</kbd> is used on UNIX-like systems and + * <kbd>taskkill</kbd> is used in Windows. + * + * @return void + */ + public function terminate() + { + if (function_exists('posix_kill')) { + posix_kill($this->pid, 15); + } elseif (PHP_OS === 'WINNT') { + exec('taskkill /PID ' . escapeshellarg($this->pid)); + } else { + exec('kill -15 ' . escapeshellarg($this->pid)); + } + } + + // }}} +} + +// }}} + +?> diff --git a/program/lib/Crypt/GPG/Signature.php b/program/lib/Crypt/GPG/Signature.php index 03ab44c53..1d28a1188 100644 --- a/program/lib/Crypt/GPG/Signature.php +++ b/program/lib/Crypt/GPG/Signature.php @@ -28,9 +28,10 @@ * @category Encryption * @package Crypt_GPG * @author Nathan Fredrickson <nathan@silverorange.com> - * @copyright 2005-2010 silverorange + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2005-2013 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Signature.php 302773 2010-08-25 14:16:28Z gauthierm $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Crypt_GPG */ @@ -50,7 +51,7 @@ require_once 'Crypt/GPG/UserId.php'; * @package Crypt_GPG * @author Nathan Fredrickson <nathan@silverorange.com> * @author Michael Gauthier <mike@silverorange.com> - * @copyright 2005-2010 silverorange + * @copyright 2005-2013 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 * @link http://pear.php.net/package/Crypt_GPG * @see Crypt_GPG::verify() @@ -159,8 +160,6 @@ class Crypt_GPG_Signature if ($signature->_userId instanceof Crypt_GPG_UserId) { $this->_userId = clone $signature->_userId; - } else { - $this->_userId = $signature->_userId; } } diff --git a/program/lib/Crypt/GPG/SubKey.php b/program/lib/Crypt/GPG/SubKey.php index b6316e99f..59245cac1 100644 --- a/program/lib/Crypt/GPG/SubKey.php +++ b/program/lib/Crypt/GPG/SubKey.php @@ -29,7 +29,7 @@ * @author Nathan Fredrickson <nathan@silverorange.com> * @copyright 2005-2010 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: SubKey.php 302768 2010-08-25 13:45:52Z gauthierm $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Crypt_GPG */ @@ -53,7 +53,7 @@ */ class Crypt_GPG_SubKey { - // {{{ class constants + // {{{ algorithm class constants /** * RSA encryption algorithm. @@ -77,6 +77,29 @@ class Crypt_GPG_SubKey const ALGORITHM_ELGAMAL_ENC_SGN = 20; // }}} + // {{{ usage class constants + + /** + * Key can be used to encrypt + */ + const USAGE_ENCRYPT = 1; + + /** + * Key can be used to sign + */ + const USAGE_SIGN = 2; + + /** + * Key can be used to certify other keys + */ + const USAGE_CERTIFY = 4; + + /** + * Key can be used for authentication + */ + const USAGE_AUTHENTICATION = 8; + + // }}} // {{{ class properties /** diff --git a/program/lib/Crypt/GPG/UserId.php b/program/lib/Crypt/GPG/UserId.php index 04435708c..a367bceb3 100644 --- a/program/lib/Crypt/GPG/UserId.php +++ b/program/lib/Crypt/GPG/UserId.php @@ -28,7 +28,7 @@ * @author Michael Gauthier <mike@silverorange.com> * @copyright 2008-2010 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: UserId.php 295621 2010-03-01 04:18:54Z gauthierm $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Crypt_GPG */ diff --git a/program/lib/Crypt/GPG/VerifyStatusHandler.php b/program/lib/Crypt/GPG/VerifyStatusHandler.php index 083bd3012..8904be149 100644 --- a/program/lib/Crypt/GPG/VerifyStatusHandler.php +++ b/program/lib/Crypt/GPG/VerifyStatusHandler.php @@ -31,7 +31,7 @@ * @author Michael Gauthier <mike@silverorange.com> * @copyright 2008 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: VerifyStatusHandler.php 302908 2010-08-31 03:56:54Z gauthierm $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Crypt_GPG * @link http://www.gnupg.org/ */ diff --git a/program/lib/Crypt/GPGAbstract.php b/program/lib/Crypt/GPGAbstract.php new file mode 100644 index 000000000..214133936 --- /dev/null +++ b/program/lib/Crypt/GPGAbstract.php @@ -0,0 +1,508 @@ +<?php + +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * Crypt_GPG is a package to use GPG from PHP + * + * This package provides an object oriented interface to GNU Privacy + * Guard (GPG). It requires the GPG executable to be on the system. + * + * Though GPG can support symmetric-key cryptography, this package is intended + * only to facilitate public-key cryptography. + * + * This file contains an abstract implementation of a user of the + * {@link Crypt_GPG_Engine} class. + * + * PHP version 5 + * + * LICENSE: + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @category Encryption + * @package Crypt_GPG + * @author Nathan Fredrickson <nathan@silverorange.com> + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2005-2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: GPG.php 305428 2010-11-17 02:47:56Z gauthierm $ + * @link http://pear.php.net/package/Crypt_GPG + * @link http://pear.php.net/manual/en/package.encryption.crypt-gpg.php + * @link http://www.gnupg.org/ + */ + +/** + * GPG key class + */ +require_once 'Crypt/GPG/Key.php'; + +/** + * GPG sub-key class + */ +require_once 'Crypt/GPG/SubKey.php'; + +/** + * GPG user id class + */ +require_once 'Crypt/GPG/UserId.php'; + +/** + * GPG process and I/O engine class + */ +require_once 'Crypt/GPG/Engine.php'; + +/** + * GPG exception classes + */ +require_once 'Crypt/GPG/Exceptions.php'; + +// {{{ class Crypt_GPGAbstract + +/** + * Base class for implementing a user of {@link Crypt_GPG_Engine} + * + * @category Encryption + * @package Crypt_GPG + * @author Nathan Fredrickson <nathan@silverorange.com> + * @author Michael Gauthier <mike@silverorange.com> + * @copyright 2005-2013 silverorange + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/Crypt_GPG + * @link http://www.gnupg.org/ + */ +abstract class Crypt_GPGAbstract +{ + // {{{ class error constants + + /** + * Error code returned when there is no error. + */ + const ERROR_NONE = 0; + + /** + * Error code returned when an unknown or unhandled error occurs. + */ + const ERROR_UNKNOWN = 1; + + /** + * Error code returned when a bad passphrase is used. + */ + const ERROR_BAD_PASSPHRASE = 2; + + /** + * Error code returned when a required passphrase is missing. + */ + const ERROR_MISSING_PASSPHRASE = 3; + + /** + * Error code returned when a key that is already in the keyring is + * imported. + */ + const ERROR_DUPLICATE_KEY = 4; + + /** + * Error code returned the required data is missing for an operation. + * + * This could be missing key data, missing encrypted data or missing + * signature data. + */ + const ERROR_NO_DATA = 5; + + /** + * Error code returned when an unsigned key is used. + */ + const ERROR_UNSIGNED_KEY = 6; + + /** + * Error code returned when a key that is not self-signed is used. + */ + const ERROR_NOT_SELF_SIGNED = 7; + + /** + * Error code returned when a public or private key that is not in the + * keyring is used. + */ + const ERROR_KEY_NOT_FOUND = 8; + + /** + * Error code returned when an attempt to delete public key having a + * private key is made. + */ + const ERROR_DELETE_PRIVATE_KEY = 9; + + /** + * Error code returned when one or more bad signatures are detected. + */ + const ERROR_BAD_SIGNATURE = 10; + + /** + * Error code returned when there is a problem reading GnuPG data files. + */ + const ERROR_FILE_PERMISSIONS = 11; + + /** + * Error code returned when a key could not be created. + */ + const ERROR_KEY_NOT_CREATED = 12; + + /** + * Error code returned when bad key parameters are used during key + * generation. + */ + const ERROR_BAD_KEY_PARAMS = 13; + + // }}} + // {{{ other class constants + + /** + * URI at which package bugs may be reported. + */ + const BUG_URI = 'http://pear.php.net/bugs/report.php?package=Crypt_GPG'; + + // }}} + // {{{ protected class properties + + /** + * Engine used to control the GPG subprocess + * + * @var Crypt_GPG_Engine + * + * @see Crypt_GPGAbstract::setEngine() + */ + protected $engine = null; + + // }}} + // {{{ __construct() + + /** + * Creates a new GPG object + * + * Available options are: + * + * - <kbd>string homedir</kbd> - the directory where the GPG + * keyring files are stored. If not + * specified, Crypt_GPG uses the + * default of <kbd>~/.gnupg</kbd>. + * - <kbd>string publicKeyring</kbd> - the file path of the public + * keyring. Use this if the public + * keyring is not in the homedir, or + * if the keyring is in a directory + * not writable by the process + * invoking GPG (like Apache). Then + * you can specify the path to the + * keyring with this option + * (/foo/bar/pubring.gpg), and specify + * a writable directory (like /tmp) + * using the <i>homedir</i> option. + * - <kbd>string privateKeyring</kbd> - the file path of the private + * keyring. Use this if the private + * keyring is not in the homedir, or + * if the keyring is in a directory + * not writable by the process + * invoking GPG (like Apache). Then + * you can specify the path to the + * keyring with this option + * (/foo/bar/secring.gpg), and specify + * a writable directory (like /tmp) + * using the <i>homedir</i> option. + * - <kbd>string trustDb</kbd> - the file path of the web-of-trust + * database. Use this if the trust + * database is not in the homedir, or + * if the database is in a directory + * not writable by the process + * invoking GPG (like Apache). Then + * you can specify the path to the + * trust database with this option + * (/foo/bar/trustdb.gpg), and specify + * a writable directory (like /tmp) + * using the <i>homedir</i> option. + * - <kbd>string binary</kbd> - the location of the GPG binary. If + * not specified, the driver attempts + * to auto-detect the GPG binary + * location using a list of known + * default locations for the current + * operating system. The option + * <kbd>gpgBinary</kbd> is a + * deprecated alias for this option. + * - <kbd>string agent</kbd> - the location of the GnuPG agent + * binary. The gpg-agent is only + * used for GnuPG 2.x. If not + * specified, the engine attempts + * to auto-detect the gpg-agent + * binary location using a list of + * know default locations for the + * current operating system. + * - <kbd>boolean debug</kbd> - whether or not to use debug mode. + * When debug mode is on, all + * communication to and from the GPG + * subprocess is logged. This can be + * + * @param array $options optional. An array of options used to create the + * GPG object. All options are optional and are + * represented as key-value pairs. + * + * @throws Crypt_GPG_FileException if the <kbd>homedir</kbd> does not exist + * and cannot be created. This can happen if <kbd>homedir</kbd> is + * not specified, Crypt_GPG is run as the web user, and the web + * user has no home directory. This exception is also thrown if any + * of the options <kbd>publicKeyring</kbd>, + * <kbd>privateKeyring</kbd> or <kbd>trustDb</kbd> options are + * specified but the files do not exist or are are not readable. + * This can happen if the user running the Crypt_GPG process (for + * example, the Apache user) does not have permission to read the + * files. + * + * @throws PEAR_Exception if the provided <kbd>binary</kbd> is invalid, or + * if no <kbd>binary</kbd> is provided and no suitable binary could + * be found. + * + * @throws PEAR_Exception if the provided <kbd>agent</kbd> is invalid, or + * if no <kbd>agent</kbd> is provided and no suitable gpg-agent + * cound be found. + */ + public function __construct(array $options = array()) + { + $this->setEngine(new Crypt_GPG_Engine($options)); + } + + // }}} + // {{{ setEngine() + + /** + * Sets the I/O engine to use for GnuPG operations + * + * Normally this method does not need to be used. It provides a means for + * dependency injection. + * + * @param Crypt_GPG_Engine $engine the engine to use. + * + * @return Crypt_GPGAbstract the current object, for fluent interface. + */ + public function setEngine(Crypt_GPG_Engine $engine) + { + $this->engine = $engine; + return $this; + } + + // }}} + // {{{ _getKeys() + + /** + * Gets the available keys in the keyring + * + * Calls GPG with the <kbd>--list-keys</kbd> command and grabs keys. See + * the first section of <b>doc/DETAILS</b> in the + * {@link http://www.gnupg.org/download/ GPG package} for a detailed + * description of how the GPG command output is parsed. + * + * @param string $keyId optional. Only keys with that match the specified + * pattern are returned. The pattern may be part of + * a user id, a key id or a key fingerprint. If not + * specified, all keys are returned. + * + * @return array an array of {@link Crypt_GPG_Key} objects. If no keys + * match the specified <kbd>$keyId</kbd> an empty array is + * returned. + * + * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs. + * Use the <kbd>debug</kbd> option and file a bug report if these + * exceptions occur. + * + * @see Crypt_GPG_Key + */ + protected function _getKeys($keyId = '') + { + // get private key fingerprints + if ($keyId == '') { + $operation = '--list-secret-keys'; + } else { + $operation = '--list-secret-keys ' . escapeshellarg($keyId); + } + + // According to The file 'doc/DETAILS' in the GnuPG distribution, using + // double '--with-fingerprint' also prints the fingerprint for subkeys. + $arguments = array( + '--with-colons', + '--with-fingerprint', + '--with-fingerprint', + '--fixed-list-mode' + ); + + $output = ''; + + $this->engine->reset(); + $this->engine->setOutput($output); + $this->engine->setOperation($operation, $arguments); + $this->engine->run(); + + $code = $this->engine->getErrorCode(); + + switch ($code) { + case self::ERROR_NONE: + case self::ERROR_KEY_NOT_FOUND: + // ignore not found key errors + break; + case self::ERROR_FILE_PERMISSIONS: + $filename = $this->engine->getErrorFilename(); + if ($filename) { + throw new Crypt_GPG_FileException( + sprintf( + 'Error reading GnuPG data file \'%s\'. Check to make ' . + 'sure it is readable by the current user.', + $filename + ), + $code, + $filename + ); + } + throw new Crypt_GPG_FileException( + 'Error reading GnuPG data file. Check to make GnuPG data ' . + 'files are readable by the current user.', + $code + ); + default: + throw new Crypt_GPG_Exception( + 'Unknown error getting keys. Please use the \'debug\' option ' . + 'when creating the Crypt_GPG object, and file a bug report ' . + 'at ' . self::BUG_URI, + $code + ); + } + + $privateKeyFingerprints = array(); + + $lines = explode(PHP_EOL, $output); + foreach ($lines as $line) { + $lineExp = explode(':', $line); + if ($lineExp[0] == 'fpr') { + $privateKeyFingerprints[] = $lineExp[9]; + } + } + + // get public keys + if ($keyId == '') { + $operation = '--list-public-keys'; + } else { + $operation = '--list-public-keys ' . escapeshellarg($keyId); + } + + $output = ''; + + $this->engine->reset(); + $this->engine->setOutput($output); + $this->engine->setOperation($operation, $arguments); + $this->engine->run(); + + $code = $this->engine->getErrorCode(); + + switch ($code) { + case self::ERROR_NONE: + case self::ERROR_KEY_NOT_FOUND: + // ignore not found key errors + break; + case self::ERROR_FILE_PERMISSIONS: + $filename = $this->engine->getErrorFilename(); + if ($filename) { + throw new Crypt_GPG_FileException( + sprintf( + 'Error reading GnuPG data file \'%s\'. Check to make ' . + 'sure it is readable by the current user.', + $filename + ), + $code, + $filename + ); + } + throw new Crypt_GPG_FileException( + 'Error reading GnuPG data file. Check to make GnuPG data ' . + 'files are readable by the current user.', + $code + ); + default: + throw new Crypt_GPG_Exception( + 'Unknown error getting keys. Please use the \'debug\' option ' . + 'when creating the Crypt_GPG object, and file a bug report ' . + 'at ' . self::BUG_URI, + $code + ); + } + + $keys = array(); + + $key = null; // current key + $subKey = null; // current sub-key + + $lines = explode(PHP_EOL, $output); + foreach ($lines as $line) { + $lineExp = explode(':', $line); + + if ($lineExp[0] == 'pub') { + + // new primary key means last key should be added to the array + if ($key !== null) { + $keys[] = $key; + } + + $key = new Crypt_GPG_Key(); + + $subKey = Crypt_GPG_SubKey::parse($line); + $key->addSubKey($subKey); + + } elseif ($lineExp[0] == 'sub') { + + $subKey = Crypt_GPG_SubKey::parse($line); + $key->addSubKey($subKey); + + } elseif ($lineExp[0] == 'fpr') { + + $fingerprint = $lineExp[9]; + + // set current sub-key fingerprint + $subKey->setFingerprint($fingerprint); + + // if private key exists, set has private to true + if (in_array($fingerprint, $privateKeyFingerprints)) { + $subKey->setHasPrivate(true); + } + + } elseif ($lineExp[0] == 'uid') { + + $string = stripcslashes($lineExp[9]); // as per documentation + $userId = new Crypt_GPG_UserId($string); + + if ($lineExp[1] == 'r') { + $userId->setRevoked(true); + } + + $key->addUserId($userId); + + } + } + + // add last key + if ($key !== null) { + $keys[] = $key; + } + + return $keys; + } + + // }}} +} + +// }}} + +?> diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php index 5911c04d7..33517fbcd 100644 --- a/program/lib/Roundcube/html.php +++ b/program/lib/Roundcube/html.php @@ -3,7 +3,7 @@ /* +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | 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. | @@ -32,8 +32,8 @@ class html public static $doctype = 'xhtml'; public static $lc_tags = true; - public static $common_attrib = array('id','class','style','title','align'); - public static $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','thead','tbody','tr','th','td','style','script'); + public static $common_attrib = array('id','class','style','title','align','unselectable'); + public static $containers = array('iframe','div','span','p','h1','h2','h3','ul','form','textarea','table','thead','tbody','tr','th','td','style','script'); /** @@ -645,7 +645,7 @@ class html_select extends html $option_content = self::quote($option_content); } - $this->content .= self::tag('option', $attr + $option, $option_content, array('class','style','title','disabled')); + $this->content .= self::tag('option', $attr + $option, $option_content, array('value','label','class','style','title','disabled','selected')); } return parent::show(); @@ -677,8 +677,8 @@ class html_table extends html */ public function __construct($attrib = array()) { - $default_attrib = self::$doctype == 'xhtml' ? array('summary' => '', 'border' => 0) : array(); - $this->attrib = array_merge($attrib, $default_attrib); + $default_attrib = self::$doctype == 'xhtml' ? array('summary' => '', 'border' => '0') : array(); + $this->attrib = array_merge($attrib, $default_attrib); if (!empty($attrib['tagname']) && $attrib['tagname'] != 'table') { $this->tagname = $attrib['tagname']; @@ -880,7 +880,7 @@ class html_table extends html private function _row_tagname() { static $row_tagnames = array('table' => 'tr', 'ul' => 'li', '*' => 'div'); - return $row_tagnames[$this->tagname] ?: $row_tagnames['*']; + return $row_tagnames[$this->tagname] ? $row_tagnames[$this->tagname] : $row_tagnames['*']; } /** @@ -889,7 +889,7 @@ class html_table extends html private function _col_tagname() { static $col_tagnames = array('table' => 'td', '*' => 'span'); - return $col_tagnames[$this->tagname] ?: $col_tagnames['*']; + return $col_tagnames[$this->tagname] ? $col_tagnames[$this->tagname] : $col_tagnames['*']; } } diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index 399f84fd8..69d95f023 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -3,8 +3,8 @@ /* +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | - | Copyright (C) 2011-2012, Kolab Systems AG | + | Copyright (C) 2008-2014, The Roundcube Dev Team | + | Copyright (C) 2011-2014, Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -94,6 +94,13 @@ class rcube */ public $plugins; + /** + * Instance of rcube_user class. + * + * @var rcube_user + */ + public $user; + /* private/protected vars */ protected $texts; @@ -642,10 +649,11 @@ class rcube /** * Load a localization package * - * @param string Language ID - * @param array Additional text labels/messages + * @param string $lang Language ID + * @param array $add Additional text labels/messages + * @param array $merge Additional text labels/messages to merge */ - public function load_language($lang = null, $add = array()) + public function load_language($lang = null, $add = array(), $merge = array()) { $lang = $this->language_prop(($lang ? $lang : $_SESSION['language'])); @@ -685,6 +693,11 @@ class rcube if (is_array($add) && !empty($add)) { $this->texts += $add; } + + // merge additional texts (from plugin) + if (is_array($merge) && !empty($merge)) { + $this->texts = array_merge($this->texts, $merge); + } } @@ -1108,7 +1121,20 @@ class rcube // log_driver == 'file' is assumed here $line = sprintf("[%s]: %s\n", $date, $line); - $log_dir = self::$instance ? self::$instance->config->get('log_dir') : null; + $log_dir = null; + + // per-user logging is activated + if (self::$instance && self::$instance->config->get('per_user_logging', false) && self::$instance->get_user_id()) { + $log_dir = self::$instance->get_user_log_dir(); + if (empty($log_dir)) + return false; + } + else if (!empty($log['dir'])) { + $log_dir = $log['dir']; + } + else if (self::$instance) { + $log_dir = self::$instance->config->get('log_dir'); + } if (empty($log_dir)) { $log_dir = RCUBE_INSTALL_PATH . 'logs'; @@ -1146,7 +1172,6 @@ class rcube // handle PHP exceptions if (is_object($arg) && is_a($arg, 'Exception')) { $arg = array( - 'type' => 'php', 'code' => $arg->getCode(), 'line' => $arg->getLine(), 'file' => $arg->getFile(), @@ -1154,7 +1179,7 @@ class rcube ); } else if (is_string($arg)) { - $arg = array('message' => $arg, 'type' => 'php'); + $arg = array('message' => $arg); } if (empty($arg['code'])) { @@ -1170,7 +1195,7 @@ class rcube $cli = php_sapi_name() == 'cli'; - if (($log || $terminate) && !$cli && $arg['type'] && $arg['message']) { + if (($log || $terminate) && !$cli && $arg['message']) { $arg['fatal'] = $terminate; self::log_bug($arg); } @@ -1198,7 +1223,7 @@ class rcube */ public static function log_bug($arg_arr) { - $program = strtoupper($arg_arr['type']); + $program = strtoupper(!empty($arg_arr['type']) ? $arg_arr['type'] : 'php'); $level = self::get_instance()->config->get('debug_level'); // disable errors for ajax requests, write to log instead (#1487831) @@ -1284,6 +1309,20 @@ class rcube self::write_log($dest, sprintf("%s: %0.4f sec", $label, $diff)); } + /** + * Setter for system user object + * + * @param rcube_user Current user instance + */ + public function set_user($user) + { + if (is_object($user)) { + $this->user = $user; + + // overwrite config with user preferences + $this->config->set_user_prefs((array)$this->user->get_prefs()); + } + } /** * Getter for logged user ID. @@ -1347,6 +1386,17 @@ class rcube } } + /** + * Get the per-user log directory + */ + protected function get_user_log_dir() + { + $log_dir = $this->config->get('log_dir', RCUBE_INSTALL_PATH . 'logs'); + $user_name = $this->get_user_name(); + $user_log_dir = $log_dir . '/' . $user_name; + + return !empty($user_name) && is_writable($user_log_dir) ? $user_log_dir : false; + } /** * Getter for logged user language code. @@ -1537,6 +1587,10 @@ class rcube !empty($response) ? join('; ', $response) : '')); } } + else { + // allow plugins to catch sending errors with the same parameters as in 'message_before_send' + $this->plugins->exec_hook('message_send_error', $plugin + array('error' => $error)); + } if (is_resource($msg_body)) { fclose($msg_body); diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php index 6e2b439d8..4d9fa3db1 100644 --- a/program/lib/Roundcube/rcube_addressbook.php +++ b/program/lib/Roundcube/rcube_addressbook.php @@ -209,6 +209,7 @@ abstract class rcube_addressbook public function validate(&$save_data, $autofix = false) { $rcube = rcube::get_instance(); + $valid = true; // check validity of email addresses foreach ($this->get_col_values('email', $save_data, true) as $email) { @@ -216,12 +217,28 @@ abstract class rcube_addressbook if (!rcube_utils::check_email(rcube_utils::idn_to_ascii($email))) { $error = $rcube->gettext(array('name' => 'emailformaterror', 'vars' => array('email' => $email))); $this->set_error(self::ERROR_VALIDATE, $error); - return false; + $valid = false; + break; } } } - return true; + // allow plugins to do contact validation and auto-fixing + $plugin = $rcube->plugins->exec_hook('contact_validate', array( + 'record' => $save_data, + 'autofix' => $autofix, + 'valid' => $valid, + )); + + if ($valid && !$plugin['valid']) { + $this->set_error(self::ERROR_VALIDATE, $plugin['error']); + } + + if (is_array($plugin['record'])) { + $save_data = $plugin['record']; + } + + return $plugin['valid']; } /** @@ -264,7 +281,8 @@ abstract class rcube_addressbook * @param array Assoziative array with save data * Keys: Field name with optional section in the form FIELD:SECTION * Values: Field value. Can be either a string or an array of strings for multiple values - * @return boolean True on success, False on error + * + * @return mixed On success if ID has been changed returns ID, otherwise True, False on error */ function update($id, $save_cols) { @@ -294,8 +312,10 @@ abstract class rcube_addressbook /** * Mark all records in database as deleted + * + * @param bool $with_groups Remove also groups */ - function delete_all() + function delete_all($with_groups = false) { /* empty for read-only address books */ } @@ -515,8 +535,12 @@ abstract class rcube_addressbook $fn = join(' ', array($contact['surname'], $contact['firstname'], $contact['middlename'])); else if ($compose_mode == 1) $fn = join(' ', array($contact['firstname'], $contact['middlename'], $contact['surname'])); - else + else if ($compose_mode == 0) $fn = !empty($contact['name']) ? $contact['name'] : join(' ', array($contact['prefix'], $contact['firstname'], $contact['middlename'], $contact['surname'], $contact['suffix'])); + else { + $plugin = rcube::get_instance()->plugins->exec_hook('contact_listname', array('contact' => $contact)); + $fn = $plugin['fn']; + } $fn = trim($fn, ', '); diff --git a/program/lib/Roundcube/rcube_browser.php b/program/lib/Roundcube/rcube_browser.php index 34128291b..b9642d8f9 100644 --- a/program/lib/Roundcube/rcube_browser.php +++ b/program/lib/Roundcube/rcube_browser.php @@ -28,32 +28,30 @@ class rcube_browser { $HTTP_USER_AGENT = strtolower($_SERVER['HTTP_USER_AGENT']); - $this->ver = 0; - $this->win = strpos($HTTP_USER_AGENT, 'win') != false; - $this->mac = strpos($HTTP_USER_AGENT, 'mac') != false; + $this->ver = 0; + $this->win = strpos($HTTP_USER_AGENT, 'win') != false; + $this->mac = strpos($HTTP_USER_AGENT, 'mac') != false; $this->linux = strpos($HTTP_USER_AGENT, 'linux') != false; $this->unix = strpos($HTTP_USER_AGENT, 'unix') != false; - $this->opera = strpos($HTTP_USER_AGENT, 'opera') !== false; - $this->ns4 = strpos($HTTP_USER_AGENT, 'mozilla/4') !== false && strpos($HTTP_USER_AGENT, 'msie') === false; - $this->ns = ($this->ns4 || strpos($HTTP_USER_AGENT, 'netscape') !== false); - $this->ie = !$this->opera && strpos($HTTP_USER_AGENT, 'compatible; msie') !== false; - $this->khtml = strpos($HTTP_USER_AGENT, 'khtml') !== false; - $this->mz = !$this->ie && !$this->khtml && strpos($HTTP_USER_AGENT, 'mozilla/5') !== false; - $this->chrome = strpos($HTTP_USER_AGENT, 'chrome') !== false; - $this->safari = !$this->chrome && ($this->khtml || strpos($HTTP_USER_AGENT, 'safari') !== false); + $this->webkit = strpos($HTTP_USER_AGENT, 'applewebkit') !== false; + $this->opera = strpos($HTTP_USER_AGENT, 'opera') !== false || ($this->webkit && strpos($HTTP_USER_AGENT, 'opr/') !== false); + $this->ns = strpos($HTTP_USER_AGENT, 'netscape') !== false; + $this->chrome = !$this->opera && strpos($HTTP_USER_AGENT, 'chrome') !== false; + $this->ie = !$this->opera && (strpos($HTTP_USER_AGENT, 'compatible; msie') !== false || strpos($HTTP_USER_AGENT, 'trident/') !== false); + $this->safari = !$this->opera && !$this->chrome && ($this->webkit || strpos($HTTP_USER_AGENT, 'safari') !== false); + $this->mz = !$this->ie && !$this->safari && !$this->chrome && !$this->ns && !$this->opera && strpos($HTTP_USER_AGENT, 'mozilla') !== false; - if ($this->ns || $this->chrome) { - $test = preg_match('/(mozilla|chrome)\/([0-9.]+)/', $HTTP_USER_AGENT, $regs); - $this->ver = $test ? (float)$regs[2] : 0; + if ($this->opera) { + if (preg_match('/(opera|opr)\/([0-9.]+)/', $HTTP_USER_AGENT, $regs)) { + $this->ver = (float) $regs[2]; + } } - else if ($this->mz) { - $test = preg_match('/rv:([0-9.]+)/', $HTTP_USER_AGENT, $regs); - $this->ver = $test ? (float)$regs[1] : 0; + else if (preg_match('/(chrome|msie|version|khtml)(\s*|\/)([0-9.]+)/', $HTTP_USER_AGENT, $regs)) { + $this->ver = (float) $regs[3]; } - else if ($this->ie || $this->opera) { - $test = preg_match('/(msie|opera) ([0-9.]+)/', $HTTP_USER_AGENT, $regs); - $this->ver = $test ? (float)$regs[2] : 0; + else if (preg_match('/rv:([0-9.]+)/', $HTTP_USER_AGENT, $regs)) { + $this->ver = (float) $regs[1]; } if (preg_match('/ ([a-z]{2})-([a-z]{2})/', $HTTP_USER_AGENT, $regs)) @@ -61,10 +59,10 @@ class rcube_browser else $this->lang = 'en'; - $this->dom = ($this->mz || $this->safari || ($this->ie && $this->ver>=5) || ($this->opera && $this->ver>=7)); + $this->dom = $this->mz || $this->safari || ($this->ie && $this->ver>=5) || ($this->opera && $this->ver>=7); $this->pngalpha = $this->mz || $this->safari || ($this->ie && $this->ver>=5.5) || ($this->ie && $this->ver>=5 && $this->mac) || ($this->opera && $this->ver>=7) ? true : false; - $this->imgdata = !$this->ie; + $this->imgdata = !$this->ie; } } diff --git a/program/lib/Roundcube/rcube_charset.php b/program/lib/Roundcube/rcube_charset.php index 19dbf6cbc..8612e7fca 100644 --- a/program/lib/Roundcube/rcube_charset.php +++ b/program/lib/Roundcube/rcube_charset.php @@ -199,10 +199,13 @@ class rcube_charset $iconv_options = ''; } } + else { + $iconv_options = false; + } } // convert charset using iconv module - if ($iconv_options !== null && $from != 'UTF7-IMAP' && $to != 'UTF7-IMAP') { + if ($iconv_options !== false && $from != 'UTF7-IMAP' && $to != 'UTF7-IMAP') { // throw an exception if iconv reports an illegal character in input // it means that input string has been truncated set_error_handler(array('rcube_charset', 'error_handler'), E_NOTICE); @@ -224,10 +227,13 @@ class rcube_charset $mbstring_list = mb_list_encodings(); $mbstring_list = array_map('strtoupper', $mbstring_list); } + else { + $mbstring_list = false; + } } // convert charset using mbstring module - if ($mbstring_list !== null) { + if ($mbstring_list !== false) { $aliases['WINDOWS-1257'] = 'ISO-8859-13'; // it happens that mbstring supports ASCII but not US-ASCII if (($from == 'US-ASCII' || $to == 'US-ASCII') && !in_array('US-ASCII', $mbstring_list)) { diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php index 04b914c3d..afe13e879 100644 --- a/program/lib/Roundcube/rcube_config.php +++ b/program/lib/Roundcube/rcube_config.php @@ -63,7 +63,7 @@ class rcube_config $this->paths = explode(PATH_SEPARATOR, $paths); // make all paths absolute foreach ($this->paths as $i => $path) { - if (!$this->_is_absolute($path)) { + if (!rcube_utils::is_absolute_path($path)) { if ($realpath = realpath(RCUBE_INSTALL_PATH . $path)) { $this->paths[$i] = unslashify($realpath) . '/'; } @@ -243,8 +243,8 @@ class rcube_config */ public function resolve_paths($file, $use_env = true) { - $files = array(); - $abs_path = $this->_is_absolute($file); + $files = array(); + $abs_path = rcube_utils::is_absolute_path($file); foreach ($this->paths as $basepath) { $realpath = $abs_path ? $file : realpath($basepath . '/' . $file); @@ -270,14 +270,6 @@ class rcube_config } /** - * Determine whether the given file path is absolute or relative - */ - private function _is_absolute($path) - { - return $path[0] == DIRECTORY_SEPARATOR || preg_match('!^[a-z]:[\\\\/]!i', $path); - } - - /** * Getter for a specific config parameter * * @param string $name Parameter name @@ -373,7 +365,11 @@ class rcube_config */ public function all() { - return $this->prop; + $rcube = rcube::get_instance(); + $plugin = $rcube->plugins->exec_hook('config_get', array( + 'name' => '*', 'result' => $this->prop)); + + return $plugin['result']; } /** diff --git a/program/lib/Roundcube/rcube_contacts.php b/program/lib/Roundcube/rcube_contacts.php index 6d01368a1..d215760cf 100644 --- a/program/lib/Roundcube/rcube_contacts.php +++ b/program/lib/Roundcube/rcube_contacts.php @@ -350,7 +350,7 @@ class rcube_contacts extends rcube_addressbook if (in_array($col, $this->table_cols)) { switch ($mode) { case 1: // strict - $where[] = '(' . $this->db->quoteIdentifier($col) . ' = ' . $this->db->quote($val) + $where[] = '(' . $this->db->quote_identifier($col) . ' = ' . $this->db->quote($val) . ' OR ' . $this->db->ilike($col, $val . $AS . '%') . ' OR ' . $this->db->ilike($col, '%' . $AS . $val . $AS . '%') . ' OR ' . $this->db->ilike($col, '%' . $AS . $val) . ')'; @@ -390,7 +390,7 @@ class rcube_contacts extends rcube_addressbook } foreach (array_intersect($required, $this->table_cols) as $col) { - $and_where[] = $this->db->quoteIdentifier($col).' <> '.$this->db->quote(''); + $and_where[] = $this->db->quote_identifier($col).' <> '.$this->db->quote(''); } if (!empty($where)) { @@ -592,8 +592,8 @@ class rcube_contacts extends rcube_addressbook // validate e-mail addresses $valid = parent::validate($save_data, $autofix); - // require at least one e-mail address (syntax check is already done) - if ($valid && !array_filter($this->get_col_values('email', $save_data, true))) { + // require at least one email address or a name + if ($valid && !strlen($save_data['firstname'].$save_data['surname'].$save_data['name']) && !array_filter($this->get_col_values('email', $save_data, true))) { $this->set_error(self::ERROR_VALIDATE, 'noemailwarning'); $valid = false; } @@ -626,11 +626,11 @@ class rcube_contacts extends rcube_addressbook } } - $save_data = $this->convert_save_data($save_data); + $save_data = $this->convert_save_data($save_data); $a_insert_cols = $a_insert_values = array(); foreach ($save_data as $col => $value) { - $a_insert_cols[] = $this->db->quoteIdentifier($col); + $a_insert_cols[] = $this->db->quote_identifier($col); $a_insert_values[] = $this->db->quote($value); } @@ -655,17 +655,18 @@ class rcube_contacts extends rcube_addressbook * * @param mixed Record identifier * @param array Assoziative array with save data + * * @return boolean True on success, False on error */ function update($id, $save_cols) { - $updated = false; + $updated = false; $write_sql = array(); - $record = $this->get_record($id, true); + $record = $this->get_record($id, true); $save_cols = $this->convert_save_data($save_cols, $record); foreach ($save_cols as $col => $value) { - $write_sql[] = sprintf("%s=%s", $this->db->quoteIdentifier($col), $this->db->quote($value)); + $write_sql[] = sprintf("%s=%s", $this->db->quote_identifier($col), $this->db->quote($value)); } if (!empty($write_sql)) { @@ -683,7 +684,7 @@ class rcube_contacts extends rcube_addressbook $this->result = null; // clear current result (from get_record()) } - return $updated; + return $updated ? true : false; } @@ -812,16 +813,30 @@ class rcube_contacts extends rcube_addressbook /** * Remove all records from the database + * + * @param bool $with_groups Remove also groups + * + * @return int Number of removed records */ - function delete_all() + function delete_all($with_groups = false) { $this->cache = null; - $this->db->query("UPDATE ".$this->db->table_name($this->db_name). - " SET del=1, changed=".$this->db->now(). - " WHERE user_id = ?", $this->user_id); + $this->db->query("UPDATE " . $this->db->table_name($this->db_name) + . " SET del = 1, changed = " . $this->db->now() + . " WHERE user_id = ?", $this->user_id); - return $this->db->affected_rows(); + $count = $this->db->affected_rows(); + + if ($with_groups) { + $this->db->query("UPDATE " . $this->db->table_name($this->db_groups) + . " SET del = 1, changed = " . $this->db->now() + . " WHERE user_id = ?", $this->user_id); + + $count += $this->db->affected_rows(); + } + + return $count; } @@ -860,11 +875,11 @@ class rcube_contacts extends rcube_addressbook function delete_group($gid) { // flag group record as deleted - $sql_result = $this->db->query( - "UPDATE ".$this->db->table_name($this->db_groups). - " SET del=1, changed=".$this->db->now(). - " WHERE contactgroup_id=?". - " AND user_id=?", + $this->db->query( + "UPDATE " . $this->db->table_name($this->db_groups) + . " SET del = 1, changed = " . $this->db->now() + . " WHERE contactgroup_id = ?" + . " AND user_id = ?", $gid, $this->user_id ); @@ -873,7 +888,6 @@ class rcube_contacts extends rcube_addressbook return $this->db->affected_rows(); } - /** * Rename a specific contact group * diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php index 00e6d4e20..aa385dce4 100644 --- a/program/lib/Roundcube/rcube_csv2vcard.php +++ b/program/lib/Roundcube/rcube_csv2vcard.php @@ -47,7 +47,7 @@ class rcube_csv2vcard //'business_street_2' => '', //'business_street_3' => '', 'car_phone' => 'phone:car', - 'categories' => 'categories', + 'categories' => 'groups', //'children' => '', 'company' => 'organization', //'company_main_phone' => '', @@ -146,6 +146,9 @@ class rcube_csv2vcard 'work_title' => 'jobtitle', 'work_zip' => 'zipcode:work', 'group' => 'groups', + + // GMail + 'groups' => 'groups', ); /** @@ -427,6 +430,11 @@ class rcube_csv2vcard $contact['birthday'] = $contact['birthday-y'] .'-' .$contact['birthday-m'] . '-' . $contact['birthday-d']; } + // categories/groups separator in vCard is ',' not ';' + if (!empty($contact['groups'])) { + $contact['groups'] = str_replace(';', ',', $contact['groups']); + } + // Empty dates, e.g. "0/0/00", "0000-00-00 00:00:00" foreach (array('birthday', 'anniversary') as $key) { if (!empty($contact[$key])) { diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index aaba28172..2828f26ee 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -392,7 +392,7 @@ class rcube_db */ protected function _query($query, $offset, $numrows, $params) { - $query = trim($query); + $query = ltrim($query); $this->db_connect($this->dsn_select($query), true); @@ -405,27 +405,28 @@ class rcube_db $query = $this->set_limit($query, $numrows, $offset); } - $params = (array) $params; - // Because in Roundcube we mostly use queries that are // executed only once, we will not use prepared queries $pos = 0; $idx = 0; - while ($pos = strpos($query, '?', $pos)) { - if ($query[$pos+1] == '?') { // skip escaped ? - $pos += 2; - } - else { - $val = $this->quote($params[$idx++]); - unset($params[$idx-1]); - $query = substr_replace($query, $val, $pos, 1); - $pos += strlen($val); + if (count($params)) { + while ($pos = strpos($query, '?', $pos)) { + if ($query[$pos+1] == '?') { // skip escaped '?' + $pos += 2; + } + else { + $val = $this->quote($params[$idx++]); + unset($params[$idx-1]); + $query = substr_replace($query, $val, $pos, 1); + $pos += strlen($val); + } } } - // replace escaped ? back to normal - $query = rtrim(strtr($query, array('??' => '?')), ';'); + // replace escaped '?' back to normal, see self::quote() + $query = str_replace('??', '?', $query); + $query = rtrim($query, " \t\n\r\0\x0B;"); $this->debug($query); diff --git a/program/lib/Roundcube/rcube_html2text.php b/program/lib/Roundcube/rcube_html2text.php index 6f79e2f8e..3b4508da9 100644 --- a/program/lib/Roundcube/rcube_html2text.php +++ b/program/lib/Roundcube/rcube_html2text.php @@ -608,7 +608,7 @@ class rcube_html2text $this->width = $p_width; // Add citation markers and create <pre> block - $body = preg_replace_callback('/((?:^|\n)>*)([^\n]*)/', array($this, 'blockquote_citation_ballback'), trim($body)); + $body = preg_replace_callback('/((?:^|\n)>*)([^\n]*)/', array($this, 'blockquote_citation_callback'), trim($body)); $body = '<pre>' . htmlspecialchars($body) . '</pre>'; $text = substr_replace($text, $body . "\n", $start, $end + 13 - $start); @@ -616,6 +616,10 @@ class rcube_html2text break; } + // abort on invalid tag structure (e.g. no closing tag found) + else { + break; + } } while ($end || $next); } @@ -624,7 +628,7 @@ class rcube_html2text /** * Callback function to correctly add citation markers for blockquote contents */ - public function blockquote_citation_ballback($m) + public function blockquote_citation_callback($m) { $line = ltrim($m[2]); $space = $line[0] == '>' ? '' : ' '; diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 9faf1bbc6..432227091 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -680,6 +680,41 @@ class rcube_imap extends rcube_storage /** + * Public method for listing message flags + * + * @param string $folder Folder name + * @param array $uids Message UIDs + * @param int $mod_seq Optional MODSEQ value (of last flag update) + * + * @return array Indexed array with message flags + */ + public function list_flags($folder, $uids, $mod_seq = null) + { + if (!strlen($folder)) { + $folder = $this->folder; + } + + if (!$this->check_connection()) { + return array(); + } + + // @TODO: when cache was synchronized in this request + // we might already have asked for flag updates, use it. + + $flags = $this->conn->fetch($folder, $uids, true, array('FLAGS'), $mod_seq); + $result = array(); + + if (!empty($flags)) { + foreach ($flags as $message) { + $result[$message->uid] = $message->flags; + } + } + + return $result; + } + + + /** * Public method for listing headers * * @param string $folder Folder name @@ -1409,7 +1444,7 @@ class rcube_imap extends rcube_storage public function search_once($folder = null, $str = 'ALL') { if (!$str) { - return 'ALL'; + $str = 'ALL'; } if (!strlen($folder)) { @@ -2121,7 +2156,7 @@ class rcube_imap extends rcube_storage // convert charset (if text or message part) if ($body && preg_match('/^(text|message)$/', $o_part->ctype_primary)) { // Remove NULL characters if any (#1486189) - if (strpos($body, "\x00") !== false) { + if ($formatted && strpos($body, "\x00") !== false) { $body = str_replace("\x00", '', $body); } @@ -2843,12 +2878,21 @@ class rcube_imap extends rcube_storage /** * Filter the given list of folders according to access rights + * + * For performance reasons we assume user has full rights + * on all personal folders. */ protected function filter_rights($a_folders, $rights) { $regex = '/('.$rights.')/'; + foreach ($a_folders as $idx => $folder) { + if ($this->folder_namespace($folder) == 'personal') { + continue; + } + $myrights = join('', (array)$this->my_rights($folder)); + if ($myrights !== null && !preg_match($regex, $myrights)) { unset($a_folders[$idx]); } @@ -3848,9 +3892,12 @@ class rcube_imap extends rcube_storage /** * Sort folders first by default folders and then in alphabethical order * - * @param array $a_folders Folders list + * @param array $a_folders Folders list + * @param bool $skip_default Skip default folders handling + * + * @return array Sorted list */ - protected function sort_folder_list($a_folders) + public function sort_folder_list($a_folders, $skip_default = false) { $a_out = $a_defaults = $folders = array(); @@ -3862,7 +3909,7 @@ class rcube_imap extends rcube_storage continue; } - if (($p = array_search($folder, $this->default_folders)) !== false && !$a_defaults[$p]) { + if (!$skip_default && ($p = array_search($folder, $this->default_folders)) !== false && !$a_defaults[$p]) { $a_defaults[$p] = $folder; } else { diff --git a/program/lib/Roundcube/rcube_imap_cache.php b/program/lib/Roundcube/rcube_imap_cache.php index a8166545e..0c3edeaad 100644 --- a/program/lib/Roundcube/rcube_imap_cache.php +++ b/program/lib/Roundcube/rcube_imap_cache.php @@ -1250,10 +1250,8 @@ class rcube_imap_cache unset($msg->replaces); - if (is_array($msg->structure->parts)) { - foreach ($msg->structure->parts as $part) { - $this->message_object_prepare($part, $size); - } + if (is_object($msg->structure)) { + $this->message_object_prepare($msg->structure, $size); } if (is_array($msg->parts)) { diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index f9a62f010..9035840a8 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -73,6 +73,7 @@ class rcube_imap_generic const COMMAND_NORESPONSE = 1; const COMMAND_CAPABILITY = 2; const COMMAND_LASTLINE = 4; + const COMMAND_ANONYMIZED = 8; const DEBUG_LINE_LENGTH = 4098; // 4KB + 2B for \r\n @@ -88,16 +89,28 @@ class rcube_imap_generic * * @param string $string Command string * @param bool $endln True if CRLF need to be added at the end of command + * @param bool $anonymized Don't write the given data to log but a placeholder * * @param int Number of bytes sent, False on error */ - function putLine($string, $endln=true) + function putLine($string, $endln=true, $anonymized=false) { if (!$this->fp) return false; if ($this->_debug) { - $this->debug('C: '. rtrim($string)); + // anonymize the sent command for logging + $cut = $endln ? 2 : 0; + if ($anonymized && preg_match('/^(A\d+ (?:[A-Z]+ )+)(.+)/', $string, $m)) { + $log = $m[1] . sprintf('****** [%d]', strlen($m[2]) - $cut); + } + else if ($anonymized) { + $log = sprintf('****** [%d]', strlen($string) - $cut); + } + else { + $log = rtrim($string); + } + $this->debug('C: ' . $log); } $res = fwrite($this->fp, $string . ($endln ? "\r\n" : '')); @@ -116,10 +129,11 @@ class rcube_imap_generic * * @param string $string Command string * @param bool $endln True if CRLF need to be added at the end of command + * @param bool $anonymized Don't write the given data to log but a placeholder * * @return int|bool Number of bytes sent, False on error */ - function putLineC($string, $endln=true) + function putLineC($string, $endln=true, $anonymized=false) { if (!$this->fp) { return false; @@ -138,7 +152,7 @@ class rcube_imap_generic $parts[$i+1] = sprintf("{%d+}\r\n", $matches[1]); } - $bytes = $this->putLine($parts[$i].$parts[$i+1], false); + $bytes = $this->putLine($parts[$i].$parts[$i+1], false, $anonymized); if ($bytes === false) return false; $res += $bytes; @@ -153,7 +167,7 @@ class rcube_imap_generic $i++; } else { - $bytes = $this->putLine($parts[$i], false); + $bytes = $this->putLine($parts[$i], false, $anonymized); if ($bytes === false) return false; $res += $bytes; @@ -519,7 +533,7 @@ class rcube_imap_generic $reply = base64_encode($user . ' ' . $hash); // send result - $this->putLine($reply); + $this->putLine($reply, true, true); } else { // RFC2831: DIGEST-MD5 @@ -537,7 +551,7 @@ class rcube_imap_generic base64_decode($challenge), $this->host, 'imap', $user)); // send result - $this->putLine($reply); + $this->putLine($reply, true, true); $line = trim($this->readReply()); if ($line[0] == '+') { @@ -577,7 +591,7 @@ class rcube_imap_generic // RFC 4959 (SASL-IR): save one round trip if ($this->getCapability('SASL-IR')) { list($result, $line) = $this->execute("AUTHENTICATE PLAIN", array($reply), - self::COMMAND_LASTLINE | self::COMMAND_CAPABILITY); + self::COMMAND_LASTLINE | self::COMMAND_CAPABILITY | self::COMMAND_ANONYMIZED); } else { $this->putLine($this->nextTag() . " AUTHENTICATE PLAIN"); @@ -588,7 +602,7 @@ class rcube_imap_generic } // send result, get reply and process it - $this->putLine($reply); + $this->putLine($reply, true, true); $line = $this->readReply(); $result = $this->parseResult($line); } @@ -3419,7 +3433,7 @@ class rcube_imap_generic } // Send command - if (!$this->putLineC($query)) { + if (!$this->putLineC($query, true, ($options & self::COMMAND_ANONYMIZED))) { $this->setError(self::ERROR_COMMAND, "Unable to send command: $query"); return $noresp ? self::ERROR_COMMAND : array(self::ERROR_COMMAND, ''); } diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php index 64288f973..de3790e5c 100644 --- a/program/lib/Roundcube/rcube_ldap.php +++ b/program/lib/Roundcube/rcube_ldap.php @@ -52,7 +52,7 @@ class rcube_ldap extends rcube_addressbook * * @var array */ - private static $group_types = array( + private $group_types = array( 'group' => 'member', 'groupofnames' => 'member', 'kolabgroupofnames' => 'member', @@ -94,6 +94,9 @@ class rcube_ldap extends rcube_addressbook $this->prop['groups']['name_attr'] = 'cn'; if (empty($this->prop['groups']['scope'])) $this->prop['groups']['scope'] = 'sub'; + // extend group objectclass => member attribute mapping + if (!empty($this->prop['groups']['class_member_attr'])) + $this->group_types = array_merge($this->group_types, $this->prop['groups']['class_member_attr']); // add group name attrib to the list of attributes to be fetched $fetch_attributes[] = $this->prop['groups']['name_attr']; @@ -292,6 +295,14 @@ class rcube_ldap extends rcube_addressbook if ($this->prop['search_base_dn'] && $this->prop['search_filter'] && (strstr($bind_dn, '%dn') || strstr($this->base_dn, '%dn') || strstr($this->groups_base_dn, '%dn')) ) { + $search_attribs = array('uid'); + if ($search_bind_attrib = (array)$this->prop['search_bind_attrib']) { + foreach ($search_bind_attrib as $r => $attr) { + $search_attribs[] = $attr; + $replaces[$r] = ''; + } + } + $search_bind_dn = strtr($this->prop['search_bind_dn'], $replaces); $search_base_dn = strtr($this->prop['search_base_dn'], $replaces); $search_filter = strtr($this->prop['search_filter'], $replaces); @@ -321,10 +332,18 @@ class rcube_ldap extends rcube_addressbook } } - $res = $ldap->search($search_base_dn, $search_filter, 'sub', array('uid')); + $res = $ldap->search($search_base_dn, $search_filter, 'sub', $search_attribs); if ($res) { $res->rewind(); $replaces['%dn'] = $res->get_dn(); + + // add more replacements from 'search_bind_attrib' config + if ($search_bind_attrib) { + $res = $res->current(); + foreach ($search_bind_attrib as $r => $attr) { + $replaces[$r] = $res[$attr][0]; + } + } } if ($ldap != $this->ldap) { @@ -355,6 +374,23 @@ class rcube_ldap extends rcube_addressbook $this->base_dn = strtr($this->base_dn, $replaces); $this->groups_base_dn = strtr($this->groups_base_dn, $replaces); + // replace placeholders in filter settings + if (!empty($this->prop['filter'])) + $this->prop['filter'] = strtr($this->prop['filter'], $replaces); + if (!empty($this->prop['groups']['filter'])) + $this->prop['groups']['filter'] = strtr($this->prop['groups']['filter'], $replaces); + if (!empty($this->prop['groups']['member_filter'])) + $this->prop['groups']['member_filter'] = strtr($this->prop['groups']['member_filter'], $replaces); + + if (!empty($this->prop['group_filters'])) { + foreach ($this->prop['group_filters'] as $i => $gf) { + if (!empty($gf['base_dn'])) + $this->prop['group_filters'][$i]['base_dn'] = strtr($gf['base_dn'], $replaces); + if (!empty($gf['filter'])) + $this->prop['group_filters'][$i]['filter'] = strtr($gf['filter'], $replaces); + } + } + if (empty($bind_user)) { $bind_user = $u; } @@ -518,7 +554,7 @@ class rcube_ldap extends rcube_addressbook } else { $prop = $this->group_id ? $this->group_data : $this->prop; - $base_dn = $this->group_id ? $this->group_base_dn : $this->base_dn; + $base_dn = $this->group_id ? $prop['base_dn'] : $this->base_dn; // use global search filter if (!empty($this->filter)) @@ -559,9 +595,10 @@ class rcube_ldap extends rcube_addressbook /** * Get all members of the given group * - * @param string Group DN - * @param array Group entries (if called recursively) - * @return array Accumulated group members + * @param string Group DN + * @param boolean Count only + * @param array Group entries (if called recursively) + * @return array Accumulated group members */ function list_group_members($dn, $count = false, $entries = null) { @@ -569,7 +606,7 @@ class rcube_ldap extends rcube_addressbook // fetch group object if (empty($entries)) { - $attribs = array('dn','objectClass','member','uniqueMember','memberURL'); + $attribs = array_merge(array('dn','objectClass','memberURL'), array_values($this->group_types)); $entries = $this->ldap->read_entries($dn, '(objectClass=*)', $attribs); if ($entries === false) { return $group_members; @@ -581,17 +618,17 @@ class rcube_ldap extends rcube_addressbook $attrs = array(); foreach ((array)$entry['objectclass'] as $objectclass) { - if (strtolower($objectclass) == 'groupofurls') { - $members = $this->_list_group_memberurl($dn, $entry, $count); - $group_members = array_merge($group_members, $members); - } - else if (($member_attr = $this->get_group_member_attr(array($objectclass), '')) + if (($member_attr = $this->get_group_member_attr(array($objectclass), '')) && ($member_attr = strtolower($member_attr)) && !in_array($member_attr, $attrs) ) { $members = $this->_list_group_members($dn, $entry, $member_attr, $count); $group_members = array_merge($group_members, $members); $attrs[] = $member_attr; } + else if (!empty($entry['memberurl'])) { + $members = $this->_list_group_memberurl($dn, $entry, $count); + $group_members = array_merge($group_members, $members); + } if ($this->prop['sizelimit'] && count($group_members) > $this->prop['sizelimit']) { break 2; @@ -608,6 +645,7 @@ class rcube_ldap extends rcube_addressbook * @param string Group DN * @param array Group entry * @param string Member attribute to use + * @param boolean Count only * @return array Accumulated group members */ private function _list_group_members($dn, $entry, $attr, $count) @@ -621,8 +659,7 @@ class rcube_ldap extends rcube_addressbook // read these attributes for all members $attrib = $count ? array('dn','objectClass') : $this->prop['list_attributes']; - $attrib[] = 'member'; - $attrib[] = 'uniqueMember'; + $attrib = array_merge($attrib, array_values($this->group_types)); $attrib[] = 'memberURL'; $filter = $this->prop['groups']['member_filter'] ? $this->prop['groups']['member_filter'] : '(objectclass=*)'; @@ -669,7 +706,7 @@ class rcube_ldap extends rcube_addressbook if ($result = $this->ldap->search($m[1], $filter, $m[2], $attrs, $this->group_data)) { $entries = $result->entries(); for ($j = 0; $j < $entries['count']; $j++) { - if (self::is_group_entry($entries[$j]) && ($nested_group_members = $this->list_group_members($entries[$j]['dn'], $count))) + if ($this->is_group_entry($entries[$j]) && ($nested_group_members = $this->list_group_members($entries[$j]['dn'], $count))) $group_members = array_merge($group_members, $nested_group_members); else $group_members[] = $entries[$j]; @@ -1287,8 +1324,10 @@ class rcube_ldap extends rcube_addressbook /** * Remove all contact records + * + * @param bool $with_groups Delete also groups if enabled */ - function delete_all() + function delete_all($with_groups = false) { // searching for contact entries $dn_list = $this->ldap->list_entries($this->base_dn, $this->prop['filter'] ? $this->prop['filter'] : '(objectclass=*)'); @@ -1299,6 +1338,16 @@ class rcube_ldap extends rcube_addressbook } $this->delete($dn_list); } + + if ($with_groups && $this->groups && ($groups = $this->_fetch_groups()) && count($groups)) { + foreach ($groups as $group) { + $this->ldap->delete($group['dn']); + } + + if ($this->cache) { + $this->cache->remove('groups'); + } + } } /** @@ -1354,7 +1403,7 @@ class rcube_ldap extends rcube_addressbook $out[$this->primary_key] = self::dn_encode($rec['dn']); // determine record type - if (self::is_group_entry($rec)) { + if ($this->is_group_entry($rec)) { $out['_type'] = 'group'; $out['readonly'] = true; $fieldmap['name'] = $this->group_data['name_attr'] ? $this->group_data['name_attr'] : $this->prop['groups']['name_attr']; @@ -1479,11 +1528,11 @@ class rcube_ldap extends rcube_addressbook /** * Determines whether the given LDAP entry is a group record */ - private static function is_group_entry($entry) + private function is_group_entry($entry) { $classes = array_map('strtolower', (array)$entry['objectclass']); - return count(array_intersect(array_keys(self::$group_types), $classes)) > 0; + return count(array_intersect(array_keys($this->group_types), $classes)) > 0; } /** @@ -1569,11 +1618,12 @@ class rcube_ldap extends rcube_addressbook // special case: list groups from 'group_filters' config if ($vlv_page === null && !empty($this->prop['group_filters'])) { $groups = array(); + $rcube = rcube::get_instance(); // list regular groups configuration as special filter if (!empty($this->prop['groups']['filter'])) { $id = '__groups__'; - $groups[$id] = array('ID' => $id, 'name' => rcube_label('groups'), 'virtual' => true) + $this->prop['groups']; + $groups[$id] = array('ID' => $id, 'name' => $rcube->gettext('groups'), 'virtual' => true) + $this->prop['groups']; } foreach ($this->prop['group_filters'] as $id => $prop) { @@ -1914,7 +1964,7 @@ class rcube_ldap extends rcube_addressbook if (!empty($object_classes)) { foreach ((array)$object_classes as $oc) { - if ($attr = self::$group_types[strtolower($oc)]) { + if ($attr = $this->group_types[strtolower($oc)]) { return $attr; } } diff --git a/program/lib/Roundcube/rcube_ldap_generic.php b/program/lib/Roundcube/rcube_ldap_generic.php index 923a12a41..b85afe4ce 100644 --- a/program/lib/Roundcube/rcube_ldap_generic.php +++ b/program/lib/Roundcube/rcube_ldap_generic.php @@ -240,7 +240,7 @@ class rcube_ldap_generic $method = 'DIGEST-MD5'; } - $this->_debug("C: SASL Bind [mech: $method, authc: $authc, authz: $authz, pass: $pass]"); + $this->_debug("C: SASL Bind [mech: $method, authc: $authc, authz: $authz, pass: **** [" . strlen($pass) . "]"); if (ldap_sasl_bind($this->conn, NULL, $pass, $method, NULL, $authc, $authz)) { $this->_debug("S: OK"); @@ -271,7 +271,7 @@ class rcube_ldap_generic return false; } - $this->_debug("C: Bind $dn [pass: $pass]"); + $this->_debug("C: Bind $dn, pass: **** [" . strlen($pass) . "]"); if (@ldap_bind($this->conn, $dn, $pass)) { $this->_debug("S: OK"); diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index 9b662a286..f24ec3ed8 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -211,16 +211,19 @@ class rcube_message } $level = explode('.', $part->mime_id); + $depth = count($level); // Check if the part belongs to higher-level's multipart part - // this can be alternative/related/signed/encrypted, but not mixed + // this can be alternative/related/signed/encrypted or mixed while (array_pop($level) !== null) { - if (!count($level)) { + $parent_depth = count($level); + if (!$parent_depth) { return true; } $parent = $this->mime_parts[join('.', $level)]; - if (!preg_match('/^multipart\/(alternative|related|signed|encrypted)$/', $parent->mimetype)) { + if (!preg_match('/^multipart\/(alternative|related|signed|encrypted|mixed)$/', $parent->mimetype) + || ($parent->mimetype == 'multipart/mixed' && $parent_depth < $depth - 1)) { continue 2; } } @@ -529,8 +532,9 @@ class rcube_message $part_mimetype = $mail_part->real_mimetype; list($primary_type, $secondary_type) = explode('/', $part_mimetype); } - else - $part_mimetype = $mail_part->mimetype; + else { + $part_mimetype = $part_orig_mimetype = $mail_part->mimetype; + } // multipart/alternative if ($primary_type == 'multipart') { diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php index 9c2220328..55b70f67c 100644 --- a/program/lib/Roundcube/rcube_mime.php +++ b/program/lib/Roundcube/rcube_mime.php @@ -378,6 +378,10 @@ class rcube_mime } if ($decode) { $name = self::decode_header($name, $fallback); + // some clients encode addressee name with quotes around it + if ($name[0] == '"' && $name[strlen($name)-1] == '"') { + $name = substr($name, 1, -1); + } } } @@ -810,7 +814,7 @@ class rcube_mime } $mime_types = $mime_extensions = array(); - $regex = "/([\w\+\-\.\/]+)\t+([\w\s]+)/i"; + $regex = "/([\w\+\-\.\/]+)\s+([\w\s]+)/i"; foreach((array)$lines as $line) { // skip comments or mime types w/o any extensions if ($line[0] == '#' || !preg_match($regex, $line, $matches)) diff --git a/program/lib/Roundcube/rcube_plugin.php b/program/lib/Roundcube/rcube_plugin.php index 3153a8410..f0af95332 100644 --- a/program/lib/Roundcube/rcube_plugin.php +++ b/program/lib/Roundcube/rcube_plugin.php @@ -109,7 +109,7 @@ abstract class rcube_plugin */ public function require_plugin($plugin_name) { - return $this->api->load_plugin($plugin_name); + return $this->api->load_plugin($plugin_name, true); } /** @@ -125,13 +125,17 @@ abstract class rcube_plugin $fpath = $this->home.'/'.$fname; $rcube = rcube::get_instance(); - if (is_file($fpath) && !$rcube->config->load_from_file($fpath)) { + if (($is_local = is_file($fpath)) && !$rcube->config->load_from_file($fpath)) { rcube::raise_error(array( 'code' => 527, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "Failed to load config from $fpath"), true, false); return false; } + else if (!$is_local) { + // Search plugin_name.inc.php file in any configured path + return $rcube->config->load_from_file($this->ID . '.inc.php'); + } return true; } diff --git a/program/lib/Roundcube/rcube_plugin_api.php b/program/lib/Roundcube/rcube_plugin_api.php index 5a25ada02..461c3cc07 100644 --- a/program/lib/Roundcube/rcube_plugin_api.php +++ b/program/lib/Roundcube/rcube_plugin_api.php @@ -35,8 +35,9 @@ class rcube_plugin_api public $url = 'plugins/'; public $task = ''; public $output; - public $handlers = array(); - public $allowed_prefs = array(); + public $handlers = array(); + public $allowed_prefs = array(); + public $allowed_session_prefs = array(); protected $plugins = array(); protected $tasks = array(); @@ -167,10 +168,11 @@ class rcube_plugin_api * Load the specified plugin * * @param string Plugin name + * @param boolean Force loading of the plugin even if it doesn't match the filter * * @return boolean True on success, false if not loaded or failure */ - public function load_plugin($plugin_name) + public function load_plugin($plugin_name, $force = false) { static $plugins_dir; @@ -196,7 +198,7 @@ class rcube_plugin_api // check inheritance... if (is_subclass_of($plugin, 'rcube_plugin')) { // ... task, request type and framed mode - if ((!$plugin->task || preg_match('/^('.$plugin->task.')$/i', $this->task)) + if (($force || !$plugin->task || preg_match('/^('.$plugin->task.')$/i', $this->task)) && (!$plugin->noajax || (is_object($this->output) && $this->output->type == 'html')) && (!$plugin->noframe || empty($_REQUEST['_framed'])) ) { @@ -282,6 +284,7 @@ class rcube_plugin_api $composer = INSTALL_PATH . "/plugins/$plugin_name/composer.json"; if (file_exists($composer) && ($json = @json_decode(file_get_contents($composer), true))) { list($info['vendor'], $info['name']) = explode('/', $json['name']); + $info['version'] = $json['version']; $info['license'] = $json['license']; if ($license_uri = $license_uris[$info['license']]) $info['license_uri'] = $license_uri; diff --git a/program/lib/Roundcube/rcube_result_index.php b/program/lib/Roundcube/rcube_result_index.php index 5f592c54f..058f25c6f 100644 --- a/program/lib/Roundcube/rcube_result_index.php +++ b/program/lib/Roundcube/rcube_result_index.php @@ -231,29 +231,13 @@ class rcube_result_index /** - * Filters data set. Removes elements listed in $ids list. + * Filters data set. Removes elements not listed in $ids list. * * @param array $ids List of IDs to remove. */ public function filter($ids = array()) { $data = $this->get(); - $data = array_diff($data, $ids); - - $this->meta = array(); - $this->meta['count'] = count($data); - $this->raw_data = implode(self::SEPARATOR_ELEMENT, $data); - } - - - /** - * Filters data set. Removes elements not listed in $ids list. - * - * @param array $ids List of IDs to keep. - */ - public function intersect($ids = array()) - { - $data = $this->get(); $data = array_intersect($data, $ids); $this->meta = array(); @@ -332,6 +316,7 @@ class rcube_result_index if (empty($this->raw_data)) { return array(); } + return explode(self::SEPARATOR_ELEMENT, $this->raw_data); } diff --git a/program/lib/Roundcube/rcube_result_thread.php b/program/lib/Roundcube/rcube_result_thread.php index 7657550be..ceaaf59a6 100644 --- a/program/lib/Roundcube/rcube_result_thread.php +++ b/program/lib/Roundcube/rcube_result_thread.php @@ -453,7 +453,7 @@ class rcube_result_thread // when sorting search result it's good to make the index smaller if ($index->count() != $this->count_messages()) { - $index->intersect($this->get()); + $index->filter($this->get()); } $result = array_fill_keys($index->get(), null); @@ -606,33 +606,39 @@ class rcube_result_thread // arrays handling is much more expensive // For the following structure: THREAD (2)(3 6 (4 23)(44 7 96)) // -- 2 - // // -- 3 // \-- 6 // |-- 4 // | \-- 23 // | // \-- 44 - // \-- 7 - // \-- 96 + // \-- 7 + // \-- 96 // // The output will be: 2,3^1:6^2:4^3:23^2:44^3:7^4:96 if ($str[$begin] != '(') { - $stop = $begin + strspn($str, '1234567890', $begin, $end - $begin); - $msg = substr($str, $begin, $stop - $begin); - if (!$msg) { + // find next bracket + $stop = $begin + strcspn($str, '()', $begin, $end - $begin); + $messages = explode(' ', trim(substr($str, $begin, $stop - $begin))); + + if (empty($messages)) { return $node; } - $this->meta['messages']++; - - $node .= ($depth ? self::SEPARATOR_ITEM.$depth.self::SEPARATOR_LEVEL : '').$msg; + foreach ($messages as $msg) { + if ($msg) { + $node .= ($depth ? self::SEPARATOR_ITEM.$depth.self::SEPARATOR_LEVEL : '').$msg; + $this->meta['messages']++; + $depth++; + } + } - if ($stop + 1 < $end) { - $node .= $this->parse_thread($str, $stop + 1, $end, $depth + 1); + if ($stop < $end) { + $node .= $this->parse_thread($str, $stop, $end, $depth); } - } else { + } + else { $off = $begin; while ($off < $end) { $start = $off; @@ -649,7 +655,8 @@ class rcube_result_thread if ($p1 !== false && $p1 < $p) { $off = $p1 + 1; $n++; - } else { + } + else { $off = $p + 1; $n--; } diff --git a/program/lib/Roundcube/rcube_session.php b/program/lib/Roundcube/rcube_session.php index 67072df41..caca262c6 100644 --- a/program/lib/Roundcube/rcube_session.php +++ b/program/lib/Roundcube/rcube_session.php @@ -34,6 +34,7 @@ class rcube_session private $changed; private $time_diff = 0; private $reloaded = false; + private $appends = array(); private $unsets = array(); private $gc_handlers = array(); private $cookiename = 'roundcube_sessauth'; @@ -441,8 +442,19 @@ class rcube_session $node = &$this->get_node(explode('.', $path), $_SESSION); - if ($key !== null) $node[$key] = $value; - else $node[] = $value; + if ($key !== null) { + $node[$key] = $value; + $path .= '.' . $key; + } + else { + $node[] = $value; + } + + $this->appends[] = $path; + + // when overwriting a previously unset variable + if ($this->unsets[$path]) + unset($this->unsets[$path]); } @@ -491,13 +503,40 @@ class rcube_session */ public function reload() { + // collect updated data from previous appends + $merge_data = array(); + foreach ((array)$this->appends as $var) { + $path = explode('.', $var); + $value = $this->get_node($path, $_SESSION); + $k = array_pop($path); + $node = &$this->get_node($path, $merge_data); + $node[$k] = $value; + } + if ($this->key && $this->memcache) $data = $this->mc_read($this->key); else if ($this->key) $data = $this->db_read($this->key); - if ($data) + if ($data) { session_decode($data); + + // apply appends and unsets to reloaded data + $_SESSION = array_merge_recursive($_SESSION, $merge_data); + + foreach ((array)$this->unsets as $var) { + if (isset($_SESSION[$var])) { + unset($_SESSION[$var]); + } + else { + $path = explode('.', $var); + $k = array_pop($path); + $node = &$this->get_node($path, $_SESSION); + unset($node[$k]); + } + } + } + } /** diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php index 60b1389ea..70f15dc7b 100644 --- a/program/lib/Roundcube/rcube_smtp.php +++ b/program/lib/Roundcube/rcube_smtp.php @@ -29,6 +29,7 @@ class rcube_smtp private $conn = null; private $response; private $error; + private $anonymize_log = 0; // define headers delimiter const SMTP_MIME_CRLF = "\r\n"; @@ -67,6 +68,7 @@ class rcube_smtp 'smtp_auth_type' => $rcube->config->get('smtp_auth_type'), 'smtp_helo_host' => $rcube->config->get('smtp_helo_host'), 'smtp_timeout' => $rcube->config->get('smtp_timeout'), + 'smtp_conn_options' => $rcube->config->get('smtp_conn_options'), 'smtp_auth_callbacks' => array(), )); @@ -106,10 +108,11 @@ class rcube_smtp // IDNA Support $smtp_host = rcube_utils::idn_to_ascii($smtp_host); - $this->conn = new Net_SMTP($smtp_host, $smtp_port, $helo_host); + $this->conn = new Net_SMTP($smtp_host, $smtp_port, $helo_host, false, 0, $CONFIG['smtp_conn_options']); if ($rcube->config->get('smtp_debug')) { $this->conn->setDebug(true, array($this, 'debug_handler')); + $this->anonymize_log = 0; } // register authentication methods @@ -329,6 +332,15 @@ class rcube_smtp */ public function debug_handler(&$smtp, $message) { + // catch AUTH commands and set anonymization flag for subsequent sends + if (preg_match('/^Send: AUTH ([A-Z]+)/', $message, $m)) { + $this->anonymize_log = $m[1] == 'LOGIN' ? 2 : 1; + } + // anonymize this log entry + else if ($this->anonymize_log > 0 && strpos($message, 'Send:') === 0 && --$this->anonymize_log == 0) { + $message = sprintf('Send: ****** [%d]', strlen($message) - 8); + } + if (($len = strlen($message)) > self::DEBUG_LINE_LENGTH) { $diff = $len - self::DEBUG_LINE_LENGTH; $message = substr($message, 0, self::DEBUG_LINE_LENGTH) diff --git a/program/lib/Roundcube/rcube_spellcheck_atd.php b/program/lib/Roundcube/rcube_spellcheck_atd.php index 68e8b7cb8..9f073f56f 100644 --- a/program/lib/Roundcube/rcube_spellcheck_atd.php +++ b/program/lib/Roundcube/rcube_spellcheck_atd.php @@ -39,6 +39,18 @@ class rcube_spellcheck_atd extends rcube_spellcheck_engine ); /** + * Return a list of languages supported by this backend + * + * @see rcube_spellcheck_engine::languages() + */ + function languages() + { + $langs = array_values($this->langhosts); + $langs[] = 'en'; + return $langs; + } + + /** * Set content and check spelling * * @see rcube_spellcheck_engine::check() diff --git a/program/lib/Roundcube/rcube_spellcheck_enchant.php b/program/lib/Roundcube/rcube_spellcheck_enchant.php index a22251e00..14d6fff46 100644 --- a/program/lib/Roundcube/rcube_spellcheck_enchant.php +++ b/program/lib/Roundcube/rcube_spellcheck_enchant.php @@ -31,6 +31,24 @@ class rcube_spellcheck_enchant extends rcube_spellcheck_engine private $matches = array(); /** + * Return a list of languages supported by this backend + * + * @see rcube_spellcheck_engine::languages() + */ + function languages() + { + $this->init(); + + $langs = array(); + $dicts = enchant_broker_list_dicts($this->enchant_broker); + foreach ($dicts as $dict) { + $langs[] = preg_replace('/-.*$/', '', $dict['lang_tag']); + } + + return array_unique($langs); + } + + /** * Initializes Enchant dictionary */ private function init() diff --git a/program/lib/Roundcube/rcube_spellcheck_engine.php b/program/lib/Roundcube/rcube_spellcheck_engine.php index 88e10ac05..3cb4ca3de 100644 --- a/program/lib/Roundcube/rcube_spellcheck_engine.php +++ b/program/lib/Roundcube/rcube_spellcheck_engine.php @@ -43,6 +43,13 @@ abstract class rcube_spellcheck_engine } /** + * Return a list of languages supported by this backend + * + * @return array Indexed list of language codes + */ + abstract function languages(); + + /** * Set content and check spelling * * @param string $text Text content for spellchecking diff --git a/program/lib/Roundcube/rcube_spellcheck_googie.php b/program/lib/Roundcube/rcube_spellcheck_googie.php index 70507dc23..3777942a6 100644 --- a/program/lib/Roundcube/rcube_spellcheck_googie.php +++ b/program/lib/Roundcube/rcube_spellcheck_googie.php @@ -26,13 +26,28 @@ */ class rcube_spellcheck_googie extends rcube_spellcheck_engine { - const GOOGLE_HOST = 'ssl://www.google.com'; - const GOOGLE_PORT = 443; + const GOOGIE_HOST = 'ssl://spell.roundcube.net'; + const GOOGIE_PORT = 443; private $matches = array(); private $content; /** + * Return a list of languages supported by this backend + * + * @see rcube_spellcheck_engine::languages() + */ + function languages() + { + return array('am','ar','ar','bg','br','ca','cs','cy','da', + 'de_CH','de_DE','el','en_GB','en_US', + 'eo','es','et','eu','fa','fi','fr_FR','ga','gl','gl', + 'he','hr','hu','hy','is','it','ku','lt','lv','nl', + 'pl','pt_BR','pt_PT','ro','ru', + 'sk','sl','sv','uk'); + } + + /** * Set content and check spelling * * @see rcube_spellcheck_engine::check() @@ -52,25 +67,25 @@ class rcube_spellcheck_googie extends rcube_spellcheck_engine $path = $a_uri['path'] . ($a_uri['query'] ? '?'.$a_uri['query'] : '') . $this->lang; } else { - $host = self::GOOGLE_HOST; - $port = self::GOOGLE_PORT; + $host = self::GOOGIE_HOST; + $port = self::GOOGIE_PORT; $path = '/tbproxy/spell?lang=' . $this->lang; } - // Google has some problem with spaces, use \n instead - $gtext = str_replace(' ', "\n", $text); + $path .= sprintf('&key=%06d', $_SESSION['user_id']); $gtext = '<?xml version="1.0" encoding="utf-8" ?>' .'<spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1">' - .'<text>' . $gtext . '</text>' + .'<text>' . htmlspecialchars($text, ENT_QUOTES, RCUBE_CHARSET) . '</text>' .'</spellrequest>'; $store = ''; if ($fp = fsockopen($host, $port, $errno, $errstr, 30)) { $out = "POST $path HTTP/1.0\r\n"; $out .= "Host: " . str_replace('ssl://', '', $host) . "\r\n"; + $out .= "User-Agent: Roundcube Webmail/" . RCMAIL_VERSION . " (Googiespell Wrapper)\r\n"; $out .= "Content-Length: " . strlen($gtext) . "\r\n"; - $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $out .= "Content-Type: text/xml\r\n"; $out .= "Connection: Close\r\n\r\n"; $out .= $gtext; fwrite($fp, $out); @@ -83,8 +98,10 @@ class rcube_spellcheck_googie extends rcube_spellcheck_engine // parse HTTP response if (preg_match('!^HTTP/1.\d (\d+)(.+)!', $store, $m)) { $http_status = $m[1]; - if ($http_status != '200') + if ($http_status != '200') { $this->error = 'HTTP ' . $m[1] . $m[2]; + $this->error .= "\n" . $store; + } } if (!$store) { @@ -92,6 +109,7 @@ class rcube_spellcheck_googie extends rcube_spellcheck_engine } else if (preg_match('/<spellresult error="([^"]+)"/', $store, $m) && $m[1]) { $this->error = "Error code $m[1] returned"; + $this->error .= preg_match('/<errortext>([^<]+)/', $store, $m) ? ": " . html_entity_decode($m[1]) : ''; } preg_match_all('/<c o="([^"]*)" l="([^"]*)" s="([^"]*)">([^<]*)<\/c>/', $store, $matches, PREG_SET_ORDER); diff --git a/program/lib/Roundcube/rcube_spellcheck_pspell.php b/program/lib/Roundcube/rcube_spellcheck_pspell.php index ce089ed8f..b12684e43 100644 --- a/program/lib/Roundcube/rcube_spellcheck_pspell.php +++ b/program/lib/Roundcube/rcube_spellcheck_pspell.php @@ -30,6 +30,35 @@ class rcube_spellcheck_pspell extends rcube_spellcheck_engine private $matches = array(); /** + * Return a list of languages supported by this backend + * + * @see rcube_spellcheck_engine::languages() + */ + function languages() + { + $defaults = array('en'); + $langs = array(); + + // get aspell dictionaries + exec('aspell dump dicts', $dicts); + if (!empty($dicts)) { + $seen = array(); + foreach ($dicts as $lang) { + $lang = preg_replace('/-.*$/', '', $lang); + $langc = strlen($lang) == 2 ? $lang.'_'.strtoupper($lang) : $lang; + if (!$seen[$langc]++) + $langs[] = $lang; + } + $langs = array_unique($langs); + } + else { + $langs = $defaults; + } + + return $langs; + } + + /** * Initializes PSpell dictionary */ private function init() diff --git a/program/lib/Roundcube/rcube_spellchecker.php b/program/lib/Roundcube/rcube_spellchecker.php index 31835dbb5..5b77bda02 100644 --- a/program/lib/Roundcube/rcube_spellchecker.php +++ b/program/lib/Roundcube/rcube_spellchecker.php @@ -65,6 +65,52 @@ class rcube_spellchecker } } + /** + * Return a list of supported languages + */ + function languages() + { + // trust configuration + $configured = $this->rc->config->get('spellcheck_languages'); + if (!empty($configured) && is_array($configured) && !$configured[0]) { + return $configured; + } + else if (!empty($configured)) { + $langs = (array)$configured; + } + else if ($this->backend) { + $langs = $this->backend->languages(); + } + + // load index + @include(RCUBE_LOCALIZATION_DIR . 'index.inc'); + + // add correct labels + $languages = array(); + foreach ($langs as $lang) { + $langc = strtolower(substr($lang, 0, 2)); + $alias = $rcube_language_aliases[$langc]; + if (!$alias) { + $alias = $langc.'_'.strtoupper($langc); + } + if ($rcube_languages[$lang]) { + $languages[$lang] = $rcube_languages[$lang]; + } + else if ($rcube_languages[$alias]) { + $languages[$lang] = $rcube_languages[$alias]; + } + else { + $languages[$lang] = ucfirst($lang); + } + } + + // remove possible duplicates (#1489395) + $languages = array_unique($languages); + + asort($languages); + + return $languages; + } /** * Set content and check spelling @@ -152,7 +198,7 @@ class rcube_spellchecker // send output $out = '<?xml version="1.0" encoding="'.RCUBE_CHARSET.'"?><spellresult charschecked="'.mb_strlen($this->content).'">'; - foreach ($this->matches as $item) { + foreach ((array)$this->matches as $item) { $out .= '<c o="'.$item[1].'" l="'.$item[2].'">'; $out .= is_array($item[4]) ? implode("\t", $item[4]) : $item[4]; $out .= '</c>'; @@ -173,7 +219,7 @@ class rcube_spellchecker { $result = array(); - foreach ($this->matches as $item) { + foreach ((array)$this->matches as $item) { if ($this->engine == 'pspell') { $word = $item[0]; } @@ -306,7 +352,7 @@ class rcube_spellchecker "UPDATE ".$this->rc->db->table_name('dictionary') ." SET data = ?" ." WHERE user_id " . ($plugin['userid'] ? "= ".$this->rc->db->quote($plugin['userid']) : "IS NULL") - ." AND " . $this->rc->db->quoteIdentifier('language') . " = ?", + ." AND " . $this->rc->db->quote_identifier('language') . " = ?", implode(' ', $plugin['dictionary']), $plugin['language']); } // don't store empty dict @@ -314,14 +360,14 @@ class rcube_spellchecker $this->rc->db->query( "DELETE FROM " . $this->rc->db->table_name('dictionary') ." WHERE user_id " . ($plugin['userid'] ? "= ".$this->rc->db->quote($plugin['userid']) : "IS NULL") - ." AND " . $this->rc->db->quoteIdentifier('language') . " = ?", + ." AND " . $this->rc->db->quote_identifier('language') . " = ?", $plugin['language']); } } else if (!empty($this->dict)) { $this->rc->db->query( "INSERT INTO " .$this->rc->db->table_name('dictionary') - ." (user_id, " . $this->rc->db->quoteIdentifier('language') . ", data) VALUES (?, ?, ?)", + ." (user_id, " . $this->rc->db->quote_identifier('language') . ", data) VALUES (?, ?, ?)", $plugin['userid'], $plugin['language'], implode(' ', $plugin['dictionary'])); } } @@ -348,7 +394,7 @@ class rcube_spellchecker $sql_result = $this->rc->db->query( "SELECT data FROM ".$this->rc->db->table_name('dictionary') ." WHERE user_id ". ($plugin['userid'] ? "= ".$this->rc->db->quote($plugin['userid']) : "IS NULL") - ." AND " . $this->rc->db->quoteIdentifier('language') . " = ?", + ." AND " . $this->rc->db->quote_identifier('language') . " = ?", $plugin['language']); if ($sql_arr = $this->rc->db->fetch_assoc($sql_result)) { diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php index e697b2c73..c09f05328 100644 --- a/program/lib/Roundcube/rcube_storage.php +++ b/program/lib/Roundcube/rcube_storage.php @@ -360,6 +360,18 @@ abstract class rcube_storage /** + * Public method for listing message flags + * + * @param string $folder Folder name + * @param array $uids Message UIDs + * @param int $mod_seq Optional MODSEQ value + * + * @return array Indexed array with message flags + */ + abstract function list_flags($folder, $uids, $mod_seq = null); + + + /** * Public method for listing headers. * * @param string $folder Folder name @@ -601,7 +613,7 @@ abstract class rcube_storage /** * Parse message UIDs input * - * @param mixed $uids UIDs array or comma-separated list or '*' or '1:*' + * @param mixed $uids UIDs array or comma-separated list or '*' or '1:*' * * @return array Two elements array with UIDs converted to list and ALL flag */ @@ -621,6 +633,9 @@ abstract class rcube_storage if (is_array($uids)) { $uids = join(',', $uids); } + else if (strpos($uids, ':')) { + $uids = join(',', rcube_imap_generic::uncompressMessageSet($uids)); + } if (preg_match('/[^0-9,]/', $uids)) { $uids = ''; diff --git a/program/lib/Roundcube/rcube_user.php b/program/lib/Roundcube/rcube_user.php index 5e9c9af80..e232736c9 100644 --- a/program/lib/Roundcube/rcube_user.php +++ b/program/lib/Roundcube/rcube_user.php @@ -125,8 +125,10 @@ class rcube_user */ function get_prefs() { + $prefs = array(); + if (!empty($this->language)) - $prefs = array('language' => $this->language); + $prefs['language'] = $this->language; if ($this->ID) { // Preferences from session (write-master is unavailable) @@ -163,8 +165,16 @@ class rcube_user if (!$this->ID) return false; - $config = $this->rc->config; - $old_prefs = (array)$this->get_prefs(); + $plugin = $this->rc->plugins->exec_hook('preferences_update', array( + 'userid' => $this->ID, 'prefs' => $a_user_prefs, 'old' => (array)$this->get_prefs())); + + if (!empty($plugin['abort'])) { + return; + } + + $a_user_prefs = $plugin['prefs']; + $old_prefs = $plugin['old']; + $config = $this->rc->config; // merge (partial) prefs array with existing settings $save_prefs = $a_user_prefs + $old_prefs; @@ -213,6 +223,14 @@ class rcube_user return false; } + /** + * Generate a unique hash to identify this user which + */ + function get_hash() + { + $key = substr($this->rc->config->get('des_key'), 1, 4); + return md5($this->data['user_id'] . $key . $this->data['username'] . '@' . $this->data['mail_host']); + } /** * Get default identity of this user @@ -249,7 +267,7 @@ class rcube_user "SELECT * FROM ".$this->db->table_name('identities'). " WHERE del <> 1 AND user_id = ?". ($sql_add ? " ".$sql_add : ""). - " ORDER BY ".$this->db->quoteIdentifier('standard')." DESC, name ASC, identity_id ASC", + " ORDER BY ".$this->db->quote_identifier('standard')." DESC, name ASC, identity_id ASC", $this->ID); while ($sql_arr = $this->db->fetch_assoc($sql_result)) { @@ -284,7 +302,7 @@ class rcube_user $query_cols = $query_params = array(); foreach ((array)$data as $col => $value) { - $query_cols[] = $this->db->quoteIdentifier($col) . ' = ?'; + $query_cols[] = $this->db->quote_identifier($col) . ' = ?'; $query_params[] = $value; } $query_params[] = $iid; @@ -320,7 +338,7 @@ class rcube_user $insert_cols = $insert_values = array(); foreach ((array)$data as $col => $value) { - $insert_cols[] = $this->db->quoteIdentifier($col); + $insert_cols[] = $this->db->quote_identifier($col); $insert_values[] = $value; } $insert_cols[] = 'user_id'; @@ -385,7 +403,7 @@ class rcube_user if ($this->ID && $iid) { $this->db->query( "UPDATE ".$this->db->table_name('identities'). - " SET ".$this->db->quoteIdentifier('standard')." = '0'". + " SET ".$this->db->quote_identifier('standard')." = '0'". " WHERE user_id = ?". " AND identity_id <> ?". " AND del <> 1", @@ -625,11 +643,11 @@ class rcube_user $result = array(); $sql_result = $this->db->query( - "SELECT search_id AS id, ".$this->db->quoteIdentifier('name') + "SELECT search_id AS id, ".$this->db->quote_identifier('name') ." FROM ".$this->db->table_name('searches') ." WHERE user_id = ?" - ." AND ".$this->db->quoteIdentifier('type')." = ?" - ." ORDER BY ".$this->db->quoteIdentifier('name'), + ." AND ".$this->db->quote_identifier('type')." = ?" + ." ORDER BY ".$this->db->quote_identifier('name'), (int) $this->ID, (int) $type); while ($sql_arr = $this->db->fetch_assoc($sql_result)) { @@ -657,9 +675,9 @@ class rcube_user } $sql_result = $this->db->query( - "SELECT ".$this->db->quoteIdentifier('name') - .", ".$this->db->quoteIdentifier('data') - .", ".$this->db->quoteIdentifier('type') + "SELECT ".$this->db->quote_identifier('name') + .", ".$this->db->quote_identifier('data') + .", ".$this->db->quote_identifier('type') ." FROM ".$this->db->table_name('searches') ." WHERE user_id = ?" ." AND search_id = ?", @@ -714,11 +732,11 @@ class rcube_user $insert_cols[] = 'user_id'; $insert_values[] = (int) $this->ID; - $insert_cols[] = $this->db->quoteIdentifier('type'); + $insert_cols[] = $this->db->quote_identifier('type'); $insert_values[] = (int) $data['type']; - $insert_cols[] = $this->db->quoteIdentifier('name'); + $insert_cols[] = $this->db->quote_identifier('name'); $insert_values[] = $data['name']; - $insert_cols[] = $this->db->quoteIdentifier('data'); + $insert_cols[] = $this->db->quote_identifier('data'); $insert_values[] = serialize($data['data']); $sql = "INSERT INTO ".$this->db->table_name('searches') diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index b73bc0812..46d53ac91 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -454,6 +454,9 @@ class rcube_utils // cut out all contents between { and } while (($pos = strpos($source, '{', $last_pos)) && ($pos2 = strpos($source, '}', $pos))) { + $nested = strpos($source, '{', $pos+1); + if ($nested && $nested < $pos2) // when dealing with nested blocks (e.g. @media), take the inner one + $pos = $nested; $length = $pos2 - $pos - 1; $styles = substr($source, $pos+1, $length); @@ -619,6 +622,10 @@ class rcube_utils */ public static function parse_host($name, $host = '') { + if (!is_string($name)) { + return $name; + } + // %n - host $n = preg_replace('/:\d+$/', '', $_SERVER['SERVER_NAME']); // %t - host name without first part, e.g. %n=mail.domain.tld, %t=domain.tld @@ -639,8 +646,7 @@ class rcube_utils } } - $name = str_replace(array('%n', '%t', '%d', '%h', '%z', '%s'), array($n, $t, $d, $h, $z, $s[2]), $name); - return $name; + return str_replace(array('%n', '%t', '%d', '%h', '%z', '%s'), array($n, $t, $d, $h, $z, $s[2]), $name); } @@ -677,9 +683,17 @@ class rcube_utils */ public static function remote_addr() { - foreach (array('HTTP_X_FORWARDED_FOR','HTTP_X_REAL_IP','REMOTE_ADDR') as $prop) { - if (!empty($_SERVER[$prop])) - return $_SERVER[$prop]; + if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $hosts = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'], 2); + return $hosts[0]; + } + + if (!empty($_SERVER['HTTP_X_REAL_IP'])) { + return $_SERVER['HTTP_X_REAL_IP']; + } + + if (!empty($_SERVER['REMOTE_ADDR'])) { + return $_SERVER['REMOTE_ADDR']; } return ''; @@ -744,40 +758,13 @@ class rcube_utils */ public static function strtotime($date) { - $date = trim($date); - - // check for MS Outlook vCard date format YYYYMMDD - if (preg_match('/^([12][90]\d\d)([01]\d)([0123]\d)$/', $date, $m)) { - return mktime(0,0,0, intval($m[2]), intval($m[3]), intval($m[1])); - } - - // common little-endian formats, e.g. dd/mm/yyyy (not all are supported by strtotime) - if (preg_match('/^(\d{1,2})[.\/-](\d{1,2})[.\/-](\d{4})$/', $date, $m) - && $m[1] > 0 && $m[1] <= 31 && $m[2] > 0 && $m[2] <= 12 && $m[3] >= 1970 - ) { - return mktime(0,0,0, intval($m[2]), intval($m[1]), intval($m[3])); - } + $date = self::clean_datestr($date); // unix timestamp if (is_numeric($date)) { return (int) $date; } - // Clean malformed data - $date = preg_replace( - array( - '/GMT\s*([+-][0-9]+)/', // support non-standard "GMTXXXX" literal - '/[^a-z0-9\x20\x09:+-]/i', // remove any invalid characters - '/\s*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*/i', // remove weekday names - ), - array( - '\\1', - '', - '', - ), $date); - - $date = trim($date); - // if date parsing fails, we have a date in non-rfc format. // remove token from the end and try again while ((($ts = @strtotime($date)) === false) || ($ts < 0)) { @@ -805,8 +792,8 @@ class rcube_utils return $date; } - $dt = false; - $date = trim($date); + $dt = false; + $date = self::clean_datestr($date); // try to parse string with DateTime first if (!empty($date)) { @@ -831,6 +818,52 @@ class rcube_utils return $dt; } + /** + * Clean up date string for strtotime() input + * + * @param string $date Date string + * + * @return string Date string + */ + public static function clean_datestr($date) + { + $date = trim($date); + + // check for MS Outlook vCard date format YYYYMMDD + if (preg_match('/^([12][90]\d\d)([01]\d)([0123]\d)$/', $date, $m)) { + return sprintf('%04d-%02d-%02d 00:00:00', intval($m[1]), intval($m[2]), intval($m[3])); + } + + // Clean malformed data + $date = preg_replace( + array( + '/GMT\s*([+-][0-9]+)/', // support non-standard "GMTXXXX" literal + '/[^a-z0-9\x20\x09:+-\/]/i', // remove any invalid characters + '/\s*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*/i', // remove weekday names + ), + array( + '\\1', + '', + '', + ), $date); + + $date = trim($date); + + // try to fix dd/mm vs. mm/dd discrepancy, we can't do more here + if (preg_match('/^(\d{1,2})[.\/-](\d{1,2})[.\/-](\d{4})$/', $date, $m)) { + $mdy = $m[2] > 12 && $m[1] <= 12; + $day = $mdy ? $m[2] : $m[1]; + $month = $mdy ? $m[1] : $m[2]; + $date = sprintf('%04d-%02d-%02d 00:00:00', intval($m[3]), $month, $day); + } + // I've found that YYYY.MM.DD is recognized wrong, so here's a fix + else if (preg_match('/^(\d{4})\.(\d{1,2})\.(\d{1,2})$/', $date)) { + $date = str_replace('.', '-', $date) . ' 00:00:00'; + } + + return $date; + } + /* * Idn_to_ascii wrapper. * Intl/Idn modules version of this function doesn't work with e-mail address @@ -890,10 +923,20 @@ class rcube_utils * * @param string Input string (UTF-8) * @param boolean True to return list of words as array + * * @return mixed Normalized string or a list of normalized tokens */ public static function normalize_string($str, $as_array = false) { + // replace 4-byte unicode characters with '?' character, + // these are not supported in default utf-8 charset on mysql, + // the chance we'd need them in searching is very low + $str = preg_replace('/(' + . '\xF0[\x90-\xBF][\x80-\xBF]{2}' + . '|[\xF1-\xF3][\x80-\xBF]{3}' + . '|\xF4[\x80-\x8F][\x80-\xBF]{2}' + . ')/', '?', $str); + // split by words $arr = self::tokenize_string($str); @@ -1002,4 +1045,16 @@ class rcube_utils return !in_array($str, array('false', '0', 'no', 'off', 'nein', ''), true); } + /** + * OS-dependent absolute path detection + */ + public static function is_absolute_path($path) + { + if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { + return (bool) preg_match('!^[a-z]:[\\\\/]!i', $path); + } + else { + return $path[0] == DIRECTORY_SEPARATOR; + } + } } diff --git a/program/lib/Roundcube/rcube_vcard.php b/program/lib/Roundcube/rcube_vcard.php index d54dc56ad..a54ee7e11 100644 --- a/program/lib/Roundcube/rcube_vcard.php +++ b/program/lib/Roundcube/rcube_vcard.php @@ -378,7 +378,7 @@ class rcube_vcard default: if ($field == 'phone' && $this->phonetypemap[$type_uc]) { $type = $this->phonetypemap[$type_uc]; - } + } if (($tag = self::$fieldmap[$field]) && (is_array($value) || strlen($value))) { $index = count($this->raw[$tag]); @@ -518,20 +518,28 @@ class rcube_vcard */ public static function cleanup($vcard) { - // Convert special types (like Skype) to normal type='skype' classes with this simple regex ;) - $vcard = preg_replace( - '/item(\d+)\.(TEL|EMAIL|URL)([^:]*?):(.*?)item\1.X-ABLabel:(?:_\$!<)?([\w-() ]*)(?:>!\$_)?./s', - '\2;type=\5\3:\4', - $vcard); - // convert Apple X-ABRELATEDNAMES into X-* fields for better compatibility $vcard = preg_replace_callback( '/item(\d+)\.(X-ABRELATEDNAMES)([^:]*?):(.*?)item\1.X-ABLabel:(?:_\$!<)?([\w-() ]*)(?:>!\$_)?./s', array('self', 'x_abrelatednames_callback'), $vcard); - // Remove cruft like item1.X-AB*, item1.ADR instead of ADR, and empty lines - $vcard = preg_replace(array('/^item\d*\.X-AB.*$/m', '/^item\d*\./m', "/\n+/"), array('', '', "\n"), $vcard); + // Cleanup + $vcard = preg_replace(array( + // convert special types (like Skype) to normal type='skype' classes with this simple regex ;) + '/item(\d+)\.(TEL|EMAIL|URL)([^:]*?):(.*?)item\1.X-ABLabel:(?:_\$!<)?([\w-() ]*)(?:>!\$_)?./s', + '/^item\d*\.X-AB.*$/m', // remove cruft like item1.X-AB* + '/^item\d*\./m', // remove item1.ADR instead of ADR + '/\n+/', // remove empty lines + '/^(N:[^;\R]*)$/m', // if N doesn't have any semicolons, add some + ), + array( + '\2;type=\5\3:\4', + '', + '', + "\n", + '\1;;;;', + ), $vcard); // convert X-WAB-GENDER to X-GENDER if (preg_match('/X-WAB-GENDER:(\d)/', $vcard, $matches)) { @@ -539,9 +547,6 @@ class rcube_vcard $vcard = preg_replace('/X-WAB-GENDER:\d/', 'X-GENDER:' . $value, $vcard); } - // if N doesn't have any semicolons, add some - $vcard = preg_replace('/^(N:[^;\R]*)$/m', '\1;;;;', $vcard); - return $vcard; } @@ -612,8 +617,8 @@ class rcube_vcard $enc = null; foreach($regs2[1] as $attrid => $attr) { + $attr = preg_replace('/[\s\t\n\r\0\x0B]/', '', $attr); if ((list($key, $value) = explode('=', $attr)) && $value) { - $value = trim($value); if ($key == 'ENCODING') { $value = strtoupper($value); // add next line(s) to value string if QP line end detected @@ -792,7 +797,7 @@ class rcube_vcard return $result; } - $s = strtr($s, $rep2); + $s = trim(strtr($s, $rep2)); } // some implementations (GMail) use non-standard backslash before colon (#1489085) diff --git a/program/lib/Roundcube/rcube_washtml.php b/program/lib/Roundcube/rcube_washtml.php index e7467545f..51f7930aa 100644 --- a/program/lib/Roundcube/rcube_washtml.php +++ b/program/lib/Roundcube/rcube_washtml.php @@ -184,7 +184,7 @@ class rcube_washtml '|rgb\(\s*[0-9]+\s*,\s*[0-9]+\s*,\s*[0-9]+\s*\)'. '|-?[0-9.]+\s*(em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)?'. '|#[0-9a-f]{3,6}'. - '|[a-z0-9", -]+'. + '|[a-z0-9"\', -]+'. ')\s*/i', $str, $match) ) { if ($match[2]) { @@ -418,7 +418,7 @@ class rcube_washtml $html = preg_replace($html_search, $html_replace, trim($html)); //-> Replace all of those weird MS Word quotes and other high characters - $badwordchars=array( + $badwordchars = array( "\xe2\x80\x98", // left single quote "\xe2\x80\x99", // right single quote "\xe2\x80\x9c", // left double quote @@ -426,7 +426,7 @@ class rcube_washtml "\xe2\x80\x94", // em dash "\xe2\x80\xa6" // elipses ); - $fixedwordchars=array( + $fixedwordchars = array( "'", "'", '"', @@ -434,7 +434,7 @@ class rcube_washtml '—', '...' ); - $html = str_replace($badwordchars,$fixedwordchars, $html); + $html = str_replace($badwordchars, $fixedwordchars, $html); // PCRE errors handling (#1486856), should we use something like for every preg_* use? if ($html === null && ($preg_error = preg_last_error()) != PREG_NO_ERROR) { @@ -455,13 +455,16 @@ class rcube_washtml } // fix (unknown/malformed) HTML tags before "wash" - $html = preg_replace_callback('/(<(?!\!)[\/]*)([^\s>]+)/', array($this, 'html_tag_callback'), $html); + $html = preg_replace_callback('/(<(?!\!)[\/]*)([^\s>]+)([^>]*)/', array($this, 'html_tag_callback'), $html); // Remove invalid HTML comments (#1487759) // Don't remove valid conditional comments // Don't remove MSOutlook (<!-->) conditional comments (#1489004) $html = preg_replace('/<!--[^->\[\n]+>/', '', $html); + // fix broken nested lists + self::fix_broken_lists($html); + // turn relative into absolute urls $html = self::resolve_base($html); @@ -479,7 +482,12 @@ class rcube_washtml '/[^a-z0-9_\[\]\!-]/i', // forbidden characters ), '', $tagname); - return $matches[1] . $tagname; + // fix invalid closing tags - remove any attributes (#1489446) + if ($matches[1] == '</') { + $matches[3] = ''; + } + + return $matches[1] . $tagname . $matches[3]; } /** @@ -495,5 +503,77 @@ class rcube_washtml return $body; } -} + /** + * Fix broken nested lists, they are not handled properly by DOMDocument (#1488768) + */ + public static function fix_broken_lists(&$html) + { + // do two rounds, one for <ol>, one for <ul> + foreach (array('ol', 'ul') as $tag) { + $pos = 0; + while (($pos = stripos($html, '<' . $tag, $pos)) !== false) { + $pos++; + + // make sure this is an ol/ul tag + if (!in_array($html[$pos+2], array(' ', '>'))) { + continue; + } + + $p = $pos; + $in_li = false; + $li_pos = 0; + + while (($p = strpos($html, '<', $p)) !== false) { + $tt = strtolower(substr($html, $p, 4)); + + // li open tag + if ($tt == '<li>' || $tt == '<li ') { + $in_li = true; + $p += 4; + } + // li close tag + else if ($tt == '</li' && in_array($html[$p+4], array(' ', '>'))) { + $li_pos = $p; + $p += 4; + $in_li = false; + } + // ul/ol closing tag + else if ($tt == '</' . $tag && in_array($html[$p+4], array(' ', '>'))) { + break; + } + // nested ol/ul element out of li + else if (!$in_li && $li_pos && ($tt == '<ol>' || $tt == '<ol ' || $tt == '<ul>' || $tt == '<ul ')) { + // find closing tag of this ul/ol element + $element = substr($tt, 1, 2); + $cpos = $p; + do { + $tpos = stripos($html, '<' . $element, $cpos+1); + $cpos = stripos($html, '</' . $element, $cpos+1); + } + while ($tpos !== false && $cpos !== false && $cpos > $tpos); + + // not found, this is invalid HTML, skip it + if ($cpos === false) { + break; + } + + // get element content + $end = strpos($html, '>', $cpos); + $len = $end - $p + 1; + $element = substr($html, $p, $len); + + // move element to the end of the last li + $html = substr_replace($html, '', $p, $len); + $html = substr_replace($html, $element, $li_pos, 0); + + $p = $end; + } + else { + $p++; + } + } + } + } + } +} diff --git a/program/localization/ar/labels.inc b/program/localization/ar/labels.inc new file mode 100644 index 000000000..6fd922ad9 --- /dev/null +++ b/program/localization/ar/labels.inc @@ -0,0 +1,123 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/<lang>/labels.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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ +*/ +$labels['welcome'] = 'مرØباً بكم ÙÙŠ $product'; +$labels['username'] = 'اسم المستخدم'; +$labels['password'] = 'كلمة المرور'; +$labels['server'] = 'الخادم'; +$labels['login'] = 'تسجيل الدخول'; +$labels['logout'] = 'تسجيل الخروج'; +$labels['mail'] = 'البريد'; +$labels['settings'] = 'الإعدادات'; +$labels['addressbook'] = 'دÙتر العناوين'; +$labels['inbox'] = 'البريد الوارد'; +$labels['drafts'] = 'المسودات'; +$labels['sent'] = 'البريد المرسل'; +$labels['trash'] = 'المهملات'; +$labels['junk'] = 'الرسائل غير المرغوب Ùيها'; +$labels['subject'] = 'الموضوع'; +$labels['from'] = 'المرسل'; +$labels['cc'] = 'نسخة إلي'; +$labels['bcc'] = 'نسخة مخÙية الوجهة'; +$labels['date'] = 'التاريخ'; +$labels['size'] = 'الØجم'; +$labels['priority'] = 'الأولوية'; +$labels['mailboxlist'] = 'مجلدات'; +$labels['copy'] = 'نسخ'; +$labels['move'] = 'نقل'; +$labels['moveto'] = 'نقل إلى...'; +$labels['download'] = 'تنزيل'; +$labels['showattachment'] = 'إظهار'; +$labels['showanyway'] = 'إظهار ذلك على أي Øال'; +$labels['filename'] = 'اسم الملÙ'; +$labels['filesize'] = 'Øجم الملÙ'; +$labels['addtoaddressbook'] = 'إضاÙØ© إلى دÙتر العناوين'; +$labels['sun'] = 'Ø£Øد'; +$labels['mon'] = 'إثنين'; +$labels['tue'] = 'ثلاثاء'; +$labels['wed'] = 'أربعاء'; +$labels['thu'] = 'خميس'; +$labels['fri'] = 'جمعة'; +$labels['sat'] = 'سبت'; +$labels['sunday'] = 'الأØد'; +$labels['monday'] = 'الإثنين'; +$labels['tuesday'] = 'الثلاثاء'; +$labels['wednesday'] = 'الأربعاء'; +$labels['thursday'] = 'الخميس'; +$labels['friday'] = 'الجمعة'; +$labels['saturday'] = 'السبت'; +$labels['jan'] = 'يناير'; +$labels['feb'] = 'Ùبراير'; +$labels['mar'] = 'مارس'; +$labels['apr'] = 'أبريل'; +$labels['may'] = 'مايو'; +$labels['jun'] = 'يونيو'; +$labels['jul'] = 'يوليو'; +$labels['aug'] = 'أغسطس'; +$labels['sep'] = 'سبتمبر'; +$labels['oct'] = 'أكتوبر'; +$labels['nov'] = 'نوÙمبر'; +$labels['dec'] = 'ديسمبر'; +$labels['longjan'] = 'يناير'; +$labels['longfeb'] = 'Ùبراير'; +$labels['longmar'] = 'مارس'; +$labels['longapr'] = 'أبريل'; +$labels['longmay'] = 'مايو'; +$labels['longjun'] = 'يونيو'; +$labels['longjul'] = 'يوليو'; +$labels['longaug'] = 'أغسطس'; +$labels['longsep'] = 'سبتمبر'; +$labels['longoct'] = 'أكتوبر'; +$labels['longnov'] = 'نوÙمبر'; +$labels['longdec'] = 'ديسمبر'; +$labels['today'] = 'اليوم'; +$labels['refresh'] = 'تØديث'; +$labels['checkmail'] = 'التØقق من وجود رسائل جديدة'; +$labels['compose'] = 'إنشاء'; +$labels['writenewmessage'] = 'إنشاء رسالة جديدة'; +$labels['reply'] = 'رد'; +$labels['replytomessage'] = 'الرد على المرسل'; +$labels['replytoallmessage'] = 'الرد على قائمة أو إلى المرسل وجميع المستلمين'; +$labels['replyall'] = 'الرد على الجميع'; +$labels['replylist'] = 'الرد على القائمة'; +$labels['forward'] = 'إعادة توجيه'; +$labels['deletemessage'] = 'Øذ٠الرسالة'; +$labels['movemessagetotrash'] = 'انقل الرسالة إلى سلة المهملات'; +$labels['printmessage'] = 'أطبع هذه الرسالة'; +$labels['previousmessage'] = 'عرض الرسالة السابقة'; +$labels['firstmessage'] = 'عرض الرسالة الأولى'; +$labels['nextmessage'] = 'عرض الرسالة التالية'; +$labels['lastmessage'] = 'عرض الرسالة الأخيرة'; +$labels['backtolist'] = 'العودة إلى قائمة الرسائل'; +$labels['viewsource'] = 'إظهار المصدر'; +$labels['mark'] = 'علامة'; +$labels['markread'] = 'مقروءة'; +$labels['markunread'] = 'غير مقروءة'; +$labels['moreactions'] = 'إجراءات إضاÙية...'; +$labels['more'] = 'المزيد'; +$labels['back'] = 'العودة'; +$labels['options'] = 'خيارات'; +$labels['select'] = 'تØديد'; +$labels['all'] = 'الكل'; +$labels['none'] = 'لاشيء'; +$labels['currpage'] = 'الصÙØØ© الØالية'; +$labels['unread'] = 'غير مقروءة'; +$labels['flagged'] = 'موسوم'; +$labels['unanswered'] = 'بلا رد'; +$labels['deleted'] = 'Ù…ØذوÙ'; +$labels['undeleted'] = 'غير Ù…ØذوÙØ©'; +?> diff --git a/program/localization/ast/labels.inc b/program/localization/ast/labels.inc index 7a60238b7..25d09451c 100644 --- a/program/localization/ast/labels.inc +++ b/program/localization/ast/labels.inc @@ -197,6 +197,7 @@ $labels['spellcheck'] = 'Correutor ortográficu'; $labels['checkspelling'] = 'Revisar ortografÃa'; $labels['resumeediting'] = 'Siguir cola edición'; $labels['revertto'] = 'Revertir a'; +$labels['responsename'] = 'Nome'; $labels['attach'] = 'Axuntar'; $labels['attachments'] = 'Axuntos'; $labels['upload'] = 'Xubir'; @@ -428,6 +429,7 @@ $labels['standardwindows'] = 'Xestionar ventanes emerxentes como ventanes están $labels['forwardmode'] = 'Reunviu de mensaxes'; $labels['inline'] = 'en llinia'; $labels['asattachment'] = 'como axuntu'; +$labels['replyalldefault'] = 'responder a toos'; $labels['folder'] = 'Bandexa'; $labels['folders'] = 'Bandexes'; $labels['foldername'] = 'Nome de bandexa'; diff --git a/program/localization/az_AZ/labels.inc b/program/localization/az_AZ/labels.inc index 60930a49d..1e4a5e2f5 100644 --- a/program/localization/az_AZ/labels.inc +++ b/program/localization/az_AZ/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to-dan $count'; $labels['copy'] = 'Kopyala'; $labels['move'] = 'Köçür'; $labels['moveto'] = 'Burada köçür...'; +$labels['copyto'] = 'Bura kopyala...'; $labels['download'] = 'Endir'; $labels['open'] = 'Aç'; $labels['showattachment'] = 'GöstÉ™r'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Orfoqrafiya'; $labels['checkspelling'] = 'Orfoqrafiyanı yoxla'; $labels['resumeediting'] = 'RedaktÉ™ni davam et'; $labels['revertto'] = 'DÉ™yiÅŸikliklÉ™ri ləğv et'; +$labels['restore'] = 'BÉ™rpa'; +$labels['restoremessage'] = 'MÉ™ktub bÉ™rpa edilsin?'; +$labels['responses'] = 'Cavablar'; +$labels['insertresponse'] = 'Cavab daxil et'; +$labels['manageresponses'] = 'Cavabların idarÉ™ edilmÉ™si'; +$labels['savenewresponse'] = 'Yeni cavabı saxla'; +$labels['editresponses'] = 'Cavabları redaktÉ™ et'; +$labels['editresponse'] = 'Cavabı redaktÉ™ et'; +$labels['responsename'] = 'Ad'; +$labels['responsetext'] = 'Cavab mÉ™tni'; $labels['attach'] = 'Fayl É™lavÉ™ et'; $labels['attachments'] = 'BÉ™rkidilmiÅŸ Fayllar'; $labels['upload'] = 'YüklÉ™'; @@ -316,7 +327,11 @@ $labels['searchdelete'] = 'SorÄŸunu sil'; $labels['import'] = 'Ä°dxal'; $labels['importcontacts'] = 'Ãœnvanların idxalı'; $labels['importfromfile'] = 'Fayldan idxal:'; +$labels['importtarget'] = 'Kontaktları É™lavÉ™ et'; $labels['importreplace'] = 'Ãœnvan kitabçasını dÉ™yiÅŸ'; +$labels['importgroups'] = 'Qrup idxalı tapşırığı'; +$labels['importgroupsall'] = 'Hamısı (É™gÉ™r lazımdırsa qrupun yaradılması)'; +$labels['importgroupsexisting'] = 'Yalnız mövcud qruplar üçün'; $labels['importdesc'] = 'Siz kontaktları mövcud ünvan kitabçasından yüklÉ™yÉ™ bilÉ™rsiniz. <br/> Hal-hazırda biz ünvanların idxalını <a href="http://az.wikipedia.org/wiki/VCard">vCard</a> vÉ™ ya CSV (vergüllÉ™ bölünmüş) formatında olan vizit kartları dÉ™stÉ™klÉ™yirik.'; $labels['done'] = 'Bitdi'; $labels['settingsfor'] = 'Nizamlamaları'; @@ -424,6 +439,9 @@ $labels['standardwindows'] = 'Handle popapsı standart pÉ™ncÉ™rÉ™lÉ™r kimi'; $labels['forwardmode'] = 'MÉ™ktubların yönÉ™ldilmÉ™si'; $labels['inline'] = 'mÉ™tndÉ™'; $labels['asattachment'] = 'fayl kimi'; +$labels['replyallmode'] = '[Hamıya cavab] düymÉ™sinin susmaya görÉ™ hÉ™rÉ™kÉ™ti'; +$labels['replyalldefault'] = 'hamıya cavab'; +$labels['replyalllist'] = 'yalnız poçt siyahısına (É™gÉ™r tapılıbsa) cavab '; $labels['folder'] = 'Qovluq'; $labels['folders'] = 'Qovluqlar'; $labels['foldername'] = 'Qovluq adı'; diff --git a/program/localization/az_AZ/messages.inc b/program/localization/az_AZ/messages.inc index ddab8d702..28e5f57d2 100644 --- a/program/localization/az_AZ/messages.inc +++ b/program/localization/az_AZ/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,8 @@ $messages['invalidrequest'] = 'SÉ™hv sorÄŸu! MÉ™lumat yaddaÅŸda qalmadı.'; $messages['invalidhost'] = 'SÉ™hv server adı.'; $messages['nomessagesfound'] = 'Poçt qutusunda mÉ™ktub tapılmadı.'; $messages['loggedout'] = 'Çıxış uÄŸurlu oldu. SaÄŸ olun!'; -$messages['mailboxempty'] = 'Poçt qutusu boÅŸdur'; +$messages['mailboxempty'] = 'Poçt boÅŸdur'; +$messages['nomessages'] = 'MÉ™ktub yoxdur'; $messages['refreshing'] = 'YenilÉ™nmÉ™...'; $messages['loading'] = 'YüklÉ™nir...'; $messages['uploading'] = 'Fayl yüklÉ™nir...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'MÉ™ktub uÄŸurla göndÉ™rildi'; $messages['savingmessage'] = 'MÉ™ktubu saxla...'; $messages['messagesaved'] = 'MÉ™ktub qaralamada saxlandı'; $messages['successfullysaved'] = 'YaddaÅŸa yazıldı'; +$messages['savingresponse'] = 'Cavab mÉ™tninin saxlanılması...'; +$messages['deleteresponseconfirm'] = 'Siz cavab mÉ™tnini silmÉ™k istÉ™yirsiniz?'; $messages['addedsuccessfully'] = 'ÆlaqÉ™ ünvan kitabçasına É™lavÉ™ olundu'; $messages['contactexists'] = 'Ãœnvan kitabçasında bu e-poçtla É™laqÉ™ mövcuddur'; $messages['contactnameexists'] = 'Bu adda kontakt artıq mövcuddur.'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'TÉ™lÉ™b olunan ünvan tapılmadı'; $messages['contactsearchonly'] = 'Kontaqların axtarışı üçün ÅŸÉ™rti daxil edin'; $messages['sendingfailed'] = 'MÉ™ktub göndÉ™rilmÉ™di'; $messages['senttooquickly'] = 'MÉ™ktub göndÉ™rmÉ™k üçün $sec saniyÉ™ gözlÉ™mÉ™k gÉ™rÉ™kir'; +$messages['errorsavingsent'] = 'GöndÉ™rilÉ™n mÉ™ktubun saxlanılması zamanı xÉ™ta baÅŸ verdi.'; +$messages['errorsaving'] = 'Saxlanılma zamanı xÉ™ta baÅŸ verdi.'; $messages['errormoving'] = 'MÉ™ktubu (mÉ™ktubları) köçürmÉ™k alnmadı'; $messages['errorcopying'] = 'MÉ™ktubu (mÉ™ktubları) kopyalamaq alınmadı'; $messages['errordeleting'] = 'MÉ™ktubu (mÉ™ktubları) silmÉ™k alınmadı'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'LütfÉ™n, qÉ™bul edÉ™nin ünvanını daxil ed $messages['nosubjectwarning'] = '"Mövzu" sahÉ™si boÅŸdur. Mövzu daxil etmÉ™k istÉ™yirsiniz?'; $messages['nobodywarning'] = 'MÉ™ktub boÅŸ göndÉ™rilsin?'; $messages['notsentwarning'] = 'MÉ™ktub göndÉ™rilmÉ™di. GöndÉ™rilmÉ™dÉ™n imtina etmÉ™k istÉ™yirsiniz?'; +$messages['restoresavedcomposedata'] = 'ÆvvÉ™lki göndÉ™rildi, ancaq göndÉ™rilmÉ™yÉ™n mÉ™ktub da tapıldı.\n\nSubject: $subject\nSaved: $date\n\nSiz bu mÉ™ktubu bÉ™rpa etmÉ™k istÉ™yirsiniz?'; $messages['noldapserver'] = 'LütfÉ™n, axtarış üçün LDAP server seçin'; $messages['nosearchname'] = 'LütfÉ™n, ad vÉ™ ya e-poçt É™lavÉ™ edin'; $messages['notuploadedwarning'] = 'ÆlavÉ™lÉ™r tam yüklÉ™nilmÉ™yib. GözlÉ™yin vÉ™ ya yüklÉ™mÉ™ni ləğv edin.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'SMTP Error ($code): $msg'; $messages['emailformaterror'] = 'SÉ™hv ünvan: $email'; $messages['toomanyrecipients'] = 'QÉ™bul edÉ™nlÉ™r hÉ™ddindÉ™n artıq çoxdur. LütfÉ™n, $max qÉ™dÉ™r azaldın.'; $messages['maxgroupmembersreached'] = 'Qrupun ölçüsü imkan verilÉ™n maksimumdan artıqdır - $max'; +$messages['internalerror'] = 'Daxili xÉ™ta. LütfÉ™n bir daha cÉ™hd edin.'; $messages['contactdelerror'] = 'Kontak(lar)ı silmÉ™k alınmadı'; $messages['contactdeleted'] = 'Kontak(lar) uÄŸurla silindi'; $messages['contactrestoreerror'] = 'SilinmiÅŸ kontakt(lar)ın bÉ™rpası alınmadı'; diff --git a/program/localization/be_BE/labels.inc b/program/localization/be_BE/labels.inc index b5a3ed6d8..9180b92d7 100644 --- a/program/localization/be_BE/labels.inc +++ b/program/localization/be_BE/labels.inc @@ -29,7 +29,7 @@ $labels['drafts'] = 'Чарнавікі'; $labels['sent'] = 'ДаÑланыÑ'; $labels['trash'] = 'Сметніца'; $labels['junk'] = 'Спам'; -$labels['show_real_foldernames'] = 'Паказваць ÑÐ°Ð¿Ñ€Ð°ÑžÐ´Ð½Ñ‹Ñ Ñ–Ð¼Ñ‘Ð½Ñ‹ Ð´Ð»Ñ Ð°Ð´Ð¼Ñ‹Ñловых папак'; +$labels['show_real_foldernames'] = 'Паказваць ÑÐ°Ð¿Ñ€Ð°ÑžÐ´Ð½Ñ‹Ñ Ð½Ð°Ð·Ð²Ñ‹ Ð´Ð»Ñ Ð°Ð´Ð¼Ñ‹Ñловых папак'; $labels['subject'] = 'ТÑма'; $labels['from'] = 'Ðд каго'; $labels['sender'] = 'Ðдпраўнік'; @@ -42,21 +42,21 @@ $labels['date'] = 'Дата'; $labels['size'] = 'Памер'; $labels['priority'] = 'ПрыÑрытÑÑ‚'; $labels['organization'] = 'УÑтанова'; -$labels['readstatus'] = 'Ðе прачытанае'; +$labels['readstatus'] = 'Прачытана'; $labels['listoptions'] = 'Параметры ÑпіÑу...'; -$labels['mailboxlist'] = 'ТÑчкі'; +$labels['mailboxlist'] = 'Папкі'; $labels['messagesfromto'] = 'Паведамленні $from—$to з $count'; $labels['threadsfromto'] = 'Ðбмеркаванні $from—$to з $count'; $labels['messagenrof'] = 'Паведамленне $nr з $count'; $labels['fromtoshort'] = '$from—$to з $count'; -$labels['copy'] = 'Капіраваць'; +$labels['copy'] = 'КапіÑваць'; $labels['move'] = 'ПерамÑÑціць'; $labels['moveto'] = 'ПерамÑÑціць у...'; -$labels['download'] = 'Спампаваць'; -$labels['open'] = 'Ðдчыніць'; +$labels['download'] = 'СцÑгнуць'; +$labels['open'] = 'Ðдкрыць'; $labels['showattachment'] = 'Паказаць'; $labels['showanyway'] = 'УÑÑ‘ адно паказваць'; -$labels['filename'] = 'Ð†Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°'; +$labels['filename'] = 'Ðазва файла'; $labels['filesize'] = 'Памер файла'; $labels['addtoaddressbook'] = 'Дадаць у адраÑную кнігу'; $labels['sun'] = 'нд'; @@ -118,13 +118,13 @@ $labels['previousmessage'] = 'Паказаць папÑÑ€ÑднÑе паведР$labels['firstmessage'] = 'Паказаць першае паведамленне'; $labels['nextmessage'] = 'Паказаць наÑтупнае паведамленне'; $labels['lastmessage'] = 'Паказаць апошнÑе паведамленне'; -$labels['backtolist'] = 'Ðазад да ÑпіÑа паведамленнÑÑž'; -$labels['viewsource'] = 'Паказаць жарало'; +$labels['backtolist'] = 'Ðазад да ÑпіÑу паведамленнÑÑž'; +$labels['viewsource'] = 'Зыходны Ñ‚ÑкÑÑ‚'; $labels['mark'] = 'Пазначыць'; $labels['markmessages'] = 'Пазначыць паведамленні'; $labels['markread'] = 'Як прачытаныÑ'; $labels['markunread'] = 'Як непрачытаныÑ'; -$labels['markflagged'] = 'УÑтанавіць флаг'; +$labels['markflagged'] = 'ПаÑтавіць флаг'; $labels['markunflagged'] = 'ЗнÑць флаг'; $labels['moreactions'] = 'Больш дзеÑннÑÑž...'; $labels['more'] = 'Больш'; @@ -177,8 +177,8 @@ $labels['msgtext'] = 'УÑÑ‘ паведамленне'; $labels['body'] = 'Цела'; $labels['type'] = 'Тып'; $labels['namex'] = 'ІмÑ'; -$labels['openinextwin'] = 'Ðдчыніць у новым акне'; -$labels['emlsave'] = 'Спампаваць (.eml)'; +$labels['openinextwin'] = 'Ðдкрыць у новым акне'; +$labels['emlsave'] = 'СцÑгнуць (.eml)'; $labels['changeformattext'] = 'Паказаць Ñк проÑÑ‚Ñ‹ Ñ‚ÑкÑÑ‚'; $labels['changeformathtml'] = 'Паказаць Ñк HTML'; $labels['editasnew'] = 'ÐдрÑдагаваць Ñк новае'; @@ -197,11 +197,21 @@ $labels['spellcheck'] = 'ПравапіÑ'; $labels['checkspelling'] = 'Праверыць правапіÑ'; $labels['resumeediting'] = 'ПрацÑгнуць Ñ€Ñдагаванне'; $labels['revertto'] = 'Ðдкаціцца на'; +$labels['restore'] = 'Ðднавіць'; +$labels['restoremessage'] = 'Ðднавіць паведамленне?'; +$labels['responses'] = 'Ðдказы'; +$labels['insertresponse'] = 'УÑтавіць адказ'; +$labels['manageresponses'] = 'Кіраваць адказамі'; +$labels['savenewresponse'] = 'Захаваць новы адказ'; +$labels['editresponses'] = 'Ð Ñдагаваць адказы'; +$labels['editresponse'] = 'Ð Ñдагаваць адказ'; +$labels['responsename'] = 'Ðазва'; +$labels['responsetext'] = 'ТÑкÑÑ‚ адказу'; $labels['attach'] = 'Далучыць'; $labels['attachments'] = 'ДалучÑнні'; -$labels['upload'] = 'Запампаваць'; +$labels['upload'] = 'Ðпублікаваць'; $labels['uploadprogress'] = '$percent ($current з $total)'; -$labels['close'] = 'Зачыніць'; +$labels['close'] = 'Закрыць'; $labels['messageoptions'] = 'Параметры паведамленнÑ...'; $labels['low'] = 'Ðізкі'; $labels['lowest'] = 'Ðайнізшы'; @@ -209,8 +219,8 @@ $labels['normal'] = 'Звычайны'; $labels['high'] = 'Ð’Ñ‹Ñокі'; $labels['highest'] = 'Ðайвышшы'; $labels['nosubject'] = '(без Ñ‚Ñмы)'; -$labels['showimages'] = 'Паказваць відарыÑÑ‹'; -$labels['alwaysshow'] = 'ЗаўÑёды паказваць відарыÑÑ‹ ад $sender'; +$labels['showimages'] = 'Паказваць выÑвы'; +$labels['alwaysshow'] = 'ЗаўÑёды паказваць выÑвы ад $sender'; $labels['isdraft'] = 'ГÑта чарнавік.'; $labels['andnmore'] = 'ÑÑˆÑ‡Ñ $nr...'; $labels['togglemoreheaders'] = 'Паказаць больш загалоўкаў паведамленнÑ'; @@ -227,7 +237,7 @@ $labels['addfollowupto'] = 'Групавы-адказ-на'; $labels['mdnrequest'] = 'Ðдпраўнік пажадаў даведацца аб прачытанні гÑтага паведамленнÑ. ÐпавÑÑціць адпраўніка?'; $labels['receiptread'] = 'Пацверджанне Ð°Ñ‚Ñ€Ñ‹Ð¼Ð°Ð½Ð½Ñ (прачытаннÑ)'; $labels['yourmessage'] = 'ГÑта пацверджанне аб атрыманні вашага паведамленнÑ'; -$labels['receiptnote'] = 'Заўвага: ГÑтае пацверджанне значыць адно, што паведамленне было адлюÑтравана на Ñкране кампутара адраÑата. ÐÑма гарантыі, што атрымальнік прачытаў альбо зразумеў змеÑÑ‚ паведамленнÑ.'; +$labels['receiptnote'] = 'Заўвага: ГÑтае пацверджанне значыць адно, што паведамленне было адлюÑтравана на Ñкране камп\'ютара адраÑата. ÐÑма гарантыі, што атрымальнік прачытаў альбо зразумеў змеÑÑ‚ паведамленнÑ.'; $labels['name'] = 'Ðкраннае імÑ'; $labels['firstname'] = 'ІмÑ'; $labels['surname'] = 'Прозвішча'; @@ -251,7 +261,7 @@ $labels['birthday'] = 'Дзень народзінаў'; $labels['anniversary'] = 'Юбілей'; $labels['website'] = 'Ð’Ñб-Ñайт'; $labels['instantmessenger'] = 'IM'; -$labels['notes'] = 'Зацемкі'; +$labels['notes'] = 'Занатоўкі'; $labels['male'] = 'мужчына'; $labels['female'] = 'жанчына'; $labels['manager'] = 'Кіраўнік'; @@ -286,10 +296,10 @@ $labels['edit'] = 'Ð Ñдагаваць'; $labels['cancel'] = 'СкаÑаваць'; $labels['save'] = 'Захаваць'; $labels['delete'] = 'Выдаліць'; -$labels['rename'] = 'Перайменаваць'; +$labels['rename'] = 'Пераназваць'; $labels['addphoto'] = 'Дадаць'; $labels['replacephoto'] = 'ЗамÑніць'; -$labels['uploadphoto'] = 'Запампаваць фота'; +$labels['uploadphoto'] = 'Ðпублікаваць фота'; $labels['newcontact'] = 'Стварыць новую картку кантакта'; $labels['deletecontact'] = 'Выдаліць абраных кантактаў'; $labels['composeto'] = 'СклаÑці ліÑÑ‚ да'; @@ -300,7 +310,7 @@ $labels['exportall'] = 'ÐкÑпартаваць уÑÑ‘'; $labels['exportsel'] = 'ÐкÑпартаваць абранае'; $labels['exportvcards'] = 'ÐкÑпартаваць кантакты Ñž фармаце vCard'; $labels['newcontactgroup'] = 'Стварыць новую групу кантактаў'; -$labels['grouprename'] = 'Перайменаваць групу'; +$labels['grouprename'] = 'Пераназваць групу'; $labels['groupdelete'] = 'Выдаліць групу'; $labels['groupremoveselected'] = 'Выдаліць абраных кантакаў з групы'; $labels['previouspage'] = 'ПапÑÑ€ÑднÑÑ Ñтаронка'; @@ -321,7 +331,7 @@ $labels['importreplace'] = 'ЗамÑніць адраÑную кнігу цалР$labels['importgroups'] = 'Імпартаваць прызначÑнні групы'; $labels['importgroupsall'] = 'УÑе (Ñтварыць групы пры неабходнаÑці)'; $labels['importgroupsexisting'] = 'Толькі Ð´Ð»Ñ Ñ–Ñнуючых груп'; -$labels['importdesc'] = 'Кантакты можна запампаваць з Ñ–Ñнуючай адраÑнай кнігі.<br/>Ðа дадзены момант падтрымліваюцца адраÑÑ‹ Ñž фарматах <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> Ñ– CSV (значÑнні цераз коÑку).'; +$labels['importdesc'] = 'Кантакты можна загрузіць з Ñ–Ñнуючай адраÑнай кнігі.<br/>Ðа дадзены момант падтрымліваюцца адраÑÑ‹ Ñž фарматах <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> Ñ– CSV (значÑнні праз коÑку).'; $labels['done'] = 'Гатова'; $labels['settingsfor'] = 'ÐаÑтаўленні длÑ'; $labels['about'] = 'ÐпіÑанне'; @@ -348,13 +358,13 @@ $labels['timezone'] = 'ЧаÑÐ°Ð²Ð°Ñ Ð·Ð¾Ð½Ð°'; $labels['pagesize'] = 'Радкоў на Ñтаронку'; $labels['signature'] = 'ПодпіÑ'; $labels['dstactive'] = 'Летні/зімовы чаÑ'; -$labels['showinextwin'] = 'ÐдчынÑць паведамленне Ñž новым акне'; +$labels['showinextwin'] = 'Ðдкрываць паведамленні Ñž новым акне'; $labels['composeextwin'] = 'Складаць у новым акне'; $labels['htmleditor'] = 'Складаць паведамленні Ñž HTML'; $labels['htmlonreply'] = 'у адказ на паведамленні Ñž HTML'; $labels['htmlonreplyandforward'] = 'пры пераÑылцы альбо Ñž адказ на паведамленні Ñž HTML'; $labels['htmlsignature'] = 'ÐŸÐ¾Ð´Ð¿Ñ–Ñ Ñƒ HTML'; -$labels['showemail'] = 'Паказваць Ð°Ð´Ñ€Ð°Ñ Ñлектроннай пошты разам з Ñкранным імем'; +$labels['showemail'] = 'Паказваць Ð°Ð´Ñ€Ð°Ñ Ñлектроннай пошты разам з Ñкраннай назвай'; $labels['previewpane'] = 'ПанÑль праглÑду'; $labels['skin'] = 'ТÑма інтÑрфейÑу'; $labels['logoutclear'] = 'Ðчышчаць Сметніцу па выхадзе'; @@ -384,7 +394,7 @@ $labels['never'] = 'ніколі'; $labels['immediately'] = 'імгненна'; $labels['messagesdisplaying'] = 'ÐдлюÑтраванне паведамленнÑÑž'; $labels['messagescomposition'] = 'Складанне паведамленнÑÑž'; -$labels['mimeparamfolding'] = 'Імёны далучÑннÑÑž'; +$labels['mimeparamfolding'] = 'Ðазвы далучÑннÑÑž'; $labels['2231folding'] = 'Поўны RFC 2231 (Thunderbird)'; $labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)'; $labels['2047folding'] = 'Поўны RFC 2047 (інш.)'; @@ -428,8 +438,11 @@ $labels['standardwindows'] = 'УÑпрымаць вокны-бурбалкі ÑÐ $labels['forwardmode'] = 'ПераÑылка паведамленнÑÑž'; $labels['inline'] = 'у Ñ‚ÑкÑце'; $labels['asattachment'] = 'Ñк далучÑнне'; +$labels['replyallmode'] = 'Стандартнае дзеÑнне кнопкі [Ðдказаць уÑім]'; +$labels['replyalldefault'] = 'адказаць уÑім'; +$labels['replyalllist'] = 'адказаць толькі Ñž ÑÐ¿Ñ–Ñ Ñ€Ð°ÑÑылкі (калі знойдзены)'; $labels['folder'] = 'Папка'; -$labels['folders'] = 'ТÑчкі'; +$labels['folders'] = 'Папкі'; $labels['foldername'] = 'Ðазва папкі'; $labels['subscribed'] = 'ПадпіÑанаÑ'; $labels['messagecount'] = 'Паведамленні'; diff --git a/program/localization/be_BE/messages.inc b/program/localization/be_BE/messages.inc index 4b2f07a2f..6afc34b23 100644 --- a/program/localization/be_BE/messages.inc +++ b/program/localization/be_BE/messages.inc @@ -35,8 +35,8 @@ $messages['loggedout'] = 'СеÑÑ–Ñ ÑкаÑавана. Да пабачÑÐ½Ð½Ñ $messages['mailboxempty'] = 'У Ñкрынцы пуÑта.'; $messages['refreshing'] = 'ÐбнаўлÑецца...'; $messages['loading'] = 'Загружаецца...'; -$messages['uploading'] = 'Файл запампоўваюцца...'; -$messages['uploadingmany'] = 'Файлы запампоўваюцца...'; +$messages['uploading'] = 'Файл зацÑгваецца...'; +$messages['uploadingmany'] = 'Файлы зацÑгваюцца...'; $messages['loadingdata'] = 'Загружаюцца даныÑ...'; $messages['checkingmail'] = 'Праверка новых паведамленнÑÑž...'; $messages['sendingmessage'] = 'Паведамленне адпраўлÑецца...'; @@ -44,6 +44,8 @@ $messages['messagesent'] = 'Паведамленні адпраўлены.'; $messages['savingmessage'] = 'Паведамленне захоўваецца...'; $messages['messagesaved'] = 'Паведамленне захавана Ñž Чарнавікі.'; $messages['successfullysaved'] = 'Захавана.'; +$messages['savingresponse'] = 'ТÑкÑÑ‚ адказу захоўваецца...'; +$messages['deleteresponseconfirm'] = 'Ðапраўду выдаліць Ñ‚ÑкÑÑ‚ адказу?'; $messages['addedsuccessfully'] = 'Кантакт дададзены Ñž адраÑную кнігу.'; $messages['contactexists'] = 'Кантакт з такім Ñамым адраÑам Ñл. пошты ўжо Ñ–Ñнуе.'; $messages['contactnameexists'] = 'Кантакт з такім Ñамым імем ужо Ñ–Ñнуе.'; @@ -80,9 +82,10 @@ $messages['norecipientwarning'] = 'Задайце хацÑ-б аднаго Ð°Ñ‚Ñ $messages['nosubjectwarning'] = 'ТÑма ліÑта не зададзена. Ці жадаеце задаць Ñе зараз?'; $messages['nobodywarning'] = 'Ðдправіць гÑта паведамленне без Ñ‚ÑкÑту?'; $messages['notsentwarning'] = 'Паведамленне не адпраўлена. Жадаеце ÑкаÑаваць Ñваё паведамленне?'; +$messages['restoresavedcomposedata'] = 'Было знойдзена ўжо Ñкладзенае, але не адпраўленае паведамленне.\n\nТÑма: $subject\nЗахавана: $date\n\nЖадаеце аднавіць гÑтае паведамленне?'; $messages['noldapserver'] = 'Задайце ldap-Ñервер Ð´Ð»Ñ Ð¿Ð¾ÑˆÑƒÐºÑƒ.'; $messages['nosearchname'] = 'Задайце Ñ–Ð¼Ñ ÐºÐ°Ð½Ñ‚Ð°ÐºÑ‚Ð° альбо Ð°Ð´Ñ€Ð°Ñ Ñлектроннай пошты.'; -$messages['notuploadedwarning'] = 'Ðе ÑžÑе далучÑнні пакуль ÑÑˆÑ‡Ñ Ð·Ð°Ð¿Ð°Ð¼Ð¿Ð°Ð²Ð°Ð½Ñ‹Ñ. Пачакайце альбо ÑкаÑуйце аперацыю.'; +$messages['notuploadedwarning'] = 'Ðе ÑžÑе далучÑнні пакуль ÑÑˆÑ‡Ñ Ð·Ð°Ñ†ÑгнутыÑ. Пачакайце альбо ÑкаÑуйце аперацыю.'; $messages['searchsuccessful'] = 'Знойдзена $nr паведамленнÑÑž.'; $messages['contactsearchsuccessful'] = 'Знойдзена $nr кантактаў.'; $messages['searchnomatch'] = 'Пошук не даў выніку.'; @@ -97,8 +100,8 @@ $messages['folderexpunged'] = 'Папка ÑціÑнута. '; $messages['deletedsuccessfully'] = 'Выдалена.'; $messages['converting'] = 'Фарматаванне выдалÑецца...'; $messages['messageopenerror'] = 'Ðе ўдалоÑÑ Ð·Ð°Ð³Ñ€ÑƒÐ·Ñ–Ñ†ÑŒ паведамленне з Ñервера.'; -$messages['fileuploaderror'] = 'Ðе ўдалоÑÑ Ð·Ð°Ð¿Ð°Ð¼Ð¿Ð°Ð²Ð°Ñ†ÑŒ файл.'; -$messages['filesizeerror'] = 'Запампаваны файл перавышае макÑімальна дазволены памер $size.'; +$messages['fileuploaderror'] = 'Ðе ўдалоÑÑ Ð·Ð°Ñ†Ñгнуць файл.'; +$messages['filesizeerror'] = 'ЗацÑгнуты файл перавышае макÑімальна дазволены памер $size.'; $messages['copysuccess'] = '$nr кантактаў ÑкапіÑвана.'; $messages['movesuccess'] = '$nr кантактаў перамешчана.'; $messages['copyerror'] = 'Ðе ўдалоÑÑ ÑкапіÑваць ніводнага кантакта.'; @@ -118,17 +121,17 @@ $messages['errorsendingreceipt'] = 'Ðе ўдалоÑÑ Ð°Ð´Ð¿Ñ€Ð°Ð²Ñ–Ñ†ÑŒ Ð¿Ð°Ñ $messages['deleteidentityconfirm'] = 'Ðапраўду выдаліць гÑтую тоеÑнаÑць?'; $messages['nodeletelastidentity'] = 'ГÑтую тоеÑнаÑць выдаліць нÑможна, бо апошнÑÑ.'; $messages['forbiddencharacter'] = 'Ðазва папкі змÑшчае забаронены знак.'; -$messages['selectimportfile'] = 'ÐбÑрыце файл на запампоўку.'; +$messages['selectimportfile'] = 'ÐбÑрыце файл да зацÑгваннÑ.'; $messages['addresswriterror'] = 'ÐÐ±Ñ€Ð°Ð½Ð°Ñ Ð°Ð´Ñ€Ð°ÑÐ½Ð°Ñ ÐºÐ½Ñ–Ð³Ð° Ñ‘Ñць толькі-длÑ-чытаннÑ.'; $messages['contactaddedtogroup'] = 'Кантакты дададзены Ñž групу.'; $messages['contactremovedfromgroup'] = 'Кантакты Ð²Ñ‹Ð´Ð°Ð»ÐµÐ½Ñ‹Ñ Ð· групы.'; $messages['nogroupassignmentschanged'] = 'УÑе прызначÑнні групы заÑталіÑÑ Ð±ÐµÐ· зменаў.'; $messages['importwait'] = 'Ідзе імпартаванне. Чакайце...'; -$messages['importformaterror'] = 'Імпартаванне не ўдалоÑÑ! Запампаваны файл не ўтрымоўвае Ñлушных даных на імпарт.'; +$messages['importformaterror'] = 'Імпартаванне не ўдалоÑÑ! Загружаны файл не ўтрымоўвае Ñлушных даных на імпарт.'; $messages['importconfirm'] = '<b>$inserted кантактаў імпартаваныÑ</b>'; $messages['importconfirmskipped'] = '<b>Прапушчана $skipped Ñ–Ñнуючых запіÑаў</b>'; $messages['importmessagesuccess'] = '$nr паведамленнÑÑž імпартавана'; -$messages['importmessageerror'] = 'Ðе ўдалоÑÑ Ñ–Ð¼Ð¿Ð°Ñ€Ñ‚Ð°Ð²Ð°Ñ†ÑŒ! Запампаваны файл не Ñ‘Ñць Ñлушным паведамленнем альбо файлам паштовай Ñкрынкі'; +$messages['importmessageerror'] = 'Ðе ўдалоÑÑ Ñ–Ð¼Ð¿Ð°Ñ€Ñ‚Ð°Ð²Ð°Ñ†ÑŒ! Загружаны файл не Ñ‘Ñць Ñлушным паведамленнем альбо файлам паштовай Ñкрынкі'; $messages['opnotpermitted'] = 'ÐÐ¿ÐµÑ€Ð°Ñ†Ñ‹Ñ Ð½Ðµ дазволенаÑ!'; $messages['nofromaddress'] = 'У абранай тоеÑнаÑці не Ñтае адраÑу Ñл. пошты.'; $messages['editorwarning'] = 'Змена Ñ€Ñдактара прывÑдзе да Ñтраты фарматаваннÑ. ПрацÑгнуць?'; diff --git a/program/localization/bg_BG/labels.inc b/program/localization/bg_BG/labels.inc index 29c99e8f4..e7f2f3712 100644 --- a/program/localization/bg_BG/labels.inc +++ b/program/localization/bg_BG/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to от $count'; $labels['copy'] = 'Копиране'; $labels['move'] = 'ПремеÑтване'; $labels['moveto'] = 'ПремеÑти във...'; +$labels['copyto'] = 'Копирай във...'; $labels['download'] = 'Изтегли'; $labels['open'] = 'Отвори'; $labels['showattachment'] = 'Показване'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'ПравопиÑ'; $labels['checkspelling'] = 'Проверка на правопиÑа'; $labels['resumeediting'] = 'Продължи черновата'; $labels['revertto'] = 'Върни Ñе към'; +$labels['restore'] = 'ВъзÑтанови'; +$labels['restoremessage'] = 'ВъзÑтановÑване на Ñъобщението?'; +$labels['responses'] = 'Отговори'; +$labels['insertresponse'] = 'Вмъкване на отговори'; +$labels['manageresponses'] = 'ÐаÑтройка на отговори'; +$labels['savenewresponse'] = 'Ð—Ð°Ð¿Ð¸Ñ Ð½Ð° нов отговор'; +$labels['editresponses'] = 'Ð ÐµÐ´Ð°ÐºÑ†Ð¸Ñ Ð½Ð° отговори'; +$labels['editresponse'] = 'Ð ÐµÐ´Ð°ÐºÑ†Ð¸Ñ Ð½Ð° отговор'; +$labels['responsename'] = 'Име'; +$labels['responsetext'] = 'ТекÑÑ‚ на отговор'; $labels['attach'] = 'Прикачи'; $labels['attachments'] = 'Прикачени файлове'; $labels['upload'] = 'Качи'; @@ -224,7 +235,7 @@ $labels['addcc'] = 'Копие до'; $labels['addbcc'] = 'Скрито копие до'; $labels['addreplyto'] = 'Отговор до'; $labels['addfollowupto'] = 'Препращане към'; -$labels['mdnrequest'] = 'ПодателÑÑ‚ е поиÑкал да бъде уведомен, че Ñте го прочели това пиÑмо. Желаете ли да изпратите обратна разпиÑка?'; +$labels['mdnrequest'] = 'ПодателÑÑ‚ е поиÑкал да бъде уведомен, че Ñте прочели това пиÑмо. Желаете ли да изпратите обратна разпиÑка?'; $labels['receiptread'] = 'Обратна разпиÑка (прочетено)'; $labels['yourmessage'] = 'Това е обратна разпиÑка отноÑно пиÑмото Ви'; $labels['receiptnote'] = 'Забележка: Тази разпиÑка потвърждава Ñамо, че пиÑмото е било визуализирано на екрана на получателÑÑ‚. ÐÑма никаква гаранциÑ, че той е разбрал и/или дори прочел неговото Ñъдържание.'; @@ -238,8 +249,8 @@ $labels['nickname'] = 'ПÑевдоним'; $labels['jobtitle'] = 'ДлъжноÑÑ‚'; $labels['department'] = 'Отдел'; $labels['gender'] = 'Пол'; -$labels['maidenname'] = 'Бащино име'; -$labels['email'] = 'E-mail'; +$labels['maidenname'] = 'МоминÑко име'; +$labels['email'] = 'Ел. поща'; $labels['phone'] = 'Телефон'; $labels['address'] = 'ÐдреÑ'; $labels['street'] = 'Улица'; @@ -354,7 +365,7 @@ $labels['htmleditor'] = 'ПиÑане на ново пиÑмо като HTML'; $labels['htmlonreply'] = 'Ñамо при отговор на HTML пиÑмо'; $labels['htmlonreplyandforward'] = 'Ñамо при препращане или отговор на HTML пиÑмо'; $labels['htmlsignature'] = 'HTML подпиÑ'; -$labels['showemail'] = 'Показва email Ð°Ð´Ñ€ÐµÑ Ñ ÐµÐºÑ€Ð°Ð½Ð½Ð¾Ñ‚Ð¾ име'; +$labels['showemail'] = 'Показва Ð°Ð´Ñ€ÐµÑ Ð½Ð° ел. поща Ñ ÐµÐºÑ€Ð°Ð½Ð½Ð¾Ñ‚Ð¾ име'; $labels['previewpane'] = 'Показване на панел за преглед'; $labels['skin'] = 'Изглед на потребителÑки интерфейÑ'; $labels['logoutclear'] = 'При изход изтрий вÑичко от Кошче'; @@ -415,7 +426,7 @@ $labels['reqmdn'] = 'Винаги изиÑквай обратна разпиÑк $labels['reqdsn'] = 'Винаги изиÑквай ÑÑ‚Ð°Ñ‚ÑƒÑ Ð´Ð¾Ñтавка на пиÑмото'; $labels['replysamefolder'] = 'ПоÑтави отговор в папка на пиÑмото, на което Ñе отговарÑ'; $labels['defaultabook'] = 'ÐдреÑна книга по подразбиране'; -$labels['autocompletesingle'] = 'ПропуÑни алтернативни e-mail адреÑи при автоматично попълване'; +$labels['autocompletesingle'] = 'ПропуÑни алтернативни адреÑи на ел. поща при автоматично попълване'; $labels['listnamedisplay'] = 'Форматирай ÑпиÑък Ñ ÐºÐ¾Ð½Ñ‚Ð°ÐºÑ‚Ð¸ като'; $labels['spellcheckbeforesend'] = 'Провери за правопиÑни грешки преди изпращане на пиÑмото'; $labels['spellcheckoptions'] = 'ÐаÑтройки на проверката за правопиÑ'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Обработва изÑкачащи прозор $labels['forwardmode'] = 'Препращай пиÑмата'; $labels['inline'] = 'цитирани в пиÑмото'; $labels['asattachment'] = 'като прикачен файл'; +$labels['replyallmode'] = 'ДейÑтвие по подразбиране на бутон [Отговор на вÑички]'; +$labels['replyalldefault'] = 'отговори на вÑички'; +$labels['replyalllist'] = 'отговори на ÑпиÑъка Ñамо (ако има)'; $labels['folder'] = 'Папка'; $labels['folders'] = 'Папки'; $labels['foldername'] = 'Име на папката'; diff --git a/program/localization/bg_BG/messages.inc b/program/localization/bg_BG/messages.inc index 210eda1b1..df9620b30 100644 --- a/program/localization/bg_BG/messages.inc +++ b/program/localization/bg_BG/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -30,9 +30,10 @@ $messages['erroroverquota'] = 'Ðевъзможно извършване на о $messages['erroroverquotadelete'] = 'ÐÑма доÑтатъчно Ñвободно диÑково проÑтранÑтво. Ползвайте Shift+Del за да изтриете пиÑма.'; $messages['invalidrequest'] = 'Ðевалидна заÑвка! Данните не Ñа Ñъхранени.'; $messages['invalidhost'] = 'Ðевалидно име на Ñървър.'; -$messages['nomessagesfound'] = 'ÐÑма пиÑма.'; +$messages['nomessagesfound'] = 'ÐÑма пиÑма в тази пощенÑка кутиÑ.'; $messages['loggedout'] = 'СеÑиÑта е прекратена уÑпешно. Довиждане до ÑÐ»ÐµÐ´Ð²Ð°Ñ‰Ð¸Ñ Ð¿ÑŠÑ‚!'; -$messages['mailboxempty'] = 'ПощенÑката ÐºÑƒÑ‚Ð¸Ñ Ðµ празна.'; +$messages['mailboxempty'] = 'ПощенÑката ÐºÑƒÑ‚Ð¸Ñ Ðµ празна'; +$messages['nomessages'] = 'ÐÑма пиÑма'; $messages['refreshing'] = 'ОбновÑване...'; $messages['loading'] = 'Зареждане...'; $messages['uploading'] = 'Качване на файл...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'ПиÑмото е изпратено уÑпешно. $messages['savingmessage'] = 'ЗапиÑване на пиÑмо...'; $messages['messagesaved'] = 'ПиÑмото е запиÑано в Чернови.'; $messages['successfullysaved'] = 'УÑпешен запиÑ.'; +$messages['savingresponse'] = 'ЗапиÑване текÑÑ‚ на отговор...'; +$messages['deleteresponseconfirm'] = 'Желаете ли да изтриете текÑÑ‚ за отговор?'; $messages['addedsuccessfully'] = 'Контактът е добавен в адреÑната книга.'; $messages['contactexists'] = 'Вече ÑъщеÑтвува контакт Ñ Ñ‚Ð¾Ð·Ð¸ e-mail адреÑ.'; $messages['contactnameexists'] = 'Вече ÑъщеÑтвува контакт Ñ Ñ‚Ð¾Ð²Ð° име.'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'ТърÑениÑÑ‚ контакт не е нам $messages['contactsearchonly'] = 'Използвайте полето за да Ñ‚ÑŠÑ€Ñите контакти'; $messages['sendingfailed'] = 'ÐеуÑпешно изпращане на пиÑмо.'; $messages['senttooquickly'] = 'ÐœÐ¾Ð»Ñ Ð¸Ð·Ñ‡Ð°ÐºÐ°Ð¹Ñ‚Ðµ $sec Ñекунди преди да изпратите пиÑмото.'; +$messages['errorsavingsent'] = 'Възникна грешка при запиÑване на изпратеното пиÑмо.'; +$messages['errorsaving'] = 'Възникна грешка при запиÑването.'; $messages['errormoving'] = 'ПиÑмото не може да бъде премеÑтено.'; $messages['errorcopying'] = 'ПиÑмото не може да бъде копирано.'; $messages['errordeleting'] = 'ПиÑмото не може да бъде изтрито.'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'ÐœÐ¾Ð»Ñ Ð²ÑŠÐ²ÐµÐ´ÐµÑ‚Ðµ поне един Ð $messages['nosubjectwarning'] = 'Полето "Заглавие" е празно. Желаете ли да въведете заглавие Ñега?'; $messages['nobodywarning'] = 'Изпрати това пиÑмо без текÑÑ‚?'; $messages['notsentwarning'] = 'ПиÑмото не е изпратено. Желаете ли да бъде унищожено?'; +$messages['restoresavedcomposedata'] = 'Ðамерено е неизпратено пиÑмо, което е било в Ð¿Ñ€Ð¾Ñ†ÐµÑ Ð½Ð° Ñъздаване.\n\nОтноÑно: $subject\nЗапазено на: $date\n\nЖелаете ли да възÑтановите пиÑмото?'; $messages['noldapserver'] = 'Изберете LDAP Ñървър за Ñ‚ÑŠÑ€Ñене.'; $messages['nosearchname'] = 'ÐœÐ¾Ð»Ñ Ð²ÑŠÐ²ÐµÐ´ÐµÑ‚Ðµ име на контакта или e-mail адреÑ.'; $messages['notuploadedwarning'] = 'Ð’Ñе още не Ñа качени вÑички прикачени файлове. ÐœÐ¾Ð»Ñ Ð¸Ð·Ñ‡Ð°ÐºÐ°Ð¹Ñ‚Ðµ или откажете качването.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'SMTP грешка: $msg'; $messages['emailformaterror'] = 'Ðевалиден e-mail адреÑ: $email'; $messages['toomanyrecipients'] = 'Прекалено много адреÑи за изпращане (макÑимум: $max).'; $messages['maxgroupmembersreached'] = 'БроÑÑ‚ на членовете на групата е повече от макÑималниÑ: $max.'; +$messages['internalerror'] = 'Възникна вътрешна грешка. ÐœÐ¾Ð»Ñ Ð¾Ð¿Ð¸Ñ‚Ð°Ð¹Ñ‚Ðµ отново.'; $messages['contactdelerror'] = 'Ðевъзможно изтриване на контакти.'; $messages['contactdeleted'] = 'Контактът беше изтрит уÑпешно.'; $messages['contactrestoreerror'] = 'ÐеуÑпешно възÑтановÑване на изтрите контакти.'; diff --git a/program/localization/bs_BA/labels.inc b/program/localization/bs_BA/labels.inc index df58d8d60..c79cf4ecc 100644 --- a/program/localization/bs_BA/labels.inc +++ b/program/localization/bs_BA/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to od ukupno $count'; $labels['copy'] = 'Kopiraj'; $labels['move'] = 'Premjesti'; $labels['moveto'] = 'Premjesti u...'; +$labels['copyto'] = 'Kopiraj u...'; $labels['download'] = 'Preuzmi'; $labels['open'] = 'Otvori'; $labels['showattachment'] = 'Prikaži'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Pravopis'; $labels['checkspelling'] = 'Provjera pravopisa'; $labels['resumeediting'] = 'Nastavi ureÄ‘ivanje'; $labels['revertto'] = 'Vrati na'; +$labels['restore'] = 'Vrati'; +$labels['restoremessage'] = 'Vratiti poruku?'; +$labels['responses'] = 'Odgovori'; +$labels['insertresponse'] = 'Umetni odgovor'; +$labels['manageresponses'] = 'Upravljaj odgovorima'; +$labels['savenewresponse'] = 'Snimi novi odgovor'; +$labels['editresponses'] = 'Uredi odgovore'; +$labels['editresponse'] = 'Uredi odgovor'; +$labels['responsename'] = 'Ime'; +$labels['responsetext'] = 'Tekst odgovora'; $labels['attach'] = 'Priloži'; $labels['attachments'] = 'Prilozi'; $labels['upload'] = 'Dodaj'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Tretiraj popup-ove kao standardne prozore'; $labels['forwardmode'] = 'ProsljeÄ‘ivanje poruka'; $labels['inline'] = 'u istom redu'; $labels['asattachment'] = 'kao prilog'; +$labels['replyallmode'] = 'Zadana radnja za [Odgovori svima] dugme'; +$labels['replyalldefault'] = 'odgovori svima'; +$labels['replyalllist'] = 'odgovori samo listi mailova (ukoliko je pronaÄ‘ena)'; $labels['folder'] = 'Folder'; $labels['folders'] = 'Folderi'; $labels['foldername'] = 'Naziv foldera'; diff --git a/program/localization/bs_BA/messages.inc b/program/localization/bs_BA/messages.inc index 3424013c5..52f865f1e 100644 --- a/program/localization/bs_BA/messages.inc +++ b/program/localization/bs_BA/messages.inc @@ -44,6 +44,8 @@ $messages['messagesent'] = 'Poruka je uspjeÅ¡no poslana.'; $messages['savingmessage'] = 'Poruka se snima...'; $messages['messagesaved'] = 'Poruka je uspjeÅ¡no saÄuvana u skicama.'; $messages['successfullysaved'] = 'UspjeÅ¡no saÄuvano.'; +$messages['savingresponse'] = 'Snimam teksta odgovora...'; +$messages['deleteresponseconfirm'] = 'Da li zaista želite obrisati tekst ovog odgovora?'; $messages['addedsuccessfully'] = 'Kontakt uspjeÅ¡no dodan u adresar.'; $messages['contactexists'] = 'Kontakt sa ovom email adresom već postoji u adresaru.'; $messages['contactnameexists'] = 'Kontakt s tim imenom već postoji.'; @@ -54,6 +56,8 @@ $messages['contactnotfound'] = 'Traženi kontakt nije pronaÄ‘en.'; $messages['contactsearchonly'] = 'Unesite neki pojam za pretragu'; $messages['sendingfailed'] = 'GreÅ¡ka pri slanju poruke.'; $messages['senttooquickly'] = 'Molimo saÄekajte $sec sekundi prije slanja ove poruke.'; +$messages['errorsavingsent'] = 'Desila se greÅ¡ka pri snimanju poslane poruke.'; +$messages['errorsaving'] = 'Desila se greÅ¡ka pri snimanju.'; $messages['errormoving'] = 'Nije moguće premjestiti poruke.'; $messages['errorcopying'] = 'Nije moguće kopirati poruke.'; $messages['errordeleting'] = 'Nije moguće obrisati poruke.'; @@ -78,6 +82,7 @@ $messages['norecipientwarning'] = 'Molimo vas da upiÅ¡ete barem jednog primaoca. $messages['nosubjectwarning'] = 'Polje \'Naslov\' je prazno. Želite li unijeti naslov?'; $messages['nobodywarning'] = 'Želite li poslati poruku bez teksta?'; $messages['notsentwarning'] = 'Poruka nije poslana. Želite li odbaciti ovu poruku?'; +$messages['restoresavedcomposedata'] = 'PronaÄ‘ena je prethodno napisana poruka koja nije poslana..\n\nTema:$subject\nSnimljeno: $date\n\nŽelite li vratiti ovu poruku?'; $messages['noldapserver'] = 'Molimo vas da odaberete LDAP server za pretragu.'; $messages['nosearchname'] = 'Molimo vas da upiÅ¡ete ime kontakta ili email adresu.'; $messages['notuploadedwarning'] = 'Neki od priloga joÅ¡ nisu dodani na server. Molimo vas da saÄekate ili da otkažete dodavanje.'; @@ -140,6 +145,7 @@ $messages['smtperror'] = 'SMTP greÅ¡ka: $msg'; $messages['emailformaterror'] = 'NetaÄna email adresa: $email'; $messages['toomanyrecipients'] = 'PreviÅ¡e primaoca. Smanjite broj primaoca na $max.'; $messages['maxgroupmembersreached'] = 'Broj Älanova grupe prelazi maksimum od $max.'; +$messages['internalerror'] = 'Dogodila se interna greÅ¡ka. Molimo vas da pokuÅ¡ate ponovo.'; $messages['contactdelerror'] = 'Kontakti ne mogu biti obrisani.'; $messages['contactdeleted'] = 'Kontakti su uspjeÅ¡no obrisani.'; $messages['contactrestoreerror'] = 'Nije moguće vratiti obrisane kontakte.'; diff --git a/program/localization/ca_ES/labels.inc b/program/localization/ca_ES/labels.inc index 065431fbc..120e2bc97 100644 --- a/program/localization/ca_ES/labels.inc +++ b/program/localization/ca_ES/labels.inc @@ -45,13 +45,14 @@ $labels['organization'] = 'Organització'; $labels['readstatus'] = 'Estat de lectura'; $labels['listoptions'] = 'Llista d\'opcions...'; $labels['mailboxlist'] = 'Carpetes'; -$labels['messagesfromto'] = 'Missatges des de $from a $to de $count'; +$labels['messagesfromto'] = 'Missatges $from a $to de $count'; $labels['threadsfromto'] = 'Fils $from a $to de $count'; $labels['messagenrof'] = 'Missatge $nr de $count'; $labels['fromtoshort'] = '$from - $to de $count'; $labels['copy'] = 'Copia'; $labels['move'] = 'Mou'; $labels['moveto'] = 'Mou a...'; +$labels['copyto'] = 'Copia a...'; $labels['download'] = 'Descarrega'; $labels['open'] = 'Obre'; $labels['showattachment'] = 'Mostra'; @@ -89,7 +90,7 @@ $labels['longjan'] = 'gener'; $labels['longfeb'] = 'febrer'; $labels['longmar'] = 'març'; $labels['longapr'] = 'abril'; -$labels['longmay'] = 'mai'; +$labels['longmay'] = 'maig'; $labels['longjun'] = 'juny'; $labels['longjul'] = 'juliol'; $labels['longaug'] = 'agost'; @@ -99,14 +100,14 @@ $labels['longnov'] = 'novembre'; $labels['longdec'] = 'desembre'; $labels['today'] = 'Avui'; $labels['refresh'] = 'Actualitza'; -$labels['checkmail'] = 'Recupera missatges nous'; +$labels['checkmail'] = 'Comprova si hi ha missatges nous'; $labels['compose'] = 'Escriu un missatge'; $labels['writenewmessage'] = 'Crea un nou missatge'; $labels['reply'] = 'Respon'; $labels['replytomessage'] = 'Respon al remitent'; -$labels['replytoallmessage'] = 'Respon al remitent i a tots els destinataris'; +$labels['replytoallmessage'] = 'Respon a la llista o al remitent i a tots els destinataris'; $labels['replyall'] = 'Respon a tots'; -$labels['replylist'] = 'Llista de resposta'; +$labels['replylist'] = 'Respon a la llista'; $labels['forward'] = 'Reenvia'; $labels['forwardinline'] = 'Reenvia com en lÃnia'; $labels['forwardattachment'] = 'Reenvia com a adjunt'; @@ -134,7 +135,7 @@ $labels['select'] = 'Selecciona'; $labels['all'] = 'Tots'; $labels['none'] = 'Cap'; $labels['currpage'] = 'Pà gina actual'; -$labels['unread'] = 'No llegits'; +$labels['unread'] = 'No llegit'; $labels['flagged'] = 'Marcat'; $labels['unanswered'] = 'No respost'; $labels['withattachment'] = 'Amb fitxer adjunt'; @@ -143,17 +144,17 @@ $labels['undeleted'] = 'No s\'ha suprimit'; $labels['invert'] = 'Inverteix'; $labels['filter'] = 'Filtre'; $labels['list'] = 'Llista'; -$labels['threads'] = 'Fils de discusió'; -$labels['expand-all'] = 'Expandeix tots'; +$labels['threads'] = 'Fils de discussió'; +$labels['expand-all'] = 'Expandeix tot'; $labels['expand-unread'] = 'Expandeix No llegits'; -$labels['collapse-all'] = 'Redueix tots'; +$labels['collapse-all'] = 'Redueix tot'; $labels['threaded'] = 'Encadenat'; $labels['autoexpand_threads'] = 'Expandeix els missatges encadenats'; -$labels['do_expand'] = 'tots els fils de discusió'; +$labels['do_expand'] = 'tots els fils de discussió'; $labels['expand_only_unread'] = 'només amb missatges no llegits'; $labels['fromto'] = 'Remitent/Destinatari'; $labels['flag'] = 'Marca'; -$labels['attachment'] = 'Adjunció'; +$labels['attachment'] = 'Adjunt'; $labels['nonesort'] = 'Cap'; $labels['sentdate'] = 'Data d\'enviament'; $labels['arrival'] = 'Data d\'arribada'; @@ -163,7 +164,7 @@ $labels['listcolumns'] = 'Llista les columnes'; $labels['listsorting'] = 'Columna d\'ordenació'; $labels['listorder'] = 'Ordre d\'ordenació'; $labels['listmode'] = 'Mode de vista de llista'; -$labels['folderactions'] = 'Accions de carpeta'; +$labels['folderactions'] = 'Accions de carpeta...'; $labels['compact'] = 'Compacta'; $labels['empty'] = 'Buida'; $labels['importmessages'] = 'Importa missatges'; @@ -175,16 +176,16 @@ $labels['resetsearch'] = 'Neteja cerca'; $labels['searchmod'] = 'Cerca modificadors'; $labels['msgtext'] = 'Missatge sencer'; $labels['body'] = 'Cos'; -$labels['type'] = 'tipus:'; +$labels['type'] = 'Tipus'; $labels['namex'] = 'Nom'; $labels['openinextwin'] = 'Obre a una nova finestra'; $labels['emlsave'] = 'Descarrega (.eml)'; $labels['changeformattext'] = 'Mostra en format de text net'; $labels['changeformathtml'] = 'Mostra en format HTML'; $labels['editasnew'] = 'Edita com a nou'; -$labels['send'] = 'Enviar'; +$labels['send'] = 'Envia'; $labels['sendmessage'] = 'Envia el missatge'; -$labels['savemessage'] = 'Desa aquest esborrany'; +$labels['savemessage'] = 'Desa com a esborrany'; $labels['addattachment'] = 'Adjunta un fitxer'; $labels['charset'] = 'Codificació de carà cters'; $labels['editortype'] = 'Tipus d\'editor'; @@ -197,8 +198,18 @@ $labels['spellcheck'] = 'Ortografia'; $labels['checkspelling'] = 'Comprova l\'ortografia'; $labels['resumeediting'] = 'Reprèn l\'edició'; $labels['revertto'] = 'Torna a'; +$labels['restore'] = 'Recupera'; +$labels['restoremessage'] = 'Recupera el missatge?'; +$labels['responses'] = 'Respostes'; +$labels['insertresponse'] = 'Introduïu una resposta'; +$labels['manageresponses'] = 'Gestiona respostes'; +$labels['savenewresponse'] = 'Desa una nova resposta'; +$labels['editresponses'] = 'Edita respostes'; +$labels['editresponse'] = 'Edita la resposta'; +$labels['responsename'] = 'Nom'; +$labels['responsetext'] = 'Text de resposta'; $labels['attach'] = 'Adjunta'; -$labels['attachments'] = 'Adjuncions'; +$labels['attachments'] = 'Adjunts'; $labels['upload'] = 'Afegeix'; $labels['uploadprogress'] = '$percent ($current de $total)'; $labels['close'] = 'Tanca'; @@ -214,18 +225,18 @@ $labels['alwaysshow'] = 'Mostra sempre les imatges de $sender'; $labels['isdraft'] = 'Aquest és un missatge esborrany.'; $labels['andnmore'] = '$nr més...'; $labels['togglemoreheaders'] = 'Mostra més capçaleres del missatge'; -$labels['togglefullheaders'] = 'Conmuta les capçaleres de text cru'; +$labels['togglefullheaders'] = 'Commuta les capçaleres del missatge en brut'; $labels['htmltoggle'] = 'HTML'; $labels['plaintoggle'] = 'Text net'; $labels['savesentmessagein'] = 'Desa el missatge enviat a'; $labels['dontsave'] = 'no ho desis'; -$labels['maxuploadsize'] = 'El mida mà xima del fitxer és $size'; +$labels['maxuploadsize'] = 'La mida mà xima permesa del fitxer és $size'; $labels['addcc'] = 'Afegeix Cc'; $labels['addbcc'] = 'Afegeix Bcc'; $labels['addreplyto'] = 'Afegeix Respon-A'; $labels['addfollowupto'] = 'Afegir Seguiment-A'; $labels['mdnrequest'] = 'El remitent d\'aquest missatge ha demanat ser notificat quan llegiu aquest missatge. Voleu notificar al remitent?'; -$labels['receiptread'] = 'Confirmació de recepció'; +$labels['receiptread'] = 'Confirmació de recepció (llegit)'; $labels['yourmessage'] = 'Això és una confirmació de recepció per al vostre missatge'; $labels['receiptnote'] = 'Nota: Aquesta confirmació només indica que el missatge ha estat mostrat a l\'ordinador del destinatari. No hi ha garantia que el destinatari hagi llegit o entès el contingut del missatge.'; $labels['name'] = 'Nom a mostrar'; @@ -273,7 +284,7 @@ $labels['typecar'] = 'Cotxe'; $labels['typepager'] = 'Cercapersones'; $labels['typevideo'] = 'VÃdeo'; $labels['typeassistant'] = 'Assistent'; -$labels['typehomepage'] = 'Pà gina Inicial'; +$labels['typehomepage'] = 'Pà gina web personal'; $labels['typeblog'] = 'Bloc'; $labels['typeprofile'] = 'Perfil'; $labels['addfield'] = 'Afegeix camp...'; @@ -289,7 +300,7 @@ $labels['delete'] = 'Suprimeix'; $labels['rename'] = 'Reanomena'; $labels['addphoto'] = 'Afegeix'; $labels['replacephoto'] = 'Reemplaça'; -$labels['uploadphoto'] = 'Puja una fotografia'; +$labels['uploadphoto'] = 'Afegeix una fotografia'; $labels['newcontact'] = 'Crea un nou contacte'; $labels['deletecontact'] = 'Suprimeix els contactes seleccionats'; $labels['composeto'] = 'Redacta correu per a'; @@ -310,14 +321,18 @@ $labels['lastpage'] = 'Mostra la darrera pà gina'; $labels['group'] = 'Grup'; $labels['groups'] = 'Grups'; $labels['listgroup'] = 'Llista els membres del grup'; -$labels['personaladrbook'] = 'Llibreta d\'adreces'; +$labels['personaladrbook'] = 'Llibreta d\'adreces personals'; $labels['searchsave'] = 'Desa la cerca'; $labels['searchdelete'] = 'Suprimeix la cerca'; $labels['import'] = 'Importa'; $labels['importcontacts'] = 'Importa contactes'; $labels['importfromfile'] = 'Importa des d\'un fitxer:'; -$labels['importreplace'] = 'Reemplaça la llibreta d\'adreçes sencera'; -$labels['importdesc'] = 'Podeu carregar contactes des d\'una llibreta de direccions.<br/>Actualment donem suport a la importació d\'adreces des de fitxers de tipus <a href="http://ca.wikipedia.org/wiki/VCard">vCard</a> o CSV (valors separats per comes).'; +$labels['importtarget'] = 'Afegeix contactes a'; +$labels['importreplace'] = 'Substitueix la llibreta d\'adreces sencera'; +$labels['importgroups'] = 'Importa assignacions de grup'; +$labels['importgroupsall'] = 'Tot (crea grups si és necessari)'; +$labels['importgroupsexisting'] = 'Només per a grups existents'; +$labels['importdesc'] = 'Podeu afegir contactes des d\'una llibreta d\'adreces.<br/>Actualment donem suport a la importació d\'adreces des de fitxers de tipus <a href="http://ca.wikipedia.org/wiki/VCard">vCard</a> o CSV (valors separats per comes).'; $labels['done'] = 'Fet'; $labels['settingsfor'] = 'Configuració per a'; $labels['about'] = 'Quant a'; @@ -344,11 +359,11 @@ $labels['timezone'] = 'Fus horari'; $labels['pagesize'] = 'Files per pà gina'; $labels['signature'] = 'Signatura'; $labels['dstactive'] = 'Horari d\'estiu'; -$labels['showinextwin'] = 'Obrir el missatge en una nova finestra'; -$labels['composeextwin'] = 'Redactar en una nova finestra'; +$labels['showinextwin'] = 'Obre el missatge en una nova finestra'; +$labels['composeextwin'] = 'Redacta en una nova finestra'; $labels['htmleditor'] = 'Escriu missatges en HTML'; $labels['htmlonreply'] = 'només en resposta a missatges en HTML'; -$labels['htmlonreplyandforward'] = 'en reenviament o resposta a missatge HTML'; +$labels['htmlonreplyandforward'] = 'quan es reenviï o es respongui un missatge en HTML'; $labels['htmlsignature'] = 'Signatura en HTML'; $labels['showemail'] = 'Mostra l\'adreça electrònica amb el nom'; $labels['previewpane'] = 'Mostra el panell de previsualització'; @@ -358,10 +373,10 @@ $labels['logoutcompact'] = 'Compacta la safata d\'entrada al tancar la sessió'; $labels['uisettings'] = 'InterfÃcie de l\'usuari'; $labels['serversettings'] = 'Configuració del servidor'; $labels['mailboxview'] = 'Vista de la bústia'; -$labels['mdnrequests'] = 'Notificacions de confirmació de recepció'; +$labels['mdnrequests'] = 'Quan es demani confirmació de recepció'; $labels['askuser'] = 'demana\'m què vull fer'; $labels['autosend'] = 'envia la confirmació de recepció'; -$labels['autosendknown'] = 'envia la confirmació de recepció als meus contactes, pels demés damana-m\'ho'; +$labels['autosendknown'] = 'envia la confirmació de recepció als meus contactes, pels demés demana-m\'ho'; $labels['autosendknownignore'] = 'envia la confirmació als meus contactes, pels demés ignora-ho'; $labels['ignore'] = 'ignora'; $labels['readwhendeleted'] = 'Marca el missatge com a llegit quan se suprimeixi'; @@ -370,12 +385,12 @@ $labels['skipdeleted'] = 'No mostris els missatges suprimits'; $labels['deletealways'] = 'Si falla quan es mou un missatge a la Paperera, aleshores suprimeix-lo'; $labels['deletejunk'] = 'Suprimeix directament els missatges de Correu brossa'; $labels['showremoteimages'] = 'Mostra les imatges remotes del missatge'; -$labels['fromknownsenders'] = 'de remitent conegut'; +$labels['fromknownsenders'] = 'de remitents coneguts'; $labels['always'] = 'sempre'; $labels['showinlineimages'] = 'Mostra les imatges adjuntes sota el missatge'; $labels['autosavedraft'] = 'Desa l\'esborrany automà ticament'; $labels['everynminutes'] = 'cada $n minut(s)'; -$labels['refreshinterval'] = 'Resfrescar (comprovar nous missatges, etc.)'; +$labels['refreshinterval'] = 'Actualitza (comprova nous missatges, etc.)'; $labels['never'] = 'mai'; $labels['immediately'] = 'immediatament'; $labels['messagesdisplaying'] = 'Vista de missatges'; @@ -386,25 +401,25 @@ $labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)'; $labels['2047folding'] = 'Compleix RFC 2047 (un altre)'; $labels['force7bit'] = 'Fes servir la codificació MIME per a carà cters de 8-bits'; $labels['advancedoptions'] = 'Opcions avançades'; -$labels['focusonnewmessage'] = 'Envia el focus al navegador quan hi hagi un nou missatge'; +$labels['focusonnewmessage'] = 'Activa la finestra del navegador quan hi hagi un nou missatge'; $labels['checkallfolders'] = 'Comprova totes les carpetes per missatges nous'; -$labels['displaynext'] = 'Mostra el següent missatge després de suprimir-ne o moure\'n un'; -$labels['defaultfont'] = 'Font de lletra per defecte de missatge HTML'; +$labels['displaynext'] = 'Mostra el missatge següent després de suprimir-ne o moure\'n un'; +$labels['defaultfont'] = 'Font de lletra per defecte de missatge en HTML'; $labels['mainoptions'] = 'Opcions principals'; $labels['browseroptions'] = 'Opcions del navegador'; $labels['section'] = 'Secció'; $labels['maintenance'] = 'Manteniment'; $labels['newmessage'] = 'Missatge nou'; $labels['signatureoptions'] = 'Opcions de signatura'; -$labels['whenreplying'] = 'Quan es respon'; -$labels['replyempty'] = 'do citis el missatge original'; +$labels['whenreplying'] = 'Quan es respongui'; +$labels['replyempty'] = 'no citis el missatge original'; $labels['replytopposting'] = 'comença el missatge nou per sobre de l\'original'; $labels['replybottomposting'] = 'comença el missatge nou per sota de l\'original'; -$labels['replyremovesignature'] = 'Quan es contesti, suprimeix la signatura original del missatge'; +$labels['replyremovesignature'] = 'Quan es respongui suprimeix la signatura original del missatge'; $labels['autoaddsignature'] = 'Afegeix la signatura automà ticament'; $labels['newmessageonly'] = 'només si és un missatge nou'; $labels['replyandforwardonly'] = 'només a respostes i reenviaments'; -$labels['insertsignature'] = 'Inserta la signatura'; +$labels['insertsignature'] = 'Inclou la signatura'; $labels['previewpanemarkread'] = 'Marca els missatges previsualitzats com a llegits'; $labels['afternseconds'] = 'després de $n segons'; $labels['reqmdn'] = 'Demana sempre la confirmació de recepció'; @@ -423,7 +438,10 @@ $labels['mailtoprotohandler'] = 'Registra controlador de protocol pels enllaços $labels['standardwindows'] = 'Gestiona les finestres emergents com si fossin finestres normals'; $labels['forwardmode'] = 'Reenviament de missatges'; $labels['inline'] = 'en lÃnia'; -$labels['asattachment'] = 'com adjunt'; +$labels['asattachment'] = 'com un adjunt'; +$labels['replyallmode'] = 'Acció per defecte del botó [Respon a tots]'; +$labels['replyalldefault'] = 'respon a tots'; +$labels['replyalllist'] = 'respon només a la llista de missatges (si n\'hi ha cap)'; $labels['folder'] = 'Carpeta'; $labels['folders'] = 'Carpetes'; $labels['foldername'] = 'Nom de la carpeta'; @@ -448,7 +466,7 @@ $labels['sortby'] = 'Ordena per'; $labels['sortasc'] = 'Ordena ascendentment'; $labels['sortdesc'] = 'Ordena descendentment'; $labels['undo'] = 'Desfés'; -$labels['installedplugins'] = 'Connectors Instal·lats'; +$labels['installedplugins'] = 'Complements Instal·lats'; $labels['plugin'] = 'Complement'; $labels['version'] = 'Versió'; $labels['source'] = 'Font'; diff --git a/program/localization/ca_ES/messages.inc b/program/localization/ca_ES/messages.inc index 06a72cb50..c71677b44 100644 --- a/program/localization/ca_ES/messages.inc +++ b/program/localization/ca_ES/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -24,16 +24,17 @@ $messages['servererror'] = 'Error del Servidor!'; $messages['servererrormsg'] = 'Error del Servidor: $msg'; $messages['dberror'] = 'Error a la Base de Dades!'; $messages['requesttimedout'] = 'S\'ha esgotat el temps de la sol·licitud'; -$messages['errorreadonly'] = 'Impossible de realitzar l\'operació. La carpeta és de només lectura.'; -$messages['errornoperm'] = 'Impossible de realitzar l\'operació. PermÃs denegat.'; +$messages['errorreadonly'] = 'No s\'ha pogut de realitzar l\'operació. La carpeta és de només lectura.'; +$messages['errornoperm'] = 'No s\'ha pogut realitzar l\'operació. PermÃs denegat.'; $messages['erroroverquota'] = 'No s\'ha pogut completar l\'operació. No hi ha prou espai lliure al disc dur.'; $messages['erroroverquotadelete'] = 'No hi ha prou espai lliure. Feu servir MAJÚS+SUPR per suprimir el missatge.'; $messages['invalidrequest'] = 'Petició no và lida! No s\'han desat les dades.'; $messages['invalidhost'] = 'Nom de servidor no và lid.'; $messages['nomessagesfound'] = 'No s\'han trobat missatges en aquesta bústia.'; $messages['loggedout'] = 'Heu tancat la sessió correctament. A reveure!'; -$messages['mailboxempty'] = 'La bústia és buida.'; -$messages['refreshing'] = 'S\'està refrescant...'; +$messages['mailboxempty'] = 'La bústia és buida'; +$messages['nomessages'] = 'No hi ha missatges'; +$messages['refreshing'] = 'S\'està actualitzant...'; $messages['loading'] = 'S\'està carregant…'; $messages['uploading'] = 'S\'està pujant el fitxer...'; $messages['uploadingmany'] = 'S\'estan pujant els fitxers...'; @@ -41,19 +42,23 @@ $messages['loadingdata'] = 'S\'estan carregant les dades...'; $messages['checkingmail'] = 'S’està comprovant si hi ha missatges nous…'; $messages['sendingmessage'] = 'S’està enviant el missatge…'; $messages['messagesent'] = 'Missatge enviat correctament.'; -$messages['savingmessage'] = 'Desant missatge...'; +$messages['savingmessage'] = 'S\'està desant el missatge...'; $messages['messagesaved'] = 'Missatge desat a Esborranys.'; $messages['successfullysaved'] = 'Desat correctament.'; +$messages['savingresponse'] = 'S\'està desant el text de resposta...'; +$messages['deleteresponseconfirm'] = 'Esteu segurs de voler suprimir aquest text de resposta?'; $messages['addedsuccessfully'] = 'Contacte afegit correctament a la llibreta d\'adreces.'; $messages['contactexists'] = 'Ja hi ha un contacte amb aquesta adreça de correu.'; $messages['contactnameexists'] = 'Ja existeix un contacte amb el mateix nom.'; -$messages['blockedimages'] = 'Per protegir la vostra privacitat, les imatges remotes han estat bloquejades en aquest missatge.'; +$messages['blockedimages'] = 'Per protegir la vostra privadesa, les imatges remotes han estat bloquejades en aquest missatge.'; $messages['encryptedmessage'] = 'Aquest és un missatge xifrat i no pot ser mostrat. Ho sento!'; $messages['nocontactsfound'] = 'No s\'ha trobat cap contacte.'; $messages['contactnotfound'] = 'No s\'ha trobat el contacte sol·licitat.'; $messages['contactsearchonly'] = 'Introduïu termes de cerca per trobar contactes'; $messages['sendingfailed'] = 'Error enviant el missatge.'; $messages['senttooquickly'] = 'Si us plau, espereu $sec segon(s) abans d\'enviar aquest missatge.'; +$messages['errorsavingsent'] = 'S\'ha produït un error mentre es desava el missatge enviat.'; +$messages['errorsaving'] = 'S\'ha produït un error mentre es desava.'; $messages['errormoving'] = 'No s\'ha pogut moure el(s) missatge(s).'; $messages['errorcopying'] = 'No s\'ha pogut copiar el(s) missatge(s).'; $messages['errordeleting'] = 'No s\'ha pogut suprimir el(s) missatge(s).'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'Si us plau, introduïu com a mÃnim un destin $messages['nosubjectwarning'] = 'El camp "Assumpte" és buit. Voleu introduir-ne un ara?'; $messages['nobodywarning'] = 'Voleu enviar aquest missatge sense text?'; $messages['notsentwarning'] = 'El missatge no s\'ha enviat. Voleu descartar el vostre missatge?'; +$messages['restoresavedcomposedata'] = 'S\'ha trobat un missatge començat però que no ha estat enviat.\n\nAssumpte: $subject\nDesat: $date\n\nVoleu recuperar aquest missatge?'; $messages['noldapserver'] = 'Si us plau, seleccioneu un servidor LDAP per cercar.'; $messages['nosearchname'] = 'Si us plau, introduïu un nom de contacte o una adreça de correu.'; $messages['notuploadedwarning'] = 'Encara no s\'han pujat tots els adjunts. Si us plau, espereu o cancel·leu la pujada.'; @@ -112,7 +118,7 @@ $messages['markingmessage'] = 'S\'està marcant missatge(s)...'; $messages['addingmember'] = 'S\'està afegint contacte(s) al grup...'; $messages['removingmember'] = 'S\'està suprimint contacte(s) del grup...'; $messages['receiptsent'] = 'Confirmació de lectura enviada correctament.'; -$messages['errorsendingreceipt'] = 'No es pot enviar la confirmació.'; +$messages['errorsendingreceipt'] = 'No s\'ha pogut enviar la confirmació.'; $messages['deleteidentityconfirm'] = 'Esteu segurs de voler suprimir aquesta identitat?'; $messages['nodeletelastidentity'] = 'No podeu suprimir aquesta identitat, és l\'última.'; $messages['forbiddencharacter'] = 'El nom de carpeta conté un carà cter no permès.'; @@ -129,7 +135,7 @@ $messages['importmessagesuccess'] = '<b>S\'han importat $nr missatges correctame $messages['importmessageerror'] = 'La importació ha fallat. El fitxer que heu pujat no és un fitxer de missatges và lid o no és un fitxer de bústia.'; $messages['opnotpermitted'] = 'Operació no permesa!'; $messages['nofromaddress'] = 'Falta l\'adreça de correu a la identitat seleccionada.'; -$messages['editorwarning'] = 'Si canvieu a l\'editor de text pla perdreu tot el format del text. Voleu continuar?'; +$messages['editorwarning'] = 'Si canvieu a l\'editor de text net perdreu tot el format del text. Voleu continuar?'; $messages['httpreceivedencrypterror'] = 'Hi ha hagut un error fatal de configuració. Contacteu amb el vostre administrador immediatament. <b>El vostre missatge no pot ser enviat.</b>'; $messages['smtpconnerror'] = 'Error SMTP ($code): La connexió al servidor ha fallat.'; $messages['smtpautherror'] = 'Error SMTP ($code): La identificació ha fallat.'; @@ -138,8 +144,9 @@ $messages['smtptoerror'] = 'Error SMTP ($code): No s\'ha pogut posar "$to" com a $messages['smtprecipientserror'] = 'Error SMTP: No s\'ha pogut analitzar la llista de destinataris.'; $messages['smtperror'] = 'Error SMTP: $msg'; $messages['emailformaterror'] = 'Adreça de correu no và lida: $email'; -$messages['toomanyrecipients'] = 'Massa destinataris. Reduïu el nombre de destinataris a $max.'; +$messages['toomanyrecipients'] = 'Hi ha masses destinataris. Reduïu el nombre de destinataris a $max.'; $messages['maxgroupmembersreached'] = 'El nombre de membres del grup excedeix el mà xim de $max.'; +$messages['internalerror'] = 'S\'ha produït un error intern. Si us plau torneu-ho a provar.'; $messages['contactdelerror'] = 'No s\'han pogut suprimir el(s) contacte(s).'; $messages['contactdeleted'] = 'Contacte(s) suprimit(s) correctament.'; $messages['contactrestoreerror'] = 'No s\'ha pogut restaurar el(s) contacte(s) suprimit(s).'; @@ -148,7 +155,7 @@ $messages['groupdeleted'] = 'Grup suprimit correctament.'; $messages['grouprenamed'] = 'Grup reanomenat correctament.'; $messages['groupcreated'] = 'Grup creat correctament.'; $messages['savedsearchdeleted'] = 'S\'ha suprimit correctament la cerca desada.'; -$messages['savedsearchdeleteerror'] = 'No s\'ha pogut suprimit la cerca desada.'; +$messages['savedsearchdeleteerror'] = 'No s\'ha pogut suprimir la cerca desada.'; $messages['savedsearchcreated'] = 'S\'ha creat correctament la cerca desada.'; $messages['savedsearchcreateerror'] = 'No s\'ha pogut crear la cerca desada.'; $messages['messagedeleted'] = 'Missatge(s) suprimit(s) correctament.'; @@ -166,5 +173,5 @@ $messages['mispellingsfound'] = 'S\'han detectat errors d\'ortografia al missatg $messages['parentnotwritable'] = 'No s\'ha pogut crear/moure la carpeta dins de la carpeta ascendent seleccionada. No hi ha permisos d\'escriptura.'; $messages['messagetoobig'] = 'La part del missatge és massa gran per processar-la.'; $messages['attachmentvalidationerror'] = 'ATENCIÓ! Aquest adjunt és sospitós perquè el seu tipus no coincideix amb el tipus declarat al missatge. Si no confieu en l\'emissor, no l\'haurÃeu d\'obrir al navegador perquè pot contenir elements maliciosos. <br/><br/><em>S\'esperava: $expected; s\'ha trobat: $detected</em>'; -$messages['noscriptwarning'] = 'Atenció: Aquest client de correu necessita Javascript! Per a poder fer-lo servir, heu d\'activar Javascript a les opcions del navegador.'; +$messages['noscriptwarning'] = 'Atenció: Aquest client de correu necessita Javascript! Per a poder fer-lo servir heu d\'activar Javascript a les opcions del navegador.'; ?> diff --git a/program/localization/cs_CZ/labels.inc b/program/localization/cs_CZ/labels.inc index d887d8d0a..2c94306e5 100644 --- a/program/localization/cs_CZ/labels.inc +++ b/program/localization/cs_CZ/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from - $to z $count'; $labels['copy'] = 'KopÃrovat'; $labels['move'] = 'PÅ™esunout'; $labels['moveto'] = 'pÅ™esunout do...'; +$labels['copyto'] = 'KopÃrovat do...'; $labels['download'] = 'stáhnout'; $labels['open'] = 'OtevÅ™Ãt'; $labels['showattachment'] = 'Zobrazit'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Pravopis'; $labels['checkspelling'] = 'Zkontrolovat pravopis'; $labels['resumeediting'] = 'PokraÄovat v úpravách'; $labels['revertto'] = 'PÅ™ejÃt na'; +$labels['restore'] = 'Obnovit'; +$labels['restoremessage'] = 'Obnovit zprávu?'; +$labels['responses'] = 'OdpovÄ›di'; +$labels['insertresponse'] = 'Vložit odpovÄ›d'; +$labels['manageresponses'] = 'Spravovat odpovÄ›dÃ'; +$labels['savenewresponse'] = 'Uložit novou odpovÄ›Ä'; +$labels['editresponses'] = 'Upravit odpovÄ›di'; +$labels['editresponse'] = 'Upravit odpovÄ›Ä'; +$labels['responsename'] = 'Název'; +$labels['responsetext'] = 'Text odpovÄ›di'; $labels['attach'] = 'PÅ™iložit'; $labels['attachments'] = 'PÅ™Ãlohy'; $labels['upload'] = 'Nahrát'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Zacházet s vyskakovacÃmi okny jako se standardnà $labels['forwardmode'] = 'PÅ™eposlat zprávu'; $labels['inline'] = 'vloženÄ›'; $labels['asattachment'] = 'jako pÅ™Ãlohu'; +$labels['replyallmode'] = 'Výchozà akce tlaÄÃtka [OdpovÄ›dÄ›t vÅ¡em]'; +$labels['replyalldefault'] = 'odpovÄ›dÄ›t vÅ¡em'; +$labels['replyalllist'] = 'odpovÄ›dÄ›t pouze do poÅ¡tovnà konference (pokud je nalezena)'; $labels['folder'] = 'Složka'; $labels['folders'] = 'Složky'; $labels['foldername'] = 'Jméno složky'; diff --git a/program/localization/cs_CZ/messages.inc b/program/localization/cs_CZ/messages.inc index 0bd6b0e82..37f5280e8 100644 --- a/program/localization/cs_CZ/messages.inc +++ b/program/localization/cs_CZ/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -33,6 +33,7 @@ $messages['invalidhost'] = 'Å patné jméno serveru.'; $messages['nomessagesfound'] = 'Ve schránce nebyla nalezena žádná zpráva'; $messages['loggedout'] = 'Byli jste úspěšnÄ› odhlášeni. Na shledanou!'; $messages['mailboxempty'] = 'Schránka je prázdná'; +$messages['nomessages'] = 'Žádné zprávy'; $messages['refreshing'] = 'Obnovuji...'; $messages['loading'] = 'NaÄÃtám...'; $messages['uploading'] = 'Nahrávám soubor...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Zpráva byla odeslána'; $messages['savingmessage'] = 'Ukládám zprávu...'; $messages['messagesaved'] = 'Zpráva uložena do Rozepsané'; $messages['successfullysaved'] = 'Uloženo'; +$messages['savingresponse'] = 'Ukládám text odpovÄ›di...'; +$messages['deleteresponseconfirm'] = 'Opravdu chcete odstranit tento text odpovÄ›di?'; $messages['addedsuccessfully'] = 'Kontakt byl úspěšnÄ› pÅ™idán do adresáře'; $messages['contactexists'] = 'Kontakt se zadanou e-mailovou adresou již existuje'; $messages['contactnameexists'] = 'Kontakt se stejným jménem již existuje'; @@ -80,6 +83,7 @@ $messages['norecipientwarning'] = 'Zadejte, prosÃm, alespoň jednoho pÅ™Ãjemce $messages['nosubjectwarning'] = 'PÅ™edmÄ›t nebyl vyplňen. PÅ™ejete si jej zadat nynÃ?'; $messages['nobodywarning'] = 'Opravdu chtete odeslat prázdnou zprávu?'; $messages['notsentwarning'] = 'Zpráva nebyla odeslána. PÅ™ejete si zprávu zahodit?'; +$messages['restoresavedcomposedata'] = 'Byla nalezena dÅ™Ãve vytvoÅ™ená ale neodeslaná zpráva.\n\nPÅ™edmÄ›t: $subject\nUloženo: $date\n\nPÅ™ejete si obnovit tuto zprávu?'; $messages['noldapserver'] = 'Zvolte, prosÃm, LDAP server k hledánÃ'; $messages['nosearchname'] = 'Zadejte, prosÃm, jméno nebo e-mail kontaktu'; $messages['notuploadedwarning'] = 'JeÅ¡tÄ› nebyly nahrány vÅ¡echny pÅ™Ãlohy. PoÄkejte prosÃm nebo nahrávánà zruÅ¡te.'; diff --git a/program/localization/cy_GB/labels.inc b/program/localization/cy_GB/labels.inc index 37ee5bbc1..770df3bff 100644 --- a/program/localization/cy_GB/labels.inc +++ b/program/localization/cy_GB/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from - $to o $count'; $labels['copy'] = 'Copio'; $labels['move'] = 'Symud'; $labels['moveto'] = 'Symud i...'; +$labels['copyto'] = 'Copio i...'; $labels['download'] = 'Llwytho lawr'; $labels['open'] = 'Agor'; $labels['showattachment'] = 'Dangos'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Sillafu'; $labels['checkspelling'] = 'Gwirio sillafu'; $labels['resumeediting'] = 'Ail-ddechrau golygu'; $labels['revertto'] = 'Dychwelyd i'; +$labels['restore'] = 'Adfer'; +$labels['restoremessage'] = 'Adfer neges?'; +$labels['responses'] = 'Ymatebion'; +$labels['insertresponse'] = 'Mewnosod ymateb'; +$labels['manageresponses'] = 'Rheoli ymatebion'; +$labels['savenewresponse'] = 'Cadw ymateb newydd'; +$labels['editresponses'] = 'Golygu ymatebion'; +$labels['editresponse'] = 'Golygu ymateb'; +$labels['responsename'] = 'Enw'; +$labels['responsetext'] = 'Testun Ymateb'; $labels['attach'] = 'Atodi'; $labels['attachments'] = 'Atodiadau'; $labels['upload'] = 'Llwytho fyny'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Trin ffenestri naid fel ffenestri arferol'; $labels['forwardmode'] = 'Danfon neges ymlaen'; $labels['inline'] = 'mewnlin'; $labels['asattachment'] = 'fel atodiad'; +$labels['replyallmode'] = 'Gweithred diofyn botwm [Ymateb i bawb]'; +$labels['replyalldefault'] = 'ymateb i bawb'; +$labels['replyalllist'] = 'ymateb i\'r rhestr trafod yn unig (os canfuwyd)'; $labels['folder'] = 'Ffolder'; $labels['folders'] = 'Ffolderi'; $labels['foldername'] = 'Enw ffolder'; diff --git a/program/localization/cy_GB/messages.inc b/program/localization/cy_GB/messages.inc index 5dd8230c7..5c0ef7e8d 100644 --- a/program/localization/cy_GB/messages.inc +++ b/program/localization/cy_GB/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -16,10 +16,10 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ $messages['errortitle'] = 'Fe gafwyd gwall!'; -$messages['loginfailed'] = 'Methwyd a\'ch mewngofnodi'; -$messages['cookiesdisabled'] = 'Nid yw eich porwr yn derbyn cwcis'; -$messages['sessionerror'] = 'Mae\'r sesiwn yn anghywir neu wedi dod i ben'; -$messages['storageerror'] = 'Methwyd cysylltu a\'r gweinydd IMAP'; +$messages['loginfailed'] = 'Methwyd mewngofnodi.'; +$messages['cookiesdisabled'] = 'Nid yw eich porwr yn derbyn cwcis.'; +$messages['sessionerror'] = 'Mae\'r sesiwn yn anghywir neu wedi dod i ben.'; +$messages['storageerror'] = 'Methwyd cysylltu a\'r gweinydd storfa.'; $messages['servererror'] = 'Gwall Gweinydd!'; $messages['servererrormsg'] = 'Gwall Gweinydd: $msg'; $messages['dberror'] = 'Gwall Cronfa Ddata!'; @@ -32,7 +32,6 @@ $messages['invalidrequest'] = 'Cais annilys! Ni chadwyd unrhyw wybodaeth.'; $messages['invalidhost'] = 'Enw gweinydd annilys.'; $messages['nomessagesfound'] = 'Dim negeseuon wedi eu canfod yn y blwch hwn'; $messages['loggedout'] = 'Rydych wedi gorffen y sesiwn yn llwyddianus. Hwyl fawr!'; -$messages['mailboxempty'] = 'Blwch yn wag'; $messages['refreshing'] = 'Yn adnewyddu...'; $messages['loading'] = 'Yn llwytho...'; $messages['uploading'] = 'Yn llwytho ffeil i fyny...'; @@ -44,6 +43,8 @@ $messages['messagesent'] = 'Danfonwyd y neges yn llwyddiannus'; $messages['savingmessage'] = 'Yn cadw neges...'; $messages['messagesaved'] = 'Cadwyd neges i\'r Drafftiau'; $messages['successfullysaved'] = 'Cadwyd yn llwyddiannus'; +$messages['savingresponse'] = 'Yn cadw testun ymateb...'; +$messages['deleteresponseconfirm'] = 'Ydych chi wir am ddileu y testun ymateb hwn?'; $messages['addedsuccessfully'] = 'Cyswllt wedi ei ychwanegu i\'r llyfr cyfeiriadau yn llwyddiannus'; $messages['contactexists'] = 'Mae cyswllt gyda\'r cyfeiriad e-bost yma yn bodoli\'n barod'; $messages['contactnameexists'] = 'Mae cyswllt gyda\'r un enw yn bodoli yn barod.'; @@ -54,6 +55,8 @@ $messages['contactnotfound'] = 'Ni gafwyd hyd i\'r cysylltiad gofynnwyd amdano'; $messages['contactsearchonly'] = 'Rhowch dermau chwilio i ganfod cysylltiadau'; $messages['sendingfailed'] = 'Methwyd danfon y neges'; $messages['senttooquickly'] = 'Arhoswch $sec eiliad cyn danfon y neges'; +$messages['errorsavingsent'] = 'Fe gafwyd gwall wrth gadw\'r neges ddanfonwyd.'; +$messages['errorsaving'] = 'Fe gafwyd gwall wrth gadw'; $messages['errormoving'] = 'Methwyd symud y neges'; $messages['errorcopying'] = 'Methwyd copïo\'r neges(euon)'; $messages['errordeleting'] = 'Methwyd dileu y neges'; @@ -78,6 +81,7 @@ $messages['norecipientwarning'] = 'Rhowch o leiaf un derbynnydd'; $messages['nosubjectwarning'] = 'Mae\'r pennawd "Pwnc" yn wag. Hoffech chi roi un fewn nawr?'; $messages['nobodywarning'] = 'Danfon y neges hwn heb destun?'; $messages['notsentwarning'] = 'Ni ddanfonwyd y neges. Hoffech chi gael gwared a\'r neges?'; +$messages['restoresavedcomposedata'] = 'Cafwyd hyd i neges wedi ei ysgrifennu o\'r blaen ond heb ei ddanfon.\n\nPwnc: $subject\nCadwyd: $date\n\nYdych chi am adfer y neges?'; $messages['noldapserver'] = 'Dewiswch weinydd ldap i chwilio'; $messages['nosearchname'] = 'Rhowch enw cyswllt neu gyfeiriad e-bost'; $messages['notuploadedwarning'] = 'Nid yw pob atodiad wedi eu llwytho i fyny eto. Triwch eto neu canslo.'; @@ -140,6 +144,7 @@ $messages['smtperror'] = 'Gwall SMTP: $msg'; $messages['emailformaterror'] = 'Cyfeiriad e-bost anghywir: $email'; $messages['toomanyrecipients'] = 'Gormod o dderbynnwyr. Lleihewch y nifer i $max'; $messages['maxgroupmembersreached'] = 'Mae nifer o aelodau\'r grŵp yn fwy na\'r uchafswm o $max'; +$messages['internalerror'] = 'Fe gafwyd gwall mewnol. Rhowch gynnig arni eto.'; $messages['contactdelerror'] = 'Methwyd dileu cyswllt'; $messages['contactdeleted'] = 'Cyswllt wedi ei ddileu yn llwyddiannus'; $messages['contactrestoreerror'] = 'Methwyd adfer y cyswllt/cysylltiadau a ddilëwyd'; diff --git a/program/localization/da_DK/labels.inc b/program/localization/da_DK/labels.inc index 52de86d92..66103ad63 100644 --- a/program/localization/da_DK/labels.inc +++ b/program/localization/da_DK/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to af $count'; $labels['copy'] = 'Kopiér'; $labels['move'] = 'Flyt'; $labels['moveto'] = 'Flyt til...'; +$labels['copyto'] = 'Kopier til...'; $labels['download'] = 'Download'; $labels['open'] = 'Ã…ben'; $labels['showattachment'] = 'Vis'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Stav'; $labels['checkspelling'] = 'Stavekontrol'; $labels['resumeediting'] = 'Genoptag redigering'; $labels['revertto'] = 'Vend tilbage til'; +$labels['restore'] = 'Gendan'; +$labels['restoremessage'] = 'Gendan besked'; +$labels['responses'] = 'Svar'; +$labels['insertresponse'] = 'Indsæt et svar'; +$labels['manageresponses'] = 'Administrer svar'; +$labels['savenewresponse'] = 'Gem et nyt svar'; +$labels['editresponses'] = 'Rediger svar'; +$labels['editresponse'] = 'Rediger svar'; +$labels['responsename'] = 'Navn'; +$labels['responsetext'] = 'Svartekst'; $labels['attach'] = 'Vedhæft'; $labels['attachments'] = 'Vedhæftninger'; $labels['upload'] = 'Overfør'; @@ -316,7 +327,11 @@ $labels['searchdelete'] = 'Slet søgning'; $labels['import'] = 'Importér'; $labels['importcontacts'] = 'Importér kontakter'; $labels['importfromfile'] = 'Importér fra fil:'; +$labels['importtarget'] = 'Tilføj kontakter til'; $labels['importreplace'] = 'Overskriv hele adressebogen'; +$labels['importgroups'] = 'Importer gruppetildelinger'; +$labels['importgroupsall'] = 'Alle (opret grupper hvis nødvendigt)'; +$labels['importgroupsexisting'] = 'Kun for eksisterende grupper'; $labels['importdesc'] = 'Du kan uploade kontakter fra en eksisterende adressebog. <br/>I øjeblikket supportere vi import af adresser fra <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> og CSV (komma-separeret) data format.'; $labels['done'] = 'Færdig'; $labels['settingsfor'] = 'Indstillinger for'; @@ -424,6 +439,9 @@ $labels['standardwindows'] = 'Behandl popups som standardvinduer'; $labels['forwardmode'] = 'Videresendelse af besked'; $labels['inline'] = 'inline'; $labels['asattachment'] = 'som vedhæftning'; +$labels['replyallmode'] = 'Standardhandling til [Svar alle]-knap'; +$labels['replyalldefault'] = 'Svar til alle'; +$labels['replyalllist'] = 'svar kun til mail-liste (hvis fundet)'; $labels['folder'] = 'Mappe'; $labels['folders'] = 'Mapper'; $labels['foldername'] = 'Mappenavn'; diff --git a/program/localization/da_DK/messages.inc b/program/localization/da_DK/messages.inc index c12236eef..1328ed288 100644 --- a/program/localization/da_DK/messages.inc +++ b/program/localization/da_DK/messages.inc @@ -44,6 +44,8 @@ $messages['messagesent'] = 'Beskeden blev afsendt succesfuldt.'; $messages['savingmessage'] = 'Gemmer besked...'; $messages['messagesaved'] = 'Beskeden er gemt i kladdemappen.'; $messages['successfullysaved'] = 'Gemt succesfuldt'; +$messages['savingresponse'] = 'Gemmer svartekst...'; +$messages['deleteresponseconfirm'] = 'Er du sikker pÃ¥, at du ønsker at slette svarteksten?'; $messages['addedsuccessfully'] = 'Kontakten blev tilføjet adressebogen.'; $messages['contactexists'] = 'Der er allerede en kontakt med denne e-mailadresse.'; $messages['contactnameexists'] = 'En kontakt med samme navn eksisterer allerede.'; @@ -54,6 +56,8 @@ $messages['contactnotfound'] = 'Den søgte kontakt blev ikke fundet.'; $messages['contactsearchonly'] = 'Indtast søgeord for at finde kontakter.'; $messages['sendingfailed'] = 'Beskeden kunne ikke sendes.'; $messages['senttooquickly'] = 'Vent venligst $sec sekunder før du sender denne besked.'; +$messages['errorsavingsent'] = 'Der opstod en fejl ved at gemme den sendte besked.'; +$messages['errorsaving'] = 'Der opstod en fejl ved at gemme.'; $messages['errormoving'] = 'Beskeden kunne ikke flyttes.'; $messages['errorcopying'] = 'Beskeden kunne ikke kopieres.'; $messages['errordeleting'] = 'Beskeden kunne ikke slettes.'; @@ -78,6 +82,7 @@ $messages['norecipientwarning'] = 'Indtast mindst én modtager.'; $messages['nosubjectwarning'] = '\'Emne\'-feltet er tomt. Kunne du tænke dig at skrive et nu?'; $messages['nobodywarning'] = 'Send denne besked uden tekst?'; $messages['notsentwarning'] = 'Beskeden er ikke sendt. Vil du kassere din besked?'; +$messages['restoresavedcomposedata'] = 'En tidligere skreven men usendt besked blev fundet.\n\nEmne: $subject\nGemt: $date\n\nØnsker du at gendanne denne besked?'; $messages['noldapserver'] = 'Vælg venligst hvilken LDAP-server der skal søges i.'; $messages['nosearchname'] = 'Indtast venligst en kontakts navn eller e-mailadresse.'; $messages['notuploadedwarning'] = 'Ikke alle vedhæftede filer er blevet uploadet endnu. Vent venligst eller afbryd upload.'; @@ -140,6 +145,7 @@ $messages['smtperror'] = 'SMTP fejl: $msg'; $messages['emailformaterror'] = 'Ugyldig e-mailadresse: $email'; $messages['toomanyrecipients'] = 'For mange modtagere. Reducer antallet af modtagere til $max.'; $messages['maxgroupmembersreached'] = 'Antallet af gruppemedlemmer overstiger maksimum pÃ¥ $max.'; +$messages['internalerror'] = 'En intern fejl opstod. Prøv venligst igen.'; $messages['contactdelerror'] = 'Kunne ikke slette kontakt(er).'; $messages['contactdeleted'] = 'Kontakt(er) slettet.'; $messages['contactrestoreerror'] = 'Kunne ikke gendanne slettede kontakt(er).'; diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc index e5fe1ec66..f53640ab5 100644 --- a/program/localization/de_CH/labels.inc +++ b/program/localization/de_CH/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to von $count'; $labels['copy'] = 'Kopieren'; $labels['move'] = 'Verschieben'; $labels['moveto'] = 'Verschieben nach...'; +$labels['copyto'] = 'Kopieren nach...'; $labels['download'] = 'Download'; $labels['open'] = 'Öffnen'; $labels['showattachment'] = 'Anzeigen'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Rechtschreibung'; $labels['checkspelling'] = 'Rechtschreibung prüfen'; $labels['resumeediting'] = 'Bearbeitung fortsetzen'; $labels['revertto'] = 'Zurück zu'; +$labels['restore'] = 'Wiederherstellen'; +$labels['restoremessage'] = 'Nachricht wiederherstellen?'; +$labels['responses'] = 'Antworten'; +$labels['insertresponse'] = 'Antwort einfügen'; +$labels['manageresponses'] = 'Antworten verwalten'; +$labels['savenewresponse'] = 'Neue Antwort speichern'; +$labels['editresponses'] = 'Antworten bearbeiten'; +$labels['editresponse'] = 'Antwort bearbeiten'; +$labels['responsename'] = 'Name'; +$labels['responsetext'] = 'Antworttext'; $labels['attach'] = 'Anhängen'; $labels['attachments'] = 'Anhänge'; $labels['upload'] = 'Hochladen'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Popups als normale Browserfenster öffnen'; $labels['forwardmode'] = 'Weiterleiten einer Nachricht'; $labels['inline'] = 'eingebettet'; $labels['asattachment'] = 'als Anhang'; +$labels['replyallmode'] = 'Standard Funktion für [Allen antworten]'; +$labels['replyalldefault'] = 'Allen antworten'; +$labels['replyalllist'] = 'Nur der Mailing-Liste antworten (falls vorhanden)'; $labels['folder'] = 'Ordner'; $labels['folders'] = 'Ordner'; $labels['foldername'] = 'Ordnername'; diff --git a/program/localization/de_CH/messages.inc b/program/localization/de_CH/messages.inc index 4e5ccaa46..63a1411d0 100644 --- a/program/localization/de_CH/messages.inc +++ b/program/localization/de_CH/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -33,6 +33,7 @@ $messages['invalidhost'] = 'Ungültiger Servername'; $messages['nomessagesfound'] = 'Keine Nachrichten in diesem Ordner'; $messages['loggedout'] = 'Sie haben Ihre Session erfolgreich beendet. Auf Wiedersehen!'; $messages['mailboxempty'] = 'Ordner ist leer'; +$messages['nomessages'] = 'Keine Nachrichten'; $messages['refreshing'] = 'Aktualisiere...'; $messages['loading'] = 'Daten werden geladen...'; $messages['uploading'] = 'Datei wird hochgeladen...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Nachricht erfolgreich gesendet'; $messages['savingmessage'] = 'Nachricht wird gespeichert...'; $messages['messagesaved'] = 'Nachricht als Entwurf gespeichert'; $messages['successfullysaved'] = 'Erfolgreich gespeichert'; +$messages['savingresponse'] = 'Antwort wird gespeichert...'; +$messages['deleteresponseconfirm'] = 'Wollen Sie diese Antwort wirklich löschen?'; $messages['addedsuccessfully'] = 'Kontakt zum Adressbuch hinzugefügt'; $messages['contactexists'] = 'Es existiert bereits ein Kontakt mit dieser E-Mail-Adresse.'; $messages['contactnameexists'] = 'Es existiert bereits ein Kontakt mit diesem Namen'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'Die gewählte Adresse wurde nicht gefunden'; $messages['contactsearchonly'] = 'Geben Sie einen Suchbegriff ein, um Kontakte zu finden'; $messages['sendingfailed'] = 'Versand der Nachricht fehlgeschlagen'; $messages['senttooquickly'] = 'Bitte warten Sie $sec Sekunde(n) vor dem Senden dieser Nachricht'; +$messages['errorsavingsent'] = 'Beim Speichern der gesendeten Nachricht ist ein Fehler aufgetreten.'; +$messages['errorsaving'] = 'Beim Speichern ist ein Fehler aufgetreten.'; $messages['errormoving'] = 'Nachricht(en) konnte(n) nicht verschoben werden.'; $messages['errorcopying'] = 'Nachticht(en) konnte(n) nicht kopiert werden.'; $messages['errordeleting'] = 'Nachricht(en) konnte(n) nicht gelöscht werden.'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'Bitte geben Sie mindestens einen Empfänger a $messages['nosubjectwarning'] = 'Die Betreffzeile ist leer. Möchten Sie jetzt einen Betreff eingeben?'; $messages['nobodywarning'] = 'Wollen Sie diese Nachricht ohne Inhalt senden?'; $messages['notsentwarning'] = 'Ihre Nachricht wurde nicht gesendet. Wollen Sie die Nachricht verwerfen?'; +$messages['restoresavedcomposedata'] = 'Eine zuvor verfasste aber nicht gesendete Nachricht wurde gefunden.\n\nBetreff: $subject\nGespeichert: $date\n\nWollen Sie diese Nachricht wiederherstellen?'; $messages['noldapserver'] = 'Bitte wählen Sie einen LDAP-Server aus'; $messages['nosearchname'] = 'Bitte geben Sie einen Namen oder eine E-Mail-Adresse ein.'; $messages['notuploadedwarning'] = 'Es wurden noch nicht alle Dateien hochgeladen. Bitte warten oder Upload abbrechen.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'SMTP Fehler: $msg'; $messages['emailformaterror'] = 'Ungültige E-Mail-Adresse: $email'; $messages['toomanyrecipients'] = 'Zuviele Empfänger angegeben. Reduzieren Sie die Empfängeradressen auf $max.'; $messages['maxgroupmembersreached'] = 'Die Anzahl Adressen in dieser Gruppe überschreitet das Maximum von $max.'; +$messages['internalerror'] = 'Ein interner Fehler ist aufgetreten. Bitte versuchen Sie den Vorgang erneut.'; $messages['contactdelerror'] = 'Fehler beim Löschen.'; $messages['contactdeleted'] = 'Kontakt(e) erfolgreich gelöscht.'; $messages['contactrestoreerror'] = 'Die gelöschten Kontakte konnten nicht wiederhergestellt werden.'; diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc index e3f4652cc..e0a347e42 100644 --- a/program/localization/de_DE/labels.inc +++ b/program/localization/de_DE/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to von $count'; $labels['copy'] = 'Kopieren'; $labels['move'] = 'Verschieben'; $labels['moveto'] = 'Verschieben nach...'; +$labels['copyto'] = 'Kopieren nach...'; $labels['download'] = 'Herunterladen'; $labels['open'] = 'Offen'; $labels['showattachment'] = 'Anzeigen'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Rechtschreibung'; $labels['checkspelling'] = 'Rechtschreibung prüfen'; $labels['resumeediting'] = 'Bearbeitung fortsetzen'; $labels['revertto'] = 'Zurück zu'; +$labels['restore'] = 'Wiederherstellen'; +$labels['restoremessage'] = 'Nachricht wiederherstellen?'; +$labels['responses'] = 'Schnellantworten'; +$labels['insertresponse'] = 'Schnellantwort hinzufügen'; +$labels['manageresponses'] = 'Schnellantworten verwalten'; +$labels['savenewresponse'] = 'Neue Schnellantwort speichern'; +$labels['editresponses'] = 'Schnellantworten bearbeiten'; +$labels['editresponse'] = 'Schnellantwort bearbeiten'; +$labels['responsename'] = 'Name'; +$labels['responsetext'] = 'Text der Antwort'; $labels['attach'] = 'Anhängen'; $labels['attachments'] = 'Anhänge'; $labels['upload'] = 'Hochladen'; @@ -318,6 +329,8 @@ $labels['importcontacts'] = 'Kontakte importieren'; $labels['importfromfile'] = 'Import aus Datei:'; $labels['importtarget'] = 'Kontakte hinzufügen zu'; $labels['importreplace'] = 'Bestehendes Adressbuch komplett ersetzen'; +$labels['importgroups'] = 'Gruppenzuordnungen importieren'; +$labels['importgroupsall'] = 'Alle (Gruppen erstellen wenn nötig)'; $labels['importgroupsexisting'] = 'Nur für existierende Gruppen'; $labels['importdesc'] = 'Sie können Kontakte von einem vorhandenen Adressbuch hochladen.<br/>Zur Zeit wird der Import von Adressen im <a href="http://de.wikipedia.org/wiki/VCard">vCard</a> oder <a href="http://de.wikipedia.org/wiki/CSV_(Dateiformat)">CSV</a>Format unterstützt.'; $labels['done'] = 'Fertig'; @@ -426,6 +439,9 @@ $labels['standardwindows'] = 'Popups als Standard Windows behandeln'; $labels['forwardmode'] = 'Nachrichtenweiterleitung'; $labels['inline'] = 'eingebettet'; $labels['asattachment'] = 'als Anhang'; +$labels['replyallmode'] = 'Standardaktion des "Allen antworten" Button'; +$labels['replyalldefault'] = 'Allen antworten'; +$labels['replyalllist'] = 'Nur der Mailingliste antworten (wenn gefunden)'; $labels['folder'] = 'Ordner'; $labels['folders'] = 'Ordner'; $labels['foldername'] = 'Ordnername'; diff --git a/program/localization/de_DE/messages.inc b/program/localization/de_DE/messages.inc index fbc21521a..d9e6d9687 100644 --- a/program/localization/de_DE/messages.inc +++ b/program/localization/de_DE/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,8 @@ $messages['invalidrequest'] = 'Ungültige Anfrage! Es wurden keine Daten gespeic $messages['invalidhost'] = 'Ungültiger Server Name'; $messages['nomessagesfound'] = 'Keine Nachrichten in diesem Ordner.'; $messages['loggedout'] = 'Sie haben Ihre Sitzung erfolgreich beendet. Auf Wiedersehen!'; -$messages['mailboxempty'] = 'Mailbox ist leer.'; +$messages['mailboxempty'] = 'Mailbox ist leer'; +$messages['nomessages'] = 'Keine Nachrichten'; $messages['refreshing'] = 'Aktualisieren…'; $messages['loading'] = 'Wird geladen...'; $messages['uploading'] = 'Datei wird hochgeladen...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Nachricht erfolgreich gesendet.'; $messages['savingmessage'] = 'Nachricht wird gespeichert...'; $messages['messagesaved'] = 'Nachricht als Entwurf gespeichert.'; $messages['successfullysaved'] = 'Erfolgreich gespeichert.'; +$messages['savingresponse'] = 'Antwortvorlage wird gespeichert...'; +$messages['deleteresponseconfirm'] = 'Möchten Sie diese Vorlage wirklich löschen?'; $messages['addedsuccessfully'] = 'Kontakt zum Adressbuch hinzugefügt.'; $messages['contactexists'] = 'Es existiert bereits ein Kontakt mit dieser E-Mail-Adresse.'; $messages['contactnameexists'] = 'Ein Kontakt mit dem gleichen Namen existiert bereits.'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'Der angeforderte Kontakt wurde nicht gefunden.'; $messages['contactsearchonly'] = 'Geben Sie einen Suchbegriff ein, um Kontakte zu finden.'; $messages['sendingfailed'] = 'Versenden der Nachricht fehlgeschlagen.'; $messages['senttooquickly'] = 'Bitte warten Sie $sec Sekunde(n) vor dem Senden dieser Nachricht.'; +$messages['errorsavingsent'] = 'Ein Fehler ist beim Speichern der gesendeten Nachricht aufgetreten.'; +$messages['errorsaving'] = 'Beim Speichern ist ein Fehler aufgetreten.'; $messages['errormoving'] = 'Nachricht(en) konnte(n) nicht verschoben werden.'; $messages['errorcopying'] = 'Nachticht(en) konnte(n) nicht kopiert werden.'; $messages['errordeleting'] = 'Nachricht(en) konnte(n) nicht gelöscht werden.'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'Bitte geben Sie mindestens einen Empfänger a $messages['nosubjectwarning'] = 'Die Betreffzeile ist leer. Möchten Sie jetzt einen Betreff eingeben?'; $messages['nobodywarning'] = 'Diese Nachricht ohne Inhalt senden?'; $messages['notsentwarning'] = 'Ihre Nachricht wurde nicht gesendet. Wollen Sie die Nachricht verwerfen?'; +$messages['restoresavedcomposedata'] = 'Es wurde ein nicht versandter Entwurf einer Nachricht gefunden.\n\nBetreff: $subject\nGespeichert am: $date\n\nMöchten Sie diese Nachricht wiederherstellen?'; $messages['noldapserver'] = 'Bitte wählen Sie einen LDAP-Server aus.'; $messages['nosearchname'] = 'Bitte geben Sie einen Namen oder eine E-Mail-Adresse ein.'; $messages['notuploadedwarning'] = 'Es wurden noch nicht alle Dateien hochgeladen. Bitte warten oder Upload abbrechen.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'SMTP Fehler: $msg'; $messages['emailformaterror'] = 'Ungültige E-Mail-Adresse: $email'; $messages['toomanyrecipients'] = 'Zuviele Empfänger. Reduzieren Sie die Anzahl Empfängeradressen auf $max.'; $messages['maxgroupmembersreached'] = 'Die Anzahl Adressen in dieser Gruppe überschreitet das Maximum von $max.'; +$messages['internalerror'] = 'Ein interner Fehler ist aufgetreten. Bitte versuchen es erneut.'; $messages['contactdelerror'] = 'Fehler beim Löschen.'; $messages['contactdeleted'] = 'Kontakt(e) erfolgreich gelöscht.'; $messages['contactrestoreerror'] = 'Konnte die gelöschten Kontakte nicht wiederherstellen.'; diff --git a/program/localization/el_GR/labels.inc b/program/localization/el_GR/labels.inc index 2e3ab405c..0362673de 100644 --- a/program/localization/el_GR/labels.inc +++ b/program/localization/el_GR/labels.inc @@ -197,6 +197,11 @@ $labels['spellcheck'] = 'Συλλαβισμός'; $labels['checkspelling'] = 'Έλεγχος οÏθογÏαφίας'; $labels['resumeediting'] = 'ΣυνÎχεια επεξεÏγασίας'; $labels['revertto'] = 'ΕπαναφοÏά στο'; +$labels['restore'] = 'ΕπαναφοÏά'; +$labels['responses'] = 'Απαντήσεις'; +$labels['insertresponse'] = 'Εισάγετε μια απάντηση'; +$labels['manageresponses'] = 'ΔιαχείÏιση απαντήσεων'; +$labels['responsename'] = 'Όνομα'; $labels['attach'] = 'ΕπισÏναψη'; $labels['attachments'] = 'ΣυνημμÎνα'; $labels['upload'] = 'ΦόÏτωση'; @@ -424,6 +429,7 @@ $labels['standardwindows'] = 'ΧειÏιστείτε τα αναδυόμενα Ï $labels['forwardmode'] = 'Î Ïοώθηση μηνυμάτων'; $labels['inline'] = 'με εσνωμάτωση'; $labels['asattachment'] = 'σαν επισÏναψη'; +$labels['replyalldefault'] = 'απάντηση σε όλους'; $labels['folder'] = 'Φάκελος'; $labels['folders'] = 'Φάκελοι'; $labels['foldername'] = 'Όνομα φακÎλου'; diff --git a/program/localization/el_GR/messages.inc b/program/localization/el_GR/messages.inc index be6639d68..44c69bbb3 100644 --- a/program/localization/el_GR/messages.inc +++ b/program/localization/el_GR/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -16,7 +16,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ $messages['errortitle'] = 'Έχει Ï€ÏοκÏψει κάποιο σφάλμα!'; -$messages['loginfailed'] = 'Είσοδος απÎτυχε'; +$messages['loginfailed'] = 'Είσοδος απÎτυχε.'; $messages['cookiesdisabled'] = 'Ο πεÏιηγητής σας (browser) δεν αποδÎχεται cookies'; $messages['sessionerror'] = 'Η συνεδÏία σας είναι άκυÏη ή Îχει λήξει'; $messages['storageerror'] = 'Η σÏνδεση με το διακομιστή IMAP απÎτυχε'; @@ -33,6 +33,7 @@ $messages['invalidhost'] = 'ΆκυÏο όνομα εξυπηÏετητή.'; $messages['nomessagesfound'] = 'Δε βÏÎθηκαν μηνÏματα σε αυτή τη θυÏίδα'; $messages['loggedout'] = 'Έχετε τεÏματίσει επιτυχώς τη συνεδÏία. Αντίο!'; $messages['mailboxempty'] = 'Η θυÏίδα είναι άδεια'; +$messages['nomessages'] = 'ΚανÎνα μήνυμα'; $messages['refreshing'] = 'ΑνανÎωση....'; $messages['loading'] = 'ΦόÏτωση...'; $messages['uploading'] = 'Το αÏχείο φοÏτώνεται...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Μήνυμα εστάλη επιτυχώς'; $messages['savingmessage'] = 'Αποθήκευση μηνÏματος...'; $messages['messagesaved'] = 'Μήνυμα αποθηκεÏτηκε στα Î ÏόχειÏα'; $messages['successfullysaved'] = 'ΑποθηκεÏτηκε επιτυχώς'; +$messages['savingresponse'] = 'ΑποθηκεÏετε το κείμενο απάντησης...'; +$messages['deleteresponseconfirm'] = 'ΣίγουÏα θÎλετε να διαγÏάψετε αυτό το κείμενο απάντησης;'; $messages['addedsuccessfully'] = 'Η επαφή Ï€ÏοστÎθηκε επιτυχώς στις ΕπαφÎÏ‚'; $messages['contactexists'] = 'ΥπάÏχει ήδη επαφή με αυτή τη διεÏθυνση e-mail'; $messages['contactnameexists'] = 'Μια επαφή με το ίδιο όνομα υπάÏχει ήδη.'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'Η ζητοÏμενη επαφή δεν βÏÎθ $messages['contactsearchonly'] = 'Εισάγετε κάποιους ÏŒÏους Ï€Ïος αναζήτηση'; $messages['sendingfailed'] = 'Αποστολή μηνÏματος απÎτυχε'; $messages['senttooquickly'] = 'ΠαÏακαλώ πεÏιμÎνετε $sec δευτεÏόλεπτα, Ï€Ïιν στείλετε το μήνυμα'; +$messages['errorsavingsent'] = 'Î ÏοÎκυψε σφάλμα κατά την αποθήκευση σταλμÎνου μηνÏματος.'; +$messages['errorsaving'] = 'Î ÏοÎκυψε σφάλμα κατά την αποθήκευση.'; $messages['errormoving'] = 'Το μήνυμα δε μποÏοÏσε να μετακινηθεί'; $messages['errorcopying'] = 'Δεν είναι δυνατή η αντιγÏαφή του μηνÏματος/των'; $messages['errordeleting'] = 'Το μήνυμα δε μποÏοÏσε να διαγÏαφεί'; @@ -140,6 +145,7 @@ $messages['smtperror'] = 'Σφάλμα SMTP: $msg'; $messages['emailformaterror'] = 'ΛανθασμÎνη διεÏθνση email: $email'; $messages['toomanyrecipients'] = 'Μεγάλο πλήθος αποδεκτών. Μειώστε τον αÏιθμό των αποδεκτών σε $max.'; $messages['maxgroupmembersreached'] = 'Ο αÏιθμός των μελών της ομάδας υπεÏβαίνει τον μÎγιστο των $max μελών.'; +$messages['internalerror'] = 'Î ÏοÎκυψε εσωτεÏικό σφάλμα. ΠαÏακαλώ δοκιμάστε ξανά.'; $messages['contactdelerror'] = 'Δεν είναι δυνατή η διαγÏαφή της επαφής/ων'; $messages['contactdeleted'] = 'Η επαφή/ÎÏ‚ διαγÏάφηκαν με επιτυχία.'; $messages['contactrestoreerror'] = 'Οι διαγÏαφημενη επαφη(ες) δεν μποÏουν να επαναφεÏθουν.'; diff --git a/program/localization/en_CA/labels.inc b/program/localization/en_CA/labels.inc new file mode 100644 index 000000000..c1c62ff01 --- /dev/null +++ b/program/localization/en_CA/labels.inc @@ -0,0 +1,496 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/<lang>/labels.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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ +*/ +$labels['welcome'] = 'Welcome to $product'; +$labels['username'] = 'Username'; +$labels['password'] = 'Password'; +$labels['server'] = 'Server'; +$labels['login'] = 'Login'; +$labels['logout'] = 'Logout'; +$labels['mail'] = 'Mail'; +$labels['settings'] = 'Settings'; +$labels['addressbook'] = 'Address Book'; +$labels['inbox'] = 'Inbox'; +$labels['drafts'] = 'Drafts'; +$labels['sent'] = 'Sent'; +$labels['trash'] = 'Trash'; +$labels['junk'] = 'Junk'; +$labels['show_real_foldernames'] = 'Show real names for special folders'; +$labels['subject'] = 'Subject'; +$labels['from'] = 'From'; +$labels['sender'] = 'Sender'; +$labels['to'] = 'To'; +$labels['cc'] = 'Cc'; +$labels['bcc'] = 'Bcc'; +$labels['replyto'] = 'Reply-To'; +$labels['followupto'] = 'Followup-To'; +$labels['date'] = 'Date'; +$labels['size'] = 'Size'; +$labels['priority'] = 'Priority'; +$labels['organization'] = 'Organization'; +$labels['readstatus'] = 'Read status'; +$labels['listoptions'] = 'List options...'; +$labels['mailboxlist'] = 'Folders'; +$labels['messagesfromto'] = 'Messages $from to $to of $count'; +$labels['threadsfromto'] = 'Threads $from to $to of $count'; +$labels['messagenrof'] = 'Message $nr of $count'; +$labels['fromtoshort'] = '$from – $to of $count'; +$labels['copy'] = 'Copy'; +$labels['move'] = 'Move'; +$labels['moveto'] = 'Move to...'; +$labels['download'] = 'Download'; +$labels['open'] = 'Open'; +$labels['showattachment'] = 'Show'; +$labels['showanyway'] = 'Show it anyway'; +$labels['filename'] = 'File name'; +$labels['filesize'] = 'File size'; +$labels['addtoaddressbook'] = 'Add to address book'; +$labels['sun'] = 'Sun'; +$labels['mon'] = 'Mon'; +$labels['tue'] = 'Tue'; +$labels['wed'] = 'Wed'; +$labels['thu'] = 'Thu'; +$labels['fri'] = 'Fri'; +$labels['sat'] = 'Sat'; +$labels['sunday'] = 'Sunday'; +$labels['monday'] = 'Monday'; +$labels['tuesday'] = 'Tuesday'; +$labels['wednesday'] = 'Wednesday'; +$labels['thursday'] = 'Thursday'; +$labels['friday'] = 'Friday'; +$labels['saturday'] = 'Saturday'; +$labels['jan'] = 'Jan'; +$labels['feb'] = 'Feb'; +$labels['mar'] = 'Mar'; +$labels['apr'] = 'Apr'; +$labels['may'] = 'May'; +$labels['jun'] = 'Jun'; +$labels['jul'] = 'Jul'; +$labels['aug'] = 'Aug'; +$labels['sep'] = 'Sep'; +$labels['oct'] = 'Oct'; +$labels['nov'] = 'Nov'; +$labels['dec'] = 'Dec'; +$labels['longjan'] = 'January'; +$labels['longfeb'] = 'February'; +$labels['longmar'] = 'March'; +$labels['longapr'] = 'April'; +$labels['longmay'] = 'May'; +$labels['longjun'] = 'June'; +$labels['longjul'] = 'July'; +$labels['longaug'] = 'August'; +$labels['longsep'] = 'September'; +$labels['longoct'] = 'October'; +$labels['longnov'] = 'November'; +$labels['longdec'] = 'December'; +$labels['today'] = 'Today'; +$labels['refresh'] = 'Refresh'; +$labels['checkmail'] = 'Check for new messages'; +$labels['compose'] = 'Compose'; +$labels['writenewmessage'] = 'Create a new message'; +$labels['reply'] = 'Reply'; +$labels['replytomessage'] = 'Reply to sender'; +$labels['replytoallmessage'] = 'Reply to list or to sender and all recipients'; +$labels['replyall'] = 'Reply all'; +$labels['replylist'] = 'Reply list'; +$labels['forward'] = 'Forward'; +$labels['forwardinline'] = 'Forward inline'; +$labels['forwardattachment'] = 'Forward as attachment'; +$labels['forwardmessage'] = 'Forward the message'; +$labels['deletemessage'] = 'Delete message'; +$labels['movemessagetotrash'] = 'Move message to trash'; +$labels['printmessage'] = 'Print this message'; +$labels['previousmessage'] = 'Show previous message'; +$labels['firstmessage'] = 'Show first message'; +$labels['nextmessage'] = 'Show next message'; +$labels['lastmessage'] = 'Show last message'; +$labels['backtolist'] = 'Back to message list'; +$labels['viewsource'] = 'Show source'; +$labels['mark'] = 'Mark'; +$labels['markmessages'] = 'Mark messages'; +$labels['markread'] = 'As read'; +$labels['markunread'] = 'As unread'; +$labels['markflagged'] = 'As flagged'; +$labels['markunflagged'] = 'As unflagged'; +$labels['moreactions'] = 'More actions...'; +$labels['more'] = 'More'; +$labels['back'] = 'Back'; +$labels['options'] = 'Options'; +$labels['select'] = 'Select'; +$labels['all'] = 'All'; +$labels['none'] = 'None'; +$labels['currpage'] = 'Current page'; +$labels['unread'] = 'Unread'; +$labels['flagged'] = 'Flagged'; +$labels['unanswered'] = 'Unanswered'; +$labels['withattachment'] = 'With attachment'; +$labels['deleted'] = 'Deleted'; +$labels['undeleted'] = 'Not deleted'; +$labels['invert'] = 'Invert'; +$labels['filter'] = 'Filter'; +$labels['list'] = 'List'; +$labels['threads'] = 'Threads'; +$labels['expand-all'] = 'Expand All'; +$labels['expand-unread'] = 'Expand Unread'; +$labels['collapse-all'] = 'Collapse All'; +$labels['threaded'] = 'Threaded'; +$labels['autoexpand_threads'] = 'Expand message threads'; +$labels['do_expand'] = 'all threads'; +$labels['expand_only_unread'] = 'only with unread messages'; +$labels['fromto'] = 'From/To'; +$labels['flag'] = 'Flag'; +$labels['attachment'] = 'Attachment'; +$labels['nonesort'] = 'None'; +$labels['sentdate'] = 'Sent date'; +$labels['arrival'] = 'Arrival date'; +$labels['asc'] = 'ascending'; +$labels['desc'] = 'descending'; +$labels['listcolumns'] = 'List columns'; +$labels['listsorting'] = 'Sorting column'; +$labels['listorder'] = 'Sorting order'; +$labels['listmode'] = 'List view mode'; +$labels['folderactions'] = 'Folder actions...'; +$labels['compact'] = 'Compact'; +$labels['empty'] = 'Empty'; +$labels['importmessages'] = 'Import messages'; +$labels['quota'] = 'Disk usage'; +$labels['unknown'] = 'unknown'; +$labels['unlimited'] = 'unlimited'; +$labels['quicksearch'] = 'Quick search'; +$labels['resetsearch'] = 'Reset search'; +$labels['searchmod'] = 'Search modifiers'; +$labels['msgtext'] = 'Entire message'; +$labels['body'] = 'Body'; +$labels['type'] = 'Type'; +$labels['namex'] = 'Name'; +$labels['openinextwin'] = 'Open in new window'; +$labels['emlsave'] = 'Download (.eml)'; +$labels['changeformattext'] = 'Display in plain text format'; +$labels['changeformathtml'] = 'Display in HTML format'; +$labels['editasnew'] = 'Edit as new'; +$labels['send'] = 'Send'; +$labels['sendmessage'] = 'Send message'; +$labels['savemessage'] = 'Save as draft'; +$labels['addattachment'] = 'Attach a file'; +$labels['charset'] = 'Charset'; +$labels['editortype'] = 'Editor type'; +$labels['returnreceipt'] = 'Return receipt'; +$labels['dsn'] = 'Delivery status notification'; +$labels['mailreplyintro'] = 'On $date, $sender wrote:'; +$labels['originalmessage'] = 'Original Message'; +$labels['editidents'] = 'Edit identities'; +$labels['spellcheck'] = 'Spell'; +$labels['checkspelling'] = 'Check spelling'; +$labels['resumeediting'] = 'Resume editing'; +$labels['revertto'] = 'Revert to'; +$labels['restore'] = 'Restore'; +$labels['restoremessage'] = 'Restore message?'; +$labels['responses'] = 'Responses'; +$labels['insertresponse'] = 'Insert a response'; +$labels['manageresponses'] = 'Manage responses'; +$labels['savenewresponse'] = 'Save new response'; +$labels['editresponses'] = 'Edit responses'; +$labels['editresponse'] = 'Edit response'; +$labels['responsename'] = 'Name'; +$labels['responsetext'] = 'Response Text'; +$labels['attach'] = 'Attach'; +$labels['attachments'] = 'Attachments'; +$labels['upload'] = 'Upload'; +$labels['uploadprogress'] = '$percent ($current from $total)'; +$labels['close'] = 'Close'; +$labels['messageoptions'] = 'Message options...'; +$labels['low'] = 'Low'; +$labels['lowest'] = 'Lowest'; +$labels['normal'] = 'Normal'; +$labels['high'] = 'High'; +$labels['highest'] = 'Highest'; +$labels['nosubject'] = '(no subject)'; +$labels['showimages'] = 'Display images'; +$labels['alwaysshow'] = 'Always show images from $sender'; +$labels['isdraft'] = 'This is a draft message.'; +$labels['andnmore'] = '$nr more...'; +$labels['togglemoreheaders'] = 'Show more message headers'; +$labels['togglefullheaders'] = 'Toggle raw message headers'; +$labels['htmltoggle'] = 'HTML'; +$labels['plaintoggle'] = 'Plain text'; +$labels['savesentmessagein'] = 'Save sent message in'; +$labels['dontsave'] = 'don\'t save'; +$labels['maxuploadsize'] = 'Maximum allowed file size is $size'; +$labels['addcc'] = 'Add Cc'; +$labels['addbcc'] = 'Add Bcc'; +$labels['addreplyto'] = 'Add Reply-To'; +$labels['addfollowupto'] = 'Add Followup-To'; +$labels['mdnrequest'] = 'The sender of this message has asked to be notified when you read this message. Do you wish to notify the sender?'; +$labels['receiptread'] = 'Return Receipt (read)'; +$labels['yourmessage'] = 'This is a Return Receipt for your message'; +$labels['receiptnote'] = 'Note: This receipt only acknowledges that the message was displayed on the recipient\'s computer. There is no guarantee that the recipient has read or understood the message contents.'; +$labels['name'] = 'Display Name'; +$labels['firstname'] = 'First Name'; +$labels['surname'] = 'Last Name'; +$labels['middlename'] = 'Middle Name'; +$labels['nameprefix'] = 'Prefix'; +$labels['namesuffix'] = 'Suffix'; +$labels['nickname'] = 'Nickname'; +$labels['jobtitle'] = 'Job Title'; +$labels['department'] = 'Department'; +$labels['gender'] = 'Gender'; +$labels['maidenname'] = 'Maiden Name'; +$labels['email'] = 'Email'; +$labels['phone'] = 'Phone'; +$labels['address'] = 'Address'; +$labels['street'] = 'Street'; +$labels['locality'] = 'City'; +$labels['zipcode'] = 'Postal Code'; +$labels['region'] = 'Province'; +$labels['country'] = 'Country'; +$labels['birthday'] = 'Birthday'; +$labels['anniversary'] = 'Anniversary'; +$labels['website'] = 'Website'; +$labels['instantmessenger'] = 'IM'; +$labels['notes'] = 'Notes'; +$labels['male'] = 'male'; +$labels['female'] = 'female'; +$labels['manager'] = 'Manager'; +$labels['assistant'] = 'Assistant'; +$labels['spouse'] = 'Spouse'; +$labels['allfields'] = 'All fields'; +$labels['search'] = 'Search'; +$labels['advsearch'] = 'Advanced Search'; +$labels['advanced'] = 'Advanced'; +$labels['other'] = 'Other'; +$labels['typehome'] = 'Home'; +$labels['typework'] = 'Work'; +$labels['typeother'] = 'Other'; +$labels['typemobile'] = 'Mobile'; +$labels['typemain'] = 'Main'; +$labels['typehomefax'] = 'Home Fax'; +$labels['typeworkfax'] = 'Work Fax'; +$labels['typecar'] = 'Car'; +$labels['typepager'] = 'Pager'; +$labels['typevideo'] = 'Video'; +$labels['typeassistant'] = 'Assistant'; +$labels['typehomepage'] = 'Home Page'; +$labels['typeblog'] = 'Blog'; +$labels['typeprofile'] = 'Profile'; +$labels['addfield'] = 'Add field...'; +$labels['addcontact'] = 'Add new contact'; +$labels['editcontact'] = 'Edit contact'; +$labels['contacts'] = 'Contacts'; +$labels['contactproperties'] = 'Contact properties'; +$labels['personalinfo'] = 'Personal information'; +$labels['edit'] = 'Edit'; +$labels['cancel'] = 'Cancel'; +$labels['save'] = 'Save'; +$labels['delete'] = 'Delete'; +$labels['rename'] = 'Rename'; +$labels['addphoto'] = 'Add'; +$labels['replacephoto'] = 'Replace'; +$labels['uploadphoto'] = 'Upload photo'; +$labels['newcontact'] = 'Create new contact card'; +$labels['deletecontact'] = 'Delete selected contacts'; +$labels['composeto'] = 'Compose mail to'; +$labels['contactsfromto'] = 'Contacts $from to $to of $count'; +$labels['print'] = 'Print'; +$labels['export'] = 'Export'; +$labels['exportall'] = 'Export all'; +$labels['exportsel'] = 'Export selected'; +$labels['exportvcards'] = 'Export contacts in vCard format'; +$labels['newcontactgroup'] = 'Create new contact group'; +$labels['grouprename'] = 'Rename group'; +$labels['groupdelete'] = 'Delete group'; +$labels['groupremoveselected'] = 'Remove selected contacts from group'; +$labels['previouspage'] = 'Show previous page'; +$labels['firstpage'] = 'Show first page'; +$labels['nextpage'] = 'Show next page'; +$labels['lastpage'] = 'Show last page'; +$labels['group'] = 'Group'; +$labels['groups'] = 'Groups'; +$labels['listgroup'] = 'List group members'; +$labels['personaladrbook'] = 'Personal Addresses'; +$labels['searchsave'] = 'Save search'; +$labels['searchdelete'] = 'Delete search'; +$labels['import'] = 'Import'; +$labels['importcontacts'] = 'Import contacts'; +$labels['importfromfile'] = 'Import from file:'; +$labels['importtarget'] = 'Add contacts to'; +$labels['importreplace'] = 'Replace the entire address book'; +$labels['importgroups'] = 'Import group assignments'; +$labels['importgroupsall'] = 'All (create groups if necessary)'; +$labels['importgroupsexisting'] = 'Only for existing groups'; +$labels['importdesc'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> or CSV (comma-separated) data format.'; +$labels['done'] = 'Done'; +$labels['settingsfor'] = 'Settings for'; +$labels['about'] = 'About'; +$labels['preferences'] = 'Preferences'; +$labels['userpreferences'] = 'User preferences'; +$labels['editpreferences'] = 'Edit user preferences'; +$labels['identities'] = 'Identities'; +$labels['manageidentities'] = 'Manage identities for this account'; +$labels['newidentity'] = 'New identity'; +$labels['newitem'] = 'New item'; +$labels['edititem'] = 'Edit item'; +$labels['preferhtml'] = 'Display HTML'; +$labels['defaultcharset'] = 'Default Character Set'; +$labels['htmlmessage'] = 'HTML Message'; +$labels['messagepart'] = 'Part'; +$labels['digitalsig'] = 'Digital Signature'; +$labels['dateformat'] = 'Date format'; +$labels['timeformat'] = 'Time format'; +$labels['prettydate'] = 'Pretty dates'; +$labels['setdefault'] = 'Set default'; +$labels['autodetect'] = 'Auto'; +$labels['language'] = 'Language'; +$labels['timezone'] = 'Time zone'; +$labels['pagesize'] = 'Rows per page'; +$labels['signature'] = 'Signature'; +$labels['dstactive'] = 'Daylight saving time'; +$labels['showinextwin'] = 'Open message in a new window'; +$labels['composeextwin'] = 'Compose in a new window'; +$labels['htmleditor'] = 'Compose HTML messages'; +$labels['htmlonreply'] = 'on reply to HTML message'; +$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message'; +$labels['htmlsignature'] = 'HTML signature'; +$labels['showemail'] = 'Show email address with display name'; +$labels['previewpane'] = 'Show preview pane'; +$labels['skin'] = 'Interface skin'; +$labels['logoutclear'] = 'Clear Trash on logout'; +$labels['logoutcompact'] = 'Compact Inbox on logout'; +$labels['uisettings'] = 'User Interface'; +$labels['serversettings'] = 'Server Settings'; +$labels['mailboxview'] = 'Mailbox View'; +$labels['mdnrequests'] = 'On request for return receipt'; +$labels['askuser'] = 'ask me'; +$labels['autosend'] = 'send receipt'; +$labels['autosendknown'] = 'send receipt to my contacts, otherwise ask me'; +$labels['autosendknownignore'] = 'send receipt to my contacts, otherwise ignore'; +$labels['ignore'] = 'ignore'; +$labels['readwhendeleted'] = 'Mark the message as read on delete'; +$labels['flagfordeletion'] = 'Flag the message for deletion instead of delete'; +$labels['skipdeleted'] = 'Do not show deleted messages'; +$labels['deletealways'] = 'If moving messages to Trash fails, delete them'; +$labels['deletejunk'] = 'Directly delete messages in Junk'; +$labels['showremoteimages'] = 'Display remote inline images'; +$labels['fromknownsenders'] = 'from known senders'; +$labels['always'] = 'always'; +$labels['showinlineimages'] = 'Display attached images below the message'; +$labels['autosavedraft'] = 'Automatically save draft'; +$labels['everynminutes'] = 'every $n minute(s)'; +$labels['refreshinterval'] = 'Refresh (check for new messages, etc.)'; +$labels['never'] = 'never'; +$labels['immediately'] = 'immediately'; +$labels['messagesdisplaying'] = 'Displaying Messages'; +$labels['messagescomposition'] = 'Composing Messages'; +$labels['mimeparamfolding'] = 'Attachment names'; +$labels['2231folding'] = 'Full RFC 2231 (Thunderbird)'; +$labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)'; +$labels['2047folding'] = 'Full RFC 2047 (other)'; +$labels['force7bit'] = 'Use MIME encoding for 8-bit characters'; +$labels['advancedoptions'] = 'Advanced options'; +$labels['focusonnewmessage'] = 'Focus browser window on new message'; +$labels['checkallfolders'] = 'Check all folders for new messages'; +$labels['displaynext'] = 'After message delete/move display the next message'; +$labels['defaultfont'] = 'Default font of HTML message'; +$labels['mainoptions'] = 'Main Options'; +$labels['browseroptions'] = 'Browser Options'; +$labels['section'] = 'Section'; +$labels['maintenance'] = 'Maintenance'; +$labels['newmessage'] = 'New Message'; +$labels['signatureoptions'] = 'Signature Options'; +$labels['whenreplying'] = 'When replying'; +$labels['replyempty'] = 'do not quote the original message'; +$labels['replytopposting'] = 'start new message above the quote'; +$labels['replybottomposting'] = 'start new message below the quote'; +$labels['replyremovesignature'] = 'When replying remove original signature from message'; +$labels['autoaddsignature'] = 'Automatically add signature'; +$labels['newmessageonly'] = 'new message only'; +$labels['replyandforwardonly'] = 'replies and forwards only'; +$labels['insertsignature'] = 'Insert signature'; +$labels['previewpanemarkread'] = 'Mark previewed messages as read'; +$labels['afternseconds'] = 'after $n seconds'; +$labels['reqmdn'] = 'Always request a return receipt'; +$labels['reqdsn'] = 'Always request a delivery status notification'; +$labels['replysamefolder'] = 'Place replies in the folder of the message being replied to'; +$labels['defaultabook'] = 'Default address book'; +$labels['autocompletesingle'] = 'Skip alternative email addresses in autocompletion'; +$labels['listnamedisplay'] = 'List contacts as'; +$labels['spellcheckbeforesend'] = 'Check spelling before sending a message'; +$labels['spellcheckoptions'] = 'Spellcheck Options'; +$labels['spellcheckignoresyms'] = 'Ignore words with symbols'; +$labels['spellcheckignorenums'] = 'Ignore words with numbers'; +$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized'; +$labels['addtodict'] = 'Add to dictionary'; +$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links'; +$labels['standardwindows'] = 'Handle popups as standard windows'; +$labels['forwardmode'] = 'Messages forwarding'; +$labels['inline'] = 'inline'; +$labels['asattachment'] = 'as attachment'; +$labels['replyallmode'] = 'Default action of [Reply all] button'; +$labels['replyalldefault'] = 'reply to all'; +$labels['replyalllist'] = 'reply to mailing list only (if found)'; +$labels['folder'] = 'Folder'; +$labels['folders'] = 'Folders'; +$labels['foldername'] = 'Folder name'; +$labels['subscribed'] = 'Subscribed'; +$labels['messagecount'] = 'Messages'; +$labels['create'] = 'Create'; +$labels['createfolder'] = 'Create new folder'; +$labels['managefolders'] = 'Manage folders'; +$labels['specialfolders'] = 'Special Folders'; +$labels['properties'] = 'Properties'; +$labels['folderproperties'] = 'Folder properties'; +$labels['parentfolder'] = 'Parent folder'; +$labels['location'] = 'Location'; +$labels['info'] = 'Information'; +$labels['getfoldersize'] = 'Click to get folder size'; +$labels['changesubscription'] = 'Click to change subscription'; +$labels['foldertype'] = 'Folder Type'; +$labels['personalfolder'] = 'Private Folder'; +$labels['otherfolder'] = 'Other User\'s Folder'; +$labels['sharedfolder'] = 'Public Folder'; +$labels['sortby'] = 'Sort by'; +$labels['sortasc'] = 'Sort ascending'; +$labels['sortdesc'] = 'Sort descending'; +$labels['undo'] = 'Undo'; +$labels['installedplugins'] = 'Installed plugins'; +$labels['plugin'] = 'Plugin'; +$labels['version'] = 'Version'; +$labels['source'] = 'Source'; +$labels['license'] = 'License'; +$labels['support'] = 'Get support'; +$labels['B'] = 'B'; +$labels['KB'] = 'KB'; +$labels['MB'] = 'MB'; +$labels['GB'] = 'GB'; +$labels['unicode'] = 'Unicode'; +$labels['english'] = 'English'; +$labels['westerneuropean'] = 'Western European'; +$labels['easterneuropean'] = 'Eastern European'; +$labels['southeasterneuropean'] = 'South-Eastern European'; +$labels['baltic'] = 'Baltic'; +$labels['cyrillic'] = 'Cyrillic'; +$labels['arabic'] = 'Arabic'; +$labels['greek'] = 'Greek'; +$labels['hebrew'] = 'Hebrew'; +$labels['turkish'] = 'Turkish'; +$labels['nordic'] = 'Nordic'; +$labels['thai'] = 'Thai'; +$labels['celtic'] = 'Celtic'; +$labels['vietnamese'] = 'Vietnamese'; +$labels['japanese'] = 'Japanese'; +$labels['korean'] = 'Korean'; +$labels['chinese'] = 'Chinese'; +?> diff --git a/program/localization/en_CA/messages.inc b/program/localization/en_CA/messages.inc new file mode 100644 index 000000000..169c1c9b1 --- /dev/null +++ b/program/localization/en_CA/messages.inc @@ -0,0 +1,176 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/<lang>/messages.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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ +*/ +$messages['errortitle'] = 'An error occurred!'; +$messages['loginfailed'] = 'Login failed.'; +$messages['cookiesdisabled'] = 'Your browser does not accept cookies.'; +$messages['sessionerror'] = 'Your session is invalid or expired.'; +$messages['storageerror'] = 'Connection to storage server failed.'; +$messages['servererror'] = 'Server Error!'; +$messages['servererrormsg'] = 'Server Error: $msg'; +$messages['dberror'] = 'Database Error!'; +$messages['requesttimedout'] = 'Request timed out'; +$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.'; +$messages['errornoperm'] = 'Unable to perform operation. Permission denied.'; +$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.'; +$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.'; +$messages['invalidrequest'] = 'Invalid request! No data was saved.'; +$messages['invalidhost'] = 'Invalid server name.'; +$messages['nomessagesfound'] = 'No messages found in this mailbox.'; +$messages['loggedout'] = 'You have successfully terminated the session. Good bye!'; +$messages['mailboxempty'] = 'Mailbox is empty.'; +$messages['refreshing'] = 'Refreshing...'; +$messages['loading'] = 'Loading...'; +$messages['uploading'] = 'Uploading file...'; +$messages['uploadingmany'] = 'Uploading files...'; +$messages['loadingdata'] = 'Loading data...'; +$messages['checkingmail'] = 'Checking for new messages...'; +$messages['sendingmessage'] = 'Sending message...'; +$messages['messagesent'] = 'Message sent successfully.'; +$messages['savingmessage'] = 'Saving message...'; +$messages['messagesaved'] = 'Message saved to Drafts.'; +$messages['successfullysaved'] = 'Successfully saved.'; +$messages['savingresponse'] = 'Saving response text...'; +$messages['deleteresponseconfirm'] = 'Do you really want to delete this response text?'; +$messages['addedsuccessfully'] = 'Contact added successfully to address book.'; +$messages['contactexists'] = 'A contact with the same e-mail address already exists.'; +$messages['contactnameexists'] = 'A contact with the same name already exists.'; +$messages['blockedimages'] = 'To protect your privacy, remote images are blocked in this message.'; +$messages['encryptedmessage'] = 'This is an encrypted message and can not be displayed. Sorry!'; +$messages['nocontactsfound'] = 'No contacts found.'; +$messages['contactnotfound'] = 'The requested contact was not found.'; +$messages['contactsearchonly'] = 'Enter some search terms to find contacts'; +$messages['sendingfailed'] = 'Failed to send message.'; +$messages['senttooquickly'] = 'Please wait $sec sec(s). before sending this message.'; +$messages['errorsavingsent'] = 'An error occurred while saving sent message.'; +$messages['errorsaving'] = 'An error occurred while saving.'; +$messages['errormoving'] = 'Could not move the message(s).'; +$messages['errorcopying'] = 'Could not copy the message(s).'; +$messages['errordeleting'] = 'Could not delete the message(s).'; +$messages['errormarking'] = 'Could not mark the message(s).'; +$messages['deletecontactconfirm'] = 'Do you really want to delete selected contact(s)?'; +$messages['deletegroupconfirm'] = 'Do you really want to delete selected group?'; +$messages['deletemessagesconfirm'] = 'Do you really want to delete selected message(s)?'; +$messages['deletefolderconfirm'] = 'Do you really want to delete this folder?'; +$messages['purgefolderconfirm'] = 'Do you really want to delete all messages in this folder?'; +$messages['contactdeleting'] = 'Deleting contact(s)...'; +$messages['groupdeleting'] = 'Deleting group...'; +$messages['folderdeleting'] = 'Deleting folder...'; +$messages['foldermoving'] = 'Moving folder...'; +$messages['foldersubscribing'] = 'Subscribing folder...'; +$messages['folderunsubscribing'] = 'Unsubscribing folder...'; +$messages['formincomplete'] = 'The form was not completely filled out.'; +$messages['noemailwarning'] = 'Please enter a valid email address.'; +$messages['nonamewarning'] = 'Please enter a name.'; +$messages['nopagesizewarning'] = 'Please enter a page size.'; +$messages['nosenderwarning'] = 'Please enter sender e-mail address.'; +$messages['norecipientwarning'] = 'Please enter at least one recipient.'; +$messages['nosubjectwarning'] = 'The "Subject" field is empty. Would you like to enter one now?'; +$messages['nobodywarning'] = 'Send this message without text?'; +$messages['notsentwarning'] = 'Message has not been sent. Do you want to discard your message?'; +$messages['restoresavedcomposedata'] = 'A previously composed but unsent message was found.\n\nSubject: $subject\nSaved: $date\n\nDo you want to restore this message?'; +$messages['noldapserver'] = 'Please select an ldap server to search.'; +$messages['nosearchname'] = 'Please enter a contact name or email address.'; +$messages['notuploadedwarning'] = 'Not all attachments have been uploaded yet. Please wait or cancel the upload.'; +$messages['searchsuccessful'] = '$nr messages found.'; +$messages['contactsearchsuccessful'] = '$nr contacts found.'; +$messages['searchnomatch'] = 'Search returned no matches.'; +$messages['searching'] = 'Searching...'; +$messages['checking'] = 'Checking...'; +$messages['nospellerrors'] = 'No spelling errors found.'; +$messages['folderdeleted'] = 'Folder successfully deleted.'; +$messages['foldersubscribed'] = 'Folder successfully subscribed.'; +$messages['folderunsubscribed'] = 'Folder successfully unsubscribed.'; +$messages['folderpurged'] = 'Folder has successfully been emptied.'; +$messages['folderexpunged'] = 'Folder has successfully been compacted.'; +$messages['deletedsuccessfully'] = 'Successfully deleted.'; +$messages['converting'] = 'Removing formatting...'; +$messages['messageopenerror'] = 'Could not load message from server.'; +$messages['fileuploaderror'] = 'File upload failed.'; +$messages['filesizeerror'] = 'The uploaded file exceeds the maximum size of $size.'; +$messages['copysuccess'] = 'Successfully copied $nr contacts.'; +$messages['movesuccess'] = 'Successfully moved $nr contacts.'; +$messages['copyerror'] = 'Could not copy any contacts.'; +$messages['moveerror'] = 'Could not move any contacts.'; +$messages['sourceisreadonly'] = 'This address source is read only.'; +$messages['errorsavingcontact'] = 'Could not save the contact address.'; +$messages['movingmessage'] = 'Moving message(s)...'; +$messages['copyingmessage'] = 'Copying message(s)...'; +$messages['copyingcontact'] = 'Copying contact(s)...'; +$messages['movingcontact'] = 'Moving contact(s)...'; +$messages['deletingmessage'] = 'Deleting message(s)...'; +$messages['markingmessage'] = 'Marking message(s)...'; +$messages['addingmember'] = 'Adding contact(s) to the group...'; +$messages['removingmember'] = 'Removing contact(s) from the group...'; +$messages['receiptsent'] = 'Successfully sent a read receipt.'; +$messages['errorsendingreceipt'] = 'Could not send the receipt.'; +$messages['deleteidentityconfirm'] = 'Do you really want to delete this identity?'; +$messages['nodeletelastidentity'] = 'You cannot delete this identity, it\'s your last one.'; +$messages['forbiddencharacter'] = 'Folder name contains a forbidden character.'; +$messages['selectimportfile'] = 'Please select a file to upload.'; +$messages['addresswriterror'] = 'The selected address book is not writeable.'; +$messages['contactaddedtogroup'] = 'Successfully added the contacts to this group.'; +$messages['contactremovedfromgroup'] = 'Successfully removed contacts from this group.'; +$messages['nogroupassignmentschanged'] = 'No group assignments changed.'; +$messages['importwait'] = 'Importing, please wait...'; +$messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.'; +$messages['importconfirm'] = '<b>Successfully imported $inserted contacts</b>'; +$messages['importconfirmskipped'] = '<b>Skipped $skipped existing entries</b>'; +$messages['importmessagesuccess'] = 'Successfully imported $nr messages'; +$messages['importmessageerror'] = 'Import failed! The uploaded file is not a valid message or mailbox file'; +$messages['opnotpermitted'] = 'Operation not permitted!'; +$messages['nofromaddress'] = 'Missing e-mail address in selected identity.'; +$messages['editorwarning'] = 'Switching to the plain text editor will cause all text formatting to be lost. Do you wish to continue?'; +$messages['httpreceivedencrypterror'] = 'A fatal configuration error occurred. Contact your administrator immediately. <b>Your message can not be sent.</b>'; +$messages['smtpconnerror'] = 'SMTP Error ($code): Connection to server failed.'; +$messages['smtpautherror'] = 'SMTP Error ($code): Authentication failed.'; +$messages['smtpfromerror'] = 'SMTP Error ($code): Failed to set sender "$from" ($msg).'; +$messages['smtptoerror'] = 'SMTP Error ($code): Failed to add recipient "$to" ($msg).'; +$messages['smtprecipientserror'] = 'SMTP Error: Unable to parse recipients list.'; +$messages['smtperror'] = 'SMTP Error: $msg'; +$messages['emailformaterror'] = 'Invalid e-mail address: $email'; +$messages['toomanyrecipients'] = 'Too many recipients. Reduce the number of recipients to $max.'; +$messages['maxgroupmembersreached'] = 'The number of group members exceeds the maximum of $max.'; +$messages['internalerror'] = 'An internal error occurred. Please try again.'; +$messages['contactdelerror'] = 'Could not delete contact(s).'; +$messages['contactdeleted'] = 'Contact(s) deleted successfully.'; +$messages['contactrestoreerror'] = 'Could not restore deleted contact(s).'; +$messages['contactrestored'] = 'Contact(s) restored successfully.'; +$messages['groupdeleted'] = 'Group deleted successfully.'; +$messages['grouprenamed'] = 'Group renamed successfully.'; +$messages['groupcreated'] = 'Group created successfully.'; +$messages['savedsearchdeleted'] = 'Saved search deleted successfully.'; +$messages['savedsearchdeleteerror'] = 'Could not delete saved search.'; +$messages['savedsearchcreated'] = 'Saved search created successfully.'; +$messages['savedsearchcreateerror'] = 'Could not create saved search.'; +$messages['messagedeleted'] = 'Message(s) deleted successfully.'; +$messages['messagemoved'] = 'Message(s) moved successfully.'; +$messages['messagecopied'] = 'Message(s) copied successfully.'; +$messages['messagemarked'] = 'Message(s) marked successfully.'; +$messages['autocompletechars'] = 'Enter at least $min characters for autocompletion.'; +$messages['autocompletemore'] = 'More matching entries found. Please type more characters.'; +$messages['namecannotbeempty'] = 'Name cannot be empty.'; +$messages['nametoolong'] = 'Name is too long.'; +$messages['folderupdated'] = 'Folder updated successfully.'; +$messages['foldercreated'] = 'Folder created successfully.'; +$messages['invalidimageformat'] = 'Not a valid image format.'; +$messages['mispellingsfound'] = 'Spelling errors detected in the message.'; +$messages['parentnotwritable'] = 'Unable to create/move folder into selected parent folder. No access rights.'; +$messages['messagetoobig'] = 'The message part is too big to process it.'; +$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>'; +$messages['noscriptwarning'] = 'Warning: This webmail service requires Javascript! In order to use it please enable Javascript in your browser\'s settings.'; +?> diff --git a/program/localization/en_GB/labels.inc b/program/localization/en_GB/labels.inc index c7778e955..628b41bde 100644 --- a/program/localization/en_GB/labels.inc +++ b/program/localization/en_GB/labels.inc @@ -29,8 +29,10 @@ $labels['drafts'] = 'Drafts'; $labels['sent'] = 'Sent'; $labels['trash'] = 'Deleted Items'; $labels['junk'] = 'Junk'; +$labels['show_real_foldernames'] = 'Show real names for special folders'; $labels['subject'] = 'Subject'; $labels['from'] = 'From'; +$labels['sender'] = 'Sender'; $labels['to'] = 'To'; $labels['cc'] = 'Copy'; $labels['bcc'] = 'Bcc'; @@ -50,7 +52,9 @@ $labels['fromtoshort'] = '$from – $to of $count'; $labels['copy'] = 'Copy'; $labels['move'] = 'Move'; $labels['moveto'] = 'Move to...'; +$labels['copyto'] = 'Copy to...'; $labels['download'] = 'Download'; +$labels['open'] = 'Open'; $labels['showattachment'] = 'Show'; $labels['showanyway'] = 'Show it anyway'; $labels['filename'] = 'File name'; @@ -134,6 +138,7 @@ $labels['currpage'] = 'Current page'; $labels['unread'] = 'Unread'; $labels['flagged'] = 'Flagged'; $labels['unanswered'] = 'Unanswered'; +$labels['withattachment'] = 'With attachment'; $labels['deleted'] = 'Deleted'; $labels['undeleted'] = 'Not deleted'; $labels['invert'] = 'Invert'; @@ -162,6 +167,7 @@ $labels['listmode'] = 'List view mode'; $labels['folderactions'] = 'Folder actions...'; $labels['compact'] = 'Compact'; $labels['empty'] = 'Empty'; +$labels['importmessages'] = 'Import messages'; $labels['quota'] = 'Disk usage'; $labels['unknown'] = 'unknown'; $labels['unlimited'] = 'unlimited'; @@ -169,8 +175,13 @@ $labels['quicksearch'] = 'Quick search'; $labels['resetsearch'] = 'Reset search'; $labels['searchmod'] = 'Search modifiers'; $labels['msgtext'] = 'Entire message'; +$labels['body'] = 'Body'; +$labels['type'] = 'Type'; +$labels['namex'] = 'Name'; $labels['openinextwin'] = 'Open in new window'; $labels['emlsave'] = 'Download (.eml)'; +$labels['changeformattext'] = 'Display in plain text format'; +$labels['changeformathtml'] = 'Display in HTML format'; $labels['editasnew'] = 'Edit as new'; $labels['send'] = 'Send'; $labels['sendmessage'] = 'Send now'; @@ -187,6 +198,16 @@ $labels['spellcheck'] = 'Spell'; $labels['checkspelling'] = 'Check spelling'; $labels['resumeediting'] = 'Resume editing'; $labels['revertto'] = 'Revert to'; +$labels['restore'] = 'Restore'; +$labels['restoremessage'] = 'Restore message?'; +$labels['responses'] = 'Responses'; +$labels['insertresponse'] = 'Insert a response'; +$labels['manageresponses'] = 'Manage responses'; +$labels['savenewresponse'] = 'Save new response'; +$labels['editresponses'] = 'Edit responses'; +$labels['editresponse'] = 'Edit response'; +$labels['responsename'] = 'Name'; +$labels['responsetext'] = 'Response Text'; $labels['attach'] = 'Attach'; $labels['attachments'] = 'Attachments'; $labels['upload'] = 'Upload'; @@ -286,6 +307,8 @@ $labels['composeto'] = 'Compose mail to'; $labels['contactsfromto'] = 'Contacts $from to $to of $count'; $labels['print'] = 'Print'; $labels['export'] = 'Export'; +$labels['exportall'] = 'Export all'; +$labels['exportsel'] = 'Export selected'; $labels['exportvcards'] = 'Export contacts in vCard format'; $labels['newcontactgroup'] = 'Create new contact group'; $labels['grouprename'] = 'Rename group'; @@ -297,13 +320,18 @@ $labels['nextpage'] = 'Show next set'; $labels['lastpage'] = 'Show last set'; $labels['group'] = 'Group'; $labels['groups'] = 'Groups'; +$labels['listgroup'] = 'List group members'; $labels['personaladrbook'] = 'Personal Addresses'; $labels['searchsave'] = 'Save search'; $labels['searchdelete'] = 'Delete search'; $labels['import'] = 'Import'; $labels['importcontacts'] = 'Import contacts'; $labels['importfromfile'] = 'Import from file:'; +$labels['importtarget'] = 'Add contacts to'; $labels['importreplace'] = 'Replace the entire address book'; +$labels['importgroups'] = 'Import group assignments'; +$labels['importgroupsall'] = 'All (create groups if necessary)'; +$labels['importgroupsexisting'] = 'Only for existing groups'; $labels['importdesc'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> or CSV (comma-separated) data format.'; $labels['done'] = 'Done'; $labels['settingsfor'] = 'Settings for'; @@ -319,6 +347,8 @@ $labels['edititem'] = 'Edit item'; $labels['preferhtml'] = 'Display HTML'; $labels['defaultcharset'] = 'Default Character Set'; $labels['htmlmessage'] = 'HTML Message'; +$labels['messagepart'] = 'Part'; +$labels['digitalsig'] = 'Digital Signature'; $labels['dateformat'] = 'Date format'; $labels['timeformat'] = 'Time format'; $labels['prettydate'] = 'Pretty dates'; @@ -335,6 +365,7 @@ $labels['htmleditor'] = 'Compose HTML messages'; $labels['htmlonreply'] = 'on reply to HTML message only'; $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message'; $labels['htmlsignature'] = 'HTML signature'; +$labels['showemail'] = 'Show email address with display name'; $labels['previewpane'] = 'Show preview pane'; $labels['skin'] = 'Interface skin'; $labels['logoutclear'] = 'Clear Trash on logout'; @@ -404,9 +435,13 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers'; $labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalised'; $labels['addtodict'] = 'Add to dictionary'; $labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links'; +$labels['standardwindows'] = 'Handle popups as standard windows'; $labels['forwardmode'] = 'Messages forwarding'; $labels['inline'] = 'inline'; $labels['asattachment'] = 'as attachment'; +$labels['replyallmode'] = 'Default action of [Reply all] button'; +$labels['replyalldefault'] = 'reply to all'; +$labels['replyalllist'] = 'reply to mailing list only (if found)'; $labels['folder'] = 'Folder'; $labels['folders'] = 'Folders'; $labels['foldername'] = 'Folder name'; diff --git a/program/localization/en_GB/messages.inc b/program/localization/en_GB/messages.inc index 5b6a8f7f2..8ee7aef5a 100644 --- a/program/localization/en_GB/messages.inc +++ b/program/localization/en_GB/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -26,11 +26,14 @@ $messages['dberror'] = 'Database Error!'; $messages['requesttimedout'] = 'Request timed out'; $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.'; $messages['errornoperm'] = 'Unable to perform operation. Permission denied.'; +$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.'; +$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.'; $messages['invalidrequest'] = 'Invalid request! No data was saved.'; $messages['invalidhost'] = 'Invalid server name.'; $messages['nomessagesfound'] = 'No messages found in this mailbox.'; $messages['loggedout'] = 'You have successfully terminated the session. Good bye!'; -$messages['mailboxempty'] = 'Mailbox is empty.'; +$messages['mailboxempty'] = 'Mailbox is empty'; +$messages['nomessages'] = 'No messages'; $messages['refreshing'] = 'Refreshing...'; $messages['loading'] = 'Loading...'; $messages['uploading'] = 'Uploading file...'; @@ -42,6 +45,8 @@ $messages['messagesent'] = 'Message sent successfully.'; $messages['savingmessage'] = 'Saving message...'; $messages['messagesaved'] = 'Message saved to Drafts.'; $messages['successfullysaved'] = 'Successfully saved.'; +$messages['savingresponse'] = 'Saving response text...'; +$messages['deleteresponseconfirm'] = 'Do you really want to delete this response text?'; $messages['addedsuccessfully'] = 'Contact successfully added to address book.'; $messages['contactexists'] = 'A contact with this e-mail address already exists.'; $messages['contactnameexists'] = 'A contact with the same name already exists.'; @@ -52,6 +57,8 @@ $messages['contactnotfound'] = 'The requested contact was not found.'; $messages['contactsearchonly'] = 'Enter some search terms to find contacts'; $messages['sendingfailed'] = 'Failed to send message.'; $messages['senttooquickly'] = 'Please wait $sec sec(s). before sending this message.'; +$messages['errorsavingsent'] = 'An error occurred while saving sent message.'; +$messages['errorsaving'] = 'An error occurred while saving.'; $messages['errormoving'] = 'Could not move the message(s).'; $messages['errorcopying'] = 'Could not copy the message(s).'; $messages['errordeleting'] = 'Could not delete the message(s).'; @@ -76,6 +83,7 @@ $messages['norecipientwarning'] = 'Please enter at least one recipient.'; $messages['nosubjectwarning'] = 'The "Subject" field is empty. Would you like to enter one now?'; $messages['nobodywarning'] = 'Send this message without any text?'; $messages['notsentwarning'] = 'Your message has not been sent. Do you want to discard it?'; +$messages['restoresavedcomposedata'] = 'A previously composed but unsent message was found.\n\nSubject: $subject\nSaved: $date\n\nDo you want to restore this message?'; $messages['noldapserver'] = 'Please select an LDAP server to search.'; $messages['nosearchname'] = 'Please enter a contact name or email address.'; $messages['notuploadedwarning'] = 'Not all attachments have been uploaded yet. Please wait or cancel the upload.'; @@ -95,11 +103,16 @@ $messages['converting'] = 'Removing formatting...'; $messages['messageopenerror'] = 'Could not load message from server.'; $messages['fileuploaderror'] = 'File upload failed.'; $messages['filesizeerror'] = 'The uploaded file exceeds the maximum size of $size.'; +$messages['copysuccess'] = 'Successfully copied $nr contacts.'; +$messages['movesuccess'] = 'Successfully moved $nr contacts.'; +$messages['copyerror'] = 'Could not copy any contacts.'; +$messages['moveerror'] = 'Could not move any contacts.'; $messages['sourceisreadonly'] = 'This address book is read-only.'; $messages['errorsavingcontact'] = 'Could not save the contact address.'; $messages['movingmessage'] = 'Moving message(s)...'; $messages['copyingmessage'] = 'Copying message(s)...'; $messages['copyingcontact'] = 'Copying contact(s)...'; +$messages['movingcontact'] = 'Moving contact(s)...'; $messages['deletingmessage'] = 'Deleting message(s)...'; $messages['markingmessage'] = 'Marking message(s)...'; $messages['addingmember'] = 'Adding contact(s) to the group...'; @@ -118,6 +131,8 @@ $messages['importwait'] = 'Importing, please wait...'; $messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.'; $messages['importconfirm'] = '<b>Successfully imported $inserted contacts</b>'; $messages['importconfirmskipped'] = '<b>Skipped $skipped existing entries</b>'; +$messages['importmessagesuccess'] = 'Successfully imported $nr messages'; +$messages['importmessageerror'] = 'Import failed! The uploaded file is not a valid message or mailbox file'; $messages['opnotpermitted'] = 'Operation not permitted!'; $messages['nofromaddress'] = 'Missing e-mail address in selected identity.'; $messages['editorwarning'] = 'Switching to the plain text editor will cause all text formatting to be lost. Do you wish to continue?'; @@ -131,6 +146,7 @@ $messages['smtperror'] = 'SMTP Error: $msg'; $messages['emailformaterror'] = 'Incorrect e-mail address: $email'; $messages['toomanyrecipients'] = 'Too many recipients. Reduce the number of recipients to $max.'; $messages['maxgroupmembersreached'] = 'The number of group members exceeds the maximum of $max.'; +$messages['internalerror'] = 'An internal error occurred. Please try again.'; $messages['contactdelerror'] = 'Could not delete contact(s).'; $messages['contactdeleted'] = 'Contact(s) deleted successfully.'; $messages['contactrestoreerror'] = 'Could not restore deleted contact(s).'; diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 840c9358c..61890a642 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -64,6 +64,7 @@ $labels['fromtoshort'] = '$from – $to of $count'; $labels['copy'] = 'Copy'; $labels['move'] = 'Move'; $labels['moveto'] = 'Move to...'; +$labels['copyto'] = 'Copy to...'; $labels['download'] = 'Download'; $labels['open'] = 'Open'; $labels['showattachment'] = 'Show'; @@ -232,6 +233,18 @@ $labels['checkspelling'] = 'Check spelling'; $labels['resumeediting'] = 'Resume editing'; $labels['revertto'] = 'Revert to'; +$labels['restore'] = 'Restore'; +$labels['restoremessage'] = 'Restore message?'; + +$labels['responses'] = 'Responses'; +$labels['insertresponse'] = 'Insert a response'; +$labels['manageresponses'] = 'Manage responses'; +$labels['savenewresponse'] = 'Save new response'; +$labels['editresponses'] = 'Edit responses'; +$labels['editresponse'] = 'Edit response'; +$labels['responsename'] = 'Name'; +$labels['responsetext'] = 'Response Text'; + $labels['attach'] = 'Attach'; $labels['attachments'] = 'Attachments'; $labels['upload'] = 'Upload'; @@ -484,6 +497,9 @@ $labels['standardwindows'] = 'Handle popups as standard windows'; $labels['forwardmode'] = 'Messages forwarding'; $labels['inline'] = 'inline'; $labels['asattachment'] = 'as attachment'; +$labels['replyallmode'] = 'Default action of [Reply all] button'; +$labels['replyalldefault'] = 'reply to all'; +$labels['replyalllist'] = 'reply to mailing list only (if found)'; $labels['folder'] = 'Folder'; $labels['folders'] = 'Folders'; diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc index 9733109ad..ce8722812 100644 --- a/program/localization/en_US/messages.inc +++ b/program/localization/en_US/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -34,7 +34,8 @@ $messages['invalidrequest'] = 'Invalid request! No data was saved.'; $messages['invalidhost'] = 'Invalid server name.'; $messages['nomessagesfound'] = 'No messages found in this mailbox.'; $messages['loggedout'] = 'You have successfully terminated the session. Good bye!'; -$messages['mailboxempty'] = 'Mailbox is empty.'; +$messages['mailboxempty'] = 'Mailbox is empty'; +$messages['nomessages'] = 'No messages'; $messages['refreshing'] = 'Refreshing...'; $messages['loading'] = 'Loading...'; $messages['uploading'] = 'Uploading file...'; @@ -46,6 +47,8 @@ $messages['messagesent'] = 'Message sent successfully.'; $messages['savingmessage'] = 'Saving message...'; $messages['messagesaved'] = 'Message saved to Drafts.'; $messages['successfullysaved'] = 'Successfully saved.'; +$messages['savingresponse'] = 'Saving response text...'; +$messages['deleteresponseconfirm'] = 'Do you really want to delete this response text?'; $messages['addedsuccessfully'] = 'Contact added successfully to address book.'; $messages['contactexists'] = 'A contact with the same e-mail address already exists.'; $messages['contactnameexists'] = 'A contact with the same name already exists.'; @@ -82,6 +85,7 @@ $messages['norecipientwarning'] = 'Please enter at least one recipient.'; $messages['nosubjectwarning'] = 'The "Subject" field is empty. Would you like to enter one now?'; $messages['nobodywarning'] = 'Send this message without text?'; $messages['notsentwarning'] = 'Message has not been sent. Do you want to discard your message?'; +$messages['restoresavedcomposedata'] = 'A previously composed but unsent message was found.\n\nSubject: $subject\nSaved: $date\n\nDo you want to restore this message?'; $messages['noldapserver'] = 'Please select an ldap server to search.'; $messages['nosearchname'] = 'Please enter a contact name or email address.'; $messages['notuploadedwarning'] = 'Not all attachments have been uploaded yet. Please wait or cancel the upload.'; diff --git a/program/localization/es_419/labels.inc b/program/localization/es_419/labels.inc new file mode 100644 index 000000000..437295bf1 --- /dev/null +++ b/program/localization/es_419/labels.inc @@ -0,0 +1,423 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/<lang>/labels.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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ +*/ +$labels['welcome'] = 'Bienvenido a $product'; +$labels['username'] = 'Usuario'; +$labels['password'] = 'Contraseña'; +$labels['server'] = 'Servidor'; +$labels['login'] = 'Login'; +$labels['logout'] = 'Salir'; +$labels['mail'] = 'Correo'; +$labels['settings'] = 'Configuración'; +$labels['addressbook'] = 'Libreta de Direcciones'; +$labels['inbox'] = 'Bandeja de Entrada'; +$labels['drafts'] = 'Borradores'; +$labels['sent'] = 'Enviados'; +$labels['trash'] = 'Papelera'; +$labels['show_real_foldernames'] = 'Mostrar el nombre real para carpetas especiales'; +$labels['subject'] = 'Tema'; +$labels['from'] = 'De'; +$labels['sender'] = 'Remitente'; +$labels['to'] = 'Para'; +$labels['cc'] = 'Cc'; +$labels['bcc'] = 'Bcc'; +$labels['replyto'] = 'Responder-a'; +$labels['date'] = 'Fecha'; +$labels['size'] = 'Tamaño'; +$labels['priority'] = 'Prioridad'; +$labels['organization'] = 'Organización'; +$labels['readstatus'] = 'Leer estado'; +$labels['listoptions'] = 'Listar opciones'; +$labels['mailboxlist'] = 'Carpetas'; +$labels['messagesfromto'] = 'Mensajes $from a $to de $count'; +$labels['threadsfromto'] = 'Hilo $from hasta $to de $count'; +$labels['messagenrof'] = 'Mensaje $nr de $count'; +$labels['fromtoshort'] = '$from - $to de $count'; +$labels['copy'] = 'Copiar'; +$labels['move'] = 'Mover'; +$labels['moveto'] = 'Mover a...'; +$labels['download'] = 'Descargar'; +$labels['open'] = 'Abrir'; +$labels['showattachment'] = 'Mostrar'; +$labels['showanyway'] = 'Mostrar de todos modos'; +$labels['filename'] = 'Nombre del archivo'; +$labels['filesize'] = 'Tamaño del archivo'; +$labels['addtoaddressbook'] = 'Agregar a la libreta de direcciones'; +$labels['sun'] = 'Dom'; +$labels['mon'] = 'Lun'; +$labels['tue'] = 'Mar'; +$labels['wed'] = 'Mié'; +$labels['thu'] = 'Jue'; +$labels['fri'] = 'Vie'; +$labels['sat'] = 'Sáb'; +$labels['sunday'] = 'Domingo'; +$labels['monday'] = 'Lunes'; +$labels['tuesday'] = 'Martes'; +$labels['wednesday'] = 'Miércoles'; +$labels['thursday'] = 'Jueves'; +$labels['friday'] = 'Viernes'; +$labels['saturday'] = 'Sábado'; +$labels['jan'] = 'Ene'; +$labels['feb'] = 'Feb'; +$labels['mar'] = 'Mar'; +$labels['apr'] = 'Abr'; +$labels['may'] = 'May'; +$labels['jun'] = 'Jun'; +$labels['jul'] = 'Jul'; +$labels['aug'] = 'Ago'; +$labels['sep'] = 'Sep'; +$labels['oct'] = 'Oct'; +$labels['nov'] = 'Nov'; +$labels['dec'] = 'Dec'; +$labels['longjan'] = 'Enero'; +$labels['longfeb'] = 'Febrero'; +$labels['longmar'] = 'Marzo'; +$labels['longapr'] = 'Abril'; +$labels['longmay'] = 'Mayo'; +$labels['longjun'] = 'Junio'; +$labels['longjul'] = 'Julio'; +$labels['longaug'] = 'Agosto'; +$labels['longsep'] = 'Septiembre'; +$labels['longoct'] = 'Octubre'; +$labels['longnov'] = 'Noviembre'; +$labels['longdec'] = 'Diciembre'; +$labels['today'] = 'Hoy'; +$labels['refresh'] = 'Actualizar'; +$labels['checkmail'] = 'Revisar si hay nuevos mensajes'; +$labels['compose'] = 'Escribir'; +$labels['writenewmessage'] = 'Crear mensaje nuevo'; +$labels['reply'] = 'Responder'; +$labels['replytomessage'] = 'Responder a remitente'; +$labels['replytoallmessage'] = 'Responder a la lista o al remittente y todos los destinatarios'; +$labels['replyall'] = 'Responder a todos'; +$labels['replylist'] = 'Responder a la lista'; +$labels['forward'] = 'Re-enviar'; +$labels['forwardinline'] = 'Reenviar en linea'; +$labels['forwardattachment'] = 'Re-enviar como archivo adjunto'; +$labels['forwardmessage'] = 'Re-enviar el mensaje'; +$labels['deletemessage'] = 'Eliminar el mensaje'; +$labels['movemessagetotrash'] = 'Mover a la papelera'; +$labels['printmessage'] = 'Imprimir este mensaje'; +$labels['previousmessage'] = 'Mostrar mensaje anterior'; +$labels['firstmessage'] = 'Mostrar primer mensaje'; +$labels['nextmessage'] = 'Mostrar el siguiente mensaje '; +$labels['lastmessage'] = 'Mostrar el último mensaje'; +$labels['backtolist'] = 'Volver a la lista de mensajes'; +$labels['viewsource'] = 'Mostrar fuente'; +$labels['mark'] = 'Marcar'; +$labels['markmessages'] = 'Macar mensajes'; +$labels['markread'] = 'Como leido'; +$labels['markunread'] = 'Como no leido'; +$labels['markflagged'] = 'Como marcado'; +$labels['markunflagged'] = 'Como no marcado'; +$labels['moreactions'] = 'Más acciones...'; +$labels['more'] = 'Más'; +$labels['back'] = 'Atrás'; +$labels['options'] = 'Opciones'; +$labels['select'] = 'Seleccionar'; +$labels['all'] = 'Todos'; +$labels['none'] = 'Ninguno'; +$labels['currpage'] = 'Página actual'; +$labels['unread'] = 'No leido'; +$labels['flagged'] = 'Marcado'; +$labels['unanswered'] = 'No respondido'; +$labels['withattachment'] = 'Con archivo adjunto'; +$labels['deleted'] = 'Eliminado'; +$labels['undeleted'] = 'No eliminado'; +$labels['invert'] = 'Invertir'; +$labels['filter'] = 'Filtrar'; +$labels['list'] = 'Enumerar'; +$labels['threads'] = 'Hilos'; +$labels['expand-all'] = 'Expandir todos'; +$labels['expand-unread'] = 'Espandir no leidos'; +$labels['collapse-all'] = 'Colapsar todos'; +$labels['threaded'] = 'En hilo'; +$labels['autoexpand_threads'] = 'Expandir hilos'; +$labels['do_expand'] = 'todos los hilos'; +$labels['expand_only_unread'] = 'solo con mensajes no leidos'; +$labels['fromto'] = 'De/Para'; +$labels['flag'] = 'Marcar'; +$labels['attachment'] = 'Archivo adjunto'; +$labels['nonesort'] = 'Ninguno'; +$labels['sentdate'] = 'Fecha de envÃo'; +$labels['arrival'] = 'Fecha de recepción'; +$labels['asc'] = 'ascendiente'; +$labels['desc'] = 'descendiente'; +$labels['listcolumns'] = 'Enumerar columnas'; +$labels['listsorting'] = 'Ordenar columnas'; +$labels['listorder'] = 'Ordenado por'; +$labels['folderactions'] = 'Acciones de carpeta'; +$labels['compact'] = 'Comprimir'; +$labels['empty'] = 'Vaciar'; +$labels['importmessages'] = 'Importar mensajes'; +$labels['quota'] = 'Uso de disco'; +$labels['unknown'] = 'desconocido'; +$labels['unlimited'] = 'ilimitado'; +$labels['quicksearch'] = 'Búsqueda rápida'; +$labels['searchmod'] = 'Modificadores de búsqueda'; +$labels['msgtext'] = 'Mensaje completo'; +$labels['body'] = 'Cuerpo'; +$labels['type'] = 'Tipo'; +$labels['namex'] = 'Nombre'; +$labels['openinextwin'] = 'Abrir en una ventana nueva'; +$labels['emlsave'] = 'Descargar (.eml)'; +$labels['changeformattext'] = 'Mostrar en texto plano'; +$labels['changeformathtml'] = 'Mostrar en formato HTML'; +$labels['editasnew'] = 'Editar como nuevo'; +$labels['send'] = 'Enviar'; +$labels['sendmessage'] = 'Enviar mensaje'; +$labels['savemessage'] = 'Guardar como borrador'; +$labels['addattachment'] = 'Adjuntar archivo'; +$labels['editortype'] = 'Tipo de editor'; +$labels['mailreplyintro'] = 'El $date, $sender escribió:'; +$labels['originalmessage'] = 'Mensaje Original'; +$labels['editidents'] = 'Editar identidades'; +$labels['resumeediting'] = 'Resumir edición'; +$labels['revertto'] = 'Revertir a'; +$labels['restore'] = 'Restaurar'; +$labels['restoremessage'] = '¿Restaurar mensaje?'; +$labels['responses'] = 'Respuestas'; +$labels['insertresponse'] = 'Insertar una respuesta'; +$labels['manageresponses'] = 'Administrar respuestas'; +$labels['savenewresponse'] = 'Guardar nueva respuesta'; +$labels['editresponses'] = 'Editar respuestas'; +$labels['editresponse'] = 'Editar respuesta'; +$labels['responsename'] = 'Nombre'; +$labels['attach'] = 'Adjuntar'; +$labels['attachments'] = 'Archivos adjuntos'; +$labels['uploadprogress'] = '$percent ($current de $total)'; +$labels['close'] = 'Cerrar'; +$labels['messageoptions'] = 'Opciones de mensaje'; +$labels['low'] = 'Bajo'; +$labels['lowest'] = 'Más bajo'; +$labels['normal'] = 'Normal'; +$labels['high'] = 'Alto'; +$labels['highest'] = 'Más alto'; +$labels['nosubject'] = '(sin tÃtulo)'; +$labels['showimages'] = 'Mostrar imágenes'; +$labels['alwaysshow'] = 'Mostrar siempre las imagenes de $sender'; +$labels['isdraft'] = 'Este mensaje es un borrador.'; +$labels['andnmore'] = '$nr more...'; +$labels['htmltoggle'] = 'HTML'; +$labels['plaintoggle'] = 'Texto plano'; +$labels['savesentmessagein'] = 'Guardar mensaje enviado en '; +$labels['dontsave'] = 'No guardar'; +$labels['maxuploadsize'] = 'El tamaño máximo permitido por archivo es $size'; +$labels['addcc'] = 'Y Cc'; +$labels['addbcc'] = 'Y Bcc'; +$labels['addreplyto'] = 'Agregar Responder-a'; +$labels['mdnrequest'] = 'El remitente de este mensaje a pedido ser notificado cuando leas el mensaje. ¿Quieres notificar al remitente?'; +$labels['name'] = 'Nombre de pantalla'; +$labels['firstname'] = 'Primer nombre'; +$labels['surname'] = 'Apellido'; +$labels['middlename'] = 'Segundo Nombre'; +$labels['nameprefix'] = 'Prefijo'; +$labels['namesuffix'] = 'Sufijo'; +$labels['nickname'] = 'Sobrenombre'; +$labels['jobtitle'] = 'Puesto'; +$labels['department'] = 'Departamento'; +$labels['maidenname'] = 'Apellido de soltera'; +$labels['email'] = 'Email'; +$labels['phone'] = 'Teléfono'; +$labels['address'] = 'Dirección'; +$labels['street'] = 'Calle'; +$labels['locality'] = 'Ciudad'; +$labels['zipcode'] = 'Código Postal'; +$labels['region'] = 'Estado/Provincia'; +$labels['country'] = 'Pais'; +$labels['birthday'] = 'Cumpleaños'; +$labels['anniversary'] = 'Aniversario'; +$labels['website'] = 'Sitio Web'; +$labels['instantmessenger'] = 'IM'; +$labels['notes'] = 'Notas'; +$labels['male'] = 'masculino'; +$labels['female'] = 'femenino'; +$labels['manager'] = 'Administrador'; +$labels['assistant'] = 'Asistente'; +$labels['spouse'] = 'Conjuge'; +$labels['allfields'] = 'Todos los campos'; +$labels['search'] = 'Buscar'; +$labels['advsearch'] = 'Busqueda Avanzada'; +$labels['advanced'] = 'Avanzado'; +$labels['other'] = 'Otro'; +$labels['typehome'] = 'Casa'; +$labels['typework'] = 'Trabajo'; +$labels['typeother'] = 'Otro'; +$labels['typemobile'] = 'Móvil'; +$labels['typemain'] = 'Principal'; +$labels['typehomefax'] = 'Fax Casa'; +$labels['typeworkfax'] = 'Fax Oficina'; +$labels['typecar'] = 'Auto'; +$labels['typevideo'] = 'Video'; +$labels['typeassistant'] = 'Assistente'; +$labels['typehomepage'] = 'Página Web'; +$labels['typeblog'] = 'Blog'; +$labels['typeprofile'] = 'Perfil'; +$labels['addfield'] = 'Agregar campo...'; +$labels['addcontact'] = 'Agregar nuevo contacto'; +$labels['editcontact'] = 'Editar contacto'; +$labels['contacts'] = 'Contactos'; +$labels['contactproperties'] = 'Propiedades del contacto'; +$labels['personalinfo'] = 'Información Personal'; +$labels['edit'] = 'Editar'; +$labels['cancel'] = 'Cancelar'; +$labels['save'] = 'Guardar'; +$labels['delete'] = 'Eliminar'; +$labels['rename'] = 'Renombrar'; +$labels['addphoto'] = 'Agregar'; +$labels['replacephoto'] = 'Remplazar'; +$labels['uploadphoto'] = 'Subir foto'; +$labels['newcontact'] = 'Crear nueva tarjeta de contacto'; +$labels['deletecontact'] = 'Eliminar contactos seleccionados'; +$labels['composeto'] = 'Escribir mail a '; +$labels['contactsfromto'] = 'Contactos $from hasta $to de $count'; +$labels['print'] = 'Imprimir'; +$labels['export'] = 'Exportar'; +$labels['exportall'] = 'Exportar todo'; +$labels['exportsel'] = 'Exportar los seleccionados'; +$labels['exportvcards'] = 'Exportar contactos en formato vCard'; +$labels['newcontactgroup'] = 'Crear grupo de contactos nuevo'; +$labels['grouprename'] = 'Renombrar grupo'; +$labels['groupdelete'] = 'Eliminar grupo'; +$labels['groupremoveselected'] = 'Eliminar contactos seleccionados del grupo'; +$labels['previouspage'] = 'Mostrar página anterior'; +$labels['firstpage'] = 'Mostrar primera página'; +$labels['nextpage'] = 'Mostrar página siguiente'; +$labels['lastpage'] = 'Mostrar última página'; +$labels['group'] = 'Grupo'; +$labels['groups'] = 'Grupos'; +$labels['listgroup'] = 'Mostrar miembros del grupo'; +$labels['personaladrbook'] = 'Direcciones personales'; +$labels['searchsave'] = 'Guardar búsqueda'; +$labels['searchdelete'] = 'Eliminar busqueda'; +$labels['import'] = 'Importar'; +$labels['importcontacts'] = 'Importar contactos'; +$labels['importfromfile'] = 'Importar desde archivo'; +$labels['importtarget'] = 'Agregar contactos a'; +$labels['importreplace'] = 'Remplazar la libreta de direcciones completa'; +$labels['importgroups'] = 'Importar tareas del grupo'; +$labels['importgroupsall'] = 'Todo (crear grupos si es necesario)'; +$labels['done'] = 'Listo'; +$labels['about'] = 'Sobre'; +$labels['preferences'] = 'Preferencias'; +$labels['userpreferences'] = 'Preferencias de usuario '; +$labels['editpreferences'] = 'Editar preferencias de usuario '; +$labels['identities'] = 'identidades'; +$labels['manageidentities'] = 'Administrar identidades para esta cuenta '; +$labels['newidentity'] = 'Identidad nueva '; +$labels['newitem'] = 'Elemento nuevo '; +$labels['edititem'] = 'Editar elemento '; +$labels['preferhtml'] = 'Mostrar HTML '; +$labels['htmlmessage'] = 'Mensaje HTML '; +$labels['digitalsig'] = 'Firma digital'; +$labels['dateformat'] = 'Formato de fecha'; +$labels['timeformat'] = 'Formato de hora'; +$labels['setdefault'] = 'Predeterminar'; +$labels['autodetect'] = 'Automático'; +$labels['language'] = 'Idioma'; +$labels['timezone'] = 'Zona horaria'; +$labels['pagesize'] = 'Columnas por página '; +$labels['signature'] = 'Firma'; +$labels['showinextwin'] = 'Abrir mensaje en una ventana nueva '; +$labels['composeextwin'] = 'Escribir en una ventana nueva '; +$labels['htmleditor'] = 'Escribir mensajes HTML'; +$labels['htmlsignature'] = 'Firma HTML '; +$labels['showemail'] = 'Mostrar dirección de email junto al nombre de pantalla'; +$labels['previewpane'] = 'Mostrar vista previa '; +$labels['logoutclear'] = 'Vaciar la papelera al salir'; +$labels['logoutcompact'] = 'Comprimir la bandeja de entrada al salir'; +$labels['uisettings'] = 'Interfaz de usuario'; +$labels['ignore'] = 'ignorar'; +$labels['readwhendeleted'] = 'Marcar mensaje como leÃdo al elimiarlo '; +$labels['skipdeleted'] = 'No mostrar mensajes eliminados '; +$labels['always'] = 'siempre '; +$labels['showinlineimages'] = 'Mostrar imágenes adjuntas debajo del mensaje'; +$labels['autosavedraft'] = 'Guardar borrador automáticamente'; +$labels['everynminutes'] = 'cada $n minuto(s)'; +$labels['never'] = 'nunca'; +$labels['immediately'] = 'inmediatamente'; +$labels['messagesdisplaying'] = 'Mostrando mensajes'; +$labels['messagescomposition'] = 'Escribiendo mensajes'; +$labels['advancedoptions'] = 'Opciones avanzadas'; +$labels['mainoptions'] = 'Opciones Principales'; +$labels['browseroptions'] = 'Opciones del Navagador'; +$labels['section'] = 'Sección'; +$labels['maintenance'] = 'Mantenimiento'; +$labels['newmessage'] = 'Mensaje Nuevo'; +$labels['signatureoptions'] = 'Opciones de Firma'; +$labels['whenreplying'] = 'Al responder'; +$labels['replyempty'] = 'No citar el mensaje original '; +$labels['replytopposting'] = 'comenzar mensaje nuevo arriba de la cita'; +$labels['replybottomposting'] = 'comenzar mensaje nuevo debajo de la cita'; +$labels['replyremovesignature'] = 'Al responder borrar la firma original del mensaje'; +$labels['autoaddsignature'] = 'Agregar firma automáticamente'; +$labels['newmessageonly'] = 'solo mensajes nuevos'; +$labels['insertsignature'] = 'insertar firma'; +$labels['spellcheckignoresyms'] = 'Ignorar palabras con sÃmbolos'; +$labels['spellcheckignorenums'] = 'Ignorar palabras con números'; +$labels['addtodict'] = 'Agregar al diccionario'; +$labels['standardwindows'] = 'Tratar popups como ventanas comunes'; +$labels['asattachment'] = 'como adjunto'; +$labels['replyalldefault'] = 'responder a todos'; +$labels['folder'] = 'Carpeta'; +$labels['folders'] = 'Carpetas'; +$labels['foldername'] = 'Nombre de carpeta'; +$labels['messagecount'] = 'Mensajes'; +$labels['create'] = 'Crear'; +$labels['createfolder'] = 'Crear carpeta nueva'; +$labels['managefolders'] = 'Administrar carpetas'; +$labels['specialfolders'] = 'Capetas Especiales'; +$labels['properties'] = 'Propiedades'; +$labels['location'] = 'Ubicación'; +$labels['info'] = 'Información'; +$labels['getfoldersize'] = 'Click para ver el tamaño de la carpeta'; +$labels['changesubscription'] = 'Click para cambiar la subscripción'; +$labels['foldertype'] = 'Tipo de Carpeta'; +$labels['personalfolder'] = 'Carpeta Privada'; +$labels['otherfolder'] = 'Carpeta de otro usuario'; +$labels['sharedfolder'] = 'Carpeta pública'; +$labels['sortby'] = 'Ordenar por'; +$labels['sortasc'] = 'Ordenar ascendientemente'; +$labels['sortdesc'] = 'Ordenar descendientemente'; +$labels['undo'] = 'Deshacer'; +$labels['installedplugins'] = 'Extensiones instaladas'; +$labels['plugin'] = 'Extensión'; +$labels['version'] = 'Versión'; +$labels['source'] = 'Fuente'; +$labels['license'] = 'Licencia'; +$labels['B'] = 'B'; +$labels['KB'] = 'KB'; +$labels['MB'] = 'MB'; +$labels['GB'] = 'GB'; +$labels['unicode'] = 'Unicode'; +$labels['english'] = 'Inglés'; +$labels['westerneuropean'] = 'Europeo Occidental'; +$labels['easterneuropean'] = 'Europeo Oriental'; +$labels['southeasterneuropean'] = 'Europeo Sur-Oriental'; +$labels['baltic'] = 'Baltico'; +$labels['arabic'] = 'Arabigo'; +$labels['greek'] = 'Griego'; +$labels['hebrew'] = 'Hebreo'; +$labels['turkish'] = 'Turko'; +$labels['nordic'] = 'Nordico'; +$labels['thai'] = 'Thai'; +$labels['celtic'] = 'Celta'; +$labels['vietnamese'] = 'Vietnamese'; +$labels['japanese'] = 'Japonés'; +$labels['korean'] = 'Koreano'; +$labels['chinese'] = 'Chino'; +?> diff --git a/program/localization/fy_NL/messages.inc b/program/localization/es_419/messages.inc index da4e39679..a22c53da8 100644 --- a/program/localization/fy_NL/messages.inc +++ b/program/localization/es_419/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -15,4 +15,12 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ +$messages['errortitle'] = '¡Ha ocurrido un error!'; +$messages['loginfailed'] = 'Falló el Login'; +$messages['cookiesdisabled'] = 'Su navegador no acepta cookies.'; +$messages['sessionerror'] = 'Su sesión es inválida o ha expirado.'; +$messages['storageerror'] = 'Ha fallado la conexión al servidor de almacenamiento.'; +$messages['servererror'] = '¡Error del servidor!'; +$messages['servererrormsg'] = 'Error del servidor: $msg'; +$messages['dberror'] = 'Error en la base de datos'; ?> diff --git a/program/localization/es_ES/labels.inc b/program/localization/es_ES/labels.inc index 66fcafd0b..ba17a4dff 100644 --- a/program/localization/es_ES/labels.inc +++ b/program/localization/es_ES/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to de $count'; $labels['copy'] = 'Copiar'; $labels['move'] = 'Mover'; $labels['moveto'] = 'Mover a…'; +$labels['copyto'] = 'Copiar a...'; $labels['download'] = 'Descargar'; $labels['open'] = 'Abrir'; $labels['showattachment'] = 'Mostrar'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Corrector ortográfico'; $labels['checkspelling'] = 'Revisar ortografÃa'; $labels['resumeediting'] = 'Continuar edición'; $labels['revertto'] = 'Revertir a'; +$labels['restore'] = 'Restaurar'; +$labels['restoremessage'] = '¿Restaurar el mensaje?'; +$labels['responses'] = 'Respuestas'; +$labels['insertresponse'] = 'Insertar una respuesta'; +$labels['manageresponses'] = 'Gestionar respuestas'; +$labels['savenewresponse'] = 'Guardar nueva respuesta'; +$labels['editresponses'] = 'Editar respuestas'; +$labels['editresponse'] = 'Editar respuesta'; +$labels['responsename'] = 'Nombre'; +$labels['responsetext'] = 'Texto de respuesta'; $labels['attach'] = 'Adjuntar'; $labels['attachments'] = 'Adjuntos'; $labels['upload'] = 'Subir'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Gestionar ventanas emergentes como ventanas están $labels['forwardmode'] = 'ReenvÃo de mensajes'; $labels['inline'] = 'en lÃnea'; $labels['asattachment'] = 'como adjunto'; +$labels['replyallmode'] = 'Acción predeterminada del botón [Responder a todos]'; +$labels['replyalldefault'] = 'responder a todos'; +$labels['replyalllist'] = 'responder sólo a la lista de correo (si se encuentra)'; $labels['folder'] = 'Bandeja'; $labels['folders'] = 'Carpetas'; $labels['foldername'] = 'Nombre de bandeja'; diff --git a/program/localization/es_ES/messages.inc b/program/localization/es_ES/messages.inc index 3a8b5ab31..53a136b0f 100644 --- a/program/localization/es_ES/messages.inc +++ b/program/localization/es_ES/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,8 @@ $messages['invalidrequest'] = '¡Petición no válida! No se han guardado los da $messages['invalidhost'] = 'Nombre de servidor inválido.'; $messages['nomessagesfound'] = 'No se han encontrado mensajes en esta casilla.'; $messages['loggedout'] = 'Ha cerrado bien la sesión. ¡Hasta pronto!'; -$messages['mailboxempty'] = 'La casilla está vacÃa.'; +$messages['mailboxempty'] = 'El buzón está vacÃo'; +$messages['nomessages'] = 'No hay mensajes'; $messages['refreshing'] = 'Actualizando…'; $messages['loading'] = 'Cargando...'; $messages['uploading'] = 'Subiendo archivo...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Mensaje enviado correctamente.'; $messages['savingmessage'] = 'Guardando mensaje...'; $messages['messagesaved'] = 'Mensaje guardado en borradores.'; $messages['successfullysaved'] = 'Guardado correctamente.'; +$messages['savingresponse'] = 'Guardando texto de respuesta...'; +$messages['deleteresponseconfirm'] = '¿Realmente quieres borrar este texto de respuesta?'; $messages['addedsuccessfully'] = 'Contacto añadido correctamente a la libreta de direcciones.'; $messages['contactexists'] = 'Ya existe un contacto con esta dirección de correo.'; $messages['contactnameexists'] = 'Ya existe un contacto con el mismo nombre.'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'El contacto solicitado no existe.'; $messages['contactsearchonly'] = 'Ingrese algún criterio para buscar contactos'; $messages['sendingfailed'] = 'Error al enviar mensaje.'; $messages['senttooquickly'] = 'Por favor, espere $sec segundo(s) antes de mandar este mensaje.'; +$messages['errorsavingsent'] = 'Ha ocurrido un error al guardar el mensaje enviado.'; +$messages['errorsaving'] = 'Ha ocurrido un error al guardar.'; $messages['errormoving'] = 'No se ha podido mover el/los mensaje(s).'; $messages['errorcopying'] = 'No se ha podido copiar el/los mensaje(s).'; $messages['errordeleting'] = 'No se ha podido eliminar el/los mensaje(s).'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'Por favor, introduzca al menos un destinatari $messages['nosubjectwarning'] = 'El campo "Asunto" está vacÃo. ¿Desea completarlo en este momento?'; $messages['nobodywarning'] = '¿Quiere enviar este mensaje sin texto?'; $messages['notsentwarning'] = 'El mensaje no ha sido enviado. ¿Desea descartar su mensaje?'; +$messages['restoresavedcomposedata'] = 'Se ha encontrado un mensaje redactado previamente y no enviado.\n\nAsunto: $subject\nGuardado: $date\n\n¿Desea restaurar este mensaje?'; $messages['noldapserver'] = 'Por favor, seleccione un servidor LDAP para buscar.'; $messages['nosearchname'] = 'Por favor, introduzca un nombre o la dirección de e-mail.'; $messages['notuploadedwarning'] = 'No se han subido aún todos los adjuntos. Por favor espere o cancele la subida.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'Error SMTP: $msg'; $messages['emailformaterror'] = 'Dirección e-mail incorrecta: $email'; $messages['toomanyrecipients'] = 'Hay demasiados destinatarios. Reduzca el número de destinatarios a $max.'; $messages['maxgroupmembersreached'] = 'El número de miembros del grupo excede el máximo de $max.'; +$messages['internalerror'] = 'Ha ocurrido un error interno. Por favor, inténtelo de nuevo.'; $messages['contactdelerror'] = 'No se ha podido eliminar el/los contacto(s).'; $messages['contactdeleted'] = 'Contacto(s) eliminado(s) correctamente.'; $messages['contactrestoreerror'] = 'No se han podido restaurar los contactos borrados.'; diff --git a/program/localization/eu_ES/labels.inc b/program/localization/eu_ES/labels.inc index bbfd0c6ac..8bf6e2fef 100644 --- a/program/localization/eu_ES/labels.inc +++ b/program/localization/eu_ES/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from - $to , guztira $count'; $labels['copy'] = 'Kopia'; $labels['move'] = 'Mugitu'; $labels['moveto'] = 'mugitu hona...'; +$labels['copyto'] = 'Kopiatu hona...'; $labels['download'] = 'deskargatu'; $labels['open'] = 'Ireki'; $labels['showattachment'] = 'Erakutsi'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Ortografia-egiaztatu'; $labels['checkspelling'] = 'Egiaztaketa ortografikoa'; $labels['resumeediting'] = 'Editatzen jarraitu'; $labels['revertto'] = 'Itzuli hona'; +$labels['restore'] = 'Berrezarri'; +$labels['restoremessage'] = 'Leheneratu mezua?'; +$labels['responses'] = 'Erantzunak'; +$labels['insertresponse'] = 'Txertatu erantzun bat'; +$labels['manageresponses'] = 'Kudeatu erantzunak'; +$labels['savenewresponse'] = 'Gorde erantzun berria'; +$labels['editresponses'] = 'Editatu erantzunak'; +$labels['editresponse'] = 'Editatu erantzuna'; +$labels['responsename'] = 'Izena'; +$labels['responsetext'] = 'Erantzun testua'; $labels['attach'] = 'Erantsi'; $labels['attachments'] = 'Eranskinak'; $labels['upload'] = 'Igo'; @@ -316,7 +327,11 @@ $labels['searchdelete'] = 'Ezabatu bilaketa'; $labels['import'] = 'Inportatu'; $labels['importcontacts'] = 'Inportatu kontaktoak'; $labels['importfromfile'] = 'Inportatu fitxategi honetatik:'; +$labels['importtarget'] = 'Gehitu kontaktuak hona:'; $labels['importreplace'] = 'Ordezkatu helbide-liburu osoa'; +$labels['importgroups'] = 'Inportatu talde-esleipenak'; +$labels['importgroupsall'] = 'Dena (sortu taldeak behar izatekotan)'; +$labels['importgroupsexisting'] = 'Existitzen diren taldeentzat soilik'; $labels['importdesc'] = 'Gehitzen ahal duzu kontaktuak dagoen helbide-liburu batetik.<br/>Inportatzeko onartzen diren formatuak: <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> eta CSV (komaz banandutakoak).'; $labels['done'] = 'Egina'; $labels['settingsfor'] = 'Honen ezarpenak:'; @@ -425,6 +440,9 @@ $labels['standardwindows'] = 'Tratatu laster-leihoak leiho estandar bezala'; $labels['forwardmode'] = 'Mezuak birbidaltzen'; $labels['inline'] = 'Konektatua'; $labels['asattachment'] = 'eranskin moduan'; +$labels['replyallmode'] = '[Erantzun denei] botoiaren lehenetsitako ekintza'; +$labels['replyalldefault'] = 'erantzun denei'; +$labels['replyalllist'] = 'erantzun posta zerrendara soilik (aurkitzekotan)'; $labels['folder'] = 'Karpeta'; $labels['folders'] = 'Karpetak'; $labels['foldername'] = 'Karpeta izena'; diff --git a/program/localization/eu_ES/messages.inc b/program/localization/eu_ES/messages.inc index 7d2025804..2352be1f0 100644 --- a/program/localization/eu_ES/messages.inc +++ b/program/localization/eu_ES/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,6 @@ $messages['invalidrequest'] = 'Eskaera ez da baliozkoa! Datuak ez dira gorde.'; $messages['invalidhost'] = 'Zerbitzari-izena ez da baliozkoa.'; $messages['nomessagesfound'] = 'Ez da mezurik aurkitu posta kutxa honetan'; $messages['loggedout'] = 'Saioa behar bezala amaitu duzu. Agur!'; -$messages['mailboxempty'] = 'Posta kutxa hutsik dago'; $messages['refreshing'] = 'Freskatzen...'; $messages['loading'] = 'Kargatzen...'; $messages['uploading'] = 'Fitxategia kargatzen...'; @@ -44,6 +43,8 @@ $messages['messagesent'] = 'Mezua behar bezala bidali da'; $messages['savingmessage'] = 'Mezua gordetzen...'; $messages['messagesaved'] = 'Mezua zirriborroetan gordea'; $messages['successfullysaved'] = 'Behar bezala gorde da'; +$messages['savingresponse'] = 'Erantzun-testua gordetzen...'; +$messages['deleteresponseconfirm'] = 'Seguru zaude erantzun-testu hau ezabatu nahi duzula?'; $messages['addedsuccessfully'] = 'Txartela behar bezala gehitu da helbide liburura'; $messages['contactexists'] = 'ePosta honetako txartel bat badago dagoeneko'; $messages['contactnameexists'] = 'Lehendik badago izen hori duen kontaktua.'; @@ -54,6 +55,8 @@ $messages['contactnotfound'] = 'Eskatutako txartela ez da aurkitu'; $messages['contactsearchonly'] = 'Sartu kontaktua aurkitzeko bilaketa daturen bat.'; $messages['sendingfailed'] = 'Huts mezua bidaltzerakoan'; $messages['senttooquickly'] = 'Itxaron $sec segundo mezua bidali aurretik, mesedez.'; +$messages['errorsavingsent'] = 'Errore bat gertatu da bidalitako mezua gordetzean.'; +$messages['errorsaving'] = 'Errore bat gertatu da gordetzean.'; $messages['errormoving'] = 'Ezin da mezua mugitu'; $messages['errorcopying'] = 'Ezin d(ir)a kopiatu mezua(k).'; $messages['errordeleting'] = 'Ezin da mezua ezabatu'; @@ -78,6 +81,7 @@ $messages['norecipientwarning'] = 'Mesedez behintzat hartzaile bat idatzi'; $messages['nosubjectwarning'] = '"Gaia" eremua hutsik dago. Bat idatzi nahi al duzu?'; $messages['nobodywarning'] = 'Testu gabeko mezu hau bidali?'; $messages['notsentwarning'] = 'Mezua ez da bidali. Mezua ezeztatu nahi al duzu?'; +$messages['restoresavedcomposedata'] = 'Lehendik idatzitako baina bidali gabeko mezu bat aurkitu da.\n\nGaia:$subject\nGordeta:$date\n\nBerreskuratu nahi duzu mezu hau?'; $messages['noldapserver'] = 'Mesedez hautatu bilaketa egiteko LDAP zerbitzari bat'; $messages['nosearchname'] = 'Mesedez idatzi kontaktu izen bat edo eposta helbide bat'; $messages['notuploadedwarning'] = 'Oraindik ez dira kargatu eranskin guztiak. Itxaron edo ezeztatu karga.'; @@ -140,6 +144,7 @@ $messages['smtperror'] = 'SMTP errorea: $msg'; $messages['emailformaterror'] = 'Helbide elektronikoa ez da baliozkoa: $email'; $messages['toomanyrecipients'] = 'Hartzaile gehiegi. Txikitu hartzaile kopura hona $max.'; $messages['maxgroupmembersreached'] = 'Taldeko partaideen kopurua $max -ko maximoa gainditzen du:'; +$messages['internalerror'] = 'Barne akatsa. Saiatu berriz, mesedez.'; $messages['contactdelerror'] = 'Ezin d(ir)a kontaktua(k) ezabatu.'; $messages['contactdeleted'] = 'Kontaktua(k) ongi ezabatu dira.'; $messages['contactrestoreerror'] = 'Ezin d(ir)a ezabatutako kontaktua(k) leheneratu.'; diff --git a/program/localization/fa_IR/labels.inc b/program/localization/fa_IR/labels.inc index de23577a0..801e0ec5c 100644 --- a/program/localization/fa_IR/labels.inc +++ b/program/localization/fa_IR/labels.inc @@ -18,16 +18,16 @@ $labels['welcome'] = 'به $product خوش آمدید'; $labels['username'] = 'نام کاربری'; $labels['password'] = 'گذرواژه'; -$labels['server'] = 'سرویس‌دهنده'; +$labels['server'] = 'سرور'; $labels['login'] = 'ورود'; -$labels['logout'] = 'برون‌رÙت'; -$labels['mail'] = 'پست'; +$labels['logout'] = 'خروج'; +$labels['mail'] = 'نامه'; $labels['settings'] = 'تنظیمات'; $labels['addressbook'] = 'دÙتر نشانی'; $labels['inbox'] = 'صندوق ورودی'; $labels['drafts'] = 'پیش‌نویس‌ها'; $labels['sent'] = 'Ùرستاده شده'; -$labels['trash'] = 'Øذ٠شده‌ها'; +$labels['trash'] = 'زباله‌دان'; $labels['junk'] = 'بنجل'; $labels['show_real_foldernames'] = 'نمایش نام واقعی برای پوشه‌های ویژه'; $labels['subject'] = 'موضوع'; @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from - $to از $count'; $labels['copy'] = 'رونوشت'; $labels['move'] = 'انتقال'; $labels['moveto'] = 'انتقال به...'; +$labels['copyto'] = 'رونوشت به...'; $labels['download'] = 'بارگیری'; $labels['open'] = 'باز کردن'; $labels['showattachment'] = 'نمایش'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'املاء'; $labels['checkspelling'] = 'بررسی املایی'; $labels['resumeediting'] = 'ادامه‌ی ویرایش'; $labels['revertto'] = 'برگرداندن به'; +$labels['restore'] = 'بازیابی'; +$labels['restoremessage'] = 'بازیابی پیغام؟'; +$labels['responses'] = 'پاسخ‌ها'; +$labels['insertresponse'] = 'درج پاسخ'; +$labels['manageresponses'] = 'مدیریت پاسخ‌ها'; +$labels['savenewresponse'] = 'ذخیره پاسخ جدید'; +$labels['editresponses'] = 'ویرایش پاسخ‌ها'; +$labels['editresponse'] = 'ویرایش پاسخ'; +$labels['responsename'] = 'نام'; +$labels['responsetext'] = 'متن پاسخ'; $labels['attach'] = 'پیوست کردن'; $labels['attachments'] = 'پیوست‌ها'; $labels['upload'] = 'بارگذاری'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'بکار بردن پاپ‌آپ‌ها به صور $labels['forwardmode'] = 'بازگردانی پیغام'; $labels['inline'] = 'خطی'; $labels['asattachment'] = 'به عنوان پیوست'; +$labels['replyallmode'] = 'عمل پیش‌Ùرض برای دکمه [پاسخ به همه]'; +$labels['replyalldefault'] = 'پاسخ به همه'; +$labels['replyalllist'] = 'پاسخ به Ùقط لیست پستی (در صورت یاÙتن)'; $labels['folder'] = 'پوشه'; $labels['folders'] = 'پوشه‌ها'; $labels['foldername'] = 'نام پوشه'; diff --git a/program/localization/fa_IR/messages.inc b/program/localization/fa_IR/messages.inc index 43f5a6c2a..e5d5667cf 100644 --- a/program/localization/fa_IR/messages.inc +++ b/program/localization/fa_IR/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -22,7 +22,7 @@ $messages['sessionerror'] = 'نشست شما معتبر نیست، یا منقض $messages['storageerror'] = 'اتصال به سرور مخزن ناموÙÙ‚ بود.'; $messages['servererror'] = 'خطای سرور!'; $messages['servererrormsg'] = 'خطای سرور: $msg'; -$messages['dberror'] = 'خطای پایگاه داده'; +$messages['dberror'] = 'خطای پایگاه داده!'; $messages['requesttimedout'] = 'زمان درخواست تمام شد'; $messages['errorreadonly'] = ' عمل مورد نظر انجام نشد. پوشه Ùقط خواندنی است.'; $messages['errornoperm'] = ' عمل مورد نظر انجام نشد. دسترسی وجود ندارد.'; @@ -32,28 +32,33 @@ $messages['invalidrequest'] = 'درخواست نامعتبر! هیچ داده‌ $messages['invalidhost'] = 'نام سرور غیرمعتبر.'; $messages['nomessagesfound'] = 'هیچ پیغامی در این صندوق‌پستی پیدا نشد.'; $messages['loggedout'] = 'شما با موÙقیت نشست را پایان دادید. خدانگهدار!'; -$messages['mailboxempty'] = 'صندوق‌پستی خالی است.'; +$messages['mailboxempty'] = 'صندوق پستی خالی است'; +$messages['nomessages'] = 'بدون پیغام'; $messages['refreshing'] = 'نوسازی...'; -$messages['loading'] = 'در Øال بارگذاری...'; +$messages['loading'] = 'بارگذاری...'; $messages['uploading'] = 'بارگذاری پرونده...'; -$messages['uploadingmany'] = 'بارگذاری پرونده ها...'; -$messages['loadingdata'] = 'در Øال بارگذاری داده‌ها...'; -$messages['checkingmail'] = 'بررسی برای پیغام جدید...'; -$messages['sendingmessage'] = 'در Øال ارسال پیغام...'; +$messages['uploadingmany'] = 'بارگذاری پرونده‌ها...'; +$messages['loadingdata'] = 'بارگذاری داده‌ها...'; +$messages['checkingmail'] = 'بررسی برای پیغام‌های جدید...'; +$messages['sendingmessage'] = 'ارسال پیغام...'; $messages['messagesent'] = 'پیغام با موÙقیت Ùرستاده شد.'; -$messages['savingmessage'] = 'درØال ذخیره‌ی پیغام...'; -$messages['messagesaved'] = 'پیغام در پیش‌نویس‌ها ذخیره شد'; +$messages['savingmessage'] = 'ذخیره‌ی پیغام...'; +$messages['messagesaved'] = 'پیغام در پیش‌نویس‌ها ذخیره شد.'; $messages['successfullysaved'] = 'با موÙقیت ذخیره شد.'; +$messages['savingresponse'] = 'ذخیره متن پاسخ...'; +$messages['deleteresponseconfirm'] = 'آیا واقعا می‌خواهید این متن پاسخ را Øذ٠نمایید؟'; $messages['addedsuccessfully'] = 'مخاطب با موÙقیت به دÙتر نشانی‌ها اضاÙÙ‡ شد.'; -$messages['contactexists'] = 'یک مخاطب با این ایمیل از قبل وجود دارد.'; -$messages['contactnameexists'] = 'یک مخاطب با این نام از قبل وجود دارد.'; -$messages['blockedimages'] = 'برای ØÙاظت از Øریم شخصی شما، عکس‌های با آدرس خارجی در این پیغام مسدود شده‌اند.'; -$messages['encryptedmessage'] = '!این یک پیغام رمزنگاری شده است Ùˆ قابل نمایش نیست. ببخشید'; -$messages['nocontactsfound'] = 'هیج مخاطبی پیدا نشد.'; +$messages['contactexists'] = 'هم اکنون یک مخاطب با ایمیل یکسان وجود دارد.'; +$messages['contactnameexists'] = 'در Øال Øاضر مخاطبی با نام یکسان وجود دارد.'; +$messages['blockedimages'] = 'برای ØÙاظت از Øریم شخصی شما، عکس‌های خارجی در این پیغام مسدود شده‌اند.'; +$messages['encryptedmessage'] = 'این یک پیغام رمزنگاری شده است Ùˆ قابل نمایش نیست. با عرض پوزش!'; +$messages['nocontactsfound'] = 'مخاطبی پیدا نشد.'; $messages['contactnotfound'] = 'مخاطب درخواست شده پیدا نشد.'; -$messages['contactsearchonly'] = 'برای یاÙتن مخاطب عبارتی را جستجو کنید'; +$messages['contactsearchonly'] = 'برای یاÙتن مخاطب‌ها، عبارت جستجو را وارد کنید'; $messages['sendingfailed'] = 'ارسال پیغام ناموÙÙ‚ بود.'; $messages['senttooquickly'] = 'لطÙا قبل از ارسال این پیغام $sec ثانیه صبر کنید.'; +$messages['errorsavingsent'] = 'خطایی رخ داده است پیام ارسالی ذخیره Ù…ÛŒ گردد.'; +$messages['errorsaving'] = 'خطایی در ذخیره کردن رخ داده است.'; $messages['errormoving'] = 'پیغام(ها) منتقل نشدند.'; $messages['errorcopying'] = 'پیغام(ها) Ú©Ù¾ÛŒ نشدند.'; $messages['errordeleting'] = 'پیغام(ها) Øذ٠نشدند.'; @@ -78,6 +83,8 @@ $messages['norecipientwarning'] = 'لطÙاً Øداقل یک گیرنده ÙˆØ§Ø $messages['nosubjectwarning'] = 'قسمت "موضوع" خالی است. می‌خواهید اکنون وارد کنید؟'; $messages['nobodywarning'] = 'این پیغام بدون متن ارسال شود؟'; $messages['notsentwarning'] = 'پیغام ارسال نشده است. آیا می‌خواهید پیغام را از بین ببرید؟'; +$messages['restoresavedcomposedata'] = 'نامه قبلا نوشته Ùˆ Ù†Ùرستاده یاÙت شد.\n\nموضوع: $subject\n +ذخیره شده: $date\n\nآیا می‌خواهید این پیغام را بازیابی نمایید؟'; $messages['noldapserver'] = 'لطÙا یک سرور LDAP برای جست‌و‌جو انتخاب کنید.'; $messages['nosearchname'] = 'لطÙا نام یک مخاطب یا یک نشانی ایمیل وارد کنید.'; $messages['notuploadedwarning'] = 'همه پیوست ها هنوز بارگذاری نشده‌اند. لطÙا صبر کرده یا بارگذاری را لغو کنید.'; @@ -140,6 +147,7 @@ $messages['smtperror'] = 'خطای SMTP: $msg'; $messages['emailformaterror'] = 'پست الکترونیکی نامعتبر: $email'; $messages['toomanyrecipients'] = 'گیرنده‌های بیش از اندازه: تعداد گیرنده ها را به $max کاهش دهید.'; $messages['maxgroupmembersreached'] = 'تعداد اعضای گروه بیشتر از $max است.'; +$messages['internalerror'] = 'یک خطای داخلی رخ داده است. لطÙا دوباره سعی کنید.'; $messages['contactdelerror'] = 'Øذ٠مخاطب(ها) انجام شد.'; $messages['contactdeleted'] = 'مخاطب(ها) با موÙقیت Øذ٠شدند.'; $messages['contactrestoreerror'] = 'مخاطب(های) Øذ٠شده بازگردانی نخواهند شد.'; diff --git a/program/localization/fi_FI/labels.inc b/program/localization/fi_FI/labels.inc index 8a9064028..f9d6e5481 100644 --- a/program/localization/fi_FI/labels.inc +++ b/program/localization/fi_FI/labels.inc @@ -29,6 +29,7 @@ $labels['drafts'] = 'Luonnokset'; $labels['sent'] = 'Lähetetyt'; $labels['trash'] = 'Roskakori'; $labels['junk'] = 'Roskaposti'; +$labels['show_real_foldernames'] = 'Näytä erikoiskansioiden oikeat nimet'; $labels['subject'] = 'Aihe'; $labels['from'] = 'Lähettäjä'; $labels['sender'] = 'Lähettäjä'; @@ -51,6 +52,7 @@ $labels['fromtoshort'] = '$from - $to (yhteensä $count)'; $labels['copy'] = 'Kopioi'; $labels['move'] = 'Siirrä'; $labels['moveto'] = 'siirrä kansioon...'; +$labels['copyto'] = 'Kopioi...'; $labels['download'] = 'lataa'; $labels['open'] = 'Avaa'; $labels['showattachment'] = 'Näytä'; @@ -196,6 +198,15 @@ $labels['spellcheck'] = 'Oikeinkirjoitus'; $labels['checkspelling'] = 'Tarkista oikeinkirjoitus'; $labels['resumeediting'] = 'Jatka muokkausta'; $labels['revertto'] = 'Muuta takaisin'; +$labels['restore'] = 'Palauta'; +$labels['restoremessage'] = 'Palautetaanko viesti?'; +$labels['responses'] = 'Vastaukset'; +$labels['manageresponses'] = 'Hallitse vastauksia'; +$labels['savenewresponse'] = 'Tallenna uusi vastaus'; +$labels['editresponses'] = 'Muokkaa vastauksia'; +$labels['editresponse'] = 'Muokkaa vastausta'; +$labels['responsename'] = 'Nimi'; +$labels['responsetext'] = 'Vastausteksti'; $labels['attach'] = 'Liitä'; $labels['attachments'] = 'Liitetiedostot'; $labels['upload'] = 'Lisää'; @@ -207,7 +218,7 @@ $labels['lowest'] = 'Matalin'; $labels['normal'] = 'Normaali'; $labels['high'] = 'Korkea'; $labels['highest'] = 'Korkein'; -$labels['nosubject'] = '(ei otsikkoa)'; +$labels['nosubject'] = '(ei aihetta)'; $labels['showimages'] = 'Näytä kuvat'; $labels['alwaysshow'] = 'Näytä aina lähettäjältä $sender saapuneet kuvat'; $labels['isdraft'] = 'Tämä on luonnosviesti.'; @@ -315,6 +326,7 @@ $labels['import'] = 'Tuo'; $labels['importcontacts'] = 'Tuo yhteystiedot'; $labels['importfromfile'] = 'Tuo tiedostosta:'; $labels['importreplace'] = 'Korvaa koko osoitekirja'; +$labels['importgroupsall'] = 'Kaikki (luo ryhmät tarvittaessa)'; $labels['importdesc'] = 'Voit tuoda yhteystietoja olemassa olevasta osoitekirjasta.<br/>Tuettuja muotoja ovat <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ja CSV (pilkuin erotetut arvot).'; $labels['done'] = 'Valmis'; $labels['settingsfor'] = 'Asetukset'; @@ -420,6 +432,9 @@ $labels['mailtoprotohandler'] = 'Rekisteröi mailto:-linkkien protokollakäsitte $labels['standardwindows'] = 'Käsittele popup-ikkunoita tavallisina ikkunoina'; $labels['forwardmode'] = 'Viestin välitys'; $labels['asattachment'] = 'liitteenä'; +$labels['replyallmode'] = 'Oletustoiminto [Vastaa kaikille]-painikkeelle'; +$labels['replyalldefault'] = 'vastaa kaikille'; +$labels['replyalllist'] = 'vastaa pelkälle postituslistalle (jos havaittu)'; $labels['folder'] = 'Kansio'; $labels['folders'] = 'Kansiot'; $labels['foldername'] = 'Kansion nimi'; diff --git a/program/localization/fi_FI/messages.inc b/program/localization/fi_FI/messages.inc index 1b3c3ea49..77a165860 100644 --- a/program/localization/fi_FI/messages.inc +++ b/program/localization/fi_FI/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,8 @@ $messages['invalidrequest'] = 'Virheellinen pyyntö! Tietoa ei tallennettu.'; $messages['invalidhost'] = 'Virheellinen palvelinnimi.'; $messages['nomessagesfound'] = 'Kansiossa ei ole sähköpostiviestejä'; $messages['loggedout'] = 'Sinut on kirjattu ulos järjestelmästä.'; -$messages['mailboxempty'] = 'Kansio on tyhjä'; +$messages['mailboxempty'] = 'Postilaatikko on tyhjä'; +$messages['nomessages'] = 'Ei viestejä'; $messages['refreshing'] = 'Päivitetään...'; $messages['loading'] = 'Ladataan...'; $messages['uploading'] = 'Ladataan tiedostoa palvelimelle...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Viesti lähetetty'; $messages['savingmessage'] = 'Tallennetaan viestiä...'; $messages['messagesaved'] = 'Viesti tallennettu "Luonnokset"-kansioon'; $messages['successfullysaved'] = 'Tallennus onnistui'; +$messages['savingresponse'] = 'Tallennetaan vastaustekstiä...'; +$messages['deleteresponseconfirm'] = 'Haluatko varmasti poistaa tämän vastaustekstin?'; $messages['addedsuccessfully'] = 'Yhteystieto lisätty osoitekirjaan'; $messages['contactexists'] = 'Samalla sähköpostiosoitteella on jo olemassa yhteystieto'; $messages['contactnameexists'] = 'Yhteystieto samalla nimellä on jo olemassa'; @@ -77,9 +80,10 @@ $messages['nonamewarning'] = 'Anna nimi'; $messages['nopagesizewarning'] = 'Anna sivukoko'; $messages['nosenderwarning'] = 'Anna lähettäjän sähköpostiosoite'; $messages['norecipientwarning'] = 'Anna ainakin yksi vastaanottaja'; -$messages['nosubjectwarning'] = '"Otsikko"-kenttä on tyhjä. Haluatko kirjoittaa viestillesi otsikon?'; +$messages['nosubjectwarning'] = '"Aihe"-kenttä on tyhjä. Haluatko kirjoittaa viestillesi aiheen?'; $messages['nobodywarning'] = 'Lähetetäänkö viesti ilman tekstiä?'; $messages['notsentwarning'] = 'Viestiä ei lähetetty. Haluatko poistaa viestin?'; +$messages['restoresavedcomposedata'] = 'Löydettiin aiemmin luotu, mutta lähettämätön viesti.\n\nAihe: $subject\nTallennettu: $date\n\nHaluatko palauttaa tämän viestin?'; $messages['noldapserver'] = 'Valitse LDAP-palvelin'; $messages['nosearchname'] = 'Anna yhteystiedon nimi tai sähköpostiosoite'; $messages['notuploadedwarning'] = 'Kaikkia liitteitä ei ole vielä ladattu palvelimelle. Odota tai peruuta lataus.'; diff --git a/program/localization/fo_FO/labels.inc b/program/localization/fo_FO/labels.inc new file mode 100644 index 000000000..5ac452adb --- /dev/null +++ b/program/localization/fo_FO/labels.inc @@ -0,0 +1,394 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/<lang>/labels.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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ +*/ +$labels['welcome'] = 'Vælkomin til $product'; +$labels['username'] = 'Brúkaranavn'; +$labels['password'] = 'Loyniorð'; +$labels['server'] = 'Ambætari'; +$labels['login'] = 'Rita inn'; +$labels['logout'] = 'Rita út'; +$labels['mail'] = 'Teldupostur'; +$labels['settings'] = 'Stillingar'; +$labels['addressbook'] = 'Búðstaðarsavn'; +$labels['inbox'] = 'Postur'; +$labels['drafts'] = 'Skitsur'; +$labels['sent'] = 'Sent'; +$labels['trash'] = 'Skrell'; +$labels['junk'] = 'Møsn'; +$labels['subject'] = 'Evni'; +$labels['from'] = 'Frá'; +$labels['sender'] = 'Sendari'; +$labels['to'] = 'Til'; +$labels['cc'] = 'Cc'; +$labels['bcc'] = 'Bcc'; +$labels['replyto'] = 'Svara-til'; +$labels['followupto'] = 'Fylg við-til'; +$labels['date'] = 'Dato'; +$labels['size'] = 'Stødd'; +$labels['priority'] = 'Raðfesting'; +$labels['organization'] = 'Fyritøka'; +$labels['readstatus'] = 'Les støðu'; +$labels['listoptions'] = 'Lýs valmøguleikar...'; +$labels['mailboxlist'] = 'Mappur'; +$labels['messagesfromto'] = 'Boðini frá $from til $to ið eru $count'; +$labels['threadsfromto'] = 'Tráðirnir frá $from til $to ið eru $count'; +$labels['messagenrof'] = 'Boðini ið eru $count'; +$labels['fromtoshort'] = '$from - $to ið eru $count'; +$labels['copy'] = 'Avrita'; +$labels['move'] = 'Flyt'; +$labels['moveto'] = 'Flyt til...'; +$labels['download'] = 'Heinta'; +$labels['showattachment'] = 'VÃs'; +$labels['showanyway'] = 'VÃs tað avlÃkavæl'; +$labels['filename'] = 'FÃlu navn'; +$labels['filesize'] = 'FÃlu stødd'; +$labels['addtoaddressbook'] = 'Legg aftrat búðstaðar bók'; +$labels['sun'] = 'Sun'; +$labels['mon'] = 'Mán'; +$labels['tue'] = 'Týs'; +$labels['wed'] = 'Mik'; +$labels['thu'] = 'Hós'; +$labels['fri'] = 'FrÃ'; +$labels['sat'] = 'Ley'; +$labels['sunday'] = 'Sunnudagur'; +$labels['monday'] = 'Mánadagur'; +$labels['tuesday'] = 'Týsdagur'; +$labels['wednesday'] = 'Mikudagur'; +$labels['thursday'] = 'Hósdagur'; +$labels['friday'] = 'FrÃggjardagur'; +$labels['saturday'] = 'Leygardagur'; +$labels['jan'] = 'Jan'; +$labels['feb'] = 'Feb'; +$labels['mar'] = 'Mar'; +$labels['apr'] = 'Apr'; +$labels['may'] = 'Maj'; +$labels['jun'] = 'Jun'; +$labels['jul'] = 'Jul'; +$labels['aug'] = 'Aug'; +$labels['sep'] = 'Sep'; +$labels['oct'] = 'Okt'; +$labels['nov'] = 'Nov'; +$labels['dec'] = 'Des'; +$labels['longjan'] = 'Januar'; +$labels['longfeb'] = 'Februar'; +$labels['longmar'] = 'Mars'; +$labels['longapr'] = 'AprÃl'; +$labels['longmay'] = 'Maj'; +$labels['longjun'] = 'Juni'; +$labels['longjul'] = 'July'; +$labels['longaug'] = 'August'; +$labels['longsep'] = 'Septembur'; +$labels['longoct'] = 'Oktobur'; +$labels['longnov'] = 'Novembur'; +$labels['longdec'] = 'Desembur'; +$labels['today'] = 'à dag'; +$labels['refresh'] = 'Endur innles'; +$labels['checkmail'] = 'Kann fyri nýggj boð.'; +$labels['compose'] = 'Stovna'; +$labels['writenewmessage'] = 'Stovna nýggj boð'; +$labels['reply'] = 'Svara'; +$labels['replytomessage'] = 'Svara til sendara'; +$labels['replytoallmessage'] = 'Svara til listan ella til sendara og allir móttakarir'; +$labels['replyall'] = 'Svara øllum'; +$labels['replylist'] = 'Svara lista'; +$labels['forward'] = 'Send vÃðari'; +$labels['forwardinline'] = 'Svara vÃðari, við gomlum teksti'; +$labels['forwardattachment'] = 'Send vÃðari sum viðhefting'; +$labels['forwardmessage'] = 'Send hesi boð vÃðari'; +$labels['deletemessage'] = 'Strika boð'; +$labels['movemessagetotrash'] = 'Koyr boð à skrell'; +$labels['printmessage'] = 'Útskriva hesi boð'; +$labels['previousmessage'] = 'VÃs seinastu boð'; +$labels['firstmessage'] = 'VÃs fyrstu boð'; +$labels['nextmessage'] = 'VÃs næstu boð'; +$labels['lastmessage'] = 'VÃs seinastu boð'; +$labels['backtolist'] = 'Aftur til boð lista'; +$labels['viewsource'] = 'VÃs keldu'; +$labels['mark'] = 'Merk'; +$labels['markmessages'] = 'Merk boð'; +$labels['markread'] = 'Sum lisin'; +$labels['markunread'] = 'Sum ólisin'; +$labels['markflagged'] = 'Sum viðmerkt'; +$labels['markunflagged'] = 'Sum óviðmerkt'; +$labels['moreactions'] = 'Fleiri gerir...'; +$labels['more'] = 'Meira'; +$labels['back'] = 'Aftur'; +$labels['options'] = 'Valmøguleikar'; +$labels['select'] = 'Vel'; +$labels['all'] = 'Alt'; +$labels['none'] = 'Einki'; +$labels['currpage'] = 'Hesa sÃðu'; +$labels['unread'] = 'Ólisið'; +$labels['flagged'] = 'Viðmerkt'; +$labels['unanswered'] = 'Ikki svara'; +$labels['deleted'] = 'Strika'; +$labels['undeleted'] = 'Ikki strika'; +$labels['invert'] = 'Vend við'; +$labels['filter'] = 'SÃla'; +$labels['list'] = 'Listið'; +$labels['threads'] = 'Tráðir'; +$labels['expand-all'] = 'Spreið alt'; +$labels['expand-unread'] = 'Spreið ólisið'; +$labels['collapse-all'] = 'Sett saman alt'; +$labels['threaded'] = 'Tráða'; +$labels['autoexpand_threads'] = 'Spreið boð tráðir'; +$labels['do_expand'] = 'Allir tráðir'; +$labels['expand_only_unread'] = 'einans við ólisin boð'; +$labels['fromto'] = 'Frá/Til'; +$labels['flag'] = 'Viðmerk'; +$labels['attachment'] = 'Viðhefting'; +$labels['nonesort'] = 'Einki'; +$labels['sentdate'] = 'Sent dato'; +$labels['arrival'] = 'Móttikið dato'; +$labels['asc'] = 'hækkandi'; +$labels['desc'] = 'lækkandi'; +$labels['listcolumns'] = 'List teigar'; +$labels['listsorting'] = 'Sorterar teiga'; +$labels['listorder'] = 'Sorterar rekkjufylgju'; +$labels['folderactions'] = 'Mappu gerir...'; +$labels['compact'] = 'Trýst saman'; +$labels['empty'] = 'Tøm'; +$labels['quota'] = 'Disk nýtsla'; +$labels['unknown'] = 'ókent'; +$labels['unlimited'] = 'óavmarka'; +$labels['quicksearch'] = 'Skjót leiting'; +$labels['resetsearch'] = 'Nulstilla leiting'; +$labels['searchmod'] = 'Leiti minkarir'; +$labels['msgtext'] = 'Øll boðini'; +$labels['openinextwin'] = 'Opna à nýggjum vindeyga'; +$labels['emlsave'] = 'Heinta (.eml)'; +$labels['editasnew'] = 'Broyt sum nýtt'; +$labels['send'] = 'Send'; +$labels['sendmessage'] = 'Send boð'; +$labels['savemessage'] = 'Goym sum skitsa'; +$labels['addattachment'] = 'Viðheft fÃl'; +$labels['charset'] = 'Stavusett'; +$labels['editortype'] = 'Útgevara slag'; +$labels['returnreceipt'] = 'Lat aftur kvittan'; +$labels['dsn'] = 'Útflýggja støðu kunngerð'; +$labels['mailreplyintro'] = 'Tann $date, skrivaði $sender:'; +$labels['originalmessage'] = 'Uppruna boð'; +$labels['editidents'] = 'Broyt samleikar'; +$labels['spellcheck'] = 'Stava'; +$labels['checkspelling'] = 'Kanna staving'; +$labels['resumeediting'] = 'Taka uppaftur skriving'; +$labels['revertto'] = 'Vend aftur til'; +$labels['attach'] = 'Viðheft'; +$labels['attachments'] = 'Viðheftingar'; +$labels['upload'] = 'Uppsend'; +$labels['uploadprogress'] = '$percent ($currently av $total)'; +$labels['close'] = 'Lat aftur'; +$labels['messageoptions'] = 'Boð valmøguleikar...'; +$labels['low'] = 'Lágt'; +$labels['lowest'] = 'Lágst'; +$labels['normal'] = 'Vanligt'; +$labels['high'] = 'Høgt'; +$labels['highest'] = 'Hagst'; +$labels['nosubject'] = '(einki evni)'; +$labels['showimages'] = 'VÃs myndir'; +$labels['alwaysshow'] = 'VÃs altÃð myndir frá $sender'; +$labels['isdraft'] = 'Hetta er eini skitsu boð.'; +$labels['andnmore'] = '$nr meir...'; +$labels['togglemoreheaders'] = 'VÃs meiri boð teksthøvd '; +$labels['togglefullheaders'] = 'Vel ráðan boð teksthøvd'; +$labels['htmltoggle'] = 'HTML'; +$labels['plaintoggle'] = 'Reiður tekstur'; +$labels['savesentmessagein'] = 'Goym boð à '; +$labels['dontsave'] = 'goym ikki'; +$labels['maxuploadsize'] = 'Stórsta fÃlu stødd loyvd er $size'; +$labels['addcc'] = 'Legg aftrat Cc'; +$labels['addbcc'] = 'Legg aftrat Bcc'; +$labels['addreplyto'] = 'Legg aftrat Svara-til'; +$labels['addfollowupto'] = 'Legg aftrat Fylg við-til'; +$labels['mdnrequest'] = 'Sendarin av hesi boð biður um at verða kunngjørdur tá ið tú lesur hesið boð. Vilt tú kunngerða sendaran?'; +$labels['receiptread'] = 'Svara móttakara (les)'; +$labels['yourmessage'] = 'Hetta er ein afturvend kvittan av tÃni boð'; +$labels['firstname'] = 'Fornavn'; +$labels['surname'] = 'Eftirnavn'; +$labels['middlename'] = 'Millunnavn'; +$labels['nameprefix'] = 'Forskoyti'; +$labels['namesuffix'] = 'Eftirskoyti'; +$labels['nickname'] = 'Eyknevni'; +$labels['jobtitle'] = 'Starvsheiti'; +$labels['department'] = 'Deild'; +$labels['gender'] = 'Kyn'; +$labels['maidenname'] = 'Gentunavn'; +$labels['email'] = 'Teldupostur'; +$labels['phone'] = 'Telefon'; +$labels['address'] = 'Búðstaður'; +$labels['street'] = 'Gøta'; +$labels['locality'] = 'Býur'; +$labels['zipcode'] = 'Post kota'; +$labels['region'] = 'Kommuna'; +$labels['country'] = 'Land'; +$labels['birthday'] = 'Føðingardagur'; +$labels['anniversary'] = 'Ãrsdagur'; +$labels['website'] = 'HeimasÃða'; +$labels['instantmessenger'] = 'IM'; +$labels['notes'] = 'Notatir'; +$labels['male'] = 'maður'; +$labels['female'] = 'kona'; +$labels['manager'] = 'Leiðari'; +$labels['assistant'] = 'Hjálparfólk'; +$labels['spouse'] = 'Hjúnafelagi'; +$labels['allfields'] = 'Allir teigar'; +$labels['search'] = 'Leita'; +$labels['advsearch'] = 'Framkomin leiting'; +$labels['advanced'] = 'Framkomin'; +$labels['other'] = 'Annað'; +$labels['typehome'] = 'Heim'; +$labels['typework'] = 'Arbeiði'; +$labels['typeother'] = 'Annað'; +$labels['typemobile'] = 'Fartelefon'; +$labels['typemain'] = 'Høvuðs'; +$labels['typehomefax'] = 'Heima faks'; +$labels['typeworkfax'] = 'Arbeiðis faks'; +$labels['typecar'] = 'Bilur'; +$labels['typepager'] = 'Persónleitari'; +$labels['typevideo'] = 'Sjónband'; +$labels['typeassistant'] = 'Hjálparfólk'; +$labels['typehomepage'] = 'HeimasÃða'; +$labels['typeblog'] = 'Bloggur'; +$labels['typeprofile'] = 'Umhvarv '; +$labels['addfield'] = 'Legg aftrat teiga...'; +$labels['addcontact'] = 'Legg aftrat nýggjan persón'; +$labels['editcontact'] = 'Broyt persón'; +$labels['contacts'] = 'Persónar'; +$labels['contactproperties'] = 'Persóna eginleikar'; +$labels['personalinfo'] = 'Persónligar upplýsingar'; +$labels['edit'] = 'Broyt'; +$labels['cancel'] = 'Ógilda'; +$labels['save'] = 'Goym'; +$labels['delete'] = 'Strika'; +$labels['rename'] = 'Umdoyp'; +$labels['addphoto'] = 'Legg aftrat'; +$labels['replacephoto'] = 'Skift út'; +$labels['uploadphoto'] = 'Uppsend mynd'; +$labels['newcontact'] = 'Ger nýtt persón kort'; +$labels['deletecontact'] = 'Strika valdir persónar'; +$labels['composeto'] = 'Skriva boð til'; +$labels['contactsfromto'] = 'Persónar frá $from til $to ið eru $count'; +$labels['print'] = 'Skriva út'; +$labels['export'] = 'Flyt út'; +$labels['exportvcards'] = 'Út flyt persónar við vCard slagið'; +$labels['newcontactgroup'] = 'Ger nýggja persóns bólk'; +$labels['grouprename'] = 'Umdoyp bólk'; +$labels['groupdelete'] = 'Strika bólk'; +$labels['groupremoveselected'] = 'Strika valdar persónar frá bólki'; +$labels['previouspage'] = 'VÃs fyrrverandi sÃðu'; +$labels['firstpage'] = 'VÃs fyrstu sÃðu'; +$labels['nextpage'] = 'VÃs næstu sÃðu'; +$labels['lastpage'] = 'VÃs seinastu sÃðu'; +$labels['group'] = 'Bólkur'; +$labels['groups'] = 'Bólkar'; +$labels['personaladrbook'] = 'Persónligir búðstaðir'; +$labels['searchsave'] = 'Goym leiting'; +$labels['searchdelete'] = 'Strika leiting'; +$labels['import'] = 'Innflyt'; +$labels['importcontacts'] = 'Innflyt persónar'; +$labels['importfromfile'] = 'Innflyt frá fÃlu'; +$labels['importreplace'] = 'Skift út alt búðstaðarsavni'; +$labels['importdesc'] = 'Tú kanst uppsenda persónar frá einari aðrari búðstaðar bók.<br/>Vit veita vit møguleika at innflyta búðstaðir frá<a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ella CSV (komma uppdeilt) dáta slag.'; +$labels['done'] = 'Liðugt'; +$labels['settingsfor'] = 'Stillingar til'; +$labels['about'] = 'Um'; +$labels['preferences'] = 'Vælmøguleikar'; +$labels['userpreferences'] = 'Brúkara vælmøguleikar'; +$labels['editpreferences'] = 'Broyt brúkara framÃhjárættindi'; +$labels['identities'] = 'Samleikar'; +$labels['manageidentities'] = 'Umsit samleikar fyri hesa kontu'; +$labels['newidentity'] = 'Nýtt samleiki'; +$labels['newitem'] = 'Nýtt ting'; +$labels['edititem'] = 'Broyt ting'; +$labels['preferhtml'] = 'VÃs HTML'; +$labels['defaultcharset'] = 'Sjálvset tekin set'; +$labels['htmlmessage'] = 'HTML boð'; +$labels['dateformat'] = 'Dato format'; +$labels['timeformat'] = 'TÃðs format'; +$labels['prettydate'] = 'Pen dato'; +$labels['setdefault'] = 'Set vanligt'; +$labels['autodetect'] = 'Sjálvirki'; +$labels['language'] = 'Mál'; +$labels['timezone'] = 'TÃðarsona'; +$labels['pagesize'] = 'Rekkjur per sÃðu'; +$labels['signature'] = 'Undirskrift'; +$labels['dstactive'] = 'SummartÃð'; +$labels['showinextwin'] = 'Opna boðà nýggjun vindeyga'; +$labels['composeextwin'] = 'Stovna à nýggjum vindeyga'; +$labels['htmleditor'] = 'Stovna HTML boð'; +$labels['htmlonreply'] = 'til svar til HTML boð'; +$labels['htmlonreplyandforward'] = 'til vÃðari sending ella svar til HTML boð'; +$labels['htmlsignature'] = 'HTML undirskrift'; +$labels['previewpane'] = 'VÃs undansýningar rút'; +$labels['skin'] = 'Markamóts skinn'; +$labels['logoutclear'] = 'Strika Skrell tá ið tú út ritar'; +$labels['logoutcompact'] = 'Trýst saman postkassa tá ið tú ritar út'; +$labels['uisettings'] = 'Brúkaraøki'; +$labels['serversettings'] = 'Ambætara stillingar'; +$labels['mailboxview'] = 'Postkassa sjón'; +$labels['mdnrequests'] = 'Bið um kvittan'; +$labels['askuser'] = 'spyr me'; +$labels['autosend'] = 'send kvittan'; +$labels['autosendknown'] = 'send kvittan til mÃnir persónar, annars spyr me'; +$labels['autosendknownignore'] = 'send kvittan til mÃnir persónar, annars skúgv til vigs'; +$labels['ignore'] = 'skúgv til vigs'; +$labels['readwhendeleted'] = 'Merk boði sum lisið á striking'; +$labels['flagfordeletion'] = 'Viðmerk boði til strikingar Ãstaðin fyri at strika'; +$labels['skipdeleted'] = 'VÃs ikki strika boð'; +$labels['deletealways'] = 'Um flyting av boðum til Skrell ikki riggar, strika tey so'; +$labels['deletejunk'] = 'Strika boð beinleiðis à Møsn'; +$labels['showremoteimages'] = 'VÃs regluligar fjarmyndir'; +$labels['fromknownsenders'] = 'frá ókendum sendarum'; +$labels['always'] = 'altÃð'; +$labels['showinlineimages'] = 'VÃs viðheftar myndir niðanfyri boðini'; +$labels['autosavedraft'] = 'Goym skitsu sjálvirkandi'; +$labels['everynminutes'] = 'hvønn $n minutt(ir)'; +$labels['refreshinterval'] = 'Endur innles (kannað fyri nýggjum boðum, o.s.fv.)'; +$labels['never'] = 'aldrin'; +$labels['immediately'] = 'à stundini'; +$labels['messagesdisplaying'] = 'VÃsir boð'; +$labels['messagescomposition'] = 'Stovnar boð'; +$labels['mimeparamfolding'] = 'Viðheftingar nøvn'; +$labels['2231folding'] = 'Fult RFC 2231 (Thunderbird)'; +$labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)'; +$labels['2047folding'] = 'Fult RFC 2047 (other)'; +$labels['force7bit'] = 'Nýt MIME kodingar til 8-bit tekin'; +$labels['advancedoptions'] = 'VÃðkaðir valmøguleikar'; +$labels['focusonnewmessage'] = 'Legg dent á kaga vindeyga tá ið nýtt boð verður stovna'; +$labels['checkallfolders'] = 'Kannað allar mappur fyri nýggj boð'; +$labels['displaynext'] = 'Eftir striking/flyting av boði, vÃs so næsta boð'; +$labels['defaultfont'] = 'Vanligi stavsnið av HTML boði'; +$labels['mainoptions'] = 'Høvuðs Vælmøguleikar'; +$labels['browseroptions'] = 'Kaga Valmøguleikar'; +$labels['section'] = 'Partur'; +$labels['maintenance'] = 'Umsiting'; +$labels['newmessage'] = 'Nýggj boð'; +$labels['signatureoptions'] = 'Undirskrift vælmøguleikar'; +$labels['whenreplying'] = 'Tá ið skriving verður framd'; +$labels['replyempty'] = 'sitera ikki uppruna boðini'; +$labels['replytopposting'] = 'byrja eini nýggj boð uppiyvir sitatinum'; +$labels['replybottomposting'] = 'byrja eini nýggj boð undir sitatinum'; +$labels['replyremovesignature'] = 'Tá ið svaring verðurframd, strika so uppruna sitati frá boðinum'; +$labels['autoaddsignature'] = 'Legg undirskrift á sjálvirkandi'; +$labels['newmessageonly'] = 'Nýggj boð einans'; +$labels['replyandforwardonly'] = 'svar og vÃðarsendingar einans'; +$labels['insertsignature'] = 'Innset undirskrift'; +$labels['previewpanemarkread'] = 'Merk undansýnd boð sum lisin'; +$labels['afternseconds'] = 'eftir $n sekund'; +$labels['reqmdn'] = 'Bið altÃð um eina kvittan'; +$labels['reqdsn'] = 'Bið altÃð um status kunngerð'; +?> diff --git a/program/localization/fo_FO/messages.inc b/program/localization/fo_FO/messages.inc new file mode 100644 index 000000000..be54b71d2 --- /dev/null +++ b/program/localization/fo_FO/messages.inc @@ -0,0 +1,175 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/<lang>/messages.inc | + | | + | Localization file of the Roundcube Webmail client | + | Copyright (C) 2005-2014, 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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ +*/ +$messages['errortitle'] = 'Ein feilur kom fyri!'; +$messages['loginfailed'] = 'Feilur à innriting.'; +$messages['cookiesdisabled'] = 'Kagi tÃn noktar cookies.'; +$messages['sessionerror'] = 'Seta tÃn er ógyldig ella útgingin.'; +$messages['storageerror'] = 'Feilur à samand til goymslu ambatara.'; +$messages['servererror'] = 'Ambatara Feilur!'; +$messages['servererrormsg'] = 'Ambatara Feilur: $msg'; +$messages['dberror'] = 'Dátugrun Feilur'; +$messages['requesttimedout'] = 'Umbøn gekk út'; +$messages['errorreadonly'] = 'Kann ikki fremja ger. Mappan kann einans lesast.'; +$messages['errornoperm'] = 'Kann ikki fremja ger. Atgongd nokta.'; +$messages['erroroverquota'] = 'Kann ikki fremja ger. Einki pláss á diski.'; +$messages['erroroverquotadelete'] = 'Einki pláss á diski. Brúka SHIFT+DEL fyri at strika boð.'; +$messages['invalidrequest'] = 'Ógyldig umbøn! Einki dáta varð goymt.'; +$messages['invalidhost'] = 'Ógyldigt ambatara navn.'; +$messages['nomessagesfound'] = 'Eingi boð à funnin hesum postkassa,'; +$messages['loggedout'] = 'Tú hevur strika tÃna setu. Farvæl!'; +$messages['refreshing'] = 'Endur-innlesur...'; +$messages['loading'] = 'Innlesur...'; +$messages['uploading'] = 'Leggur fÃlu út...'; +$messages['uploadingmany'] = 'Leggur fÃlur út...'; +$messages['loadingdata'] = 'Innlesur dáta...'; +$messages['checkingmail'] = 'Kannar fyri nýggj boð...'; +$messages['sendingmessage'] = 'Sendur boð...'; +$messages['messagesent'] = 'Boðini vóru send.'; +$messages['savingmessage'] = 'Goymur boðini.'; +$messages['messagesaved'] = 'Boðini goymd til Skitsur'; +$messages['successfullysaved'] = 'Goymt.'; +$messages['savingresponse'] = 'Goymur svar tekst...'; +$messages['deleteresponseconfirm'] = 'Vilt tú veruliga strika hendan svar tekst?'; +$messages['addedsuccessfully'] = 'Persónur lagdur aftrat búðstaðar savn.'; +$messages['contactexists'] = 'Ein persónur við sama telduposti er longu til.'; +$messages['contactnameexists'] = 'Ein persónur við sama navn er longu til.'; +$messages['blockedimages'] = 'Fyri at verja tÃn privatlÃv so eru fjarmyndir sperraðar à hesum boði.'; +$messages['encryptedmessage'] = 'Hetta er eini brogla boð og kann ikki sýnast. TÃverri!'; +$messages['nocontactsfound'] = 'Eingir persónar funnir.'; +$messages['contactnotfound'] = 'Umbindni persónurin varð ikki funnin.'; +$messages['contactsearchonly'] = 'Skriva onkur leiti orð fyri at finna persónar'; +$messages['sendingfailed'] = 'Riggaði ikki at senda boð.'; +$messages['senttooquickly'] = 'Vinarliga bÃða $sec sekund(ir) áðrenn tú sendur hetta boð.'; +$messages['errorsavingsent'] = 'Ein feilur kom fyri tá ið roynt var at goyma send boð.'; +$messages['errorsaving'] = 'Ein feilur kom fyri tá ið goymt var.'; +$messages['errormoving'] = 'Kundi ikki flyta boð(ini).'; +$messages['errorcopying'] = 'Kundi ikki avrita boð(ini).'; +$messages['errordeleting'] = 'Kundi ikki strika boð(ini).'; +$messages['errormarking'] = 'Kundi ikki merkja boð(ini).'; +$messages['deletecontactconfirm'] = 'Ert tú vÃsur à at tú vilt strika merkt(ar) persónar?'; +$messages['deletegroupconfirm'] = 'Ert tú vÃsur à at tú vilt strika valda bólk?'; +$messages['deletemessagesconfirm'] = 'Ert tú vÃsur à at tú vilt strika vald boð()?'; +$messages['deletefolderconfirm'] = 'Ert tú vÃsur à at tú vilt strika hesa mappu?'; +$messages['purgefolderconfirm'] = 'Ert tú vÃsur à at tú vilt strika øll boð à hesu mappu?'; +$messages['contactdeleting'] = 'Strikar persón(ar)...'; +$messages['groupdeleting'] = 'Strikar bólk...'; +$messages['folderdeleting'] = 'Strikar mappu...'; +$messages['foldermoving'] = 'Flytur mappu...'; +$messages['foldersubscribing'] = 'Tegnar til mappu...'; +$messages['folderunsubscribing'] = 'Ógyldar tekning til mappu...'; +$messages['formincomplete'] = 'Allir teigirnir vóru ikki fyltir út.'; +$messages['noemailwarning'] = 'Vinarliga skriva ein galdandi teldupost.'; +$messages['nonamewarning'] = 'Vinarliga skriva eitt navn.'; +$messages['nopagesizewarning'] = 'Vinarliga skriva sÃðu stødd.'; +$messages['nosenderwarning'] = 'Vinarliga skriva sendara teldupost búðstað.'; +$messages['norecipientwarning'] = 'Vinarliga skriva minst ein móttakara.'; +$messages['nosubjectwarning'] = 'Evna teigurin er tómur. Vilt tú skriva nakað à hann?'; +$messages['nobodywarning'] = 'Send hesi boð uttan tekst?'; +$messages['notsentwarning'] = 'Boðini vóru ikki send. Ynskir tú strika hetta boð?'; +$messages['restoresavedcomposedata'] = 'Eitt fyrrverandi skriva boð, men ósent, boð var funni.\n\nEvni: $subject\nGoymt: $date\n\nVilt tú endur stovna hetta boð?'; +$messages['noldapserver'] = 'Vinarliga vel ein ldap ambatara fyri at leita.'; +$messages['nosearchname'] = 'Vinarliga skriva eitt persón navn ella teldupost búðstað,'; +$messages['notuploadedwarning'] = 'Ikki allar viðheftingar eru uppsendar enn. Vinarliga bÃða ella angra uppsendingina.'; +$messages['searchsuccessful'] = '$nr boð funnin.'; +$messages['contactsearchsuccessful'] = '$nr persónar funnir.'; +$messages['searchnomatch'] = 'Leiting gav eingin úrslit.'; +$messages['searching'] = 'Leitar...'; +$messages['checking'] = 'Kannar...'; +$messages['nospellerrors'] = 'Eingin stavifeilur funnin.'; +$messages['folderdeleted'] = 'Mappa sletta.'; +$messages['foldersubscribed'] = 'Mappa tekna til.'; +$messages['folderunsubscribed'] = 'Ógylt tekning til mappu.'; +$messages['folderpurged'] = 'Mappan er tómd.'; +$messages['folderexpunged'] = 'Mappan var samantrongd.'; +$messages['deletedsuccessfully'] = 'Strika uftan feilir.'; +$messages['converting'] = 'Tekur burt forsniðing...'; +$messages['messageopenerror'] = 'Kundi ikki lesa inn boð frá servara.'; +$messages['fileuploaderror'] = 'FÃla uppsending riggaði ikk.'; +$messages['filesizeerror'] = 'Uppsendi fÃlur er stórri enn grensan ið er $size.'; +$messages['copysuccess'] = 'Avrita $nr persónar.'; +$messages['movesuccess'] = 'Flutt $nr persónar.'; +$messages['copyerror'] = 'Kundi ikki avrita persónar.'; +$messages['moveerror'] = 'Kundi ikki flyta persónar.'; +$messages['sourceisreadonly'] = 'Hendan búðstaðar keldan er einans lesandi.'; +$messages['errorsavingcontact'] = 'Kann ikki goyma addressuna hjá persóni.'; +$messages['movingmessage'] = 'Flytur hetta(hesi) boð...'; +$messages['copyingmessage'] = 'Flytur hetta(hesi) boð...'; +$messages['copyingcontact'] = 'Avritar persón(ar)...'; +$messages['movingcontact'] = 'Flytur persón(ar)...'; +$messages['deletingmessage'] = 'Strikar boð(ini)...'; +$messages['markingmessage'] = 'Merkjur boð(ini)...'; +$messages['addingmember'] = 'Leggur persón(ar) aftrat bólk...'; +$messages['removingmember'] = 'Strikar persón(ar) frá bólkið...'; +$messages['receiptsent'] = 'Kvittan er sent.'; +$messages['errorsendingreceipt'] = 'Kundi ikki senda kvittan.'; +$messages['deleteidentityconfirm'] = 'Ert tú vÃsur à at tú vilt strika hendan samleika?'; +$messages['nodeletelastidentity'] = 'Tú kanst ikki strika hendan samleika, hetta er tann seinasti.'; +$messages['forbiddencharacter'] = 'Mappu navn inniheldur óloyvd tekin.'; +$messages['selectimportfile'] = 'Vinarliga vel eina fÃlu'; +$messages['addresswriterror'] = 'Valda búðstaðar bók kann ikki skrivast Ã.'; +$messages['contactaddedtogroup'] = 'Persónar vóru lagdir aftrat bólki.'; +$messages['contactremovedfromgroup'] = 'Persónar vóru strikaðir frá bólki'; +$messages['nogroupassignmentschanged'] = 'Eingin bólka tilluting broytt.'; +$messages['importwait'] = 'Flytur inn, vinarliga bÃða...'; +$messages['importformaterror'] = 'Innflyting riggaði ikki! Tann uppsendi fÃlurin var ikki gyldigur dátu fÃlur.'; +$messages['importconfirm'] = '<b>$inserted Persónar innfluttir</b>'; +$messages['importconfirmskipped'] = '<b>Leyp um $skipped innsetanir</b>'; +$messages['importmessagesuccess'] = 'Innflutt $nr boð.'; +$messages['importmessageerror'] = 'Innflyting bar ikki til! Tann uppsendi fÃlurin er ikki gyldigur boð ella postkassa fÃlur'; +$messages['opnotpermitted'] = 'Ger ikki loyvd!'; +$messages['nofromaddress'] = 'Manglar teldupostur à valda samleika.'; +$messages['editorwarning'] = 'Um tú skiftur til reinan tekst verður øll forsniðing mist. Ynskir tú at halda fram?'; +$messages['httpreceivedencrypterror'] = 'Ein oyðandi samansetings feilur uppstóð. Vinarliga set teg à samband við umsitaran beinanvegin. <b>TÃni boð kundu ikki sendast.</b>'; +$messages['smtpconnerror'] = 'SMTP Feilur ($code): Samband til ambatara riggaði ikki.'; +$messages['smtpautherror'] = 'SMTP Feilur ($code): Atgongd nokta.'; +$messages['smtpfromerror'] = 'SMTP feilur ($code): Til bar ikki at seta sendarin til "$from" ($msg).'; +$messages['smtptoerror'] = 'SMTP feilur ($code): Til bar ikki at nýta móttakarin "$to" ($msg)'; +$messages['smtprecipientserror'] = 'SMTP feilur: Til bar ikki at greina móttakara listan.'; +$messages['smtperror'] = 'SMTP feilur: $msg'; +$messages['emailformaterror'] = 'Ógyldig teldupost búðstaður: $email'; +$messages['toomanyrecipients'] = 'Ov nógvir móttakarir. Minka um móttakarum til $max.'; +$messages['maxgroupmembersreached'] = 'Nummarið av limum à bólkinum gongur framvið hægsta mark ið er $max.'; +$messages['internalerror'] = 'Ein innanhýsis feilur kom fyri. Vinarliga royn aftur.'; +$messages['contactdelerror'] = 'Kann ikki strika persón(ar).'; +$messages['contactdeleted'] = 'Persón(ar) strikaðir.'; +$messages['contactrestoreerror'] = 'Kann ikki endurstovna persón(ar).'; +$messages['contactrestored'] = 'Persónur(ar) endurstovnaðir.'; +$messages['groupdeleted'] = 'Bólkur strikaður.'; +$messages['grouprenamed'] = 'Bólkur umdoyptur.'; +$messages['groupcreated'] = 'Bólkur stovnaður'; +$messages['savedsearchdeleted'] = 'Goymdar leitingar strikaðar'; +$messages['savedsearchdeleteerror'] = 'Kundi ikki strika goymdar leitingar.'; +$messages['savedsearchcreated'] = 'Goymdar leitingar stovnaðar.'; +$messages['savedsearchcreateerror'] = 'Kundi ikki stovna goymdar leitingar.'; +$messages['messagedeleted'] = 'Boð(ini) strika.'; +$messages['messagemoved'] = 'Boð(ini) flutt.'; +$messages['messagecopied'] = 'Boð(ini) avrita.'; +$messages['messagemarked'] = 'Boð(ini) merkt.'; +$messages['autocompletechars'] = 'Skriva minst $min tekin fyri sjálvvirkin útfylling riggar.'; +$messages['autocompletemore'] = 'Fleiri úrslit funnin. Vinarliga skriva fleiri tekin.'; +$messages['namecannotbeempty'] = 'Navn kann ikki verða tómt.'; +$messages['nametoolong'] = 'Navnið er ov langt.'; +$messages['folderupdated'] = 'Mappa dagført.'; +$messages['foldercreated'] = 'Mappa stovna.'; +$messages['invalidimageformat'] = 'Ikki eitt gyldigt mynda slag.'; +$messages['mispellingsfound'] = 'Stavuvillur funnar à tÃni boð.'; +$messages['parentnotwritable'] = 'Kann ikki flyta/avrita mappu til valda mappu. Eingin atgongu-rættindi.'; +$messages['messagetoobig'] = 'Boðini eru ov stór til at handfara.'; +$messages['attachmentvalidationerror'] = 'ÃVARING! Hendan viðheftingin er undir illgruna av tà at viðheftingar slagið ikki samsvarar við slagið ið var nevnt à boðunum. Um tú ikki stólar uppá sendaran so burdi tú ikki opna viðheftingina à tÃnum kaga, tà at tað kann innihalda illviljað tilfar.<br/><br/><em>Væntað: $expected; Fann $detected</em>'; +$messages['noscriptwarning'] = 'Ãvaring: Hendan webmail tænastan krevur Javascript! Um tú vilt nýta hana, so vinarliga tendra Javascript à tÃnum kaga.'; +?> diff --git a/program/localization/fr_FR/labels.inc b/program/localization/fr_FR/labels.inc index dd0acf4f1..023b7f415 100644 --- a/program/localization/fr_FR/labels.inc +++ b/program/localization/fr_FR/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to de $count'; $labels['copy'] = 'Copier'; $labels['move'] = 'Déplacer'; $labels['moveto'] = 'Déplacer vers...'; +$labels['copyto'] = 'Copier vers...'; $labels['download'] = 'Télécharger'; $labels['open'] = 'Ouvrir'; $labels['showattachment'] = 'Afficher'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Orthographe'; $labels['checkspelling'] = 'Vérifier l\'orthographe'; $labels['resumeediting'] = 'Retourner à l\'édition'; $labels['revertto'] = 'Revenir à '; +$labels['restore'] = 'Restaurer'; +$labels['restoremessage'] = 'Restaurer le message ?'; +$labels['responses'] = 'Réponses'; +$labels['insertresponse'] = 'Insérer une réponse'; +$labels['manageresponses'] = 'Gérer les réponses'; +$labels['savenewresponse'] = 'Sauvegarder une nouvelle réponse'; +$labels['editresponses'] = 'Editer les réponses'; +$labels['editresponse'] = 'Editer la réponse'; +$labels['responsename'] = 'Nom'; +$labels['responsetext'] = 'Texte de la réponse'; $labels['attach'] = 'Joindre'; $labels['attachments'] = 'Fichiers joints'; $labels['upload'] = 'Transférer'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Manipuler les menus surgissants comme des fenêtre $labels['forwardmode'] = 'Transfert des messages'; $labels['inline'] = 'dans le corps'; $labels['asattachment'] = 'en pièce jointe'; +$labels['replyallmode'] = 'Action par défaut du bouton [Répondre à tous]'; +$labels['replyalldefault'] = 'Répondre à tous'; +$labels['replyalllist'] = 'Répondre uniquement à la liste de diffusion (si trouvée)'; $labels['folder'] = 'Dossier'; $labels['folders'] = 'Dossiers'; $labels['foldername'] = 'Nom du dossier'; diff --git a/program/localization/gl_ES/labels.inc b/program/localization/gl_ES/labels.inc index 780d47d77..899f35c5e 100644 --- a/program/localization/gl_ES/labels.inc +++ b/program/localization/gl_ES/labels.inc @@ -15,29 +15,29 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ */ -$labels['welcome'] = 'Benvido a $product'; -$labels['username'] = 'Nome de usuario'; +$labels['welcome'] = 'Dámosche a benvida a $product'; +$labels['username'] = 'Nome de utente'; $labels['password'] = 'Contrasinal'; $labels['server'] = 'Servidor'; $labels['login'] = 'Acceder'; $labels['logout'] = 'SaÃr'; $labels['mail'] = 'Caixa de entrada'; $labels['settings'] = 'Axustes persoais'; -$labels['addressbook'] = 'Caderno de enderezos'; +$labels['addressbook'] = 'Axenda de enderezos'; $labels['inbox'] = 'Caixa de entrada'; $labels['drafts'] = 'Borradores'; $labels['sent'] = 'Enviados'; -$labels['trash'] = 'Cubo do lixo'; +$labels['trash'] = 'Lixo'; $labels['junk'] = 'Correo lixo'; -$labels['show_real_foldernames'] = 'Amosar nomes reáis para cartafois especiáis'; +$labels['show_real_foldernames'] = 'Amosar nomes reais para cartafois especiais'; $labels['subject'] = 'Asunto'; $labels['from'] = 'Remitente'; $labels['sender'] = 'Remitente'; -$labels['to'] = 'Destinatario'; +$labels['to'] = 'Destinatario(a)'; $labels['cc'] = 'Copia (Cc)'; $labels['bcc'] = 'Copia oculta (Cco)'; -$labels['replyto'] = 'Respostar a (Reply-To)'; -$labels['followupto'] = 'Respostar a todos (Followup-To)'; +$labels['replyto'] = 'Responder a'; +$labels['followupto'] = 'Responder a todos'; $labels['date'] = 'Data'; $labels['size'] = 'Tamaño'; $labels['priority'] = 'Prioridade'; @@ -45,20 +45,20 @@ $labels['organization'] = 'Organización'; $labels['readstatus'] = 'Estado da lectura'; $labels['listoptions'] = 'Opcións de lista...'; $labels['mailboxlist'] = 'Cartafoles'; -$labels['messagesfromto'] = 'Mensaxes da $from á $to de $count'; -$labels['threadsfromto'] = 'FÃos do $from ao $to de $count'; +$labels['messagesfromto'] = 'Mensaxes de $from para $to de $count'; +$labels['threadsfromto'] = 'FÃos do $from para $to de $count'; $labels['messagenrof'] = 'Mensaxe $nr de $count'; $labels['fromtoshort'] = '$from - $to de $count'; $labels['copy'] = 'Copiar'; $labels['move'] = 'Mover'; -$labels['moveto'] = 'Mover a...'; +$labels['moveto'] = 'Mover para...'; $labels['download'] = 'Descargar'; $labels['open'] = 'Abrir'; $labels['showattachment'] = 'Amosar'; -$labels['showanyway'] = 'Amosala de tódolos xeitos'; -$labels['filename'] = 'Nome de ficheiro'; -$labels['filesize'] = 'Tamaño de ficheiro'; -$labels['addtoaddressbook'] = 'Engadir ao caderno de enderezos'; +$labels['showanyway'] = 'Amosar de todos os xeitos'; +$labels['filename'] = 'Nome do ficheiro'; +$labels['filesize'] = 'Tamaño do ficheiro'; +$labels['addtoaddressbook'] = 'Engadir á Axenda de enderezos'; $labels['sun'] = 'Dom'; $labels['mon'] = 'Lun'; $labels['tue'] = 'Mar'; @@ -101,18 +101,18 @@ $labels['today'] = 'Hoxe'; $labels['refresh'] = 'Actualizar'; $labels['checkmail'] = 'Procurar novas mensaxes'; $labels['compose'] = 'Redactar unha mensaxe'; -$labels['writenewmessage'] = 'Redactar unha mensaxe nova'; +$labels['writenewmessage'] = 'Redactar unha nova mensaxe'; $labels['reply'] = 'Responder'; -$labels['replytomessage'] = 'Respostar a mensaxe'; -$labels['replytoallmessage'] = 'Respostar á lista ou ao remitente e a tódolos destinatarios'; -$labels['replyall'] = 'Respostar a todos'; -$labels['replylist'] = 'Respostar á lista de correo'; +$labels['replytomessage'] = 'Responder a mensaxe'; +$labels['replytoallmessage'] = 'Responder á persoa remitente e a todas as destinatarias'; +$labels['replyall'] = 'Responder a todos'; +$labels['replylist'] = 'Responder á lista de correo'; $labels['forward'] = 'Reenviar'; -$labels['forwardinline'] = 'Reenviar inserido'; +$labels['forwardinline'] = 'Reenviar en liña'; $labels['forwardattachment'] = 'Reenviar como anexo'; $labels['forwardmessage'] = 'Reenviar a mensaxe'; $labels['deletemessage'] = 'Eliminar a mensaxe'; -$labels['movemessagetotrash'] = 'Mover a mensaxe ao cubo do lixo'; +$labels['movemessagetotrash'] = 'Mover a mensaxe para o lixo'; $labels['printmessage'] = 'Imprimir esta mensaxe'; $labels['previousmessage'] = 'Amosar a mensaxe anterior'; $labels['firstmessage'] = 'Amosar a primeira mensaxe'; @@ -149,9 +149,9 @@ $labels['expand-unread'] = 'Expandir os non lidos'; $labels['collapse-all'] = 'Contraer todos'; $labels['threaded'] = 'Agrupar conversas'; $labels['autoexpand_threads'] = 'Expandir os fÃos de mensaxes'; -$labels['do_expand'] = 'tódolos fÃos'; +$labels['do_expand'] = 'todos os fÃos'; $labels['expand_only_unread'] = 'só con mensaxes non lidas'; -$labels['fromto'] = 'Remitente/Destinatario'; +$labels['fromto'] = 'De/Para'; $labels['flag'] = 'Marca'; $labels['attachment'] = 'Anexo'; $labels['nonesort'] = 'Ningunha'; @@ -160,7 +160,7 @@ $labels['arrival'] = 'Data de chegada'; $labels['asc'] = 'ascendente'; $labels['desc'] = 'descendente'; $labels['listcolumns'] = 'Enumerar columnas'; -$labels['listsorting'] = 'Ordenar pola columna'; +$labels['listsorting'] = 'Ordenar en columnas'; $labels['listorder'] = 'Ordenación'; $labels['listmode'] = 'Modo de vista da lista'; $labels['folderactions'] = 'Accións cos cartafoles'; @@ -171,12 +171,14 @@ $labels['quota'] = 'Uso de disco'; $labels['unknown'] = 'descoñecido'; $labels['unlimited'] = 'ilimitado'; $labels['quicksearch'] = 'Busca rápida'; -$labels['resetsearch'] = 'Restablecer a busca'; -$labels['searchmod'] = 'Modificadores de busca'; -$labels['msgtext'] = 'Mensaxe enteira'; +$labels['resetsearch'] = 'Restabelecer a pesquisa'; +$labels['searchmod'] = 'Modificadores de pesquisa'; +$labels['msgtext'] = 'Toda a mensaxe'; $labels['body'] = 'Corpo'; -$labels['openinextwin'] = 'Abrir nunha nova fiestra'; -$labels['emlsave'] = 'Gardar (.eml)'; +$labels['type'] = 'Tipo'; +$labels['namex'] = 'Nome'; +$labels['openinextwin'] = 'Abrir nunha nova xanela'; +$labels['emlsave'] = 'Descargar (.eml)'; $labels['changeformattext'] = 'Amosar en texto plano'; $labels['changeformathtml'] = 'Amosar en HTML'; $labels['editasnew'] = 'Editar como nova'; @@ -195,6 +197,16 @@ $labels['spellcheck'] = 'OrtografÃa'; $labels['checkspelling'] = 'Revisar a ortografÃa'; $labels['resumeediting'] = 'Voltar á edición'; $labels['revertto'] = 'Voltar a'; +$labels['restore'] = 'Restaurar'; +$labels['restoremessage'] = 'Restaurar mensaxe?'; +$labels['responses'] = 'Respostas'; +$labels['insertresponse'] = 'Inserir unha resposta'; +$labels['manageresponses'] = 'Xestionar respostas'; +$labels['savenewresponse'] = 'Gardar a nova resposta'; +$labels['editresponses'] = 'Editar respostas'; +$labels['editresponse'] = 'Editar resposta '; +$labels['responsename'] = 'Nome'; +$labels['responsetext'] = 'Texto de resposta'; $labels['attach'] = 'Anexar'; $labels['attachments'] = 'Ficheiros anexos'; $labels['upload'] = 'Cargar'; @@ -212,26 +224,26 @@ $labels['alwaysshow'] = 'Amosar sempre as imaxes nas mensaxes de $sender'; $labels['isdraft'] = 'Esta mensaxe é un borrador'; $labels['andnmore'] = '$nr máis...'; $labels['togglemoreheaders'] = 'Amosar máis cabecerias'; -$labels['togglefullheaders'] = 'Conmutar cabeceiras en bruto'; +$labels['togglefullheaders'] = 'Mudar os encabezados das mensaxes'; $labels['htmltoggle'] = 'HTML'; $labels['plaintoggle'] = 'Só texto'; $labels['savesentmessagein'] = 'Gardar a mensaxe enviada en'; $labels['dontsave'] = 'non gardar'; -$labels['maxuploadsize'] = 'O tamaño máximo permitido por ficheiro é de $size'; -$labels['addcc'] = 'Engadir copia (CC)'; -$labels['addbcc'] = 'Engadir copia oculta (BCC)'; -$labels['addreplyto'] = 'Engadir respostar a (Reply-To)'; -$labels['addfollowupto'] = 'Engadir respostar a todos (Followup-To)'; -$labels['mdnrequest'] = 'O remitente desta mensaxe pediu ser notificado cando vostede a lea. Quere notificar ao remitente?'; +$labels['maxuploadsize'] = 'O tamaño máximo permitido para o ficheiro é de $size'; +$labels['addcc'] = 'Engadir Copia (CC)'; +$labels['addbcc'] = 'Engadir Copia oculta (BCC)'; +$labels['addreplyto'] = 'Engadir Responder a (Reply-To)'; +$labels['addfollowupto'] = 'Engadir Respostar a todos (Followup-To)'; +$labels['mdnrequest'] = 'A persoa remitente pediu ser notificada cando a mensaxe for lida. Queres enviar notificación á persoa remitente?'; $labels['receiptread'] = 'Notificación da entrega da mensaxe (lectura)'; -$labels['yourmessage'] = 'Esta é unha notificación da entrega da súa mensaxe'; -$labels['receiptnote'] = 'Nota: Esta notificación só confirma que a mensaxe se abriu no computador do destinatario. Non asegura que o destinatario a lera ou entendera o seu contido.'; +$labels['yourmessage'] = 'Esta é unha notificación da entrega da túa mensaxe'; +$labels['receiptnote'] = 'Nota: Esta notificación só confirma que a mensaxe se abriu no computador da persoa destinataria. Non asegura que a persoa destinataria a lera ou entendera o seu contido.'; $labels['name'] = 'Nome completo'; $labels['firstname'] = 'Nome'; $labels['surname'] = 'Apelidos'; $labels['middlename'] = 'Segundo nome'; -$labels['nameprefix'] = 'Prefixo'; -$labels['namesuffix'] = 'Sufixo'; +$labels['nameprefix'] = 'Forma de tratamento (Prefixo)'; +$labels['namesuffix'] = 'Forma de tratamento (Sufixo)'; $labels['nickname'] = 'Alcume'; $labels['jobtitle'] = 'Titulación'; $labels['department'] = 'Departamento'; @@ -249,13 +261,13 @@ $labels['birthday'] = 'Aniversario'; $labels['anniversary'] = 'Aniversario'; $labels['website'] = 'Sitio web'; $labels['instantmessenger'] = 'MensaxerÃa instantánea'; -$labels['notes'] = 'Notes'; +$labels['notes'] = 'Anotacións'; $labels['male'] = 'home'; $labels['female'] = 'muller'; $labels['manager'] = 'Xerente'; $labels['assistant'] = 'Asistente'; -$labels['spouse'] = 'Cónxuxe'; -$labels['allfields'] = 'Tódolos campos'; +$labels['spouse'] = 'Parella'; +$labels['allfields'] = 'Todos os campos'; $labels['search'] = 'Procurar'; $labels['advsearch'] = 'Procura avanzada'; $labels['advanced'] = 'Avanzado'; @@ -268,13 +280,13 @@ $labels['typemain'] = 'Principal'; $labels['typehomefax'] = 'Fax da casa'; $labels['typeworkfax'] = 'Fax do traballo'; $labels['typecar'] = 'Coche'; -$labels['typepager'] = 'Buscapersonas'; +$labels['typepager'] = 'Buscapersoas'; $labels['typevideo'] = 'VÃdeo'; $labels['typeassistant'] = 'Asistente'; $labels['typehomepage'] = 'Páxina principal'; $labels['typeblog'] = 'Blogue'; $labels['typeprofile'] = 'Perfil'; -$labels['addfield'] = 'Engadir campo'; +$labels['addfield'] = 'Engadir campo...'; $labels['addcontact'] = 'Engadir novo contacto'; $labels['editcontact'] = 'Modificar este contacto'; $labels['contacts'] = 'Contactos'; @@ -307,20 +319,25 @@ $labels['nextpage'] = 'Amosar o seguinte grupo'; $labels['lastpage'] = 'Amosar o último grupo'; $labels['group'] = 'Grupo'; $labels['groups'] = 'Grupos'; +$labels['listgroup'] = 'Lista de integrantes do grupo'; $labels['personaladrbook'] = 'Enderezos persoais'; $labels['searchsave'] = 'Gardar procura'; $labels['searchdelete'] = 'Eliminar procura'; $labels['import'] = 'Importar'; $labels['importcontacts'] = 'Importar contactos'; $labels['importfromfile'] = 'Importar desde ficheiro:'; -$labels['importreplace'] = 'SubstituÃr completamente o caderno de enderezos'; -$labels['importdesc'] = 'Pode cargar contactos desde un caderno de enderezos preexistente.<br/>Pódense importar enderezos en formato <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ou CSV (valores separados por comas)'; -$labels['done'] = 'Rematado'; +$labels['importtarget'] = 'Engadir contactos a'; +$labels['importreplace'] = 'SubstituÃr completamente a Axenda de enderezos'; +$labels['importgroups'] = 'Importar atribucións do grupo'; +$labels['importgroupsall'] = 'Todos (crear grupos, se for necesario)'; +$labels['importgroupsexisting'] = 'Só para os grupos existentes'; +$labels['importdesc'] = 'Podes engadir contactos desde unha axenda de enderezos xa existente.<br/>Pódense importar enderezos en formato <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ou CSV (valores separados por comas)'; +$labels['done'] = 'Feito!'; $labels['settingsfor'] = 'Axustes de'; $labels['about'] = 'Acerca de'; $labels['preferences'] = 'Preferencias'; -$labels['userpreferences'] = 'Preferencias de usuario'; -$labels['editpreferences'] = 'Editar preferencias de usuario'; +$labels['userpreferences'] = 'Preferencias de utente'; +$labels['editpreferences'] = 'Editar preferencias de utente'; $labels['identities'] = 'Identidades'; $labels['manageidentities'] = 'Administrar as identidades desta conta'; $labels['newidentity'] = 'Nova identidade'; @@ -333,14 +350,14 @@ $labels['messagepart'] = 'Parte'; $labels['digitalsig'] = 'Sinatura dixital'; $labels['dateformat'] = 'Formato da data'; $labels['timeformat'] = 'Formato da hora'; -$labels['prettydate'] = 'Data decorada'; +$labels['prettydate'] = 'Data sinalada'; $labels['setdefault'] = 'Usar como predeterminada'; $labels['autodetect'] = 'Detectar automáticamente'; -$labels['language'] = 'Linguaxe'; +$labels['language'] = 'Lingua'; $labels['timezone'] = 'Zona horaria'; $labels['pagesize'] = 'Liñas por páxina'; $labels['signature'] = 'Sinatura'; -$labels['dstactive'] = 'Cambio de hora según horario de verán'; +$labels['dstactive'] = 'Mudar a hora según horario de verán'; $labels['showinextwin'] = 'Abrir a mensaxe nunha nova xanela'; $labels['composeextwin'] = 'Redactar nunha xanela nova'; $labels['htmleditor'] = 'Redactar mensaxes HTML'; @@ -350,24 +367,24 @@ $labels['htmlsignature'] = 'Sinatura HTML'; $labels['showemail'] = 'Amosar enderezo de correo co nome en pantalla'; $labels['previewpane'] = 'Amosar previsualización'; $labels['skin'] = 'Aspecto da interface'; -$labels['logoutclear'] = 'Baleirar o cubo do lixo ao saÃr'; +$labels['logoutclear'] = 'Baleirar o lixo ao saÃr'; $labels['logoutcompact'] = 'Compactar a caixa de entrada ao saÃr'; -$labels['uisettings'] = 'Interface de usuario'; +$labels['uisettings'] = 'Interface de utente'; $labels['serversettings'] = 'Axustes do servidor'; -$labels['mailboxview'] = 'Vista das caixas de correo'; +$labels['mailboxview'] = 'Vista da caixa de correo'; $labels['mdnrequests'] = 'Cando se solicitan notificacións da entrega'; -$labels['askuser'] = 'preguntarme qué facer'; +$labels['askuser'] = 'preguntarme que facer'; $labels['autosend'] = 'enviar automáticamente'; -$labels['autosendknown'] = 'enviar aos meus contactos, noutros casos preguntarme'; +$labels['autosendknown'] = 'enviar aos meus contactos, noutros casos preguntar'; $labels['autosendknownignore'] = 'enviar aos meus contactos, noutros casos ignorar'; $labels['ignore'] = 'ignorar'; $labels['readwhendeleted'] = 'Marcar a mensaxe como lida ao eliminar'; -$labels['flagfordeletion'] = 'Marcar a mensaxe para eliminar no canto de eliminar'; +$labels['flagfordeletion'] = 'Marcar a mensaxe para eliminar en vez de eliminar'; $labels['skipdeleted'] = 'Non amosar as mensaxes marcadas como eliminadas'; -$labels['deletealways'] = 'Eliminar as mensaxes aÃnda que non se poidan gardar no cubo do lixo'; +$labels['deletealways'] = 'Se falla Mover mensaxes para o lixo, eliminalas'; $labels['deletejunk'] = 'Borrar automáticamente as mensaxes no cartafol "Correo lixo"'; $labels['showremoteimages'] = 'Amosar as imaxes remotas'; -$labels['fromknownsenders'] = 'de remitentes coñecidos'; +$labels['fromknownsenders'] = 'con remite coñecido'; $labels['always'] = 'sempre'; $labels['showinlineimages'] = 'Amosar as imaxes anexas baixo a mensaxe'; $labels['autosavedraft'] = 'Gardar borrador automáticamente'; @@ -383,27 +400,27 @@ $labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)'; $labels['2047folding'] = 'Conforme ao RFC 2047 (outros)'; $labels['force7bit'] = 'Usar MIME para codificar caracteres de 8 bits'; $labels['advancedoptions'] = 'Opcións avanzadas'; -$labels['focusonnewmessage'] = 'Enfocar o navegador se hai mensaxes novas'; -$labels['checkallfolders'] = 'Procurar novas mensaxes en tódolos cartafoles'; +$labels['focusonnewmessage'] = 'Centrar a xanela do navegador en novas mensaxes'; +$labels['checkallfolders'] = 'Procurar novas mensaxes en todos os cartafoles'; $labels['displaynext'] = 'Logo de eliminar ou mover unha mensaxe ir á mensaxe seguinte'; $labels['defaultfont'] = 'Fonte por defecto da mensaxe HTML'; $labels['mainoptions'] = 'Opcións principais'; $labels['browseroptions'] = 'Opcións do navegador'; $labels['section'] = 'Sección'; $labels['maintenance'] = 'Mantemento'; -$labels['newmessage'] = 'Mensaxes novas'; +$labels['newmessage'] = 'Nova mensaxe'; $labels['signatureoptions'] = 'Opcións da firma'; -$labels['whenreplying'] = 'Ao respostar'; +$labels['whenreplying'] = 'Ao responder'; $labels['replyempty'] = 'non citar a mensaxe orixinal'; -$labels['replytopposting'] = 'comezar a nova mensaxe enriba da orixinal'; -$labels['replybottomposting'] = 'comezar a nova mensaxe embaixo da orixinal'; -$labels['replyremovesignature'] = 'Eliminar a firma do remitente ao respostar'; +$labels['replytopposting'] = 'comezar a nova mensaxe antes da orixinal'; +$labels['replybottomposting'] = 'comezar a nova mensaxe despois da orixinal'; +$labels['replyremovesignature'] = 'Eliminar a firma do remite ao respostar'; $labels['autoaddsignature'] = 'Engadir firma automáticamente'; $labels['newmessageonly'] = 'só nas mensaxes novas'; $labels['replyandforwardonly'] = 'só nas respostas e reenvÃos'; $labels['insertsignature'] = 'Engadir firma'; $labels['previewpanemarkread'] = 'Marcar como lidas as mensaxes previsualizadas'; -$labels['afternseconds'] = 'logo de $n segundos'; +$labels['afternseconds'] = 'despois de $n segundos'; $labels['reqmdn'] = 'Solicitar sempre unha notificación da entrega'; $labels['reqdsn'] = 'Solicitar sempre unha notificación do estado de envÃo'; $labels['replysamefolder'] = 'Deixar as respostas no cartafol onde está a mensaxe á que se responde'; @@ -421,10 +438,13 @@ $labels['standardwindows'] = 'Manexar avisos emerxentes como xanelas estándar'; $labels['forwardmode'] = 'Reenvio de mensaxes'; $labels['inline'] = 'inserido'; $labels['asattachment'] = 'coma anexo'; +$labels['replyallmode'] = 'Acción dpor defecto do botón [Responder a todos]'; +$labels['replyalldefault'] = 'responder a todos'; +$labels['replyalllist'] = 'responder só para a lista (se for atopada)'; $labels['folder'] = 'Cartafol'; $labels['folders'] = 'Cartafoles'; $labels['foldername'] = 'Nome do cartafol'; -$labels['subscribed'] = 'Subscrito'; +$labels['subscribed'] = 'Subscrito(a)'; $labels['messagecount'] = 'Mensaxes'; $labels['create'] = 'Crear'; $labels['createfolder'] = 'Crear un novo cartafol'; @@ -432,14 +452,14 @@ $labels['managefolders'] = 'Xestionar cartafoles'; $labels['specialfolders'] = 'Cartafoles especiais'; $labels['properties'] = 'Propiedades'; $labels['folderproperties'] = 'Propiedades do cartafol'; -$labels['parentfolder'] = 'Cartafol padre'; +$labels['parentfolder'] = 'Cartafol principal'; $labels['location'] = 'Situación'; $labels['info'] = 'Información'; -$labels['getfoldersize'] = 'Prema para calcular o tamaño do cartafol'; -$labels['changesubscription'] = 'Prema para trocar a subscrición'; +$labels['getfoldersize'] = 'Preme para calcular o tamaño do cartafol'; +$labels['changesubscription'] = 'Preme para mudar a subscrición'; $labels['foldertype'] = 'Tipo do cartafol'; $labels['personalfolder'] = 'Cartafol privado'; -$labels['otherfolder'] = 'Cartafol de outro usuario'; +$labels['otherfolder'] = 'Cartafol de outra persoa usuaria'; $labels['sharedfolder'] = 'Cartafol público'; $labels['sortby'] = 'Ordenar por'; $labels['sortasc'] = 'Orde ascendente'; diff --git a/program/localization/gl_ES/messages.inc b/program/localization/gl_ES/messages.inc index 599f2ce41..069ff5d42 100644 --- a/program/localization/gl_ES/messages.inc +++ b/program/localization/gl_ES/messages.inc @@ -16,23 +16,23 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ $messages['errortitle'] = 'Ocurreu un erro!'; -$messages['loginfailed'] = 'O contrasinal ou o nome de usuario son incorrectos.'; -$messages['cookiesdisabled'] = 'O seu navegador non acepta galletas.'; -$messages['sessionerror'] = 'A súa sesión non é válida ou expirou.'; +$messages['loginfailed'] = 'O contrasinal ou o nome de utente son incorrectos.'; +$messages['cookiesdisabled'] = 'O teu navegador non acepta cookies.'; +$messages['sessionerror'] = 'A tú sesión non é válida ou expirou.'; $messages['storageerror'] = 'Fallou a conexión co servidor IMAP.'; $messages['servererror'] = 'Erro do servidor!'; $messages['servererrormsg'] = 'Erro do servidor: $msg'; $messages['dberror'] = 'Erro na base de datos!'; $messages['requesttimedout'] = 'A petición expirou'; -$messages['errorreadonly'] = 'Non foi posible realizar a operación. O cartafol é de só lectura.'; -$messages['errornoperm'] = 'Non foi posible realizar a operación. Permiso denegado.'; -$messages['erroroverquota'] = 'Non se pode realizar a operación, non hai espacio no disco.'; -$messages['erroroverquotadelete'] = 'Non hai espacio no disco. Utilice Maiúsculas+Supr para borrar unha mensaxe.'; -$messages['invalidrequest'] = 'Petición inválida!. Non se gardou ningún dato.'; +$messages['errorreadonly'] = 'Non foi posÃbel realizar a operación. O cartafol é de só lectura.'; +$messages['errornoperm'] = 'Non foi posÃbel realizar a operación. Permiso denegado.'; +$messages['erroroverquota'] = 'Non se pode realizar a operación, non hai espazo no disco.'; +$messages['erroroverquotadelete'] = 'Non hai espazo no disco. Usa Maiúsculas+Supr para borrar unha mensaxe.'; +$messages['invalidrequest'] = 'Petición non válida! Non se gardou ningún dato.'; $messages['invalidhost'] = 'O nome do servidor non é válido.'; $messages['nomessagesfound'] = 'Non se atoparon mensaxes nesta caixa de correo.'; -$messages['loggedout'] = 'Rematou correctamente a súa sesión. Ata logo!'; -$messages['mailboxempty'] = 'A caixa de correo está vacÃa.'; +$messages['loggedout'] = 'Rematou correctamente a tú sesión. Até logo!'; +$messages['mailboxempty'] = 'A caixa de correo está baleira.'; $messages['refreshing'] = 'A refrescar...'; $messages['loading'] = 'Cargando...'; $messages['uploading'] = 'Cargando ficheiro...'; @@ -42,44 +42,49 @@ $messages['checkingmail'] = 'à procura de novas mensaxes...'; $messages['sendingmessage'] = 'Enviando mensaxe...'; $messages['messagesent'] = 'A mensaxe enviouse correctamente.'; $messages['savingmessage'] = 'Gardando mensaxe...'; -$messages['messagesaved'] = 'A mensaxe gardouse en "Borradores'; +$messages['messagesaved'] = 'A mensaxe gardouse en "Borradores"'; $messages['successfullysaved'] = 'Gardado correctamente.'; -$messages['addedsuccessfully'] = 'O contacto engadiuse correctamente ao caderno de enderezos.'; +$messages['savingresponse'] = 'Gardar texto de resposta...'; +$messages['deleteresponseconfirm'] = 'Realmente queres borrar este texto de resposta?'; +$messages['addedsuccessfully'] = 'O contacto engadiuse correctamente á Axenda de enderezos.'; $messages['contactexists'] = 'Xa existe un contacto con este enderezo de correo electrónico.'; $messages['contactnameexists'] = 'Xa existe un contacto con este nome.'; -$messages['blockedimages'] = 'Estanse a bloquear as imaxes remotas para protexer a súa privacidade.'; -$messages['encryptedmessage'] = 'Non se pode amosar a mensaxe porque está cifrada.'; +$messages['blockedimages'] = 'Estanse a bloquear as imaxes remotas para protexer a túa privacidade.'; +$messages['encryptedmessage'] = 'SentÃmolo! Non se pode amosar a mensaxe porque está cifrada.'; $messages['nocontactsfound'] = 'Non se atoparon contactos.'; $messages['contactnotfound'] = 'Non se atopou o contacto solicitado.'; -$messages['contactsearchonly'] = 'Introduza algún termo para atopar contactos'; +$messages['contactsearchonly'] = 'Introduce algún termo para atopar contactos'; $messages['sendingfailed'] = 'Fallou o envÃo da mensaxe.'; -$messages['senttooquickly'] = 'Por favor, espere $sec segundos antes de enviar esta mensaxe.'; -$messages['errormoving'] = 'Non foi posible mover a(s) mensaxe(s).'; -$messages['errorcopying'] = 'Non foi posible copiar a(s) mensaxe(s).'; -$messages['errordeleting'] = 'Non foi posible eliminar a(s) mensaxe(s).'; -$messages['errormarking'] = 'Non foi posible marcar a(s) mensaxe(s).'; -$messages['deletecontactconfirm'] = 'Quere eliminar o(s) contacto(s) seleccionado(s)?'; -$messages['deletegroupconfirm'] = 'Quere eliminar o grupo seleccionado?'; -$messages['deletemessagesconfirm'] = 'Quere eliminar a(s) mensaxe(s) seleccionadas?'; -$messages['deletefolderconfirm'] = 'Quere eliminar este cartafol?'; -$messages['purgefolderconfirm'] = 'Quere eliminar tódalas mensaxes neste cartafol?'; +$messages['senttooquickly'] = 'Por favor, espera $sec segundos antes de enviar esta mensaxe.'; +$messages['errorsavingsent'] = 'Houbo un erro ao gardar a mensaxe enviada.'; +$messages['errorsaving'] = 'Houbo un erro ao gardar.'; +$messages['errormoving'] = 'Non foi posÃbel mover a(s) mensaxe(s).'; +$messages['errorcopying'] = 'Non foi posÃbel copiar a(s) mensaxe(s).'; +$messages['errordeleting'] = 'Non foi posÃbel eliminar a(s) mensaxe(s).'; +$messages['errormarking'] = 'Non foi posÃbel marcar a(s) mensaxe(s).'; +$messages['deletecontactconfirm'] = 'Queres eliminar o(s) contacto(s) seleccionado(s)?'; +$messages['deletegroupconfirm'] = 'Queres eliminar o grupo seleccionado?'; +$messages['deletemessagesconfirm'] = 'Queres eliminar a(s) mensaxe(s) seleccionadas?'; +$messages['deletefolderconfirm'] = 'Queres eliminar este cartafol?'; +$messages['purgefolderconfirm'] = 'Queres eliminar todas as mensaxes neste cartafol?'; $messages['contactdeleting'] = 'Eliminando o(s) contacto(s)...'; $messages['groupdeleting'] = 'Eliminando o grupo...'; $messages['folderdeleting'] = 'Eliminando o cartafol...'; $messages['foldermoving'] = 'Movendo o cartafol...'; $messages['foldersubscribing'] = 'Subscribindo o cartafol...'; $messages['folderunsubscribing'] = 'Desubscribindo o cartafol...'; -$messages['formincomplete'] = 'Non se cumprimentou completamente o formulario.'; -$messages['noemailwarning'] = 'Por favor, introduza un enderezo de correo electrónico válido.'; -$messages['nonamewarning'] = 'Por favor, introduza un nome.'; -$messages['nopagesizewarning'] = 'Por favor, introduza un tamaño de páxina.'; -$messages['nosenderwarning'] = 'Por favor, introduza o enderezo de correo electrónico do remitente.'; -$messages['norecipientwarning'] = 'Por favor, introduza polo menos un destinatario.'; -$messages['nosubjectwarning'] = 'O campo "Asunto" está baleiro. Desexa completalo?'; -$messages['nobodywarning'] = 'Quere enviar esta mensaxe sen texto?'; -$messages['notsentwarning'] = 'A mensaxe non se enviou. Quere descartala?'; -$messages['noldapserver'] = 'Por favor, elixa un servidor LDAP para buscar.'; -$messages['nosearchname'] = 'Por favor, introduza un nome ou un enderezo de correo electrónico.'; +$messages['formincomplete'] = 'O formulario non foi completamente cuberto.'; +$messages['noemailwarning'] = 'Por favor, engade un enderezo de correo electrónico válido.'; +$messages['nonamewarning'] = 'Por favor, engade un nome.'; +$messages['nopagesizewarning'] = 'Por favor, engade un tamaño de páxina.'; +$messages['nosenderwarning'] = 'Por favor, engade o enderezo de correo electrónico do remite.'; +$messages['norecipientwarning'] = 'Por favor, engade polo menos unha persoa destinataria.'; +$messages['nosubjectwarning'] = 'O campo "Asunto" está baleiro. Queres completalo?'; +$messages['nobodywarning'] = 'Queres enviar esta mensaxe sen texto?'; +$messages['notsentwarning'] = 'A mensaxe non se enviou. Queres descartala?'; +$messages['restoresavedcomposedata'] = 'Foi atopada unha mensaxe que non se enviara.\n\nSubject: $subject\nSaved: $date\n\n¿queres restaurar esta mensaxe?'; +$messages['noldapserver'] = 'Por favor, elixe un servidor LDAP para buscar.'; +$messages['nosearchname'] = 'Por favor, engade un nome ou un enderezo de correo electrónico.'; $messages['notuploadedwarning'] = 'AÃnda non se cargaron tódolos ficheiros. Por favor, agarde ou cancele a carga.'; $messages['searchsuccessful'] = 'Atopáronse $nr mensaxes.'; $messages['contactsearchsuccessful'] = 'Atopáronse $nr contactos.'; @@ -87,79 +92,85 @@ $messages['searchnomatch'] = 'A busca non atopou coincidencias.'; $messages['searching'] = 'Buscando...'; $messages['checking'] = 'Comprobando...'; $messages['nospellerrors'] = 'Non hai erros ortográficos.'; -$messages['folderdeleted'] = 'O cartafol eliminouse correctamente.'; -$messages['foldersubscribed'] = 'O cartafol suscribiuse correctamente.'; -$messages['folderunsubscribed'] = 'O cartafol desuscribiuse correctamente.'; +$messages['folderdeleted'] = 'O cartafol foi eliminado correctamente.'; +$messages['foldersubscribed'] = 'O cartafol subscribiuse correctamente.'; +$messages['folderunsubscribed'] = 'O cartafol desubscribiuse correctamente.'; $messages['folderpurged'] = 'O cartafol purgouse correctamente.'; $messages['folderexpunged'] = 'O cartafol baleirouse correctamente.'; $messages['deletedsuccessfully'] = 'Eliminouse correctamente.'; $messages['converting'] = 'Eliminando o formato da mensaxe...'; -$messages['messageopenerror'] = 'Non foi posible cargar a mensaxe desde o servidor.'; +$messages['messageopenerror'] = 'Non foi posÃbel cargar a mensaxe desde o servidor.'; $messages['fileuploaderror'] = 'Fallou a carga do ficheiro.'; $messages['filesizeerror'] = 'O ficheiro cargado é máis grande que o tamaño máximo de $size.'; -$messages['sourceisreadonly'] = 'A orixe é de só lectura.'; -$messages['errorsavingcontact'] = 'Non foi posible gardar o contacto.'; +$messages['copysuccess'] = 'Copiáronse correctamente $nr contactos.'; +$messages['movesuccess'] = 'Movidos con suceso $nr contactos.'; +$messages['copyerror'] = 'Non foi posÃbel copiar contactos.'; +$messages['moveerror'] = 'Non foi posÃbel mover contactos.'; +$messages['sourceisreadonly'] = 'Este enderezo de orixe é de só lectura.'; +$messages['errorsavingcontact'] = 'Non foi posÃbel gardar o contacto.'; $messages['movingmessage'] = 'Movendo a(s) mensaxe(s)...'; $messages['copyingmessage'] = 'Copiando a(s) mensaxe(s)...'; $messages['copyingcontact'] = 'Copiando o(s) contacto(s)...'; +$messages['movingcontact'] = 'Movendo contacto(s)...'; $messages['deletingmessage'] = 'Eliminando a(s) mensaxe(s)...'; $messages['markingmessage'] = 'Marcando a(s) mensaxe(s)...'; $messages['addingmember'] = 'Engadindo o(s) contacto(s) ao grupo...'; $messages['removingmember'] = 'Eliminando o(s) contacto(s) do grupo...'; $messages['receiptsent'] = 'A notificación da entrega enviouse correctamente.'; -$messages['errorsendingreceipt'] = 'Non foi posible enviar a notificación da entrega.'; -$messages['deleteidentityconfirm'] = 'Quere eliminar esta identidade?'; -$messages['nodeletelastidentity'] = 'Non pode eliminar esta identidade, é a última.'; -$messages['forbiddencharacter'] = 'O nome do cartafol contén un carácter non válido.'; -$messages['selectimportfile'] = 'Por favor, escolla un ficheiro para cargar.'; -$messages['addresswriterror'] = 'Non se pode escribir no caderno de enderezos que escolleu.'; +$messages['errorsendingreceipt'] = 'Non foi posÃbel enviar a notificación da entrega.'; +$messages['deleteidentityconfirm'] = 'Queres eliminar esta identidade?'; +$messages['nodeletelastidentity'] = 'Non podes eliminar esta identidade, é a última.'; +$messages['forbiddencharacter'] = 'O nome do cartafol contén un caracter non válido.'; +$messages['selectimportfile'] = 'Por favor, escolle un ficheiro para cargar.'; +$messages['addresswriterror'] = 'Non se pode escribir na Axenda de enderezos que escolleches.'; $messages['contactaddedtogroup'] = 'Engadiuse correctamente o contacto a este grupo.'; $messages['contactremovedfromgroup'] = 'Suprimiuse correctamente o contacto deste grupo.'; $messages['nogroupassignmentschanged'] = 'Non cambiou ningunha asignación de grupo.'; -$messages['importwait'] = 'A importar. Por favor, agarde...'; +$messages['importwait'] = 'A importar. Por favor, agarda...'; $messages['importformaterror'] = 'Fallou a importación! O ficheiro cargado non contén datos válidos.'; -$messages['importconfirm'] = '<b>Importáronse correctamente $inserted contactos. Ignoráronse $skipped contactos que xa existÃan</b>:<p><em>$names</em></p>'; +$messages['importconfirm'] = '<b>Importáronse correctamente $inserted contactos</b>'; $messages['importconfirmskipped'] = '<b>Ignoráronse $skipped existing entradas</b>'; -$messages['importmessagesuccess'] = 'Importados $nr mensaxes con éxito'; -$messages['importmessageerror'] = 'Fallou a importación! O arquivo subido non é unha mensaxe válida ou un ficheiro de caixa de correo'; +$messages['importmessagesuccess'] = 'Importadas $nr mensaxes con éxito'; +$messages['importmessageerror'] = 'Fallou a importación! O arquivo subido non é unha mensaxe válida ou un ficheiro de correo'; $messages['opnotpermitted'] = 'Operación non permitida!'; -$messages['nofromaddress'] = 'Falta o enderezo de correo electrónico na identidade que escolleu.'; -$messages['editorwarning'] = 'Se troca neste intre ao editor de texto plano, vai perder todo o formato do texto. Quere continuar?'; -$messages['httpreceivedencrypterror'] = 'Produciuse un erro fatal de configuración. Contacte ao administrador inmediatamente. <b>Non se enviou a súa mensaxe.</b>'; +$messages['nofromaddress'] = 'Falta o enderezo de correo electrónico na identidade que escolleches.'; +$messages['editorwarning'] = 'Se mudas agora ao editor de texto plano, vas perder todo o formato do texto. Queres continuar?'; +$messages['httpreceivedencrypterror'] = 'Produciuse un erro fatal de configuración. Contacta coa persoa administradora inmediatamente. <b>Non se enviou a túa mensaxe.</b>'; $messages['smtpconnerror'] = 'Erro SMTP ($code): Fallou a conexión co servidor.'; $messages['smtpautherror'] = 'Erro SMTP ($code): Fallou a autenticación.'; -$messages['smtpfromerror'] = 'Erro SMTP ($code): Non foi posible establecer o remitente "$from" ($msg).'; -$messages['smtptoerror'] = 'Erro SMTP ($code): Non foi posible engadir o destinatario "$to" ($msg).'; -$messages['smtprecipientserror'] = 'Erro SMTP: Non se pode analizar a lista de destinatarios.'; +$messages['smtpfromerror'] = 'Erro SMTP ($code): Non foi posÃbel estabelecer o remite "$from" ($msg).'; +$messages['smtptoerror'] = 'Erro SMTP ($code): Non foi posÃbel engadir a persoa destinataria "$to" ($msg).'; +$messages['smtprecipientserror'] = 'Erro SMTP: Non se pode analizar a lista de persoas destinatarias.'; $messages['smtperror'] = 'Erro SMTP: $msg'; $messages['emailformaterror'] = 'O enderezo de correo electrónico é incorrecto: $email.'; -$messages['toomanyrecipients'] = 'Especificou destinatarios de máis. Por favor, redúzaos a un máximo de $max.'; -$messages['maxgroupmembersreached'] = 'O número de membros do grupo excede o máximo de $max.'; -$messages['contactdelerror'] = 'Non foi posible eliminar o(s) contacto(s).'; +$messages['toomanyrecipients'] = 'Especificou persoas destinatarias de máis. Por favor, redúceas a un máximo de $max.'; +$messages['maxgroupmembersreached'] = 'O número de integrantes do grupo excede o máximo de $max.'; +$messages['internalerror'] = 'Produciuse un erro interno. Por favor, téntao de novo.'; +$messages['contactdelerror'] = 'Non foi posÃbel eliminar o(s) contacto(s).'; $messages['contactdeleted'] = 'Borráronse correctamente o(s) contacto(s).'; -$messages['contactrestoreerror'] = 'Non foi posible restaurar o(s) contacto(s) borrado(s).'; +$messages['contactrestoreerror'] = 'Non foi posÃbel restaurar o(s) contacto(s) borrado(s).'; $messages['contactrestored'] = 'Restauráronse correctamente o(s) contacto(s).'; $messages['groupdeleted'] = 'Borrouse correctamente o grupo.'; $messages['grouprenamed'] = 'Mudouse correctamente o nome do grupo.'; $messages['groupcreated'] = 'Creouse correctamente o grupo.'; -$messages['savedsearchdeleted'] = 'Borrouse correctamente a procura gardada.'; -$messages['savedsearchdeleteerror'] = 'Non foi posible borrar a procura gardada.'; -$messages['savedsearchcreated'] = 'Creouse correctamente a procura gardada.'; -$messages['savedsearchcreateerror'] = 'Non foi posible crear a procura gardada.'; +$messages['savedsearchdeleted'] = 'Borrouse correctamente a busca gardada.'; +$messages['savedsearchdeleteerror'] = 'Non foi posÃbel eliminar a busca gardada.'; +$messages['savedsearchcreated'] = 'Creouse correctamente a busca gardada.'; +$messages['savedsearchcreateerror'] = 'Non foi posÃbel crear a busca gardada.'; $messages['messagedeleted'] = 'Borráronse correctamente a(s) mensaxe(s).'; $messages['messagemoved'] = 'Movéronse correctamente a(s) mensaxe(s).'; $messages['messagecopied'] = 'Copiáronse correctamente a(s) mensaxe(s).'; $messages['messagemarked'] = 'Marcáronse correctamente a(s) mensaxe(s).'; -$messages['autocompletechars'] = 'Introduza polo menos $min caracteres para autocompletar.'; -$messages['autocompletemore'] = 'Atopáronse máis entradas concidintes. Por favor, introduza máis caracteres.'; +$messages['autocompletechars'] = 'Engade polo menos $min caracteres para autocompletar.'; +$messages['autocompletemore'] = 'Atopáronse máis entradas concidintes. Por favor, engade máis caracteres.'; $messages['namecannotbeempty'] = 'O nome non pode estar baleiro.'; $messages['nametoolong'] = 'O nome é longo de máis.'; $messages['folderupdated'] = 'O cartafol actualizouse correctamente.'; $messages['foldercreated'] = 'O cartafol creouse correctamente.'; $messages['invalidimageformat'] = 'O formato da imaxe non é válido.'; $messages['mispellingsfound'] = 'Atopáronse erros ortográficos na mensaxe.'; -$messages['parentnotwritable'] = 'Non foi posible crear/mover o cartafol no cartafol padre escollido porque non ten permisos.'; +$messages['parentnotwritable'] = 'Non foi posÃbel crear/mover o cartafol para o cartafol principal que selecionaches porque non tes permisos.'; $messages['messagetoobig'] = 'A mensaxe é demasiado grande para procesala'; -$messages['attachmentvalidationerror'] = 'ATENCIÓN! Este anexo é sospeitoso porque o seu tipo non coincide o tipo declarado na mensaxe. Se non confÃa no remitente, non deberÃa abrilo, porque poderÃa conter un virus ou malware.<br/><br/><em>Tipo agardado: $expected; Tipo detectado: $detected</em>'; +$messages['attachmentvalidationerror'] = 'ATENCIÓN! Este anexo é sospeitoso porque o seu tipo non coincide co tipo declarado na mensaxe. Se non confÃas no remite, non deberÃas abrilo, porque poderÃa conter un virus ou malware.<br/><br/><em>Tipo agardado: $expected; Tipo detectado: $detected</em>'; $messages['noscriptwarning'] = 'Atención: Este servicio de correo web precisa de Javascript!. Por favor, active javascript nas opción do seu navegador.'; ?> diff --git a/program/localization/he_IL/labels.inc b/program/localization/he_IL/labels.inc index ad9a91adc..66c4a26b3 100644 --- a/program/localization/he_IL/labels.inc +++ b/program/localization/he_IL/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to מתוך $count'; $labels['copy'] = 'העתק'; $labels['move'] = 'העבר'; $labels['moveto'] = 'תיוק ב...'; +$labels['copyto'] = 'העתקה ×ל...'; $labels['download'] = 'הורדה'; $labels['open'] = 'לפתוח'; $labels['showattachment'] = 'הצגה'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = '×יות'; $labels['checkspelling'] = 'בדיקת ×יות'; $labels['resumeediting'] = 'המשך עריכה'; $labels['revertto'] = 'חזור למצב קוד×'; +$labels['restore'] = 'שיחזור'; +$labels['restoremessage'] = 'לשחזר הודעה?'; +$labels['responses'] = 'תגובות'; +$labels['insertresponse'] = '×”×›× ×¡×ª תגובה'; +$labels['manageresponses'] = '× ×™×”×•×œ תגובות'; +$labels['savenewresponse'] = 'שמירת תגובה חדשה'; +$labels['editresponses'] = 'עריכת תגובות'; +$labels['editresponse'] = 'עריכת תגובה'; +$labels['responsename'] = 'ש×'; +$labels['responsetext'] = 'גוף התגובה'; $labels['attach'] = 'צירוף'; $labels['attachments'] = 'צרופות'; $labels['upload'] = 'העל××”'; @@ -316,7 +327,11 @@ $labels['searchdelete'] = 'מחיקת החיפוש'; $labels['import'] = 'ייבו×'; $labels['importcontacts'] = '×™×™×‘×•× ×× ×©×™ קשר'; $labels['importfromfile'] = '×™×™×‘×•× ×ž×§×•×‘×¥'; +$labels['importtarget'] = 'הוספת ×× ×©×™ קשר ×ל '; $labels['importreplace'] = 'החלפת כל ×¤× ×§×¡ הכתובות'; +$labels['importgroups'] = '×™×™×‘×•× ×”×’×“×¨×•×ª קבוצה'; +$labels['importgroupsall'] = 'הכל (יש ×œ×”×§×™× ×§×‘×•×¦×•×ª ×× ×¦×¨×™×š)'; +$labels['importgroupsexisting'] = 'רק עבור קבוצות קיימות'; $labels['importdesc'] = '× ×™×ª×Ÿ לטעון ×× ×©×™ קשר מקובץ ×—×™×¦×•× ×™. ×× ×• ×ª×•×ž×›×™× ×‘×§×‘×¦×™× ×”×¢×¨×•×›×™× ×‘×¦×•×¨×” של <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ×ו CSV המופרד על ידי פסיקי×.'; @@ -426,6 +441,9 @@ $labels['standardwindows'] = '×—×œ×•× ×•×ª ×§×•×¤×¦×™× ×™×˜×•×¤×œ×• ×›×—×œ×•× × $labels['forwardmode'] = '×”×¤× ×™×ª הודעות'; $labels['inline'] = 'חלק מההודעה'; $labels['asattachment'] = 'כצרופה'; +$labels['replyallmode'] = 'ברירת המחדל של כפתור [×ž×¢× ×” לכול×]'; +$labels['replyalldefault'] = '×ž×¢× ×” לכול×'; +$labels['replyalllist'] = '×ž×¢× ×” לרשימת תפוצה בלבד (×× ×§×™×™×ž×ª)'; $labels['folder'] = 'תיק'; $labels['folders'] = 'תיקיות'; $labels['foldername'] = '×©× ×ª×™×§'; diff --git a/program/localization/he_IL/messages.inc b/program/localization/he_IL/messages.inc index b7e7d1ae8..a2af10081 100644 --- a/program/localization/he_IL/messages.inc +++ b/program/localization/he_IL/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,6 @@ $messages['invalidrequest'] = 'בקשה ×œ× ×—×•×§×™×ª. המידע ×œ× × ×©×ž× $messages['invalidhost'] = '×©× ×©×¨×ª ×œ× ×—×•×§×™'; $messages['nomessagesfound'] = '×œ× × ×ž×¦×ו הודעות בתיבה זו'; $messages['loggedout'] = 'הקשר הסתיי×. להתר×ות!'; -$messages['mailboxempty'] = 'רשימת ההודעות ריקה'; $messages['refreshing'] = '×ž×¨×¢× ×Ÿ...'; $messages['loading'] = '×˜×¢×™× ×”...'; $messages['uploading'] = 'קובץ עולה...'; @@ -44,6 +43,8 @@ $messages['messagesent'] = 'ההודעה × ×ž×¡×¨×” בהצלחה'; $messages['savingmessage'] = 'שמירת הודעה...'; $messages['messagesaved'] = 'ההודעה × ×©×ž×¨×” כטיוטה'; $messages['successfullysaved'] = '× ×©×ž×¨×” בהצלחה'; +$messages['savingresponse'] = 'שמירת תגובה...'; +$messages['deleteresponseconfirm'] = '×”×× ×œ×ž×—×•×§ ×ת התגובה?'; $messages['addedsuccessfully'] = '×יש הקשר × ×•×¡×£ ×œ×¤× ×§×¡ בהצלחה'; $messages['contactexists'] = '×§×™×™× ×›×‘×¨ ×יש קשר ×¢× ×›×ª×•×‘×ª דו×"ל זו'; $messages['contactnameexists'] = '×§×™×™× ×›×‘×¨ ×יש קשר בעל ×ותו ש×'; @@ -54,6 +55,8 @@ $messages['contactnotfound'] = '×יש הקשר המבוקש ×œ× × ×ž×¦×'; $messages['contactsearchonly'] = 'יש להקיש מפתחות חיפוש כדי ×œ×ž×¦×•× ×× ×©×™ קשר'; $messages['sendingfailed'] = 'שליחת ההודעה × ×›×©×œ×”'; $messages['senttooquickly'] = '× × ×œ×”×ž×ª×™×Ÿ $sec ×©× ×™×•×ª ×œ×¤× ×™ מסירת הודעה זו'; +$messages['errorsavingsent'] = '×ירעה שגי××” בזמן שמירת ההודעה ×©× ×©×œ×—×”'; +$messages['errorsaving'] = '×ירעה שגי××” בזמן השמירה'; $messages['errormoving'] = '×œ× × ×™×ª×Ÿ לתייק ×ת ההודעה'; $messages['errorcopying'] = 'העתקת ההודעות × ×›×©×œ×”'; $messages['errordeleting'] = '×œ× × ×™×ª×Ÿ למחוק ×ת ההודעה'; @@ -78,6 +81,7 @@ $messages['norecipientwarning'] = '× × ×œ×”×•×¡×™×£ לפחות × ×ž×¢×Ÿ ×חד' $messages['nosubjectwarning'] = 'שורת ×”× ×•×©× ×¨×™×§×”. ×”×× ×‘×¨×¦×•× ×š להוסיף × ×•×©× ×›×¢×ª?'; $messages['nobodywarning'] = '×”×× ×œ×©×œ×•×— הודעה ×œ×œ× ×ª×•×›×Ÿ?'; $messages['notsentwarning'] = 'ההודעה ×œ× × ×©×œ×—×”. ×”×× ×œ×‘×˜×œ?'; +$messages['restoresavedcomposedata'] = '× ×ž×¦××” הודעה ×©× ×¢×¨×›×” ×ך ×œ× × ×©×œ×—×”. \n\nSubject: $subject\n× ×©×ž×¨×”: $date\n\n×”×× ×œ×©×—×–×¨ ×ת ההודעה?'; $messages['noldapserver'] = '× × ×œ×‘×—×•×¨ שרת כתובות לחיפוש'; $messages['nosearchname'] = '× × ×œ×”×•×¡×™×£ ×יש קשר ×ו כתובת דו×"ל'; $messages['notuploadedwarning'] = 'עדיין ×œ× ×”×•×¢×œ×• כל הקבצי×. × × ×œ×—×›×•×ª ×ו לבטל הפעולה.'; @@ -140,6 +144,7 @@ $messages['smtperror'] = 'SMTP: $msg'; $messages['emailformaterror'] = '$email כתובת דו×"ל שגויה'; $messages['toomanyrecipients'] = 'יותר מדי × ×ž×¢× ×™×. יש להקטין ×ž×¡×¤×¨× ×œ - $max'; $messages['maxgroupmembersreached'] = '×ž×¡×¤×¨× ×©×œ חברי הקבוצה ××™× ×• יכול לעבור $max'; +$messages['internalerror'] = 'שגי×ת מערכת. × × ×œ× ×¡×•×ª ×©× ×™×ª.'; $messages['contactdelerror'] = '×œ× × ×™×ª×Ÿ למחוק ×יש קשר'; $messages['contactdeleted'] = '×יש הקשר × ×ž×—×§'; $messages['contactrestoreerror'] = '×œ× × ×™×ª×Ÿ לשחזר ×יש קשר ×©× ×ž×—×§'; diff --git a/program/localization/hr_HR/labels.inc b/program/localization/hr_HR/labels.inc index 70d1c1316..cfa0ff8dd 100644 --- a/program/localization/hr_HR/labels.inc +++ b/program/localization/hr_HR/labels.inc @@ -29,8 +29,10 @@ $labels['drafts'] = 'PredloÅ¡ci'; $labels['sent'] = 'Poslano'; $labels['trash'] = 'Smeće'; $labels['junk'] = 'Spam'; +$labels['show_real_foldernames'] = 'Prikaži prava imena specijalnih mapa'; $labels['subject'] = 'Naslov'; $labels['from'] = 'Od'; +$labels['sender'] = 'PoÅ¡iljatelj'; $labels['to'] = 'Za'; $labels['cc'] = 'Cc'; $labels['bcc'] = 'Bcc'; @@ -41,6 +43,7 @@ $labels['size'] = 'VeliÄina'; $labels['priority'] = 'Prioritet'; $labels['organization'] = 'Organizacija'; $labels['readstatus'] = 'ProÄitano'; +$labels['listoptions'] = 'Opcije lista...'; $labels['mailboxlist'] = 'Mape'; $labels['messagesfromto'] = 'Poruke od $from do $to od ukupno $count'; $labels['threadsfromto'] = 'Teme od $from do $to od ukupno $count'; @@ -50,6 +53,9 @@ $labels['copy'] = 'Kopiraj'; $labels['move'] = 'Premjesti'; $labels['moveto'] = 'Premjesti u...'; $labels['download'] = 'Preuzmi (download)'; +$labels['open'] = 'Otvori'; +$labels['showattachment'] = 'Prikaži'; +$labels['showanyway'] = 'Prikaži svejedno'; $labels['filename'] = 'Ime datoteke'; $labels['filesize'] = 'VeliÄina datoteke'; $labels['addtoaddressbook'] = 'Dodaj u imenik'; @@ -97,14 +103,14 @@ $labels['checkmail'] = 'Provjera novih poruka'; $labels['compose'] = 'Nova poruka'; $labels['writenewmessage'] = 'Stvori novu poruku'; $labels['reply'] = 'Odgovori'; -$labels['replytomessage'] = 'Odgovori na poruku'; -$labels['replytoallmessage'] = 'Odgovori poÅ¡iljaocu i svim primateljima'; +$labels['replytomessage'] = 'Odgovori poÅ¡iljatelju'; +$labels['replytoallmessage'] = 'Odgovori listi ili poÅ¡iljatelju i svim primateljima'; $labels['replyall'] = 'Odgovori svima'; $labels['replylist'] = 'Odgovori listi'; $labels['forward'] = 'Proslijedi'; -$labels['forwardinline'] = 'Proslijedi citirano'; +$labels['forwardinline'] = 'Proslijedi umetnuto'; $labels['forwardattachment'] = 'Proslijedi kao privitak'; -$labels['forwardmessage'] = 'Prosljedi poruku'; +$labels['forwardmessage'] = 'Proslijedi poruku'; $labels['deletemessage'] = 'ObriÅ¡i poruku'; $labels['movemessagetotrash'] = 'Preseli poruke u smeće'; $labels['printmessage'] = 'IspiÅ¡i ovu poruku'; @@ -118,9 +124,9 @@ $labels['mark'] = 'OznaÄi'; $labels['markmessages'] = 'OznaÄi poruke'; $labels['markread'] = 'Kao proÄitano'; $labels['markunread'] = 'Kao neproÄitano'; -$labels['markflagged'] = 'Kao oznaÄenu'; -$labels['markunflagged'] = 'Kao neoznaÄenu'; -$labels['moreactions'] = 'ViÅ¡e akcija'; +$labels['markflagged'] = 'Kao oznaÄeno'; +$labels['markunflagged'] = 'Kao neoznaÄeno'; +$labels['moreactions'] = 'ViÅ¡e akcija...'; $labels['more'] = 'ViÅ¡e'; $labels['back'] = 'Natrag'; $labels['options'] = 'Postavke'; @@ -128,66 +134,85 @@ $labels['select'] = 'Odaberi'; $labels['all'] = 'Sve'; $labels['none'] = 'NiÅ¡ta'; $labels['currpage'] = 'Trenutna stranica'; -$labels['unread'] = 'NeproÄitane'; -$labels['flagged'] = 'OznaÄene'; -$labels['unanswered'] = 'Neodgovrene'; +$labels['unread'] = 'NeproÄitano'; +$labels['flagged'] = 'OznaÄeno'; +$labels['unanswered'] = 'Neodgovoreno'; +$labels['withattachment'] = 'S privitkom'; $labels['deleted'] = 'Obrisano'; +$labels['undeleted'] = 'Neobrisano'; $labels['invert'] = 'Obrni'; $labels['filter'] = 'Filtriraj'; $labels['list'] = 'Lista'; $labels['threads'] = 'Teme'; $labels['expand-all'] = 'ProÅ¡iri sve'; -$labels['expand-unread'] = 'ProÅ¡iri neproÄitane'; +$labels['expand-unread'] = 'ProÅ¡iri neproÄitano'; $labels['collapse-all'] = 'Zatvori sve'; $labels['threaded'] = 'Tematski prikaz'; $labels['autoexpand_threads'] = 'ProÅ¡iri teme poruka'; -$labels['do_expand'] = 'Sve teme'; +$labels['do_expand'] = 'sve teme'; $labels['expand_only_unread'] = 'samo s neproÄitanim porukama'; $labels['fromto'] = 'PoÅ¡iljatelj/Primatelj'; $labels['flag'] = 'Oznaka'; $labels['attachment'] = 'Privitak'; $labels['nonesort'] = 'NiÅ¡ta'; $labels['sentdate'] = 'Datum slanja'; -$labels['arrival'] = 'Datum primanja'; +$labels['arrival'] = 'Datum primitka'; $labels['asc'] = 'uzlazno'; $labels['desc'] = 'silazno'; -$labels['listcolumns'] = 'Kolone'; -$labels['listsorting'] = 'Sortirajuća kolona'; -$labels['listorder'] = 'Sortirajući redoslijed'; +$labels['listcolumns'] = 'Stupci'; +$labels['listsorting'] = 'Sortirajući stupac'; +$labels['listorder'] = 'Redoslijed sortiranja'; $labels['listmode'] = 'Model pregleda listi'; -$labels['folderactions'] = 'Akcije mapa'; -$labels['compact'] = 'Kompresiranje'; +$labels['folderactions'] = 'Akcije mapa...'; +$labels['compact'] = 'Kompresiraj (sažmi)'; $labels['empty'] = 'Isprazni'; -$labels['quota'] = 'Kvota'; +$labels['importmessages'] = 'Uvoz poruka'; +$labels['quota'] = 'IskoriÅ¡tenost diska'; $labels['unknown'] = 'nepoznato'; -$labels['unlimited'] = 'beskonaÄna'; +$labels['unlimited'] = 'neograniÄeno'; $labels['quicksearch'] = 'Brza pretraga'; -$labels['resetsearch'] = 'Prikaži sve poruke'; +$labels['resetsearch'] = 'Vrati pretragu u poÄetno stanje'; $labels['searchmod'] = 'Postavke pretrage'; $labels['msgtext'] = 'Cijela poruka'; +$labels['body'] = 'Tijelo poruke'; +$labels['type'] = 'Tip'; +$labels['namex'] = 'Ime'; $labels['openinextwin'] = 'Otvori u novom prozoru'; -$labels['emlsave'] = 'Download (.eml)'; +$labels['emlsave'] = 'Preuzmi (.eml)'; +$labels['changeformattext'] = 'Prikaži kao obiÄan tekst'; +$labels['changeformathtml'] = 'Prikaži kao HTML'; $labels['editasnew'] = 'Uredi kao novo'; +$labels['send'] = 'PoÅ¡alji'; $labels['sendmessage'] = 'PoÅ¡alji poruku'; -$labels['savemessage'] = 'Spremi u \'PredloÅ¡ci\''; +$labels['savemessage'] = 'Spremi kao predložak'; $labels['addattachment'] = 'Priloži datoteku'; -$labels['charset'] = 'Charset'; -$labels['editortype'] = 'Tip editora'; +$labels['charset'] = 'Kodna stranica'; +$labels['editortype'] = 'Tip ureÄ‘ivaÄa teksta'; $labels['returnreceipt'] = 'Potvrda o primitku poruke'; -$labels['dsn'] = 'Potvrda o poslanoj poruci'; +$labels['dsn'] = 'Obavijest o statusu isporuke'; $labels['mailreplyintro'] = 'Dana $date, $sender je napisao(la):'; -$labels['originalmessage'] = 'Izvorna Poruka'; -$labels['editidents'] = 'Promijeni identitete'; -$labels['spellcheck'] = 'PiÅ¡i'; +$labels['originalmessage'] = 'Izvorna poruka'; +$labels['editidents'] = 'Uredi identitete'; +$labels['spellcheck'] = 'Pravopis'; $labels['checkspelling'] = 'Provjera pravopisa'; -$labels['resumeediting'] = 'Povratak u pisanje'; +$labels['resumeediting'] = 'Nastavi ureÄ‘ivanje'; $labels['revertto'] = 'Vrati na'; +$labels['restore'] = 'Povrat'; +$labels['restoremessage'] = 'Povrat poruke?'; +$labels['responses'] = 'Odgovori'; +$labels['insertresponse'] = 'Umetni odgovor'; +$labels['manageresponses'] = 'Upravljanje odgovorima'; +$labels['savenewresponse'] = 'Pohrani novi odgovor'; +$labels['editresponses'] = 'Uredi odgovore'; +$labels['editresponse'] = 'Uredi odgovor'; +$labels['responsename'] = 'Naziv'; +$labels['responsetext'] = 'Tekst odgovora'; $labels['attach'] = 'Priloži'; $labels['attachments'] = 'Privitci (Attachments)'; $labels['upload'] = 'Dodaj'; $labels['uploadprogress'] = '$percent ($current od $total)'; $labels['close'] = 'Zatvori'; -$labels['messageoptions'] = 'Opcije poruka...'; +$labels['messageoptions'] = 'Postavke poruka...'; $labels['low'] = 'Nizak'; $labels['lowest'] = 'Najniži'; $labels['normal'] = 'Srednji'; @@ -196,20 +221,23 @@ $labels['highest'] = 'NajviÅ¡i'; $labels['nosubject'] = '(bez naslova)'; $labels['showimages'] = 'Prikaži slike'; $labels['alwaysshow'] = 'Uvijek prikaži slike od $sender'; -$labels['isdraft'] = 'Ova poruka je skica (draft)'; +$labels['isdraft'] = 'Ova poruka je predložak.'; +$labels['andnmore'] = '$nr viÅ¡e...'; +$labels['togglemoreheaders'] = 'Prikaži joÅ¡ zaglavlja poruke'; +$labels['togglefullheaders'] = 'Prikaži neureÄ‘ena zaglavlja poruke'; $labels['htmltoggle'] = 'HTML'; $labels['plaintoggle'] = 'Samo tekst'; $labels['savesentmessagein'] = 'Spremi poslane poruke u'; $labels['dontsave'] = 'ne spremaj'; -$labels['maxuploadsize'] = 'Maksimalna dozvoljena velicina datoteke je $size'; +$labels['maxuploadsize'] = 'Maksimalna dozvoljena veliÄina datoteke je $size'; $labels['addcc'] = 'Dodaj Cc'; $labels['addbcc'] = 'Dodaj Bcc'; $labels['addreplyto'] = 'Dodaj Odgovori-na'; $labels['addfollowupto'] = 'Dodaj Nastavak-na'; -$labels['mdnrequest'] = 'PoÅ¡iljaoc ove poruke je tražio da bude obavijeÅ¡ten o njenom primitku. Želite li obavijestiti poÅ¡iljaoca?'; -$labels['receiptread'] = 'Vrati potvrdu (proÄitano)'; -$labels['yourmessage'] = 'Ovo je vraćena potvrda vaÅ¡e poruke'; -$labels['receiptnote'] = 'Info: Ova poruka samo potvrÄ‘uje da se poruka prikazala na raÄunalu primaoca. Nema garancije da je primaoc proÄitao ili razumio sadržaj poruke.'; +$labels['mdnrequest'] = 'PoÅ¡iljatelj ove poruke je tražio da bude obavijeÅ¡ten o njenom primitku. Želite li obavijestiti poÅ¡iljatelja?'; +$labels['receiptread'] = 'Potvrda o primitku (proÄitano)'; +$labels['yourmessage'] = 'Ovo je potvrda o primitku vaÅ¡e poruke'; +$labels['receiptnote'] = 'Info: Ova poruka o primitku samo potvrÄ‘uje da se poruka prikazala na raÄunalu primatelja. Nema garancije da je primatelj proÄitao ili razumio sadržaj poruke.'; $labels['name'] = 'Puno ime'; $labels['firstname'] = 'Ime'; $labels['surname'] = 'Prezime'; @@ -219,18 +247,18 @@ $labels['namesuffix'] = 'Sufiks'; $labels['nickname'] = 'Nadimak'; $labels['jobtitle'] = 'Titula'; $labels['department'] = 'Odjel'; -$labels['gender'] = 'Rod'; -$labels['maidenname'] = 'DjevojaÄko ime'; -$labels['email'] = 'E-Mail'; +$labels['gender'] = 'Spol'; +$labels['maidenname'] = 'DjevojaÄko prezime'; +$labels['email'] = 'E-mail'; $labels['phone'] = 'Telefon'; $labels['address'] = 'Adresa'; $labels['street'] = 'Ulica'; $labels['locality'] = 'Grad'; $labels['zipcode'] = 'PoÅ¡tanski broj'; $labels['region'] = 'Oblast'; -$labels['country'] = 'Zemlja'; +$labels['country'] = 'Država'; $labels['birthday'] = 'RoÄ‘endan'; -$labels['anniversary'] = 'Jubilej'; +$labels['anniversary'] = 'GodiÅ¡njica'; $labels['website'] = 'Web stranica'; $labels['instantmessenger'] = 'IM'; $labels['notes'] = 'BiljeÅ¡ke'; @@ -241,14 +269,14 @@ $labels['assistant'] = 'Asistent'; $labels['spouse'] = 'Suprug/a'; $labels['allfields'] = 'Sva polja'; $labels['search'] = 'Pretraga'; -$labels['advsearch'] = 'Napredna Pretraga'; +$labels['advsearch'] = 'Napredna pretraga'; $labels['advanced'] = 'Napredno'; $labels['other'] = 'Ostalo'; -$labels['typehome'] = 'Kućni broj'; -$labels['typework'] = 'Poslovni broj'; +$labels['typehome'] = 'Kuća'; +$labels['typework'] = 'Posao'; $labels['typeother'] = 'Ostalo'; $labels['typemobile'] = 'Mobitel'; -$labels['typemain'] = 'Glavni broj'; +$labels['typemain'] = 'Glavni'; $labels['typehomefax'] = 'Fax kuća'; $labels['typeworkfax'] = 'Fax posao'; $labels['typecar'] = 'Auto'; @@ -260,156 +288,187 @@ $labels['typeblog'] = 'Blog'; $labels['typeprofile'] = 'Profil'; $labels['addfield'] = 'Dodaj polje...'; $labels['addcontact'] = 'Dodaj novi kontakt'; -$labels['editcontact'] = 'Izmjeni kontakt'; +$labels['editcontact'] = 'Uredi kontakt'; $labels['contacts'] = 'Kontakti'; $labels['contactproperties'] = 'Svojstva kontakta'; $labels['personalinfo'] = 'Osobni podaci'; -$labels['edit'] = 'Izmjeni'; +$labels['edit'] = 'Uredi'; $labels['cancel'] = 'Odustani'; $labels['save'] = 'Spremi'; $labels['delete'] = 'ObriÅ¡i'; $labels['rename'] = 'Preimenuj'; $labels['addphoto'] = 'Dodaj'; -$labels['replacephoto'] = 'Smijeniti'; -$labels['newcontact'] = 'Dodaj novi kontakt'; +$labels['replacephoto'] = 'Zamijeni'; +$labels['uploadphoto'] = 'Postavi fotografiju'; +$labels['newcontact'] = 'Dodaj novu karticu kontakta'; $labels['deletecontact'] = 'ObriÅ¡i odabrane kontakte'; -$labels['composeto'] = 'NapiÅ¡i mail...'; +$labels['composeto'] = 'NapiÅ¡i mail za'; $labels['contactsfromto'] = 'Kontakti od $from do $to od ukupno $count'; -$labels['print'] = 'Print'; -$labels['export'] = 'Export'; +$labels['print'] = 'Ispis'; +$labels['export'] = 'Izvoz'; +$labels['exportall'] = 'Izvezi sve'; +$labels['exportsel'] = 'Izvezi odabrano'; $labels['exportvcards'] = 'Izvezi kontakte u vCard formatu'; -$labels['newcontactgroup'] = 'Napravi novu kontaktnu grupu'; -$labels['grouprename'] = 'Promijeni ime grupe'; -$labels['groupdelete'] = 'IzbriÅ¡i grupu'; +$labels['newcontactgroup'] = 'Napravi novu grupu kontakata'; +$labels['grouprename'] = 'Preimenuj grupu'; +$labels['groupdelete'] = 'ObriÅ¡i grupu'; +$labels['groupremoveselected'] = 'ObriÅ¡i odabrane kontakte iz grupe '; $labels['previouspage'] = 'Prethodna strana'; $labels['firstpage'] = 'Prva strana'; $labels['nextpage'] = 'Slijedeća strana'; $labels['lastpage'] = 'Zadnja strana'; $labels['group'] = 'Grupa'; $labels['groups'] = 'Grupe'; +$labels['listgroup'] = 'Prikaži Älanove grupe'; $labels['personaladrbook'] = 'Privatna adresa'; -$labels['searchsave'] = 'Pohrani pretragu'; +$labels['searchsave'] = 'Spremi pretragu'; $labels['searchdelete'] = 'ObriÅ¡i pretragu'; $labels['import'] = 'Uvoz'; $labels['importcontacts'] = 'Uvoz kontakta'; $labels['importfromfile'] = 'Uvezi iz datoteke:'; -$labels['importreplace'] = 'PrepiÅ¡i cijeli adresar'; +$labels['importtarget'] = 'Dodaj kontakte u'; +$labels['importreplace'] = 'PrepiÅ¡i cijeli imenik'; +$labels['importgroups'] = 'Uvezi zadatke grupe'; +$labels['importgroupsall'] = 'Sve (stvori grupe ako je potrebno)'; +$labels['importgroupsexisting'] = 'Samo za postojeće grupe'; +$labels['importdesc'] = 'Možete poslati kontakte iz postojećeg imenika.<br/>Trenutno je podržan uvoz adresa iz <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ili CSV (comma-separated) formata.'; $labels['done'] = 'ZavrÅ¡eno'; $labels['settingsfor'] = 'Postavke za'; $labels['about'] = 'O programu'; $labels['preferences'] = 'Postavke'; $labels['userpreferences'] = 'KorisniÄke postavke'; -$labels['editpreferences'] = 'Izmjena postavki'; +$labels['editpreferences'] = 'Uredi korisniÄke postavke'; $labels['identities'] = 'Identiteti'; -$labels['manageidentities'] = 'Podesi identitete za ovaj nalog'; -$labels['newidentity'] = 'Dodaj identitet'; -$labels['newitem'] = 'Novo'; -$labels['edititem'] = 'Uredi'; -$labels['preferhtml'] = 'HTML format u prednosti'; -$labels['defaultcharset'] = 'Zadani skup znakova'; +$labels['manageidentities'] = 'Upravljanje identitetima za ovaj korisniÄki raÄun'; +$labels['newidentity'] = 'Novi identitet'; +$labels['newitem'] = 'Nova stavka'; +$labels['edititem'] = 'Uredi stavku'; +$labels['preferhtml'] = 'Prikaži HTML'; +$labels['defaultcharset'] = 'Zadana kodna stranica'; $labels['htmlmessage'] = 'HTML format poruke'; +$labels['messagepart'] = 'Dio'; +$labels['digitalsig'] = 'Digitalni potpis'; $labels['dateformat'] = 'Format datuma'; $labels['timeformat'] = 'Format vremena'; -$labels['prettydate'] = 'Formatiran datum'; -$labels['setdefault'] = 'Postavi predodreÄ‘eno'; +$labels['prettydate'] = 'Formatirani datum'; +$labels['setdefault'] = 'Postavi zadano'; $labels['autodetect'] = 'Auto'; $labels['language'] = 'Jezik'; $labels['timezone'] = 'Vremenska zona'; -$labels['pagesize'] = 'Redova po stranici'; +$labels['pagesize'] = 'Redaka po stranici'; $labels['signature'] = 'Potpis'; -$labels['dstactive'] = 'Automatska promjena vremena'; -$labels['htmleditor'] = 'Sastavi HTML poruke'; -$labels['htmlonreply'] = 'odgovor samo na HTML poruke'; +$labels['dstactive'] = 'Ljetno/zimsko raÄunanje vremena'; +$labels['showinextwin'] = 'Otvori poruku u novom prozoru'; +$labels['composeextwin'] = 'Sastavi poruku u novom prozoru'; +$labels['htmleditor'] = 'Sastavi poruke u HTML formatu'; +$labels['htmlonreply'] = 'pri odgovaranju na HTML poruku'; +$labels['htmlonreplyandforward'] = 'pri prosljeÄ‘ivanju ili odgovaranju na HTML poruku'; $labels['htmlsignature'] = 'HTML potpis'; +$labels['showemail'] = 'Prikaži e-mail adresu s imenom'; $labels['previewpane'] = 'Prikaži podruÄje pregleda'; -$labels['skin'] = 'Tema izgleda'; -$labels['logoutclear'] = 'OÄisti smeće pri izlazu'; -$labels['logoutcompact'] = 'Komprimiraj Inbox pri izlazu'; -$labels['uisettings'] = 'KorisniÄki interfejs'; -$labels['serversettings'] = 'Postavke servera'; -$labels['mailboxview'] = 'Pregled Mailboxa'; -$labels['mdnrequests'] = 'Obavijest poÅ¡iljatelja'; -$labels['askuser'] = 'pitaj korisnika'; -$labels['autosend'] = 'Å¡alji automatski'; -$labels['autosendknown'] = 'Dodaj primatelja u moje kontakte, u suprotnom me pitaj'; -$labels['autosendknownignore'] = 'Dodaj primatelja u moje kontakte, u suprotnom zanemari'; +$labels['skin'] = 'Tema suÄelja'; +$labels['logoutclear'] = 'OÄisti smeće pri odjavi'; +$labels['logoutcompact'] = 'Sažmi Inbox pri odjavi'; +$labels['uisettings'] = 'KorisniÄko suÄelje'; +$labels['serversettings'] = 'Postavke poslužitelja'; +$labels['mailboxview'] = 'Pregled sanduÄića'; +$labels['mdnrequests'] = 'na zahtjev za potvrdom primitka'; +$labels['askuser'] = 'pitaj me'; +$labels['autosend'] = 'poÅ¡alji potvrdu'; +$labels['autosendknown'] = 'poÅ¡alji potvrdu ako je poÅ¡iljatelj u mom imeniku, u suprotnom me pitaj'; +$labels['autosendknownignore'] = 'poÅ¡alji potvrdu ako je poÅ¡iljatelj u mom imeniku, u suprotnom zanemari'; $labels['ignore'] = 'zanemari'; $labels['readwhendeleted'] = 'OznaÄi poruku kao proÄitanu pri brisanju'; $labels['flagfordeletion'] = 'OznaÄi poruku za brisanje umjesto brisanja'; -$labels['skipdeleted'] = 'Ne prikazivaj pobrisane poruke'; -$labels['deletealways'] = 'Ukoliko premjeÅ¡tanje poruka u mapu otpad ne uspije, izbrÅ¡i poruku'; -$labels['showremoteimages'] = 'Prikaži slike s interneta'; +$labels['skipdeleted'] = 'Ne prikazuj obrisane poruke'; +$labels['deletealways'] = 'Ukoliko premjeÅ¡tanje poruka u mapu smeće ne uspije, izbriÅ¡i poruku'; +$labels['deletejunk'] = 'Odmah obriÅ¡i poruke u mapi Smeće'; +$labels['showremoteimages'] = 'Prikaži umetnute slike s interneta'; $labels['fromknownsenders'] = 'od poznatih poÅ¡iljatelja'; $labels['always'] = 'uvijek'; -$labels['showinlineimages'] = 'Prikaži slike ispod poruke'; -$labels['autosavedraft'] = 'Automatski spremi draft'; +$labels['showinlineimages'] = 'Prikaži slike iz privitka ispod poruke'; +$labels['autosavedraft'] = 'Automatski spremi predložak'; $labels['everynminutes'] = 'svakih $n minuta'; -$labels['never'] = 'nikada'; +$labels['refreshinterval'] = 'Osvježi (provjeri nove poruke, itd.)'; +$labels['never'] = 'nikad'; $labels['immediately'] = 'odmah'; -$labels['messagesdisplaying'] = 'Prikazujem poruke'; -$labels['messagescomposition'] = 'Komponiram poruke'; +$labels['messagesdisplaying'] = 'Prikaz poruka'; +$labels['messagescomposition'] = 'Sastavljanje poruka'; $labels['mimeparamfolding'] = 'Nazivi privitaka'; -$labels['2231folding'] = 'Full RFC 2231 (Thunderbird)'; +$labels['2231folding'] = 'Prema RFC 2231 (Thunderbird)'; $labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)'; -$labels['2047folding'] = 'Full RFC 2047 (ostali)'; -$labels['force7bit'] = 'Koristi MIME postavke za 8-bitne znakove'; +$labels['2047folding'] = 'Prema RFC 2047 (ostali)'; +$labels['force7bit'] = 'Koristi MIME kodiranje za 8-bitne znakove'; $labels['advancedoptions'] = 'Napredne postavke'; -$labels['focusonnewmessage'] = 'Fokusiraj browser pri novoj poruci'; +$labels['focusonnewmessage'] = 'Fokusiraj prozor preglednika pri primitku nove poruke'; $labels['checkallfolders'] = 'Provjeri nove poruke u svim mapama'; $labels['displaynext'] = 'Nakon brisanja/micanja poruke, prikaži slijedeću'; -$labels['defaultfont'] = 'PredodreÄ‘eni font HTML poruke'; +$labels['defaultfont'] = 'Zadani font HTML poruke'; $labels['mainoptions'] = 'Glavne postavke'; -$labels['section'] = 'Sekcija'; +$labels['browseroptions'] = 'Postavke preglednika'; +$labels['section'] = 'Odjeljak'; $labels['maintenance'] = 'Održavanje'; $labels['newmessage'] = 'Nova poruka'; $labels['signatureoptions'] = 'Postavke potpisa'; $labels['whenreplying'] = 'Prilikom odgovora'; -$labels['replytopposting'] = 'zapoÄni novu poruku iznad originala'; -$labels['replybottomposting'] = 'zapoÄni novu poruku ispod originala'; +$labels['replyempty'] = 'ne citiraj originalnu poruku'; +$labels['replytopposting'] = 'zapoÄni novu poruku iznad originalne'; +$labels['replybottomposting'] = 'zapoÄni novu poruku ispod originalne'; $labels['replyremovesignature'] = 'Kod odgovaranja, makni originalni potpis iz poruke'; $labels['autoaddsignature'] = 'Automatski dodaj potpis'; -$labels['newmessageonly'] = 'samo nova poruka'; -$labels['replyandforwardonly'] = 'samo odgovori i proslijeÄ‘ivanja'; +$labels['newmessageonly'] = 'samo za nove poruke'; +$labels['replyandforwardonly'] = 'samo pri odgovaranju i proslijeÄ‘ivanju'; $labels['insertsignature'] = 'Umetni potpis'; $labels['previewpanemarkread'] = 'Obilježi pregledane poruke kao proÄitane'; $labels['afternseconds'] = 'nakon $n sekundi'; -$labels['reqmdn'] = 'Uvijek zatraži potvrdu o primitku poruke'; -$labels['reqdsn'] = 'Uvijek zatraži potvrdu o slanju poruke'; -$labels['replysamefolder'] = 'Spremi odgovore u mapu gdje se nalazi poruka'; +$labels['reqmdn'] = 'Uvijek zatraži potvrdu o primitku'; +$labels['reqdsn'] = 'Uvijek zatraži obavijest o stanju isporuke'; +$labels['replysamefolder'] = 'Spremi odgovore u mapu gdje se nalazi originalna poruka'; +$labels['defaultabook'] = 'Zadani imenik'; $labels['autocompletesingle'] = 'PreskoÄi alternativne email adrese u autocomplete prijedlozima'; +$labels['listnamedisplay'] = 'Prikaži kontakte kao'; $labels['spellcheckbeforesend'] = 'Provjeri pravopis prije slanja poruke'; $labels['spellcheckoptions'] = 'Postavke provjere pravopisa'; -$labels['spellcheckignoresyms'] = 'Ignoriraj rijeÄi koje sadrže simbole'; -$labels['spellcheckignorenums'] = 'Ignoriraj rijeÄi koje sadrže brojeve'; -$labels['spellcheckignorecaps'] = 'Ignoriraj rijeÄi sa sa svim velikim slovima'; +$labels['spellcheckignoresyms'] = 'Zanemari rijeÄi koje sadrže simbole'; +$labels['spellcheckignorenums'] = 'Zanemari rijeÄi koje sadrže brojeve'; +$labels['spellcheckignorecaps'] = 'Zanemari rijeÄi sa svim velikim slovima'; $labels['addtodict'] = 'Dodaj u rjeÄnik'; +$labels['mailtoprotohandler'] = 'Registriraj upravitelj protokola za mailto: linkove'; +$labels['standardwindows'] = 'Tretiraj skoÄne prozore kao standardne'; +$labels['forwardmode'] = 'ProsljeÄ‘ivanje poruka'; +$labels['inline'] = 'umetnuto'; +$labels['asattachment'] = 'kao privitak'; +$labels['replyallmode'] = 'Zadana akcija [Reply all] gumba'; +$labels['replyalldefault'] = 'odgovori svima'; +$labels['replyalllist'] = 'odgovori samo listi (ako postoji)'; $labels['folder'] = 'Mapa'; $labels['folders'] = 'Mape'; -$labels['foldername'] = 'Ime mape'; -$labels['subscribed'] = 'Pretplata'; +$labels['foldername'] = 'Naziv mape'; +$labels['subscribed'] = 'Pretplaćen'; $labels['messagecount'] = 'Poruke'; -$labels['create'] = 'Napravi'; -$labels['createfolder'] = 'Napravi novu mapu'; -$labels['managefolders'] = 'Podesi mapu'; -$labels['specialfolders'] = 'Specijalna mapa'; +$labels['create'] = 'Stvori'; +$labels['createfolder'] = 'Stvori novu mapu'; +$labels['managefolders'] = 'Upravljanje mapama'; +$labels['specialfolders'] = 'Specijalne mape'; $labels['properties'] = 'Svojstva'; $labels['folderproperties'] = 'Svojstva mape'; -$labels['parentfolder'] = 'Glavna fascikla'; +$labels['parentfolder'] = 'Glavna mapa'; $labels['location'] = 'Lokacija'; -$labels['info'] = 'Informacija'; -$labels['getfoldersize'] = 'Kliknite da biste dobili veliÄinu mape'; -$labels['changesubscription'] = 'Kliknite da biste promjenili pretplatu'; +$labels['info'] = 'Informacije'; +$labels['getfoldersize'] = 'Kliknite za prikaz veliÄine mape'; +$labels['changesubscription'] = 'Kliknite da biste promijenili pretplatu'; $labels['foldertype'] = 'Vrsta mape'; $labels['personalfolder'] = 'Privatna mapa'; -$labels['otherfolder'] = 'Mapa drugih korisnika'; +$labels['otherfolder'] = 'Mapa drugog korisnika'; $labels['sharedfolder'] = 'Javna mapa'; $labels['sortby'] = 'Sortiraj po'; -$labels['sortasc'] = 'Sortiraj rastućim nizom'; -$labels['sortdesc'] = 'Sortiraj opadajućim nizom'; +$labels['sortasc'] = 'Sortiraj uzlaznim nizom'; +$labels['sortdesc'] = 'Sortiraj silaznim nizom'; $labels['undo'] = 'PoniÅ¡ti'; -$labels['plugin'] = 'Plugin'; +$labels['installedplugins'] = 'Instalirani dodaci'; +$labels['plugin'] = 'Dodatak'; $labels['version'] = 'InaÄica'; -$labels['source'] = 'Izvor'; +$labels['source'] = 'Izvorni kod'; $labels['license'] = 'Licenca'; $labels['support'] = 'PodrÅ¡ka'; $labels['B'] = 'B'; @@ -418,16 +477,16 @@ $labels['MB'] = 'MB'; $labels['GB'] = 'GB'; $labels['unicode'] = 'Unicode'; $labels['english'] = 'Engleski'; -$labels['westerneuropean'] = 'Zapadno Evropski'; -$labels['easterneuropean'] = 'IstoÄno Evropski'; -$labels['southeasterneuropean'] = 'Južno-IstoÄni Evropski'; -$labels['baltic'] = 'BalitÄki'; -$labels['cyrillic'] = 'ÄŒirilÄni'; +$labels['westerneuropean'] = 'Zapadnoeuropski'; +$labels['easterneuropean'] = 'IstoÄnoeuropski'; +$labels['southeasterneuropean'] = 'JugoistoÄnoeuropski'; +$labels['baltic'] = 'BaltiÄki'; +$labels['cyrillic'] = 'ÄŒirilićni'; $labels['arabic'] = 'Arapski'; $labels['greek'] = 'GrÄki'; -$labels['hebrew'] = 'Hibru'; +$labels['hebrew'] = 'Hebrejski'; $labels['turkish'] = 'Turski'; -$labels['nordic'] = 'Nordski'; +$labels['nordic'] = 'Nordijski'; $labels['thai'] = 'Tajlandski'; $labels['celtic'] = 'Keltski'; $labels['vietnamese'] = 'Vijetnamski'; diff --git a/program/localization/hr_HR/messages.inc b/program/localization/hr_HR/messages.inc index 2e51848eb..0baeb2908 100644 --- a/program/localization/hr_HR/messages.inc +++ b/program/localization/hr_HR/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -15,139 +15,161 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ -$messages['loginfailed'] = 'Prijava neuspjeÅ¡na'; -$messages['cookiesdisabled'] = 'VaÅ¡ Web preglednik ne podržava kolaÄiće (cookies)'; -$messages['sessionerror'] = 'Morate se ponovno ulogirati'; -$messages['storageerror'] = 'NeuspjeÅ¡na veza na IMAP server'; -$messages['servererror'] = 'GreÅ¡ka poslužitelja'; -$messages['servererrormsg'] = 'GreÅ¡ka na serveru: $msg'; +$messages['errortitle'] = 'Dogodila se greÅ¡ka!'; +$messages['loginfailed'] = 'Prijava neuspjeÅ¡na.'; +$messages['cookiesdisabled'] = 'VaÅ¡ preglednik ne prihvaća kolaÄiće.'; +$messages['sessionerror'] = 'VaÅ¡a sesija je nevaljala ili istekla.'; +$messages['storageerror'] = 'NeuspjeÅ¡no povezivanje na IMAP poslužitelj.'; +$messages['servererror'] = 'GreÅ¡ka poslužitelja!'; +$messages['servererrormsg'] = 'GreÅ¡ka poslužitelja: $msg'; $messages['dberror'] = 'GreÅ¡ka baze podataka!'; -$messages['errorreadonly'] = 'Nemoguća izvedba operacije. Mapa je samo za Äitanje.'; -$messages['errornoperm'] = 'Nemoguća izvedba operacije. Dozvola odbijena.'; -$messages['invalidrequest'] = 'Nepravilan zahtijev! Podaci nisu spremljeni.'; -$messages['nomessagesfound'] = 'Nema poruka u sanduÄiću'; -$messages['loggedout'] = 'UspjeÅ¡no ste se odjavili. Zbogom!'; -$messages['mailboxempty'] = 'SanduÄuć je prazan'; +$messages['requesttimedout'] = 'Zahtjev istekao'; +$messages['errorreadonly'] = 'Nemoguće izvrÅ¡iti operaciju. Mapa je samo za Äitanje.'; +$messages['errornoperm'] = 'Nemoguće izvrÅ¡iti operaciju. Nije dozvoljen pristup.'; +$messages['erroroverquota'] = 'Nemoguće izvrÅ¡iti operaciju. Nema prostora na disku.'; +$messages['erroroverquotadelete'] = 'Nema prostora na disku. Upotrijebite SHIFT+DEL za brisanje poruka.'; +$messages['invalidrequest'] = 'Neispravan zahtjev! Podaci nisu spremljeni.'; +$messages['invalidhost'] = 'Neispravno ime poslužitelja.'; +$messages['nomessagesfound'] = 'Nema poruka u ovom sanduÄiću.'; +$messages['loggedout'] = 'UspjeÅ¡no ste se odjavili. DoviÄ‘enja!'; +$messages['refreshing'] = 'Osvježavanje...'; $messages['loading'] = 'UÄitavanje...'; -$messages['uploading'] = 'Prenosim datoteku...'; -$messages['uploadingmany'] = 'Prenosim datoteke...'; +$messages['uploading'] = 'Postavljanje datoteke...'; +$messages['uploadingmany'] = 'Postavljanje datoteka...'; $messages['loadingdata'] = 'UÄitavanje podataka...'; $messages['checkingmail'] = 'Provjera novih poruka u tijeku...'; -$messages['sendingmessage'] = 'Poruka se Å¡alje...'; -$messages['messagesent'] = 'Poruka je uspjeÅ¡no poslana'; -$messages['savingmessage'] = 'Poruka se sprema...'; -$messages['messagesaved'] = 'Poruka uspjeÅ¡no spremljena u \'PredloÅ¡ci\''; -$messages['successfullysaved'] = 'Spremanje uspjeÅ¡no obavljeno'; -$messages['addedsuccessfully'] = 'Kontakt uspjeÅ¡no dodan u imenik'; -$messages['contactexists'] = 'Kontakt sa ovom e-mail adresom već postoji u imeniku'; -$messages['contactnameexists'] = 'Kontak s istim imenom već postoji.'; -$messages['blockedimages'] = 'Zbog zaÅ¡tite privatnosti, slike sa udaljenih servera su blokirane.'; -$messages['encryptedmessage'] = 'Ova poruka je zaÅ¡tićena pa se ne može prikazati'; -$messages['nocontactsfound'] = 'Imenik je prazan'; -$messages['contactnotfound'] = 'Traženi kontakt nije pronaÄ‘en'; -$messages['contactsearchonly'] = 'UpiÅ¡ite nekoliko pojmova za pretragu imenika'; -$messages['sendingfailed'] = 'GreÅ¡ka pri slanju poruke'; -$messages['senttooquickly'] = 'Molimo saÄekajte $sec sek. prije slanja ove poruke'; -$messages['errormoving'] = 'GreÅ¡ka pri premjeÅ¡tanju poruke'; -$messages['errorcopying'] = 'GreÅ¡ka pri kopiranju poruke'; -$messages['errordeleting'] = 'GreÅ¡ka pri brisanju poruke'; -$messages['errormarking'] = 'Nije moguće oznaÄiti poruku'; -$messages['deletecontactconfirm'] = 'Želite li obrisati izabrane kontakte?'; +$messages['sendingmessage'] = 'Slanje poruke...'; +$messages['messagesent'] = 'Poruka uspjeÅ¡no poslana.'; +$messages['savingmessage'] = 'Spremanje poruke...'; +$messages['messagesaved'] = 'Poruka spremljena u mapu PredloÅ¡ci.'; +$messages['successfullysaved'] = 'UspjeÅ¡no spremljeno.'; +$messages['savingresponse'] = 'Spremanje teksta odgovora...'; +$messages['deleteresponseconfirm'] = 'Jeste li sigurni da želite obrisati tekst ovog odgovora?'; +$messages['addedsuccessfully'] = 'Kontakt uspjeÅ¡no dodan u imenik.'; +$messages['contactexists'] = 'Kontakt sa istom e-mail adresom već postoji.'; +$messages['contactnameexists'] = 'Kontakt istog imena već postoji.'; +$messages['blockedimages'] = 'Zbog zaÅ¡tite privatnosti, slike sa interneta su blokirane u ovoj poruci.'; +$messages['encryptedmessage'] = 'Ova poruka je Å¡ifrirana i ne može se prikazati.'; +$messages['nocontactsfound'] = 'Imenik je prazan.'; +$messages['contactnotfound'] = 'Traženi kontakt nije pronaÄ‘en.'; +$messages['contactsearchonly'] = 'UpiÅ¡ite neke pojmove za pretragu imenika'; +$messages['sendingfailed'] = 'Slanje poruke nije uspjelo.'; +$messages['senttooquickly'] = 'Molimo saÄekajte $sec sek. prije slanja ove poruke.'; +$messages['errorsavingsent'] = 'GreÅ¡ka pri spremanju poslane poruke.'; +$messages['errorsaving'] = 'GreÅ¡ka pri spremanju.'; +$messages['errormoving'] = 'GreÅ¡ka pri premjeÅ¡tanju poruke(a).'; +$messages['errorcopying'] = 'GreÅ¡ka pri kopiranju poruke(a).'; +$messages['errordeleting'] = 'GreÅ¡ka pri brisanju poruke(a).'; +$messages['errormarking'] = 'GreÅ¡ka pri oznaÄavanju poruke(a).'; +$messages['deletecontactconfirm'] = 'Jeste li sigurni da želite obrisati odabrani kontakt(e)?'; $messages['deletegroupconfirm'] = 'Jeste li sigurni da želite obrisati odabranu grupu?'; -$messages['deletemessagesconfirm'] = 'Sigurno želite obrisati odabrane poruke?'; -$messages['deletefolderconfirm'] = 'Želite li obrisati ovu mapu?'; -$messages['purgefolderconfirm'] = 'Želite li obrisati sve poruke u mapi?'; -$messages['contactdeleting'] = 'BriÅ¡em kontakt(e)...'; -$messages['groupdeleting'] = 'BriÅ¡em grupu...'; -$messages['folderdeleting'] = 'BriÅ¡em mapu...'; -$messages['foldermoving'] = 'PremjeÅ¡tam mapu...'; -$messages['foldersubscribing'] = 'Pretplata na mapu...'; +$messages['deletemessagesconfirm'] = 'Jeste li sigurni da želite obrisati odabranu poruku(e)?'; +$messages['deletefolderconfirm'] = 'Jeste li sigurni da želite obrisati mapu?'; +$messages['purgefolderconfirm'] = 'Jeste li sigurni da želite obrisati sve poruke u mapi?'; +$messages['contactdeleting'] = 'Brisanje kontak(a)ta...'; +$messages['groupdeleting'] = 'Brisanje grupe...'; +$messages['folderdeleting'] = 'Brisanje mape...'; +$messages['foldermoving'] = 'PremjeÅ¡tanje mape...'; +$messages['foldersubscribing'] = 'Pretplaćivanje na mapu...'; $messages['folderunsubscribing'] = 'PoniÅ¡tavanje pretplate na mapu...'; -$messages['formincomplete'] = 'Obrazac nije u cjelosti popunjen'; -$messages['noemailwarning'] = 'Unesite valjanu e-mail adresu'; -$messages['nonamewarning'] = 'Unesite ime'; -$messages['nopagesizewarning'] = 'Unesite veliÄinu stranice'; -$messages['nosenderwarning'] = 'Unesite e-mail adresu poÅ¡iljatelja'; -$messages['norecipientwarning'] = 'Unesite primatelja (ZA)'; +$messages['formincomplete'] = 'Obrazac nije u cjelosti popunjen.'; +$messages['noemailwarning'] = 'Unesite ispravnu e-mail adresu.'; +$messages['nonamewarning'] = 'Unesite ime.'; +$messages['nopagesizewarning'] = 'Unesite veliÄinu stranice.'; +$messages['nosenderwarning'] = 'Unesite e-mail adresu poÅ¡iljatelja.'; +$messages['norecipientwarning'] = 'Unesite barem jednog primatelja.'; $messages['nosubjectwarning'] = 'Polje \'Naslov\' je prazno. Želite li unijeti naslov?'; $messages['nobodywarning'] = 'Želite li poslati poruku bez teksta?'; $messages['notsentwarning'] = 'Poruka nije poslana. Želite li odbaciti ovu poruku?'; -$messages['noldapserver'] = 'Unesite LDAP poslužitelj za pretragu'; -$messages['nosearchname'] = 'Unesite ime ili e-mail adresu'; -$messages['notuploadedwarning'] = 'Svi prilozi joÅ¡ nisu presnimljeni na poslužitelj. Molim priÄekajte ili zaustavite prsnimavanje.'; -$messages['searchsuccessful'] = 'Broj pronaÄ‘enih poruka: $nr'; -$messages['contactsearchsuccessful'] = '$nr kontakata pronaÄ‘eno.'; -$messages['searchnomatch'] = 'Traženi termin nije pronaÄ‘en ni u jednoj poruci'; -$messages['searching'] = 'Pretraga u tijeku...'; +$messages['restoresavedcomposedata'] = 'PronaÄ‘ena je zapoÄeta, ali neposlana poruka .\n\nNaslov: $subject\nSnimljeno: $date\n\nŽelite li je prikazati?'; +$messages['noldapserver'] = 'Odaberite LDAP poslužitelj za pretragu.'; +$messages['nosearchname'] = 'Unesite ime ili e-mail adresu.'; +$messages['notuploadedwarning'] = 'Svi privitci joÅ¡ nisu postavljeni na poslužitelj. Molim priÄekajte ili zaustavite postavljanje.'; +$messages['searchsuccessful'] = 'PronaÄ‘eno $nr poruka.'; +$messages['contactsearchsuccessful'] = 'PronaÄ‘eno $nr kontakata.'; +$messages['searchnomatch'] = 'Pretraga nije vratila nijedan rezultat.'; +$messages['searching'] = 'Pretraživanje u tijeku...'; $messages['checking'] = 'Provjera u tijeku...'; -$messages['nospellerrors'] = 'Nije pronaÄ‘ena niti jedna pravopisna greÅ¡ka'; -$messages['folderdeleted'] = 'Mapa uspjeÅ¡no obrisana'; -$messages['foldersubscribed'] = 'Mapa uspjeÅ¡no pretplaćena'; -$messages['folderunsubscribed'] = 'Pretplata na mapu uspjeÅ¡no poniÅ¡tena'; -$messages['folderpurged'] = 'Mapa uspjeÅ¡no ispražnjena'; -$messages['folderexpunged'] = 'Mapa uspjeÅ¡no zbijena'; -$messages['deletedsuccessfully'] = 'UspjeÅ¡no obrisano'; -$messages['converting'] = 'Formatiranje poruke'; -$messages['messageopenerror'] = 'UÄitavanje poruke nije uspjelo'; -$messages['fileuploaderror'] = 'Prijenos datoteke nije uspio'; -$messages['filesizeerror'] = 'Datoteka je prevelika. Maksimalna veliÄina je $size'; -$messages['sourceisreadonly'] = 'Ovaj resurs adresa je samo za Äitanje'; -$messages['errorsavingcontact'] = 'Nije uspjelo spremanje adrese kontakta'; -$messages['movingmessage'] = 'PremjeÅ¡tanje poruke...'; -$messages['copyingmessage'] = 'Kopiranje poruke...'; -$messages['copyingcontact'] = 'Kopiram kontakt(e)...'; -$messages['deletingmessage'] = 'Brisanje poruke...'; -$messages['markingmessage'] = 'OznaÄavanje poruke...'; -$messages['addingmember'] = 'Dodajem kontakt(e) u grupu...'; -$messages['removingmember'] = 'Izbacujem kontakt(e) iz groupe...'; -$messages['receiptsent'] = 'UspjeÅ¡no poslana potvrda (proÄitano)'; -$messages['errorsendingreceipt'] = 'Ne može poslati potvrdu'; -$messages['deleteidentityconfirm'] = 'Jeste li sigurni da želite obrisati profil?'; -$messages['nodeletelastidentity'] = 'Ne možete izbrisati zadnji identitet.'; -$messages['forbiddencharacter'] = 'Naziv mape sadrži zabranjene znakove'; -$messages['selectimportfile'] = 'Odaberite datoteku za prijenos'; -$messages['addresswriterror'] = 'U odabrani adresar nije moguće zapisivat...'; -$messages['contactaddedtogroup'] = 'Kontakti uspjeÅ¡no dodani ovoj grupi'; -$messages['contactremovedfromgroup'] = 'Kontakti uspjeÅ¡no izbrisani iz ove grupe'; -$messages['importwait'] = 'Uvozim, molimo saÄekajte...'; -$messages['importconfirm'] = '<b>UspjeÅ¡no je uvezeno $inserted kontakt(a), preskoÄeno $skipped već postojećih</b>:<p><em>$names</em></p>'; +$messages['nospellerrors'] = 'Nije pronaÄ‘ena nijedna pravopisna greÅ¡ka.'; +$messages['folderdeleted'] = 'Mapa uspjeÅ¡no obrisana.'; +$messages['foldersubscribed'] = 'Mapa uspjeÅ¡no pretplaćena.'; +$messages['folderunsubscribed'] = 'Pretplata na mapu uspjeÅ¡no poniÅ¡tena.'; +$messages['folderpurged'] = 'Mapa uspjeÅ¡no ispražnjena.'; +$messages['folderexpunged'] = 'Mapa uspjeÅ¡no sažeta.'; +$messages['deletedsuccessfully'] = 'UspjeÅ¡no obrisano.'; +$messages['converting'] = 'Uklanjanje formatiranja poruke...'; +$messages['messageopenerror'] = 'UÄitavanje poruke s poslužitelja nije uspjelo.'; +$messages['fileuploaderror'] = 'Postavljanje datoteke nije uspjelo.'; +$messages['filesizeerror'] = 'Postavljena datoteka prelazi maksimalna veliÄinu od $size.'; +$messages['copysuccess'] = 'UspjeÅ¡no kopirano $n kontakata.'; +$messages['movesuccess'] = 'UspjeÅ¡no premjeÅ¡teno $n kontakata.'; +$messages['copyerror'] = 'Kopiranje kontakata nije uspjelo.'; +$messages['moveerror'] = 'PremjeÅ¡tanje kontakata nije uspjelo.'; +$messages['sourceisreadonly'] = 'Ovaj izvor adresa je samo za Äitanje.'; +$messages['errorsavingcontact'] = 'Spremanje adrese kontakta nije uspjelo.'; +$messages['movingmessage'] = 'PremjeÅ¡tanje poruke(a)...'; +$messages['copyingmessage'] = 'Kopiranje poruke(a)...'; +$messages['copyingcontact'] = 'Kopiranje kontak(a)ta...'; +$messages['movingcontact'] = 'PremjeÅ¡tanje kontakata...'; +$messages['deletingmessage'] = 'Brisanje poruke(a)...'; +$messages['markingmessage'] = 'OznaÄavanje poruke(a)...'; +$messages['addingmember'] = 'Dodavanje kontak(a)ta u grupu...'; +$messages['removingmember'] = 'Brisanje kontak(a)ta iz grupe...'; +$messages['receiptsent'] = 'Potvrda o primitku uspjeÅ¡no poslana.'; +$messages['errorsendingreceipt'] = 'Slanje potvrde o primitku nije uspjelo.'; +$messages['deleteidentityconfirm'] = 'Jeste li sigurni da želite obrisati ovaj identitet?'; +$messages['nodeletelastidentity'] = 'Jedini preostali identitet nije moguće obrisati.'; +$messages['forbiddencharacter'] = 'Naziv mape sadrži zabranjene znakove.'; +$messages['selectimportfile'] = 'Odaberite datoteku za postavljanje.'; +$messages['addresswriterror'] = 'U odabrani imenik nije omogućeno pisanje.'; +$messages['contactaddedtogroup'] = 'Kontakti uspjeÅ¡no dodani u grupu.'; +$messages['contactremovedfromgroup'] = 'Kontakti uspjeÅ¡no obrisani iz grupe.'; +$messages['nogroupassignmentschanged'] = 'Nema promjene u zadacima grupa.'; +$messages['importwait'] = 'Uvoz, molim priÄekajte...'; +$messages['importformaterror'] = 'Uvoz nije uspio! Postavljena datoteka nije ispravnog formata za uvoz.'; +$messages['importconfirm'] = '<b>UspjeÅ¡no uvezeno $inserted kontakta</b>'; $messages['importconfirmskipped'] = '<b>PreskoÄeno $skipped postojećih unosa</b>'; +$messages['importmessagesuccess'] = 'UspjeÅ¡no uvezeno $nr poruka'; +$messages['importmessageerror'] = 'Uvoz neuspjeÅ¡an! Datoteka nije u formatu poruke ili sanduÄića'; $messages['opnotpermitted'] = 'Operacija nije dozvoljena!'; -$messages['nofromaddress'] = 'Nije upisana e-mail adresa u odabrani identitet'; -$messages['editorwarning'] = 'Prebacivanje u Äisti tekstualni ureÄ‘ivaÄ Ä‡e prouzrokovati gubljenje formatiranje teksta. Želite li nastaviti?'; -$messages['httpreceivedencrypterror'] = 'Dogodila se fatalna greÅ¡ka u konfiguraciji. Odmah kontaktirajte administratora. <b>VaÅ¡a poruka se nemože poslati.</b>'; -$messages['smtpconnerror'] = 'SMTP GreÅ¡ka ($code): Veza na server nije uspjela'; -$messages['smtpautherror'] = 'SMTP GreÅ¡ka ($code): Autentikacija nije uspjela'; -$messages['smtpfromerror'] = 'SMTP GreÅ¡ka ($code): Nije uspjelo postavljanje poÅ¡iljatelja "$from" ($msg)'; -$messages['smtptoerror'] = 'SMTP GreÅ¡ka ($code): Nije uspjelo dodavanje primatelja "$to" ($msg)'; -$messages['smtprecipientserror'] = 'SMTP GreÅ¡ka: Nije moguće proÄitati listu primatelja'; -$messages['smtperror'] = 'SMTP GreÅ¡ka: $msg'; -$messages['emailformaterror'] = 'Nepravilna e-mail adresa: $email'; +$messages['nofromaddress'] = 'Nije upisana e-mail adresa u odabrani identitet.'; +$messages['editorwarning'] = 'Prebacivanje u Äisti tekstualni ureÄ‘ivaÄ Ä‡e uzrokovati gubljenje formatiranja teksta. Želite li nastaviti?'; +$messages['httpreceivedencrypterror'] = 'Dogodila se fatalna greÅ¡ka u konfiguraciji. Odmah kontaktirajte administratora. <b>VaÅ¡a poruka se ne može poslati.</b>'; +$messages['smtpconnerror'] = 'SMTP greÅ¡ka ($code): Povezivanje na poslužitelj nije uspjelo.'; +$messages['smtpautherror'] = 'SMTP greÅ¡ka ($code): Autentikacija nije uspjela.'; +$messages['smtpfromerror'] = 'SMTP greÅ¡ka ($code): Postavljanje poÅ¡iljatelja "$from" ($msg) nije uspjelo.'; +$messages['smtptoerror'] = 'SMTP greÅ¡ka ($code): Dodavanje primatelja "$to" ($msg) nije uspjelo.'; +$messages['smtprecipientserror'] = 'SMTP greÅ¡ka: Nije moguće proÄitati listu primatelja.'; +$messages['smtperror'] = 'SMTP greÅ¡ka: $msg'; +$messages['emailformaterror'] = 'Neispravna e-mail adresa: $email'; $messages['toomanyrecipients'] = 'PreviÅ¡e primatelja. Smanjite broj primatelja na $max.'; -$messages['maxgroupmembersreached'] = 'Broj Älanova grupe prelazi preko maximuma od $max'; +$messages['maxgroupmembersreached'] = 'Broj Älanova grupe prelazi maksimalni broj od $max.'; +$messages['internalerror'] = 'Dogodila se interna greÅ¡ka. Molimo pokuÅ¡ajte ponovno.'; $messages['contactdelerror'] = 'Kontakti ne mogu biti obrisani.'; $messages['contactdeleted'] = 'Kontakti uspjeÅ¡no obrisani.'; $messages['contactrestoreerror'] = 'Ne mogu vratiti obrisan(e) kontakt(e).'; -$messages['contactrestored'] = 'Kontakt(i) uspjeÅ¡no vraćeni .'; +$messages['contactrestored'] = 'Kontakt(i) uspjeÅ¡no vraćeni.'; $messages['groupdeleted'] = 'Grupa uspjeÅ¡no obrisana.'; $messages['grouprenamed'] = 'Grupa uspjeÅ¡no preimenovana.'; -$messages['groupcreated'] = 'Grupa uspjeÅ¡no kreirana.'; +$messages['groupcreated'] = 'Grupa uspjeÅ¡no stvorena.'; $messages['savedsearchdeleted'] = 'Pohranjena pretraga uspjeÅ¡no obrisana.'; -$messages['savedsearchdeleteerror'] = 'Ne mogu obrisati pohranjenu pretragu'; +$messages['savedsearchdeleteerror'] = 'Ne mogu obrisati pohranjenu pretragu.'; $messages['savedsearchcreated'] = 'Pohranjena pretraga uspjeÅ¡no stvorena.'; $messages['savedsearchcreateerror'] = 'Ne mogu stvoriti pohranjenu pretragu.'; $messages['messagedeleted'] = 'Poruke uspjeÅ¡no obrisane.'; -$messages['messagemoved'] = 'Poruke uspjeÅ¡no pomjerene.'; +$messages['messagemoved'] = 'Poruke uspjeÅ¡no premjeÅ¡tene.'; $messages['messagecopied'] = 'Poruke uspjeÅ¡no kopirane.'; $messages['messagemarked'] = 'Poruke uspjeÅ¡no oznaÄene.'; $messages['autocompletechars'] = 'Unesite barem $min znakova za auto-dopunjavanje.'; $messages['autocompletemore'] = 'ViÅ¡e podudarajućih zapisa pronaÄ‘eno. Molim upiÅ¡ite joÅ¡ znakova.'; -$messages['namecannotbeempty'] = 'Polje za ime ne može biti prazno.'; -$messages['nametoolong'] = 'Ime predugo.'; -$messages['folderupdated'] = 'Ažuriranje mape uspjeÅ¡no.'; -$messages['foldercreated'] = 'Kreiranje mape uspjeÅ¡no.'; +$messages['namecannotbeempty'] = 'Ime ne može biti prazno.'; +$messages['nametoolong'] = 'Ime je predugaÄko.'; +$messages['folderupdated'] = 'Mapa uspjeÅ¡no ažurirana.'; +$messages['foldercreated'] = 'Mapa uspjeÅ¡no stvorena.'; $messages['invalidimageformat'] = 'Format slike nije ispravan.'; -$messages['mispellingsfound'] = 'GreÅ¡ke pravopisa su pronaÄ‘ene u poruci.'; -$messages['parentnotwritable'] = 'Nije moguće stvoriti/pomaknuti mapu u odabranu mapu. Nemate prava pristupa.'; -$messages['messagetoobig'] = 'Dio poruke je prevelik za procesiranje.'; +$messages['mispellingsfound'] = 'Poruka sadrži pravopisne greÅ¡ke.'; +$messages['parentnotwritable'] = 'Nije moguće stvoriti/pomaknuti mapu u odabranoj mapi. Nemate pravo pristupa.'; +$messages['messagetoobig'] = 'Dio poruke je prevelik za obradu.'; +$messages['attachmentvalidationerror'] = 'UPOZORENJE! Ovaj privitak je sumnjiv jer vrsta privitka ne odgovara vrsti deklariranoj u poruci. Ako ne vjerujete poÅ¡iljatelju, ne biste trebali otvarati privitak u pregledniku jer može isti može sadržavati zloćudni kod.<br/><br/><em>OÄekivano: $expected; pronaÄ‘eno: $detected</em>'; +$messages['noscriptwarning'] = 'UPOZORENJE: Ovaj webmail servis zahtijeva Javascript! Kako biste ga mogli koristiti, molimo omogućite Javascript u postavkama svog preglednika.'; ?> diff --git a/program/localization/hu_HU/labels.inc b/program/localization/hu_HU/labels.inc index 648ac759f..fdd43effe 100644 --- a/program/localization/hu_HU/labels.inc +++ b/program/localization/hu_HU/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to / $count'; $labels['copy'] = 'Másolás'; $labels['move'] = 'Ãthelyezés'; $labels['moveto'] = 'Ãthelyezés...'; +$labels['copyto'] = 'Másold oda..'; $labels['download'] = 'letöltés'; $labels['open'] = 'MegnyÃtás'; $labels['showattachment'] = 'MegjelenÃtés'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'HelyesÃrás ellenÅ‘rzés'; $labels['checkspelling'] = 'HelyesÃrás-ellenÅ‘rzés'; $labels['resumeediting'] = 'HelyesÃrás-ellenÅ‘rzés vége'; $labels['revertto'] = 'VisszaállÃtás erre'; +$labels['restore'] = 'VisszaállÃtás'; +$labels['restoremessage'] = 'Ãœzenet visszaállÃtás'; +$labels['responses'] = 'Válaszok'; +$labels['insertresponse'] = 'Egy válasz beillesztése'; +$labels['manageresponses'] = 'Válaszok kezelése'; +$labels['savenewresponse'] = 'Új válasz mentése'; +$labels['editresponses'] = 'Válaszok szerkesztése'; +$labels['editresponse'] = 'Válasz szerkesztése'; +$labels['responsename'] = 'Név'; +$labels['responsetext'] = 'Válasz Szöveg'; $labels['attach'] = 'Csatolás'; $labels['attachments'] = 'Csatolmányok'; $labels['upload'] = 'Feltöltés'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'A felugró ablakok használata szokásos ablakkén $labels['forwardmode'] = 'Ãœzenet továbbÃtás'; $labels['inline'] = 'beágyazott'; $labels['asattachment'] = 'csatolmányként'; +$labels['replyallmode'] = 'Alapértelemezett művelete a [Válasz mindenkinek] gombnak'; +$labels['replyalldefault'] = 'válasz mindenkinek'; +$labels['replyalllist'] = 'válasz a csak a levelezÅ‘ listára(ha levelezÅ‘lista)'; $labels['folder'] = 'Mappa'; $labels['folders'] = 'Mappák'; $labels['foldername'] = 'Mappa neve'; diff --git a/program/localization/hu_HU/messages.inc b/program/localization/hu_HU/messages.inc index 3ca87a52f..f7eaa1394 100644 --- a/program/localization/hu_HU/messages.inc +++ b/program/localization/hu_HU/messages.inc @@ -44,6 +44,8 @@ $messages['messagesent'] = 'Az üzenet elküldve'; $messages['savingmessage'] = 'Az üzenet mentése...'; $messages['messagesaved'] = 'Az üzenet elmentve a Piszkozatokhoz'; $messages['successfullysaved'] = 'A mentés sikerült'; +$messages['savingresponse'] = 'A válasz szövegének mentése...'; +$messages['deleteresponseconfirm'] = 'Biztosan törli ezt a válasz szöveget?'; $messages['addedsuccessfully'] = 'A kapcsolat hozzáadása a cÃmjegyzékhez megtörtént'; $messages['contactexists'] = 'Ezzel az e-mail cÃmmel már létezik kapcsolat'; $messages['contactnameexists'] = 'Ezzel a névvel már létezik kapcsolat'; @@ -54,6 +56,8 @@ $messages['contactnotfound'] = 'A kiválasztott kapcsolat nem található'; $messages['contactsearchonly'] = 'Adjon meg keresÅ‘kifejezéseket a kapcsolatok közti kereséshez'; $messages['sendingfailed'] = 'Az üzenet elküldése nem sikerült'; $messages['senttooquickly'] = 'Kérem várjon még $sec másodpercet az üzenet elküldése elÅ‘tt'; +$messages['errorsavingsent'] = 'Hiba történt az elküldött üzenet mentése közben'; +$messages['errorsaving'] = 'A mentés során hiba lépett fel'; $messages['errormoving'] = 'Az üzenet(ek)et nem sikerült áthelyezni'; $messages['errorcopying'] = 'Az üzenet(ek)et nem sikerült másolni'; $messages['errordeleting'] = 'Az üzenet(ek)et nem sikerült törölni'; @@ -78,6 +82,7 @@ $messages['norecipientwarning'] = 'Legalább egy cÃmzettet adjon meg'; $messages['nosubjectwarning'] = 'A Tárgy mezÅ‘ üres. Szeretné most kitölteni?'; $messages['nobodywarning'] = 'Elküldi az üzenetet üresen?'; $messages['notsentwarning'] = 'Az üzenet még nem lett elküldve. Eldobja az üzenetet?'; +$messages['restoresavedcomposedata'] = 'Egy elkezdett de el nem küldött üzenetet talált a program.\n\Tárgy: $subject\nMentve: $date\n\nSzeretnéd visszaállÃtani és folytatni ez az üzenetet?'; $messages['noldapserver'] = 'Adjon meg egy LDAP szervert a kereséshez'; $messages['nosearchname'] = 'Adja meg a kapcsolat nevét vagy e-mail cÃmét'; $messages['notuploadedwarning'] = 'Még nem került feltöltésre minden csatolmány. Kérem várjon vagy állÃtsa le a feltöltést!'; @@ -140,6 +145,7 @@ $messages['smtperror'] = 'SMTP hiba ($code): $msg'; $messages['emailformaterror'] = 'Helytelen formátumú e-mail cÃm: $email'; $messages['toomanyrecipients'] = 'Túl sok a cÃmzett. Csökkentse a cÃmzettek számát maximum $max cÃmre!'; $messages['maxgroupmembersreached'] = 'A csoport létszáma meghaladja a maximum $max fÅ‘t'; +$messages['internalerror'] = 'BelsÅ‘ hiba történt. Kérjük próbálja újra!'; $messages['contactdelerror'] = 'Hiba a kapcsolat(ok) törlésekor'; $messages['contactdeleted'] = 'Kapcsolat(ok) sikeresen törölve'; $messages['contactrestoreerror'] = 'Nem sikerült a törölt kapcsolat(ok) helyreállÃtása'; diff --git a/program/localization/hy_AM/labels.inc b/program/localization/hy_AM/labels.inc index fec95f3cd..fa5a2bec6 100644 --- a/program/localization/hy_AM/labels.inc +++ b/program/localization/hy_AM/labels.inc @@ -31,6 +31,7 @@ $labels['trash'] = 'Ô±Õ²Õ¢Õ¡Ö€Õ¯Õ²'; $labels['junk'] = 'Ô¹Õ¡ÖƒÕ¸Õ¶'; $labels['subject'] = 'ÕŽÕ¥Ö€Õ¶Õ¡Õ£Õ«Ö€'; $labels['from'] = 'ÕˆÖ‚Õ²Õ¡Ö€Õ¯Õ¸Õ²'; +$labels['sender'] = 'ÕˆÖ‚Õ²Õ¡Ö€Õ¯Õ¸Õ²'; $labels['to'] = 'ÕÕ¿Õ¡ÖÕ¸Õ²'; $labels['cc'] = 'Cc'; $labels['bcc'] = 'Bcc'; @@ -51,6 +52,9 @@ $labels['copy'] = 'Cc'; $labels['move'] = 'ÕÕ¥Õ²Õ¡ÖƒÕ¸ÕÕ¥Õ¬'; $labels['moveto'] = 'ÕÕ¥Õ²Õ¡ÖƒÕ¸ÕÕ¥Õ¬...'; $labels['download'] = 'Õ”Õ¡Õ·Õ¥Õ¬'; +$labels['open'] = 'Ô²Õ¡Ö'; +$labels['showattachment'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬'; +$labels['showanyway'] = 'Ô±Õ´Õ¥Õ¶ Õ¤Õ¥ÕºÖ„Õ¸Ö‚Õ´ ÖÕ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬'; $labels['filename'] = 'Õ–Õ¡ÕµÕ¬Õ« Õ¡Õ¶Õ¸Ö‚Õ¶'; $labels['filesize'] = 'Õ–Õ¡ÕµÕ¬Õ« Õ¹Õ¡Öƒ'; $labels['addtoaddressbook'] = 'Õ€Õ«Õ·Õ¥Õ¬ Õ°Õ¡Õ½ÖÕ¥Õ¶'; @@ -133,6 +137,7 @@ $labels['unread'] = 'Õ‰Õ¯Õ¡Ö€Õ¤Õ¡ÖÕ¡Õ®Õ¨'; $labels['flagged'] = 'Õ†Õ·Õ¾Õ¡Õ®'; $labels['unanswered'] = 'Ô±Õ¶ÕºÕ¡Õ¿Õ¡Õ½ÕÕ¡Õ¶'; $labels['deleted'] = 'Õ‹Õ¶Õ»Õ¾Õ¡Õ®'; +$labels['undeleted'] = 'Õ‹Õ¶Õ»Õ¾Õ¡Õ® Õ¹Õ§'; $labels['invert'] = 'Õ“Õ¸ÕÕ¡Õ¿Õ¥Õ²Õ¥Õ¬'; $labels['filter'] = 'Ô¶Õ¿Õ«Õ¹'; $labels['list'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¯'; @@ -166,9 +171,13 @@ $labels['quicksearch'] = 'Ô±Ö€Õ¡Õ£ Õ¸Ö€Õ¸Õ¶Õ¸Ö‚Õ´'; $labels['resetsearch'] = 'ÕŽÕ¥Ö€Õ½Õ¯Õ½Õ¥Õ¬ Õ¸Ö€Õ¸Õ¶Õ¸Ö‚Õ´Õ¨'; $labels['searchmod'] = 'ÕˆÖ€Õ¸Õ¶Õ´Õ¡Õ¶ ÖƒÕ¸ÖƒÕ¸ÕÕ«Õ¹Õ¶Õ¥Ö€'; $labels['msgtext'] = 'ÕˆÕ²Õ» Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨'; +$labels['body'] = 'Õ„Õ¡Ö€Õ´Õ«Õ¶'; +$labels['type'] = 'ÕÖ‡'; +$labels['namex'] = 'Ô±Õ¶Õ¾Õ¡Õ¶Õ¸Ö‚Õ´'; $labels['openinextwin'] = 'Ô²Õ¡ÖÕ¥Õ¬ Õ¶Õ¸Ö€ ÕºÕ¡Õ¿Õ¸Ö‚Õ°Õ¡Õ¶Õ¸Ö‚Õ´'; $labels['emlsave'] = 'Õ†Õ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬ (.eml)'; $labels['editasnew'] = 'Ô½Õ´Õ¢Õ¡Õ£Ö€Õ¥Õ¬ Õ¸Ö€ÕºÕ¥Õ½ Õ¶Õ¸Ö€'; +$labels['send'] = 'ÕˆÖ‚Õ²Õ¡Ö€Õ¯Õ¥Õ¬'; $labels['sendmessage'] = 'ÕˆÖ‚Õ²Õ¡Ö€Õ¯Õ¥Õ¬'; $labels['savemessage'] = 'Õ€Õ«Õ·Õ¥Õ¬ Õ¸Ö€ÕºÕ¥Õ½ Õ½Ö‡Õ¡Õ£Õ«Ö€'; $labels['addattachment'] = 'Ô¿ÖÕ¥Õ¬ Ö†Õ¡ÕµÕ¬'; @@ -198,6 +207,9 @@ $labels['nosubject'] = '(Õ¡Õ¼Õ¡Õ¶Ö Õ¾Õ¥Ö€Õ¶Õ¡Õ£Ö€Õ«)'; $labels['showimages'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¶Õ¯Õ¡Ö€Õ¶Õ¥Ö€Õ¨'; $labels['alwaysshow'] = 'Õ„Õ«Õ·Õ¿ ÖÕ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¶Õ¥Ö€Õ¨ $sender–իÖ'; $labels['isdraft'] = 'ÕÕ¡ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ½Ö‡Õ¡Õ£Õ«Ö€ Õ§'; +$labels['andnmore'] = '$nr Õ¡ÕµÕ¬...'; +$labels['togglemoreheaders'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€ Õ£Õ¬ÕÕ¡Õ£Ö€Õ¥Ö€Õ¨'; +$labels['togglefullheaders'] = 'Õ“Õ¸ÕÕ¥Õ¬ Õ£Õ¬ÕÕ¡Õ£Ö€Õ¥Ö€Õ¨'; $labels['htmltoggle'] = 'HTML'; $labels['plaintoggle'] = 'ÕŠÕ¡Ö€Õ¦ Õ¿Õ¥Ö„Õ½Õ¿'; $labels['savesentmessagein'] = 'Ô³Ö€Õ¡Õ¶ÖÕ¥Õ¬ Õ¸Ö‚Õ²Õ¡Ö€Õ¯Õ¾Õ¡Õ® Õ¶Õ¡Õ´Õ¡Õ¯Õ¨'; @@ -279,6 +291,8 @@ $labels['composeto'] = 'Ô³Ö€Õ¥Õ¬ Õ¶Õ¡Õ´Õ¡Õ¯'; $labels['contactsfromto'] = 'Õ€Õ¡Õ½ÖÕ¥Õ¶Õ¥Ö€ $fromâ€“Õ«Ö $to–ը Õ¥Õ²Õ¡Õ® $count–իÖ'; $labels['print'] = 'ÕÕºÕ¥Õ¬'; $labels['export'] = 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬'; +$labels['exportall'] = 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€Õ¨'; +$labels['exportsel'] = 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¶Õ·Õ¾Õ¡Õ®Õ¶Õ¥Ö€Õ¨'; $labels['exportvcards'] = 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ°Õ¡Õ½ÖÕ¥Õ¶Õ¥Ö€Õ¨ vCard Õ¹Õ¡ÖƒÕ¡Õ±Ö‡Õ¸Õ¾'; $labels['newcontactgroup'] = 'ÕÕ¿Õ¥Õ²Õ®Õ¥Õ¬ Õ¯Õ¡ÕºÕ¸Ö€Õ¤Õ¶Õ¥Ö€Õ« Õ¶Õ¸Ö€ ÕÕ¸Ö‚Õ´Õ¢'; $labels['grouprename'] = 'ÕŽÕ¥Ö€Õ¡Õ¶Õ¾Õ¡Õ¶Õ¥Õ¬ ÕÕ¸Ö‚Õ´Õ¢Õ¨'; @@ -290,13 +304,16 @@ $labels['nextpage'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ°Õ¡Õ»Õ¸Ö€Õ¤ Õ§Õ»Õ¨'; $labels['lastpage'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¾Õ¥Ö€Õ»Õ«Õ¶ Õ§Õ»Õ¨'; $labels['group'] = 'Ô½Õ¸Ö‚Õ´Õ¢'; $labels['groups'] = 'Ô½Õ´Õ¢Õ¥Ö€'; +$labels['listgroup'] = 'Ô½Õ´Õ¢Õ« Õ¡Õ¶Õ¤Õ¡Õ´Õ¶Õ¥Ö€Õ« ÖÕ¡Õ¶Õ¯'; $labels['personaladrbook'] = 'Ô±Õ¶Õ±Õ¶Õ¡Õ¯Õ¡Õ¶ Õ°Õ¡Õ½ÖÕ¥Õ¶Õ¥Ö€'; $labels['searchsave'] = 'ÕŠÕ¡Õ°ÕºÕ¡Õ¶Õ¥Õ¬ Õ¸Ö€Õ¸Õ¶Õ¸Ö‚Õ´Õ¨'; $labels['searchdelete'] = 'Õ‹Õ¶Õ»Õ¥Õ¬ Õ¸Ö€Õ¸Õ¶Õ¸Ö‚Õ´Õ¨'; $labels['import'] = 'Õ†Õ¥Ö€Õ¯Ö€Õ¥Õ¬'; $labels['importcontacts'] = 'Õ†Õ¥Ö€Õ¯Ö€Õ¥Õ¬ Õ°Õ¡Õ½ÖÕ¥Õ¶Õ¥Ö€'; $labels['importfromfile'] = 'Õ†Õ¥Ö€Õ¯Ö€Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ«Ö'; +$labels['importtarget'] = 'Ô±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ Õ¯Õ¡ÕºÕ¸Ö€Õ¤Õ¶Õ¥Ö€Õ¨'; $labels['importreplace'] = 'Õ“Õ¸ÕÕ¥Õ¬ Õ¸Õ²Õ» Õ°Õ¡Õ½ÖÕ¥Õ¡Õ£Õ«Ö€Ö„Õ¨'; +$labels['importdesc'] = 'Ô´Õ¸Ö‚Ö„ Õ¯Õ¡Ö€Õ¸Õ² Õ¥Ö„ Õ¾Õ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬ Õ¯Õ¡ÕºÕ¸ÖÕ¶Õ¥Ö€Õ¶ Õ¡Ö€Õ¤Õ¥Õ¶ Õ£Õ¸ÕµÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ Õ¸Ö‚Õ¶Õ¥ÖÕ¸Õ² Õ°Õ¡Õ½ÖÕ¥Õ¡Õ£Ö€Ö„Õ«Ö:<br/>Ô±ÕµÕªÕ´ Õ´Õ¥Õ¶Ö„ Ö…Õ£Õ¶Õ¸Ö‚Õ´ Õ¥Õ¶Ö„ Õ¶Õ¥Ö€Õ´Õ¸Ö‚Õ®Õ¥Õ¬ <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> Õ¯Õ¡Õ´ CSV (comma-separated) Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ« Õ±Ö‡Õ¡Õ¹Õ¡ÖƒÕ¥Ö€Õ«Ö:'; $labels['done'] = 'Ô±Õ¾Õ¡Ö€Õ¿Õ¾Õ¡Õ® Õ§'; $labels['settingsfor'] = 'Õ†Õ¡ÕÕ¡Õ½Õ«Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€'; $labels['about'] = 'Õ†Õ¯Õ¡Ö€Õ¡Õ£Õ«Ö€'; @@ -311,6 +328,8 @@ $labels['edititem'] = 'Ô½Õ´Õ¢Õ¡Õ£Ö€Õ¥Õ¬ Õ«Ö€Õ¨'; $labels['preferhtml'] = 'Ô³Õ¥Ö€Õ¡Õ¤Õ¡Õ½Õ¥Õ¬ HTML'; $labels['defaultcharset'] = 'Ô¼Õ¼Õ¥Õ¬ÕµÕ¡Õ¬ Õ¿Õ¡Õ¼Õ¡Õ·Õ¡Ö€'; $labels['htmlmessage'] = 'HTML Õ¶Õ¡Õ´Õ¡Õ¯'; +$labels['messagepart'] = 'Õ´Õ¡Õ½'; +$labels['digitalsig'] = 'Ô¹Õ¾Õ¡ÕµÕ«Õ¶ Õ½Õ¿Õ¸Ö€Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶'; $labels['dateformat'] = 'Ô±Õ´Õ½Õ¡Õ©Õ¾Õ« Õ±Ö‡Õ¡Õ¹Õ¡Öƒ'; $labels['timeformat'] = 'ÔºÕ¡Õ´Õ¡Õ¶Õ¡Õ¯Õ« Õ±Ö‡Õ¡Õ¹Õ¡Öƒ'; $labels['prettydate'] = 'ÕŠÕ¡Ö€Õ¦ Õ¡Õ´Õ½Õ¡Õ©Õ¾Õ¥Ö€'; @@ -321,8 +340,11 @@ $labels['timezone'] = 'ÔºÕ¡Õ´Õ¡ÕµÕ«Õ¶ Õ£Õ¸Õ¿Õ«'; $labels['pagesize'] = 'ÕÕ¸Õ²Õ¥Ö€ Õ¡Õ¼ Õ§Õ»'; $labels['signature'] = 'ÕÕ¿Õ¸Ö€Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶'; $labels['dstactive'] = 'Ô±Õ´Õ¡Õ¼Õ¡ÕµÕ«Õ¶ ÕªÕ¡Õ´Õ¡Õ¶Õ¡Õ¯'; +$labels['showinextwin'] = 'Ô²Õ¡ÖÕ¥Õ¬ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¶Õ¸Ö€ ÕºÕ¡Õ¿Õ¸Ö‚Õ°Õ¡Õ¶Õ¸Ö‚Õ´'; +$labels['composeextwin'] = 'Ô¿Õ¡Õ¦Õ´Õ¥Õ¬ Õ¶Õ¸Ö€ ÕºÕ¡Õ¿Õ¸Ö‚Õ°Õ¡Õ¶Õ¸Ö‚Õ´'; $labels['htmleditor'] = 'ÕÕ¿Õ¥Õ²Õ®Õ¥Õ¬ HTML Õ¶Õ¡Õ´Õ¡Õ¯Õ¶Õ¥Ö€'; $labels['htmlonreply'] = 'Õ´Õ«Õ¡ÕµÕ¶ HTML Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¡Õ¶Õ¨ ÕºÕ¡Õ¿Õ¡Õ½ÕÕ¡Õ¶Õ¥Õ¬Õ«Õ½'; +$labels['htmlonreplyandforward'] = 'Õ´Õ«Õ¡ÕµÕ¶ HTML Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¡Õ¶Õ¨ ÕºÕ¡Õ¿Õ¡Õ½ÕÕ¡Õ¶Õ¥Õ¬Õ«Õ½ Õ¯Õ¡Õ´ Õ¾Õ¥Ö€Õ¡Õ°Õ¡Õ½ÖÕ¥Õ¡Õ¾Õ¸Ö€Õ¥Õ¬Õ«Õ½'; $labels['htmlsignature'] = 'HTML Õ½Õ¿Õ¸Ö€Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶'; $labels['previewpane'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ ÕºÕ¡Õ¿Õ¸Ö‚Õ°Õ¡Õ¶Õ¨'; $labels['skin'] = 'ÕÕ¥Õ½Ö„Õ« Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯'; @@ -348,6 +370,7 @@ $labels['always'] = 'Õ´Õ«Õ·Õ¿'; $labels['showinlineimages'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¯ÖÕ¾Õ¡Õ® ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¶Õ¥Ö€Õ¨ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ¿Õ¡Õ¯'; $labels['autosavedraft'] = 'ÕÖ‡Õ¡Õ£Ö€Õ« Õ¡Õ¾Õ¿Õ¸Õ´Õ¡Õ¿ Õ£Ö€Õ¡Õ¶ÖÕ¸Ö‚Õ´'; $labels['everynminutes'] = 'Õ¡Õ´Õ¥Õ¶ $n Ö€Õ¸ÕºÕ¥Õ¶'; +$labels['refreshinterval'] = 'Ô¹Õ¡Ö€Õ´Õ¡ÖÕ¶Õ¥Õ¬ (Õ½Õ¿Õ¸Ö‚Õ£Õ¥Õ¬ Õ¶Õ¸Ö€ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ¨ Ö‡ Õ¡ÕµÕ¬Õ¶)'; $labels['never'] = 'Õ¥Ö€Õ¢Õ¥Ö„'; $labels['immediately'] = 'Õ¡Õ¶Õ´Õ«Õ»Õ¡ÕºÕ¥Õ½'; $labels['messagesdisplaying'] = 'Õ¶Õ¡Õ´Õ¡Õ¯Õ¶Õ¥Ö€Õ¨ ÖÕ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬Õ«Õ½'; @@ -369,6 +392,7 @@ $labels['maintenance'] = 'ÕÕºÕ¡Õ½Õ¡Ö€Õ¯Õ¸Ö‚Õ´'; $labels['newmessage'] = 'Õ†Õ¸Ö€ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶'; $labels['signatureoptions'] = 'ÕÕ¿Õ¸Ö€Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ¨Õ¶Õ¿Ö€Õ¡Õ¶Ö„Õ¶Õ¥Ö€'; $labels['whenreplying'] = 'ÕŠÕ¡Õ¿Õ¡Õ½ÕÕ¡Õ¶Õ¥Õ¬Õ«Õ½'; +$labels['replyempty'] = 'Õ´Õ« Ö„Õ¡Õ²Õ¾Õ¡Õ®Õ¥Ö„Õ¡Õ¼Õ¡Õ»Õ«Õ¶ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨'; $labels['replytopposting'] = 'Õ½Õ¯Õ½Õ¥Õ¬ Õ¶Õ¸Ö€ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¾Õ¥Ö€Ö‡Õ«Ö'; $labels['replybottomposting'] = 'Õ½Õ¯Õ½Õ¥Õ¬ Õ¶Õ¸Ö€ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¶Õ¥Ö€Ö„Ö‡Õ«Ö'; $labels['replyremovesignature'] = 'ÕŠÕ¡Õ¿Õ¡Õ½ÕÕ¡Õ¶Õ¥Õ¬Õ«Õ½ Õ°Õ¥Õ¼Õ¡ÖÕ¶Õ¥Õ¬ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ«Ö Õ¶Õ¡ÕÕ¸Ö€Õ¤ Õ½Õ¿Õ¸Ö€Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨'; @@ -381,6 +405,7 @@ $labels['afternseconds'] = '$n Õ¾Õ¡Ö€Õ¯ÕµÕ¡Õ¶ Õ°Õ¥Õ¿Õ¸'; $labels['reqmdn'] = 'Õ„Õ«Õ·Õ¿ ÕºÕ¡Õ¿Õ¾Õ«Ö€Õ¥Õ¬ Õ½Õ¿Õ¡ÖÕ¡Õ¯Õ¡Õ¶'; $labels['reqdsn'] = 'Õ„Õ«Õ·Õ¿ ÕºÕ¡Õ¿Õ¾Õ«Ö€Õ¥Õ¬ Õ¡Õ¼Õ¡Ö„Õ´Õ¡Õ¶ Õ¯Õ¡Ö€Õ£Õ¡Õ¾Õ«Õ³Õ¡Õ¯Õ« Õ®Õ¡Õ¶Õ¸Ö‚ÖÕ¸Ö‚Õ´'; $labels['replysamefolder'] = 'Õ€Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¡Õ¶ ÕºÕ¡Õ¿Õ¡Õ½ÕÕ¡Õ¶Õ¶Õ¥Ö€Õ¨ ÕºÕ¡Õ°Õ¥Õ¬ Õ¶Õ¸Ö‚ÕµÕ¶ ÕºÕ¡Õ¶Õ¡Õ¯Õ¸Ö‚Õ´'; +$labels['defaultabook'] = 'Õ€Õ«Õ´Õ¶Õ¡Õ¯Õ¡Õ¶ Õ°Õ¡Õ½ÖÕ¥Õ¡Õ£Õ«Ö€Ö„Õ¨'; $labels['autocompletesingle'] = 'Ô±Õ¾Õ¿Õ¸Õ¬Ö€Õ¡ÖÕ´Õ¡Õ¶ ÕªÕ¡Õ´Õ¡Õ¶Õ¡Õ¯ Õ¢Õ¡ÖÕ¡Õ¼Õ¥Õ¬ Õ¡ÕµÕ¬Õ¨Õ¶Õ¿Ö€Õ¡Õ¶Ö„Õ¡ÕµÕ«Õ¶ Õ§Õ¬ÖƒÕ¸Õ½Õ¿Õ« Õ°Õ¡Õ½ÖÕ¥Õ¶Õ¥Ö€Õ¨'; $labels['listnamedisplay'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¯Õ¡ÕºÕ¸Ö€Õ¤Õ¶Õ¥Ö€Õ¨ Õ¸Ö€ÕºÕ¥Õ½'; $labels['spellcheckbeforesend'] = 'ÕÕ¿Õ¸Ö‚Õ£Õ¥Õ¬ Õ¿Õ¡Õ¼Õ¡Õ½ÕÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¸Ö‚Õ²Õ¡Ö€Õ¯Õ¥Õ¬Õ¸Ö‚Ö Õ¡Õ¼Õ¡Õ»'; @@ -390,6 +415,9 @@ $labels['spellcheckignorenums'] = 'Ô±Õ¶Õ¿Õ¥Õ½Õ¥Õ¬ Õ©Õ¾Õ¥Ö€Õ¸Õ¾ Õ¢Õ¡Õ¼Õ¥Ö€Õ¨'; $labels['spellcheckignorecaps'] = 'Ô±Õ¶Õ¿Õ¥Õ½Õ¥Õ¬ Õ¬Ö€Õ«Õ¾ Õ´Õ¥Õ®Õ¡Õ¿Õ¡Õ¼ Õ¢Õ¡Õ¼Õ¥Ö€Õ¨'; $labels['addtodict'] = 'Ô±Õ¾Õ¥Õ¬Õ¡ÖÕ¶Õ¥Õ¬ Õ¢Õ¡Õ¼Õ¡Ö€Õ¡Õ¶Õ¸Ö‚Õ´'; $labels['mailtoprotohandler'] = 'mailto: Õ°Õ²Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ« Õ½ÕºÕ¡Õ½Õ¡Ö€Õ¯Õ¸Õ²'; +$labels['forwardmode'] = 'Õ€Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ« Õ¾Õ¥Ö€Õ¡Õ°Õ¡Õ½ÖÕ¥Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ´'; +$labels['inline'] = 'Õ´Õ¥Õ»Õ¨'; +$labels['asattachment'] = 'Õ¸Ö€ÕºÕ¥Õ½ Õ¯ÖÕ¸Ö€Õ¤'; $labels['folder'] = 'Ô´Õ¡Ö€Õ¡Õ¯'; $labels['folders'] = 'Ô´Õ¡Ö€Õ¡Õ¯Õ¶Õ¥Ö€'; $labels['foldername'] = 'Ô´Õ¡Ö€Õ¡Õ¯Õ« Õ¡Õ¶Õ¸Ö‚Õ¶'; @@ -414,6 +442,7 @@ $labels['sortby'] = 'Ô´Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¥Õ¬'; $labels['sortasc'] = 'Õ¨Õ½Õ¿ Õ¡Õ³Õ´Õ¡Õ¶'; $labels['sortdesc'] = 'Õ¨Õ½Õ¿ Õ¶Õ¾Õ¡Õ¦Õ´Õ¡Õ¶'; $labels['undo'] = 'ÔµÕ¿Õ¡Ö€Õ¯Õ¥Õ¬'; +$labels['installedplugins'] = 'ÕÕ¥Õ²Õ¡Õ¯Õ¡ÕµÕ¾Õ¡Õ® Õ°Õ¡Õ¾Õ¥Õ¬Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨'; $labels['plugin'] = 'Ô½Ö€Õ«Õ¹'; $labels['version'] = 'ÕÕ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯'; $labels['source'] = 'Ô±Õ²Õ¢ÕµÕ¸Ö‚Ö€'; diff --git a/program/localization/ia/messages.inc b/program/localization/ia/messages.inc index 50ef68145..32733f21d 100644 --- a/program/localization/ia/messages.inc +++ b/program/localization/ia/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/localization/index.inc b/program/localization/index.inc index 616999514..38edb7367 100644 --- a/program/localization/index.inc +++ b/program/localization/index.inc @@ -5,7 +5,7 @@ | program/localization/index.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -26,7 +26,8 @@ $rcube_languages = array( 'sq_AL' => 'Albanian (Shqip)', - 'ar_SA' => 'Arabic (العربية)', + 'ar' => 'Arabic (العربية)', + 'ar_SA' => 'Arabic (Saudi Arabia)', 'hy_AM' => 'Armenian (Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶)', 'ast' => 'Asturiana (Asturianu)', 'az_AZ' => 'Azerbaijani (AzÉ™rbaycanca)', @@ -46,10 +47,12 @@ $rcube_languages = array( 'de_DE' => 'German (Deutsch)', 'de_CH' => 'German (Schweiz)', 'nl_NL' => 'Dutch (Nederlands)', + 'en_CA' => 'English (Canada)', 'en_GB' => 'English (GB)', 'en_US' => 'English (US)', 'eo' => 'Esperanto', 'et_EE' => 'Estonian (Eesti)', + 'fo_FO' => 'Faroese (Føroyskt)', 'fi_FI' => 'Finnish (Suomi)', 'nl_BE' => 'Flemish (Vlaams)', 'fr_FR' => 'French (Français)', @@ -66,6 +69,7 @@ $rcube_languages = array( 'it_IT' => 'Italian (Italiano)', 'ja_JP' => 'Japanese (日本語)', 'km_KH' => 'Khmer (ភាសាážáŸ’មែរ)', + 'kn_IN' => 'Konkani (कोंकणी)', 'ko_KR' => 'Korean (í•œêµì–´)', 'ku' => 'Kurdish (Kurmancî)', 'lv_LV' => 'Latvian (LatvieÅ¡u)', @@ -91,8 +95,10 @@ $rcube_languages = array( 'sl_SI' => 'Slovenian (SlovenÅ¡Äina)', 'es_AR' => 'Spanish (Argentina)', 'es_ES' => 'Spanish (Español)', + 'es_419' => 'Spanish (Latin America)', 'sv_SE' => 'Swedish (Svenska)', 'ta_IN' => 'Tamil (தமிழà¯)', + 'ti' => 'Tigrinya (ትáŒáˆáŠ›)', 'th_TH' => 'Thai (ไทย)', 'tr_TR' => 'Turkish (Türkçe)', 'uk_UA' => 'Ukrainian (УкраїнÑька)', @@ -104,7 +110,6 @@ $rcube_languages = array( $rcube_language_aliases = array( 'am' => 'hy_AM', - 'ar' => 'ar_SA', 'az' => 'az_AZ', 'bg' => 'bg_BG', 'bs' => 'bs_BA', @@ -134,6 +139,7 @@ $rcube_language_aliases = array( 'kr' => 'ko_KR', 'kh' => 'km_KH', 'kh_KH' => 'km_KH', + 'kn' => 'kn_IN', 'km' => 'km_KH', 'lb' => 'lb_LU', 'ne' => 'ne_NP', diff --git a/program/localization/it_IT/labels.inc b/program/localization/it_IT/labels.inc index ac8e2a6d4..f0f660d3d 100644 --- a/program/localization/it_IT/labels.inc +++ b/program/localization/it_IT/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to di $count'; $labels['copy'] = 'Copia'; $labels['move'] = 'Sposta'; $labels['moveto'] = 'Sposta in...'; +$labels['copyto'] = 'Copia su...'; $labels['download'] = 'Download'; $labels['open'] = 'Apri'; $labels['showattachment'] = 'Visualizza'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Controllo ortografico'; $labels['checkspelling'] = 'Controlla ortografia'; $labels['resumeediting'] = 'Torna al messaggio'; $labels['revertto'] = 'Ripristina'; +$labels['restore'] = 'Ripristina'; +$labels['restoremessage'] = 'Ripristinare il messaggio?'; +$labels['responses'] = 'Risposte'; +$labels['insertresponse'] = 'Inserisci una risposta'; +$labels['manageresponses'] = 'Gestione risposte'; +$labels['savenewresponse'] = 'Salva una nuova risposta'; +$labels['editresponses'] = 'Modifica risposte'; +$labels['editresponse'] = 'Modifica risposta'; +$labels['responsename'] = 'Nome'; +$labels['responsetext'] = 'Testo della Risposta'; $labels['attach'] = 'Allega'; $labels['attachments'] = 'Allegati'; $labels['upload'] = 'Aggiungi'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Gestisci i popup come finestre standard'; $labels['forwardmode'] = 'Inoltro messaggi'; $labels['inline'] = 'In linea'; $labels['asattachment'] = 'come allegato'; +$labels['replyallmode'] = 'Azione di defualt del bottone [Reply all]'; +$labels['replyalldefault'] = 'rispondi a tutti'; +$labels['replyalllist'] = 'rispondi solo alla mailing list (se disponibile)'; $labels['folder'] = 'Cartella'; $labels['folders'] = 'Cartelle'; $labels['foldername'] = 'Nome cartella'; diff --git a/program/localization/it_IT/messages.inc b/program/localization/it_IT/messages.inc index c5a81044e..5d964697b 100644 --- a/program/localization/it_IT/messages.inc +++ b/program/localization/it_IT/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,8 @@ $messages['invalidrequest'] = 'Richiesta non valida! Nessun dato salvato.'; $messages['invalidhost'] = 'Nome del server non valido.'; $messages['nomessagesfound'] = 'Nessun messaggio trovato in questa cartella'; $messages['loggedout'] = 'Sessione chiusa correttamente. Arrivederci!'; -$messages['mailboxempty'] = 'La casella è vuota'; +$messages['mailboxempty'] = 'La Mailbox è vuota'; +$messages['nomessages'] = 'Non ci sono messaggi'; $messages['refreshing'] = 'Aggiornamento...'; $messages['loading'] = 'Caricamento...'; $messages['uploading'] = 'Caricamento file...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Messaggio inviato correttamente'; $messages['savingmessage'] = 'Salvataggio messaggio...'; $messages['messagesaved'] = 'Messaggio salvato in bozze'; $messages['successfullysaved'] = 'Salvato correttamente'; +$messages['savingresponse'] = 'Salvataggio della risposta...'; +$messages['deleteresponseconfirm'] = 'Sei sicuro di voler eliminare questa risposta?'; $messages['addedsuccessfully'] = 'Contatto aggiunto alla rubrica'; $messages['contactexists'] = 'Esiste già un contatto con questo indirizzo e-mail'; $messages['contactnameexists'] = 'Esiste già un contatto con questo nome'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'Il contatto richiesto non è stato trovato'; $messages['contactsearchonly'] = 'Inserisci dei termini per cercare i contatti'; $messages['sendingfailed'] = 'Impossibile inviare il messaggio'; $messages['senttooquickly'] = 'Per favore, attendi $sec secondi prima di inviare questo messaggio'; +$messages['errorsavingsent'] = 'Si è verificato un errore nel savare il messaggio inviato.'; +$messages['errorsaving'] = 'Si è verificato un errore nel salvataggio.'; $messages['errormoving'] = 'Impossibile spostare il messaggio'; $messages['errorcopying'] = 'Impossibile copiare il messaggio'; $messages['errordeleting'] = 'Impossibile eliminare il messaggio'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'Per favore, immetti almeno un destinatario'; $messages['nosubjectwarning'] = 'L\'oggetto è vuoto. Vuoi inserirlo adesso?'; $messages['nobodywarning'] = 'Inviare il messaggio senza testo?'; $messages['notsentwarning'] = 'Il messaggio non è stato inviato. Vuoi annullare questo messaggio?'; +$messages['restoresavedcomposedata'] = 'E\' stato rilevato un precedente messaggio non inviato.\n\nSoggetto: $subject\nSalvato: $date\n\nVuoi ripristinare il messaggio?'; $messages['noldapserver'] = 'Per favore, scegli un server LDAP in cui ricercare'; $messages['nosearchname'] = 'Per favore, immetti un nome o un indirizzo e-mail'; $messages['notuploadedwarning'] = 'Non tutti gli allegati sono stati ancora caricati. Prego attendere, oppure cancellare il caricamento.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'Errore SMTP: $msg'; $messages['emailformaterror'] = 'Indirizzo e-mail non corretto: $email'; $messages['toomanyrecipients'] = 'Numero eccessivo di destinatari, ridurlo a $max'; $messages['maxgroupmembersreached'] = 'Il numero dei membri del gruppo eccede il massimo di $max'; +$messages['internalerror'] = 'Si è verificato un errore interno. Riprovare più tardi.'; $messages['contactdelerror'] = 'Impossibile eliminare il/i contatto/i'; $messages['contactdeleted'] = 'Contatto/i correttamente eliminato/i'; $messages['contactrestoreerror'] = 'Impossibile ripristinare il/i contatto/i cancellato/i'; diff --git a/program/localization/ja_JP/labels.inc b/program/localization/ja_JP/labels.inc index aadc8fce0..e58582e73 100644 --- a/program/localization/ja_JP/labels.inc +++ b/program/localization/ja_JP/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$count通ã®$from通目ã‹ã‚‰$to通目'; $labels['copy'] = 'コピー'; $labels['move'] = '移動'; $labels['moveto'] = 'フォルダーã«ç§»å‹•'; +$labels['copyto'] = 'コピー...'; $labels['download'] = 'ダウンãƒãƒ¼ãƒ‰'; $labels['open'] = 'é–‹ã'; $labels['showattachment'] = '表示'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'スペル'; $labels['checkspelling'] = 'スペルãƒã‚§ãƒƒã‚¯'; $labels['resumeediting'] = '編集をå†é–‹'; $labels['revertto'] = 'å…ƒã«æˆ»ã™'; +$labels['restore'] = '回復'; +$labels['restoremessage'] = 'メッセージを回復ã—ã¾ã™ã‹?'; +$labels['responses'] = '回ç”'; +$labels['insertresponse'] = '回ç”を挿入'; +$labels['manageresponses'] = '回ç”を管ç†'; +$labels['savenewresponse'] = 'æ–°ã—ã„回ç”ã‚’ä¿å˜'; +$labels['editresponses'] = '回ç”を編集'; +$labels['editresponse'] = '回ç”を編集'; +$labels['responsename'] = 'åå‰'; +$labels['responsetext'] = '回ç”ã®æ–‡ç« '; $labels['attach'] = '添付'; $labels['attachments'] = '添付ファイル'; $labels['upload'] = 'アップãƒãƒ¼ãƒ‰'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'ãƒãƒƒãƒ—アップを通常ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¨ã $labels['forwardmode'] = 'メッセージã®è»¢é€å½¢å¼'; $labels['inline'] = 'インライン'; $labels['asattachment'] = '添付ファイル'; +$labels['replyallmode'] = '「全員ã«è¿”ä¿¡ã€ãƒœã‚¿ãƒ³ã®æ—¢å®šã®å‹•ä½œ'; +$labels['replyalldefault'] = '全員ã«è¿”ä¿¡'; +$labels['replyalllist'] = 'メーリングリスト(ã¨ã‚ã‹ã‚Œã°)ã ã‘ã«è¿”ä¿¡'; $labels['folder'] = 'フォルダー'; $labels['folders'] = 'フォルダー'; $labels['foldername'] = 'フォルダーå'; diff --git a/program/localization/ja_JP/messages.inc b/program/localization/ja_JP/messages.inc index fb03bc0f8..1babab7a3 100644 --- a/program/localization/ja_JP/messages.inc +++ b/program/localization/ja_JP/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -33,6 +33,7 @@ $messages['invalidhost'] = 'æ£ã—ããªã„サーãƒãƒ¼åã§ã™ã€‚'; $messages['nomessagesfound'] = 'ã“ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ã‚ã‚Šã¾ã›ã‚“。'; $messages['loggedout'] = 'ãƒã‚°ã‚¢ã‚¦ãƒˆã—ã¾ã—ãŸã€‚ã•ã‚ˆã†ãªã‚‰!'; $messages['mailboxempty'] = 'メールボックスã¯ç©ºã§ã™ã€‚'; +$messages['nomessages'] = 'メッセージãªã—'; $messages['refreshing'] = 'å†è¡¨ç¤ºä¸...'; $messages['loading'] = 'èªã¿è¾¼ã¿ä¸...'; $messages['uploading'] = 'ファイルをアップãƒãƒ¼ãƒ‰ä¸...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'メッセージをé€ä¿¡ã—ã¾ã—ãŸã€‚'; $messages['savingmessage'] = 'メッセージをä¿å˜ä¸...'; $messages['messagesaved'] = 'メッセージを下書ãã«ä¿å˜ã—ã¾ã—ãŸã€‚'; $messages['successfullysaved'] = 'ä¿å˜ã—ã¾ã—ãŸã€‚'; +$messages['savingresponse'] = '回ç”ã®æ–‡ç« ã‚’ä¿å˜ä¸...'; +$messages['deleteresponseconfirm'] = 'ã“ã®å›žç”ã®æ–‡ç« を本当ã«å‰Šé™¤ã—ã¾ã™ã‹?'; $messages['addedsuccessfully'] = '連絡先をアドレス帳ã«è¿½åŠ ã—ã¾ã—ãŸã€‚'; $messages['contactexists'] = 'åŒã˜ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã®é€£çµ¡å…ˆãŒæ—¢ã«å˜åœ¨ã—ã¾ã™ã€‚'; $messages['contactnameexists'] = 'åŒã˜åå‰ã®é€£çµ¡å…ˆãŒæ—¢ã«å˜åœ¨ã—ã¾ã™ã€‚'; @@ -80,6 +83,7 @@ $messages['norecipientwarning'] = 'å°‘ãªãã¨ã‚‚1ã¤å®›å…ˆã‚’入力ã—ã¦ãã $messages['nosubjectwarning'] = '件å(Subject)ã®æ¬„ãŒç©ºã§ã™ã€‚今ã€å…¥åŠ›ã—ã¾ã™ã‹?'; $messages['nobodywarning'] = '本文ã®ç„¡ã„メッセージをé€ä¿¡ã—ã¾ã™ã‹?'; $messages['notsentwarning'] = 'メッセージをé€ä¿¡ã—ã¾ã›ã‚“ã§ã—ãŸã€‚ã“ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ç ´æ£„ã—ã¾ã™ã‹ã€‚'; +$messages['restoresavedcomposedata'] = '以å‰ã«ä½œæˆã—ã¦æœªé€ä¿¡ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒã‚ã‚Šã¾ã™ã€‚\n\n件å: $subject\nä¿å˜æ—¥: $date\n\nã“ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’回復ã—ã¾ã™ã‹?'; $messages['noldapserver'] = '検索ã™ã‚‹LDAPサーãƒãƒ¼ã‚’é¸æŠžã—ã¦ãã ã•ã„。'; $messages['nosearchname'] = '連絡先ã®åå‰ã‹é›»åメールアドレスを入力ã—ã¦ãã ã•ã„。'; $messages['notuploadedwarning'] = 'ã™ã¹ã¦ã®æ·»ä»˜ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ã‚’完了ã—ã¦ã„ã¾ã›ã‚“。今ã—ã°ã‚‰ãå¾…ã¤ã‹ã€å–り消ã—ã—ã¦ãã ã•ã„。'; diff --git a/program/localization/km_KH/labels.inc b/program/localization/km_KH/labels.inc index 9a2799922..c94133b5d 100644 --- a/program/localization/km_KH/labels.inc +++ b/program/localization/km_KH/labels.inc @@ -31,6 +31,7 @@ $labels['trash'] = 'ធុងសំរាម'; $labels['junk'] = 'សំបុážáŸ’រមិនល្អ'; $labels['subject'] = 'ចំណងជើង'; $labels['from'] = 'អ្នកផ្ញើ'; +$labels['sender'] = 'អ្នក​ផ្ញើ​'; $labels['to'] = 'អ្នកទទួល'; $labels['cc'] = 'Cc'; $labels['bcc'] = 'Bcc'; @@ -41,14 +42,18 @@ $labels['size'] = 'ទំហំ'; $labels['priority'] = 'អទិភាព'; $labels['organization'] = 'អង្គភាព'; $labels['readstatus'] = 'ស្ážáž¶áž“ភាពនៃការអាន'; +$labels['listoptions'] = 'ជម្រើស​បញ្ជី...'; $labels['mailboxlist'] = 'ážážáž‘ាំងអស់'; $labels['messagesfromto'] = 'សំបុážáŸ’រពី $from ទៅដល់ $toក្នុងចំណោម $count សំបុážáŸ’ážš'; $labels['threadsfromto'] = 'បន្ážáž»áŸ†ážŸáŸ†áž”áž»ážáŸ’រពី $from ទៅដល់ $toក្នុងចំណោម $count សំបុážáŸ’ážš'; $labels['messagenrof'] = 'សំបុážáŸ’ážš $nr នៃ $count'; +$labels['fromtoshort'] = '$from – $to នៃ $count'; $labels['copy'] = 'ចំលង'; $labels['move'] = 'ផ្ទáŸážš'; $labels['moveto'] = 'ផ្ទáŸážšáž‘ៅ'; $labels['download'] = 'ទាញយក'; +$labels['showattachment'] = 'បង្ហាញ'; +$labels['showanyway'] = 'បង្ហាញ​វា​យ៉ាង​ណា​កáŸâ€‹áž”ាន'; $labels['filename'] = 'ឈ្មោះឯកសារ'; $labels['filesize'] = 'ទំហំឯកសារ'; $labels['addtoaddressbook'] = 'រក្សាទុកក្នុងសៀវភៅអាសយដ្ឋាន'; @@ -91,43 +96,54 @@ $labels['longoct'] = 'ážáž»áž›áž¶'; $labels['longnov'] = 'វិច្ឆិកា'; $labels['longdec'] = 'ធ្នូ'; $labels['today'] = 'ážáŸ’ងៃនáŸáŸ‡'; +$labels['refresh'] = 'ធ្វើ​ឲ្យ​ស្រស់'; $labels['checkmail'] = 'áž–áž·áž“áž·ážáŸ’យសំបុážáŸ’ážšážáŸ’មី'; $labels['compose'] = 'សរសáŸážšážŸáŸ†áž”áž»ážáŸ’ážšážáŸ’មី'; $labels['writenewmessage'] = 'សរសáŸážšážŸáŸ†áž”áž»ážáŸ’ážšážáŸ’មី'; +$labels['reply'] = 'ឆ្លើយ'; $labels['replytomessage'] = 'ឆ្លើយážáž”ទៅអ្នកផ្ញើ'; $labels['replytoallmessage'] = 'ឆ្លើយážáž”ទៅ អ្នកទទួលទាំងអស់និង ក្រុម ឬ អ្នកផ្ញើ'; $labels['replyall'] = 'ឆ្លើយážáž”ទៅទាំងអស់គ្នា'; -$labels['replylist'] = 'ឆ្លើយážáž”ទៅក្រុម'; -$labels['forwardmessage'] = 'ផ្ញើសំបុážáŸ’របន្ážážš'; -$labels['deletemessage'] = 'លុបសំបុážáŸ’រចោល'; -$labels['movemessagetotrash'] = 'ផ្ទáŸážšážŸáŸ†áž”áž»ážáŸ’រទៅក្នុងធុងសំរាម'; -$labels['printmessage'] = 'បោះពុម្ភសំបុážáŸ’ážš'; -$labels['previousmessage'] = 'បង្ហាញសំបុážáŸ’រចាស់'; -$labels['firstmessage'] = 'បង្ហាញសំបុážáŸ’រដំបូង'; -$labels['nextmessage'] = 'បង្ហាញសំបុážáŸ’របន្ទាប់'; -$labels['lastmessage'] = 'បង្ហាញសំបុážáŸ’រចុងក្រោយ'; -$labels['backtolist'] = 'ážáŸ’រលប់ទៅកាន់ក្រុមសំបុážáŸ’ážš'; -$labels['viewsource'] = 'បង្ហាញ Source របស់សំបុážáŸ’ážš'; -$labels['markmessages'] = 'កំណážáŸ‹ážŸáŸ†áž‚ាល់សំបុážáŸ’ážš'; -$labels['markread'] = 'កំណážáŸ‹ážáž¶áž”ានអានរួច'; -$labels['markunread'] = 'កំណážáŸ‹ážáž¶áž˜áž·áž“ទាន់បានអាន'; -$labels['markflagged'] = 'កំណážáŸ‹ážŸáŸ†áž‚ាល់ដោយផ្កាយ'; -$labels['markunflagged'] = 'លុបកំណážáŸ‹ážŸáŸ†áž‚ាល់ដោយផ្កាយ'; +$labels['replylist'] = 'បញ្ជី​ឆ្លើយážáž”'; +$labels['forward'] = 'បញ្ជូន​បន្áž'; +$labels['forwardinline'] = 'បញ្ចូល​បន្ážâ€‹áž€áŸ’នុង​បន្ទាážáŸ‹'; +$labels['forwardattachment'] = 'បញ្ជូន​បន្ážâ€‹áž‡áž¶â€‹áž¯áž€ážŸáž¶ážšâ€‹áž—្ជាប់'; +$labels['forwardmessage'] = 'បញ្ជូន​បន្ážâ€‹ážŸáž¶ážš'; +$labels['deletemessage'] = 'លុប​សារ'; +$labels['movemessagetotrash'] = 'ផ្លាស់ទី​សារ​ទៅ​ធុង​សំរាម'; +$labels['printmessage'] = 'បោះពុម្ព​សារ​នáŸáŸ‡'; +$labels['previousmessage'] = 'បង្ហាញ​សារ​មុន'; +$labels['firstmessage'] = 'បង្ហាញ​សារ​ដំបូង'; +$labels['nextmessage'] = 'បង្ហាញ​សារ​បន្ទាប់'; +$labels['lastmessage'] = 'បង្ហាញ​សារ​ចុងក្រោយ'; +$labels['backtolist'] = 'ážáŸ’រឡប់​ទៅ​កាន់​បញ្ជី​សារ'; +$labels['viewsource'] = 'បង្ហាញ​ប្រភព'; +$labels['mark'] = 'សម្គាល់'; +$labels['markmessages'] = 'សម្គាល់​សារ'; +$labels['markread'] = 'អាន​រួច'; +$labels['markunread'] = 'មិន​ទាន់​អាន'; +$labels['markflagged'] = 'ដាក់​ទង់'; +$labels['markunflagged'] = 'ដោះ​ទង់'; +$labels['moreactions'] = 'សកម្មភាព​ច្រើន​ទៀáž...'; +$labels['more'] = 'ច្រើន​ទៀáž'; +$labels['back'] = 'ážáŸ’រឡប់​ក្រោយ'; +$labels['options'] = 'ជម្រើស'; $labels['select'] = 'ជ្រើសរើស'; $labels['all'] = 'ទាំងអស់'; $labels['none'] = 'មិនážáŸ†ážšáŸ€áž”'; -$labels['currpage'] = 'ទំពáŸážšáž“áŸáŸ‡'; -$labels['unread'] = 'មិនទាន់អាន'; +$labels['currpage'] = 'ទំពáŸážšâ€‹áž”ច្ចុប្បន្ន'; +$labels['unread'] = 'មិន​ទាន់​អាន'; $labels['flagged'] = 'មានកំណážáŸ‹ážŸáŸ†áž‚ាល់ដោយផ្កាយ'; $labels['unanswered'] = 'មិនទាន់ឆ្លើយážáž”'; -$labels['deleted'] = 'បានលុបរួច'; +$labels['deleted'] = 'បាន​លុប'; +$labels['undeleted'] = 'មិន​ទាន់​លុប'; $labels['invert'] = 'បញ្ច្រស់'; $labels['filter'] = 'លក្ážážáŸážŽáŸ’ឌ'; -$labels['list'] = 'ážáž¶ážšáž¶áž„'; +$labels['list'] = 'បញ្ជី'; $labels['threads'] = 'បណ្ážáž»áŸ†ážŸáŸ†áž”áž»ážáŸ’ážš'; -$labels['expand-all'] = 'បង្ហាញសំបុážáŸ’រទាំងអស់'; +$labels['expand-all'] = 'បង្ហាញ​ទាំងអស់'; $labels['expand-unread'] = 'បង្ហាញសំបុážáŸ’រមិនទាន់អាន'; -$labels['collapse-all'] = 'បិទសំបុážáŸ’រទាំងអស់'; +$labels['collapse-all'] = 'បង្រួញ​ទាំងអស់'; $labels['threaded'] = 'បានបែកចែកជាក្រុមរួច'; $labels['autoexpand_threads'] = 'បង្ហាញបណ្ážáž»áŸ†ážŸáŸ†áž”áž»ážáŸ’ážš'; $labels['do_expand'] = 'បណ្ážáž»áŸ†áž‘ាំងអស់'; @@ -157,6 +173,7 @@ $labels['msgtext'] = 'សំបុážáŸ’រទាំងមូល'; $labels['openinextwin'] = 'បើកក្នុងវីនដូវážáŸ’មី'; $labels['emlsave'] = 'រក្សាទុកទិន្ននáŸáž™áž‡áž¶áž¯áž€ážŸáž¶ážšáž”្រភáŸáž‘(.eml)'; $labels['editasnew'] = 'កែហើយរក្សាទុកដូចជាសំបុážáŸ’ážšážáŸ’មី'; +$labels['send'] = 'ផ្ញើ'; $labels['sendmessage'] = 'ផ្ញើសំបុážáŸ’ážšáž“áŸáŸ‡'; $labels['savemessage'] = 'រក្សាទុកសំបុážáŸ’រពង្រៀង'; $labels['addattachment'] = 'ឯកសារភ្ជាប់'; @@ -164,12 +181,17 @@ $labels['charset'] = 'ប្រភáŸáž‘អក្សរ'; $labels['editortype'] = 'ប្រភáŸáž‘ Editor'; $labels['returnreceipt'] = 'អážáŸ’ážáž”ទបញ្ជាក់ពីការážáŸ’រឡប់'; $labels['dsn'] = 'ប្រាប់អំពីស្ážáž¶áž“ភាពផ្ញើ'; +$labels['mailreplyintro'] = 'កាលពី​ážáŸ’ងៃ $date, $sender បាន​សរសáŸážšáŸ–'; +$labels['originalmessage'] = 'សារ​ដើម'; $labels['editidents'] = 'ផ្លាស់ប្ážáž¼ážšáž¢ážáŸ’ážážŸáž‰áŸ’ញាណ'; +$labels['spellcheck'] = 'អក្ážážšáž¶ážœáž·ážšáž»áž‘្ធ'; $labels['checkspelling'] = 'áž–áž·áž“áž·ážáŸ’យអក្ážážšáž¶ážœáž·ážšáž»áž‘្ធ'; $labels['resumeediting'] = 'បន្ážážšáž€áž¶ážšáž€áŸ‚ážáŸ†ážšáž¼ážœ'; $labels['revertto'] = 'ážáŸ’រលប់ទៅ'; +$labels['attach'] = 'ភ្ជាប់'; $labels['attachments'] = 'ឯកសារភ្ជាប់'; $labels['upload'] = 'ភ្ជាប់ឯកសារ'; +$labels['uploadprogress'] = '$percent ($current ពី $total)'; $labels['close'] = 'បិទ'; $labels['messageoptions'] = 'កំណážáŸ‹áž‡áŸ†ážšáž¾ážŸážšáž”ស់សំបុážáŸ’ážš'; $labels['low'] = 'ទាប'; @@ -180,6 +202,10 @@ $labels['highest'] = 'ážáŸ’ពស់បំផុáž'; $labels['nosubject'] = '(គ្មានចំណងជើង)'; $labels['showimages'] = 'បង្ហាញរូបភាព'; $labels['alwaysshow'] = 'បង្ហាញជានិច្ចរាល់រូបភាពបញ្ជូនពី$sender'; +$labels['isdraft'] = 'áž“áŸáŸ‡â€‹áž‡áž¶â€‹ážŸáž¶ážšâ€‹áž–្រាង។'; +$labels['andnmore'] = '$nr ច្រើន​ទៀáž...'; +$labels['togglemoreheaders'] = 'បង្ហាញ​បឋមកážáž¶â€‹ážŸáž¶ážšâ€‹áž…្រើន​ទៀáž'; +$labels['togglefullheaders'] = 'បិទ/បើក​បឋមកážáž¶â€‹ážŸáž¶ážšâ€‹â€‹ážŠáž¾áž˜'; $labels['htmltoggle'] = 'អážáŸ’ážáž”áž‘ HTML'; $labels['plaintoggle'] = 'អážáŸ’ážáž”ទធម្មážáž¶'; $labels['savesentmessagein'] = 'រក្សាសំបុážáŸ’រដែលបានផ្ញើក្នុង'; diff --git a/program/localization/km_KH/messages.inc b/program/localization/km_KH/messages.inc index a2c4bab20..682c733fd 100644 --- a/program/localization/km_KH/messages.inc +++ b/program/localization/km_KH/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -15,20 +15,25 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ -$messages['loginfailed'] = 'ការពិនិážáŸ’យចូលមិនបានសំរáŸáž…ព្រោះមានបញ្ហាកើážáž¡áž¾áž„'; -$messages['cookiesdisabled'] = 'កម្មវិធីមើលគáŸáž ទំពáŸážšáž“áŸáŸ‡áž˜áž·áž“ទទួលយកCookies'; -$messages['sessionerror'] = 'Session មិនážáŸ’រឹមážáŸ’រូវ ឬហួសកំណážáŸ‹'; -$messages['storageerror'] = 'មិនអាចភ្ជាប់ទៅកាន់ម៉ាស៊ីនIMAP'; -$messages['servererror'] = 'មានបញ្ហានៅម៉ាស៊ីនមáŸ'; +$messages['errortitle'] = 'មាន​បញ្ហា​បាន​កើážâ€‹áž¡áž¾áž„!'; +$messages['loginfailed'] = 'បាន​បរាជáŸáž™â€‹áž€áŸ’នុង​ការ​ចូល។'; +$messages['cookiesdisabled'] = 'កម្មវិធី​អ៊ីនធឺណិážâ€‹ážšáž”ស់​អ្នក​មិន​ទទួល​ážáž¼áž‚ី​ទáŸáŸ”'; +$messages['sessionerror'] = 'សមáŸáž™â€‹ážšáž”ស់​អ្នក​មិន​ážáŸ’រឹម​ážáŸ’រូវ ឬ​ផុážâ€‹áž€áŸ†ážŽážáŸ‹áŸ”'; +$messages['storageerror'] = 'មិន​អាច​ážáž—្ជាប់​ទៅ​ម៉ាស៊ីន​ឃ្លាំង​ផ្ទុក។'; +$messages['servererror'] = 'ម៉ាស៊ីន​មáŸâ€‹áž˜áž¶áž“​បញ្ហា!'; $messages['servererrormsg'] = 'បញ្ហា: $msg'; +$messages['dberror'] = 'កំហុស​មូលដ្ឋាន​ទិន្ននáŸáž™!'; +$messages['requesttimedout'] = 'សំណើ​អស់​ពáŸáž›'; $messages['errorreadonly'] = 'មិនអាចប្រážáž·áž”ážáŸ’ážáž·áž”ានពីព្រោះážážáž“áŸáŸ‡ážáŸ’រូវបានគáŸáž€áŸ†ážŽážáŸ‹ážŸáŸ†ážšáž¶áž”់ážáŸ‚មើល'; $messages['errornoperm'] = 'មិនអាចប្រážáž·áž”ážáŸ’ážáž·áž”ានពីព្រោះមិនមានសិទ្ទគ្រប់គ្រាន់'; $messages['invalidrequest'] = 'មិនអាចរក្សាទុកទិន្ននáŸáž™áž”ានពីព្រោះមានបញ្ហានៅពáŸáž›áž”ញ្ជូនទិន្ននáŸáž™'; +$messages['invalidhost'] = 'ឈ្មោះ​ម៉ាស៊ីន​មáŸâ€‹áž˜áž·áž“​ážáŸ’រឹមážáŸ’រូវ។'; $messages['nomessagesfound'] = 'ពុំមានសំបុážáŸ’រក្នុងប្រអប់សំបុážáŸ’ážšáž“áŸáŸ‡áž‘áŸ'; $messages['loggedout'] = 'អ្នកបានពិនិážáŸ’យចáŸáž‰ážŠáŸ„យជោគជáŸáž™áŸ”'; -$messages['mailboxempty'] = 'ប្រអប់សំបុážáŸ’ážšáž‘áž‘áŸ'; +$messages['refreshing'] = 'កំពុង​ផ្ទុកឡើងវិញ...'; $messages['loading'] = 'កំពុងដំណើរការ...'; $messages['uploading'] = 'កំពុងបញ្ជូនឯកសារ...'; +$messages['uploadingmany'] = 'កំពុង​ផ្ទុកឯកសារ​ឡើង...'; $messages['loadingdata'] = 'កំពុងបើកឯកសារ...'; $messages['checkingmail'] = 'កំពុងស្វែងរកមើលសំបុážáŸ’ážšážáŸ’មីáŸ...'; $messages['sendingmessage'] = 'កំពុងផ្ញើសំបុážáŸ’ážš...'; @@ -38,10 +43,12 @@ $messages['messagesaved'] = 'សំបុážáŸ’ážšážáŸ’រូវបានរក $messages['successfullysaved'] = 'រក្សាទុកដោយជោគជáŸáž™'; $messages['addedsuccessfully'] = 'អាសយដ្ឋានážáŸ’រូវបានរក្សាទុកដោយជោគជáŸáž™'; $messages['contactexists'] = 'áž–áŸážáŸŒáž˜áž¶áž“ទាក់ទងដែលមានអ៊ីមែលនáŸáŸ‡áž˜áž¶áž“ក្នុងសៀវភៅអាសយដ្ឋានរួចហើយ'; +$messages['contactnameexists'] = 'មាន​ទំនាក់ទំនង​ដែលមាន​ឈ្មោះ​ដូច​គ្នា​នáŸáŸ‡â€‹ážšáž½áž…​ហើយ។'; $messages['blockedimages'] = 'រូបភាពដែលមានក្នុងសំបុážáŸ’ážšáž“áŸáŸ‡ážáŸ’រូវបានបិទដើម្បីរក្សាសុវážáŸ’ážáž—ាព'; $messages['encryptedmessage'] = 'លោកអ្នកមិនអាចមើលសំបុážáŸ’ážšáž“áŸáŸ‡áž”ានទáŸáž–ីព្រោះសំបុážáŸ’ážšáž“áŸáŸ‡áž‡áž¶ážŸáŸ†áž”áž»ážáŸ’រសំងាážáŸ‹'; $messages['nocontactsfound'] = 'ពុំមានអាសយដ្ឋានទាក់ទងទáŸ'; $messages['contactnotfound'] = 'អាសយដ្ឋានទាក់ទងដែលលោកអ្នកចង់រកពុំមានឡើយ'; +$messages['contactsearchonly'] = 'បញ្ចូល​ពាក្យ​ស្វែងរក​មួយ​ចំនួន ដើម្បី​រក​ទំនាក់ទំនង'; $messages['sendingfailed'] = 'មិនអាចផ្ញើសំបុážáŸ’របាន'; $messages['senttooquickly'] = 'សូមរងចាំ $sec វិនាទីមុននឹងផ្ញើសំបុážáŸ’ážšáž“áŸáŸ‡'; $messages['errormoving'] = 'មិនអាចផ្ទáŸážšážŸáŸ†áž”áž»ážáŸ’របាន'; @@ -49,9 +56,12 @@ $messages['errorcopying'] = 'មិនអាចចំលងសំបុážáŸ’ážš $messages['errordeleting'] = 'មិនអាចលុបសំបុážáŸ’រចោលបាន'; $messages['errormarking'] = 'មិនអាចកំណážáŸ‹áž…ំណាំលើសំបុážáŸ’របាន'; $messages['deletecontactconfirm'] = 'ážáž¾áž›áŸ„កអ្នកពិážáž‡áž¶áž…ង់លុបពáŸážáŸŒáž˜áž¶áž“ទំនាក់ទំនងនáŸáŸ‡áž˜áŸ‚áž“áž‘áŸ?'; +$messages['deletegroupconfirm'] = 'ážáž¾áž¢áŸ’នកពិážâ€‹áž‡áž¶â€‹áž…ង់លុប​ក្រុម​បានជ្រើស?'; $messages['deletemessagesconfirm'] = 'ážáž¾áž›áŸ„កអ្នកពិážáž‡áž¶áž…ង់លុបសំបុážáŸ’ážšáž“áŸáŸ‡áž˜áŸ‚áž“áž‘áŸ?'; $messages['deletefolderconfirm'] = 'ážáž¾áž›áŸ„កអ្នកពិážáž‡áž¶áž…ង់លុបážážáž“áŸáŸ‡áž˜áŸ‚áž“áž‘áŸ?'; $messages['purgefolderconfirm'] = 'ážáž¾áž›áŸ„កអ្នកពិážáž‡áž¶áž…ង់លុបសំបុážáŸ’រទាំងអស់នៅក្នុងážážáž“áŸáŸ‡áž˜áŸ‚áž“áž‘áŸ?'; +$messages['contactdeleting'] = 'កំពុង​លុប​ទំនាក់ទំនង...'; +$messages['groupdeleting'] = 'កំពុង​លុប​ក្រុម...'; $messages['folderdeleting'] = 'កំពុងលុបážážážŸáŸ†ážšáž¶áž”់ទុកឯកសារ...'; $messages['foldermoving'] = 'កំពុងផ្ទáŸážšážážážŸáŸ†ážšáž¶áž”់ទុកឯកសារ...'; $messages['foldersubscribing'] = 'កំពុងកំណážáŸ‹áž”្រើážážážŸáŸ†ážšáž¶áž”់ទុកឯកសារ...'; @@ -67,7 +77,9 @@ $messages['nobodywarning'] = 'ážáž¾áž›áŸ„កអ្នកចង់ផ្ញើហ$messages['notsentwarning'] = 'សំបុážáŸ’ážšáž“áŸáŸ‡áž˜áž·áž“ទាន់បានផ្ញើទáŸáŸ” ážáž¾áž›áŸ„កអ្នកចង់លុបចោលទáŸ?'; $messages['noldapserver'] = 'សូមកំណážáŸ‹áž˜áŸ‰áž¶ážŸáŸŠáž¸áž“ LDAPដើម្បីស្វែងរក'; $messages['nosearchname'] = 'សូមបំពáŸáž‰ážˆáŸ’មោះទំនាក់ទំនង ឬអាសយដ្ឋានអ៊ីមែល'; +$messages['notuploadedwarning'] = 'ឯកសារ​ភ្ជាប់​ទាំង​អស់​មិន​ážáŸ’រូវ​បាន​ផ្ទុក​ឡើង​នៅឡើយ​ទáŸáŸ” សូម​រង់ចាំ​ ឬ​បោះបង់​ការ​​ផ្ទុក​ឡើង។'; $messages['searchsuccessful'] = 'រកឃើញសំបុážáŸ’រចំនួន $nr'; +$messages['contactsearchsuccessful'] = 'រក​ឃើញ​ទំនាក់ទំនង $nr ។'; $messages['searchnomatch'] = 'រកមិនឃើញអ្វីទាំងអស់'; $messages['searching'] = 'កំពុងស្វែងរក...'; $messages['checking'] = 'កំពុងពិនិážáŸ’យរក...'; @@ -86,16 +98,21 @@ $messages['sourceisreadonly'] = 'លោកអ្នកមានសិទ្ធហ$messages['errorsavingcontact'] = 'មិនអាចរក្សាអាសយដ្ឋានបានទáŸ'; $messages['movingmessage'] = 'កំពុកផ្ážáŸážšážŸáŸ†áž”áž»ážáŸ’ážš...'; $messages['copyingmessage'] = 'កំពុងចំលងសំបុážáŸ’ážš...'; +$messages['copyingcontact'] = 'កំពុង​ចម្លង​ទំនាក់ទំនង...'; $messages['deletingmessage'] = 'កំពុងលុបសំបុážáŸ’ážš...'; $messages['markingmessage'] = 'កំពុងកំណážáŸ‹ážŸáŸ†áž‚ាល់សំបុážáŸ’ážš...'; +$messages['addingmember'] = 'កំពុង​បន្ážáŸ‚ម​ទំនាក់ទំនង​ទៅ​ក្រុម...'; +$messages['removingmember'] = 'កំពុង​លុបទំនាក់ទំនង​ពី​ក្រុម...'; $messages['receiptsent'] = 'បានបញ្ជូនអážáŸ’ážáž”ទបញ្ជាក់ážáž¶áž”ានអានបានសំរáŸáž…'; $messages['errorsendingreceipt'] = 'មិនអាចបញ្ជូនអážáŸ’ážáž”ទបញ្ជាក់ážáž¶áž”ានអាន áž‘áŸ'; +$messages['deleteidentityconfirm'] = 'ážáž¾áž¢áŸ’នក​ពិážâ€‹áž‡áž¶â€‹áž…ង់​លុប​អážáŸ’ážážŸáž‰áŸ’ញាណ​នáŸáŸ‡?'; $messages['nodeletelastidentity'] = 'លោកអ្នកមិនអាចលុបអážáŸ’ážážŸáž‰áŸ’ញាណនáŸáŸ‡áž‘áŸáž–្រោះវានៅសល់ចុងក្រោយគáŸ'; $messages['forbiddencharacter'] = 'ឈ្មោះážážáž“áŸáŸ‡áž˜áž¶áž“អក្សរដែលážáŸ’រូវហាមឃាážáŸ‹'; $messages['selectimportfile'] = 'សូមជ្រើសរើសឯកសារដើម្បីបញ្ជូនភ្ជាប់'; $messages['addresswriterror'] = 'សៀវភៅអាសយដ្ឋាននោះមិនអាចសរសáŸážšáž…ូលបានទáŸ'; $messages['contactaddedtogroup'] = 'បានដាក់ពážáŸŒáž˜áž¶áž“ទំនាក់ទំនងចូលក្នុងក្រុមនáŸáŸ‡ážŠáŸ„យជោគជáŸáž™'; $messages['contactremovedfromgroup'] = 'បានលុបពážáŸŒáž˜áž¶áž“ទំនាក់ទំនងចáŸáž‰áž–ីក្រុមនáŸáŸ‡ážŠáŸ„យជោគជáŸáž™'; +$messages['nogroupassignmentschanged'] = 'គ្មាន​ការ​ផ្ដល់​ក្រុម​បាន​ប្ដូរ។'; $messages['importwait'] = 'សូមមáŸážáŸ’ážáž¶ážšáž„់ចាំកំពុងទាញទិន្ននáŸáž™áž…ូល ...'; $messages['importconfirm'] = '<b>áž–áŸážáŸŒáž˜áž¶áž“ទំនាក់ទំនង $insertedបានបញ្ចូលដោយជោគជáŸáž™,ហើយបានរំលងចោលពážáŸŒáž˜áž¶áž“ដែលមានស្រាប់$skipped </b>:<p><em>$names</em></p>'; $messages['opnotpermitted'] = 'ប្រážáž·áŸ’ážáž”ážáŸ’ážáž·áž€áž¶ážšážáŸ’រូវបានគáŸáž ាមឃាážáŸ‹!'; diff --git a/program/localization/kn_IN/labels.inc b/program/localization/kn_IN/labels.inc new file mode 100644 index 000000000..bff989285 --- /dev/null +++ b/program/localization/kn_IN/labels.inc @@ -0,0 +1,166 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/<lang>/labels.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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ +*/ +$labels['welcome'] = '$product ಗೆ ಸà³à²µà²¾à²—ತ '; +$labels['password'] = 'ರಹಸà³à²¯ ಪದ'; +$labels['addressbook'] = 'ವಿಳಾಸ ಪà³à²¸à³à²¤à²•'; +$labels['subject'] = 'ವಿಷಯ'; +$labels['from'] = 'ಇಂದ'; +$labels['to'] = 'ಗೆ'; +$labels['date'] = 'ದಿನಾಂಕ '; +$labels['size'] = 'ಗಾತà³à²°'; +$labels['priority'] = 'ಆದà³à²¯à²¤à³†'; +$labels['organization'] = 'ಸಂಘಟನೆ'; +$labels['showattachment'] = 'ತೋರಿಸà³'; +$labels['filename'] = 'ಫೈಲೠಹೆಸರà³'; +$labels['filesize'] = 'ಫೈಲೠಗಾತà³à²°'; +$labels['addtoaddressbook'] = 'ಪà³à²¸à³à²¤à²• ವಿಳಾಸ ಸೇರಿಸೠ'; +$labels['sun'] = 'à²à²¾à²¨à³ '; +$labels['mon'] = 'ಸೋಮ'; +$labels['tue'] = 'ಮಂಗಳ'; +$labels['wed'] = 'ಬà³à²§'; +$labels['thu'] = 'ಗà³à²°à³'; +$labels['fri'] = 'ಶà³à²•à³à²°'; +$labels['sat'] = 'ಶನಿ'; +$labels['sunday'] = 'à²à²¾à²¨à³à²µà²¾à²°'; +$labels['monday'] = 'ಸೋಮವಾರ'; +$labels['tuesday'] = 'ಮಂಗಳವಾರ'; +$labels['wednesday'] = 'ಬà³à²§à²µà²¾à²°'; +$labels['thursday'] = 'ಗà³à²°à³à²µà²¾à²°'; +$labels['friday'] = 'ಶà³à²•à³à²°à²µà²¾à²°'; +$labels['saturday'] = 'ಶನಿವಾರ'; +$labels['longjan'] = 'ಜನವರಿ'; +$labels['longfeb'] = 'ಫೆಬà³à²°à³à²µà²°à²¿'; +$labels['longmar'] = 'ಮಾರà³à²šà³'; +$labels['longapr'] = 'à²à²ªà³à²°à²¿à²²à³'; +$labels['longmay'] = 'ಮೇ'; +$labels['longjun'] = 'ಜೂನà³'; +$labels['longjul'] = 'ಜೂಲೈ'; +$labels['longaug'] = 'ಆಗಸà³à²Ÿà³ '; +$labels['longsep'] = 'ಸೆಪà³à²Ÿà³†à²‚ಬರ'; +$labels['longoct'] = 'ಅಕà³à²Ÿà³‹à²¬à²°'; +$labels['longnov'] = 'ನವೆಂಬರ'; +$labels['longdec'] = 'ಡಿಸೆಂಬರ'; +$labels['today'] = 'ಇಂದà³'; +$labels['checkmail'] = 'ಹೊಸ ಸಂದೇಶಗಳಿಗಾಗಿ ಪರಿಶೀಲಿಸà³'; +$labels['writenewmessage'] = 'ಒಂದೠಹೊಸ ಸಂದೇಶವನà³à²¨à³ ರಚಿಸà³'; +$labels['reply'] = 'ಉತà³à²¤à²°à²•à³†à³‚ಡà³'; +$labels['deletemessage'] = 'ಸಂದೇಶ ಅಳಿಸà³'; +$labels['printmessage'] = 'ಈ ಸಂದೇಶವನà³à²¨à³ ಮà³à²¦à³à²°à²¿à²¸à³'; +$labels['previousmessage'] = 'ಹಿಂದಿನ ಸಂದೇಶವನà³à²¨à³ ತೋರಿಸà³'; +$labels['firstmessage'] = 'ಮೊದಲ ಸಂದೇಶವನà³à²¨à³ ತೋರಿಸà³'; +$labels['nextmessage'] = 'ಮà³à²‚ದಿನ ಸಂದೇಶವನà³à²¨à³ ತೋರಿಸà³'; +$labels['lastmessage'] = 'ಕೊನೆಯ ಸಂದೇಶವನà³à²¨à³ ತೋರಿಸà³'; +$labels['unlimited'] = 'ಅನಿಯಮಿತ'; +$labels['namex'] = 'ಹೆಸರà³'; +$labels['send'] = 'ಕಳà³à²¹à²¿à²¸à³'; +$labels['sendmessage'] = 'ಸಂದೇಶ ಕಳà³à²¹à²¿à²¸à³'; +$labels['savemessage'] = 'ಡà³à²°à²¾à²«à³à²Ÿà³ ಆಗಿ ಉಳಿಸಿ'; +$labels['originalmessage'] = 'ಮೂಲ ಸಂದೇಶ'; +$labels['responsename'] = 'ಹೆಸರà³'; +$labels['close'] = 'ಮà³à²šà³à²šà³'; +$labels['messageoptions'] = 'ಸಂದೇಶ ಆಯà³à²•à³†à²—ಳà³'; +$labels['low'] = 'ಕಡಿಮೆ'; +$labels['lowest'] = 'ಅತಿ ಕಡಿಮೆ'; +$labels['normal'] = 'ಸಾಧಾರಣ'; +$labels['high'] = 'ಜಾಸà³à²¤à²¿'; +$labels['highest'] = 'ಅತಿ ಜಾಸà³à²¤à²¿ '; +$labels['nosubject'] = '(ವಿಷಯ ಇಲà³à²²)'; +$labels['showimages'] = 'ಚಿತà³à²°à²—ಳನà³à²¨à³ ತೋರಿಸà³'; +$labels['alwaysshow'] = '$sender ಇಂದ ಯಾವಾಗಲೂ ಚಿತà³à²°à²—ಳನà³à²¨à³ ತೋರಿಸà³'; +$labels['htmltoggle'] = 'HTML'; +$labels['dontsave'] = 'ಉಳಿಸಬೇಡ'; +$labels['department'] = 'ವಿà²à²¾à²—'; +$labels['gender'] = 'ಲಿಂಗ'; +$labels['email'] = 'ಇಮೇಲà³'; +$labels['phone'] = 'ದೂರವಾಣಿ'; +$labels['address'] = 'ವಿಳಾಸ'; +$labels['street'] = 'ರಸà³à²¤à³†'; +$labels['locality'] = 'ನಗರ'; +$labels['country'] = 'ದೇಶ'; +$labels['birthday'] = 'ಜನà³à²®à²¦à²¿à²¨'; +$labels['manager'] = 'ವà³à²¯à²µà²¸à³à²¥à²¾à²ªà²•'; +$labels['assistant'] = 'ಸಹಾಯಕ'; +$labels['search'] = 'ಹà³à²¡à³à²•à³'; +$labels['typehome'] = 'ಮನೆ'; +$labels['typework'] = 'ಕೆಲಸ'; +$labels['typecar'] = 'ಕಾರà³'; +$labels['addcontact'] = 'ಹೊಸ ಸಂಪರà³à²• ಸೇರಿಸಿ'; +$labels['editcontact'] = 'ಸಂಪರà³à²• ತಿದà³à²¦à³'; +$labels['contacts'] = 'ಸಂಪರà³à²•à²—ಳà³'; +$labels['edit'] = 'ತಿದà³à²¦à³'; +$labels['addphoto'] = 'ಸೇರಿಸà³'; +$labels['replacephoto'] = 'ಬದಲಾಯಿಸà³'; +$labels['uploadphoto'] = 'ಫೋಟೋ ಅಪà³à²²à³†à³‚ೕಡೠಮಾಡà³'; +$labels['deletecontact'] = 'ಆಯà³à²•à³†à²®à²¾à²¡à²¿à²¦ ಸಂಪರà³à²•à²—ಳನà³à²¨à³ ಅಳಿಸà³'; +$labels['print'] = 'ಮà³à²¦à³à²°à²¿à²¸à³'; +$labels['previouspage'] = 'ಹಿಂದಿನ ಪà³à²Ÿà²µà²¨à³à²¨à³ ತೋರಿಸà³'; +$labels['firstpage'] = 'ಮೊದಲ ಪà³à²Ÿ ತೋರಿಸà³'; +$labels['nextpage'] = 'ಮà³à²‚ದಿನ ಪà³à²Ÿ ತೋರಿಸà³'; +$labels['lastpage'] = 'ಕೊನೆಯ ಪà³à²Ÿ ತೋರಿಸà³'; +$labels['group'] = 'ಗà³à²‚ಪà³'; +$labels['groups'] = 'ಗà³à²‚ಪà³à²—ಳà³'; +$labels['preferences'] = 'ಆಯà³à²•à³†à²—ಳà³'; +$labels['userpreferences'] = 'ಬಳಕೆದಾರ ಆಯà³à²•à³†à²—ಳà³'; +$labels['editpreferences'] = 'ಬಳಕೆದಾರನ ಆಯà³à²•à³†à²—ಳನನà³à²¨à³ ತಿದà³à²¦à²¿'; +$labels['preferhtml'] = 'HTML ತೋರಿಸà³'; +$labels['htmlmessage'] = 'HTML ಸಂದೇಶ'; +$labels['digitalsig'] = 'ಡಿಜಿಟಲೠಸಹಿ'; +$labels['dateformat'] = 'ದಿನಾಂಕ ಸà³à²µà²°à³‚ಪ'; +$labels['timeformat'] = 'ಸಮಯ ಸà³à²µà²°à³‚ಪ'; +$labels['language'] = 'à²à²¾à²·à³†'; +$labels['timezone'] = 'ಸಮಯ ವಲಯ'; +$labels['pagesize'] = 'ಪà³à²°à²¤à²¿ ಪà³à²Ÿà²•à³à²•à³† ಸಾಲà³à²—ಳà³'; +$labels['signature'] = 'ಸಹಿ'; +$labels['showinextwin'] = 'ಹೊಸ ವಿಂಡೋದಲà³à²²à²¿ ಸಂದೇಶ ತೆರೆಯಿರಿ'; +$labels['composeextwin'] = 'ಹೊಸ ವಿಂಡೋದಲà³à²²à²¿ ರಚಿಸà³'; +$labels['htmleditor'] = 'HTML ಸಂದೇಶಗಳನà³à²¨à³ ರಚಿಸà³'; +$labels['htmlsignature'] = 'HTML ಸಹಿ'; +$labels['showemail'] = ' ಇಮೇಲೠವಿಳಾಸವನà³à²¨à³ ಹೆಸರಿನೊಂದಿಗೆ ತೋರಿಸà³'; +$labels['askuser'] = 'ನನನà³à²¨à³ ಕೇಳà³'; +$labels['autosend'] = 'ರಸಿಟನà³à²¨à³ ಕಳಿಸà³'; +$labels['ignore'] = 'ನಿರà³à²²à²•à³à²·à²¿à²¸à³'; +$labels['skipdeleted'] = 'ಅಳಿಸಲಾಗಿರà³à²µ ಸಂದೇಶಗಳನà³à²¨à³ ತೋರಿಸಬೇಡ'; +$labels['always'] = 'ಯಾವಾಗಲೂ'; +$labels['everynminutes'] = 'ಪà³à²°à²¤à²¿ $n ನಿಮಿಷ (ಗಳà³)'; +$labels['refreshinterval'] = 'ರಿಫà³à²°à³†à²¶à³ (ಹೊಸ ಸಂದೇಶಗಳನà³à²¨à³, ಇತà³à²¯à²¾à²¦à²¿à²—ಳನà³à²¨à³ ಪರಿಶೀಲಿಸà³)'; +$labels['immediately'] = 'ತತà³à²•à³à²·à²£ '; +$labels['mainoptions'] = 'ಮà³à²–à³à²¯ ಆಯà³à²•à³†à²—ಳà³'; +$labels['section'] = 'ವಿà²à²¾à²—'; +$labels['newmessage'] = 'ಹೊಸ ಸಂದೇಶ'; +$labels['signatureoptions'] = 'ಸಹಿ ಆಯà³à²•à³†à²—ಳà³'; +$labels['whenreplying'] = 'ಪà³à²°à²¤à³à²¯à³à²¤à³à²¤à²° ನೀಡà³à²µà²¾à²—'; +$labels['replyempty'] = 'ಮೂಲ ಸಂದೇಶವನà³à²¨à³ ಉಲà³à²²à³†à³•à²–ಿಸಬೇಡ'; +$labels['replyremovesignature'] = ' ಪà³à²°à²¤à³à²¯à³à²¤à³à²¤à²° ನೀಡà³à²µà²¾à²— ಸಂದೇಶದಿಂದ ಮೂಲಸಹಿಯನà³à²¨à³ ತೆಗೆದೠಹಾಕà³'; +$labels['newmessageonly'] = 'ಹೊಸ ಸಂದೇಶ ಮಾತà³à²° '; +$labels['insertsignature'] = 'ಸಹಿ ಸೇರಿಸà³'; +$labels['afternseconds'] = '$n ಸೆಕೆಂಡà³à²—ಳ ನಂತರ'; +$labels['addtodict'] = 'ನಿಘಂಟಿಗೆ ಸೇರಿಸà³'; +$labels['messagecount'] = 'ಸಂದೇಶಗಳà³'; +$labels['create'] = 'ರಚಿಸà³'; +$labels['properties'] = 'ಗà³à²£à²²à²•à³à²·à²£à²—ಳà³'; +$labels['location'] = 'ಸà³à²¥à²³'; +$labels['info'] = 'ಮಾಹಿತಿ'; +$labels['source'] = 'ಮೂಲ'; +$labels['B'] = 'B'; +$labels['KB'] = 'KB'; +$labels['MB'] = 'MB'; +$labels['GB'] = 'GB'; +$labels['english'] = 'ಇಂಗà³à²²à²¿à³•à²·à³'; +$labels['westerneuropean'] = 'ಪಾಶà³à²šà²¾à²¤à³à²¯ ಯà³à²°à³†à³‚ೕಪಿಯನà³'; +$labels['easterneuropean'] = 'ಪೂರà³à²µ ಯà³à²°à³†à³‚ೕಪಿಯನà³'; +?> diff --git a/program/localization/kn_IN/messages.inc b/program/localization/kn_IN/messages.inc new file mode 100644 index 000000000..7f4edf2fa --- /dev/null +++ b/program/localization/kn_IN/messages.inc @@ -0,0 +1,54 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/<lang>/messages.inc | + | | + | Localization file of the Roundcube Webmail client | + | Copyright (C) 2005-2014, 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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ +*/ +$messages['requesttimedout'] = 'ವಿನಂತಿ ಸಮಯ ಮೀರಿತà³'; +$messages['checkingmail'] = 'ಹೊಸ ಸಂದೇಶಗಳನà³à²¨à³ ಪರಿಶೀಲಿಸಲಾಗà³à²¤à³à²¤à²¿à²¦à³†...'; +$messages['sendingmessage'] = 'ಸಂದೇಶ ಕಳà³à²¹à²¿à²¸à²²à²¾à²—à³à²¤à³à²¤à²¿à²¦à³†...'; +$messages['messagesent'] = 'ಸಂದೇಶ ಯಶಸà³à²µà²¿à²¯à²¾à²—ಿ ಕಳà³à²¹à²¿à²¸à²²à²¾à²—ಿದೆ.'; +$messages['savingmessage'] = 'ಸಂದೇಶ ಉಳಿಸಲಾಗà³à²¤à³à²¤à²¿à²¦à³†...'; +$messages['successfullysaved'] = 'ಯಶಸà³à²µà²¿à²¯à²¾à²—ಿ ಉಳಿಸಲಾಗಿದೆ.'; +$messages['contactexists'] = 'ಅದೇ ಇಮೇಲೠವಿಳಾಸದೊಂದಿಗೆ ಸಂಪರà³à²• ಈಗಾಗಲೇ ಅಸà³à²¤à²¿à²¤à³à²µà²¦à²²à³à²²à²¿à²¦à³†.'; +$messages['contactnameexists'] = 'ಅದೇ ಹೆಸರಿನ ಸಂಪರà³à²• ಈಗಾಗಲೇ ಅಸà³à²¤à²¿à²¤à³à²µà²¦à²²à³à²²à²¿à²¦à³†.'; +$messages['nocontactsfound'] = 'ಯಾವà³à²¦à³†à³• ಸಂಪರà³à²•à²—ಳೠಕಂಡà³à²¬à²‚ದಿಲà³à²².'; +$messages['contactnotfound'] = 'ವಿನಂತಿಸಿದ ಸಂಪರà³à²• ಕಂಡà³à²¬à²‚ದಿಲà³à²².'; +$messages['contactsearchonly'] = 'ಸಂಪರà³à²•à²—ಳನà³à²¨à³ ಹà³à²¡à³à²•à²²à³ ಕೆಲವೠಹà³à²¡à³à²•à²¾à²Ÿ ಪದಗಳನà³à²¨à³ ನಮೂದಿಸಿ'; +$messages['sendingfailed'] = 'ಸಂದೇಶವನà³à²¨à³ ಕಳà³à²¹à²¿à²¸à²²à³ ವಿಫಲವಾಗಿದೆ.'; +$messages['senttooquickly'] = 'ಈ ಸಂದೇಶವನà³à²¨à³ ಕಳà³à²¹à²¿à²¸à³à²µ ಮೊದಲà³, $sec ಸೆಕೆಂಡೠ(ಗಳà³) ನಿರೀಕà³à²·à²¿à²¸à²¿'; +$messages['deletecontactconfirm'] = 'ನೀವೠನಿಜವಾಗಿಯೂ ಆಯà³à²•à³† ಸಂಪರà³à²• (ಗಳನà³à²¨à³) ಅಳಿಸಲೠಬಯಸà³à²¤à³à²¤à²¿à³•à²°à²¾?'; +$messages['deletegroupconfirm'] = 'ನೀವೠನಿಜವಾಗಿಯೂ ಆಯà³à²•à³† ಗà³à²‚ಪೠಅಳಿಸಲೠಬಯಸà³à²¤à³à²¤à²¿à³•à²°à²¾?'; +$messages['deletemessagesconfirm'] = 'ನೀವೠನಿಜವಾಗಿಯೂ ಆಯà³à²¦ ಸಂದೇಶ (ಗಳೠ) ಅಳಿಸಲೠಬಯಸà³à²¤à³à²¤à²¿à³•à²°à²¾?'; +$messages['contactdeleting'] = 'ಸಂಪರà³à²•(ಗಳೠ) ಅಳಿಸಲಾಗà³à²¤à³à²¤à²¿à²¦à³† ...'; +$messages['nonamewarning'] = 'ದಯವಿಟà³à²Ÿà³ ಒಂದೠಹೆಸರನà³à²¨à³ ನಮೂದಿಸಿ.'; +$messages['nopagesizewarning'] = 'ದಯವಿಟà³à²Ÿà³ ಒಂದೠಪà³à²Ÿà²¦ ಗಾತà³à²° ನಮೂದಿಸಿ.'; +$messages['norecipientwarning'] = 'ದಯವಿಟà³à²Ÿà³ ಕನಿಷà³à² ಒಬà³à²¬ ಸà³à²µà²¿à³•à²•à²°à²¿à²¸à³à²µà²µà²°à²¨à³à²¨à³ ನಮೂದಿಸಿ.'; +$messages['nosubjectwarning'] = '"ವಿಷಯ" ಕà³à²·à³†à³•à²¤à³à²° ಖಾಲಿಯಾಗಿದೆ. ನೀವೠಈಗ ಒಂದೠದಾಖಲಿಸಲೠಇಚà³à²›à²¿à²¸à³à²µà²¿à²°?'; +$messages['nosearchname'] = 'ದಯವಿಟà³à²Ÿà³ ಸಂಪರà³à²• ಹೆಸರೠಅಥವಾ ಇಮೇಲೠವಿಳಾಸವನà³à²¨à³ ನಮೂದಿಸಿ.'; +$messages['contactsearchsuccessful'] = '$nr ಸಂಪರà³à²•à²—ಳೠಸಿಕà³à²•à²¿à²µà³†.'; +$messages['searching'] = 'ಹà³à²¡à³à²•à²²à²¾à²—à³à²¤à³à²¤à²¿à²¦à³†...'; +$messages['checking'] = 'ಪರಿಶೀಲಿಸಲಾಗà³à²¤à³à²¤à²¿à²¦à³†...'; +$messages['nospellerrors'] = 'ಕಾಗà³à²£à²¿à²¤ ದೋಷಗಳನà³à²¨à³ ಕಂಡà³à²¬à²‚ದಿಲà³à²².'; +$messages['deletedsuccessfully'] = 'ಯಶಸà³à²µà²¿à²¯à²¾à²—ಿ ಅಳಿಸಲಾಗಿದೆ.'; +$messages['fileuploaderror'] = 'ಫೈಲೠಅಪà³à²²à³†à³‚ೕಡೠವಿಫಲವಾಗಿದೆ.'; +$messages['filesizeerror'] = 'ಅಪà³à²²à³†à³‚ೕಡೠಮಾಡಿದ ಫೈಲೠ$size ಗರಿಷà³à² ಗಾತà³à²°à²µà²¨à³à²¨à³ ಮೀರಿದೆ'; +$messages['errorsavingcontact'] = 'ಸಂಪರà³à²• ವಿಳಾಸ ಉಳಿಸಲಾಗಲಿಲà³à²².'; +$messages['selectimportfile'] = 'ಅಪà³à²²à³†à³‚ೕಡೠಮಾಡಲೠಫೈಲೠಆಯà³à²•à³† ಮಾಡಿ.'; +$messages['emailformaterror'] = 'ಅಮಾನà³à²¯à²µà²¾à²¦ ಇಮೇಲೠವಿಳಾಸ: $email'; +$messages['autocompletechars'] = 'ಸà³à²µà²¯à²‚ಪೂರà³à²£à²—ೊಳಿಸà³à²µà²¿à²•à³† ಕನಿಷà³à² $min ಅಕà³à²·à²°à²—ಳನà³à²¨à³ ನಮೂದಿಸಿ.'; +$messages['namecannotbeempty'] = 'ಹೆಸರೠಖಾಲಿ ಇರà³à²µà²‚ತಿಲà³à²².'; +$messages['nametoolong'] = 'ಹೆಸರೠತà³à²‚ಬಾ ಉದà³à²¦à²µà²¾à²—ಿದೆ.'; +$messages['mispellingsfound'] = 'ಸಂದೇಶದಲà³à²²à²¿ ಕಾಗà³à²£à²¿à²¤ ದೋಷಗಳೠಪತà³à²¤à³†à²¯à²¾à²—ಿವೆ.'; +?> diff --git a/program/localization/lb_LU/labels.inc b/program/localization/lb_LU/labels.inc index d32a263a1..edfa6e5d1 100644 --- a/program/localization/lb_LU/labels.inc +++ b/program/localization/lb_LU/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from bis $to vun $count'; $labels['copy'] = 'Kopéieren'; $labels['move'] = 'Réckelen'; $labels['moveto'] = 'Réckelen an...'; +$labels['copyto'] = 'Kopéieren op...'; $labels['download'] = 'Eroflueden'; $labels['open'] = 'Opmaachen'; $labels['showattachment'] = 'Weisen'; @@ -62,10 +63,10 @@ $labels['addtoaddressbook'] = 'An d\'Adressbuch setzen'; $labels['sun'] = 'Son'; $labels['mon'] = 'Méi'; $labels['tue'] = 'Dën'; -$labels['wed'] = 'Don'; -$labels['thu'] = 'Fre'; -$labels['fri'] = 'Sam'; -$labels['sat'] = 'Son'; +$labels['wed'] = 'Mët'; +$labels['thu'] = 'Don'; +$labels['fri'] = 'Fre'; +$labels['sat'] = 'Sam'; $labels['sunday'] = 'Sonndeg'; $labels['monday'] = 'Méindeg'; $labels['tuesday'] = 'Dënschdeg'; @@ -165,7 +166,7 @@ $labels['listorder'] = 'Sortéier-Reiefolleg'; $labels['listmode'] = 'Oplëschtungs-Modus'; $labels['folderactions'] = 'Dossiers-Aktiounen...'; $labels['compact'] = 'Kompaktéieren'; -$labels['empty'] = 'Eidel'; +$labels['empty'] = 'Eidel maachen'; $labels['importmessages'] = 'Messagen importéieren'; $labels['quota'] = 'Plazverbrauch'; $labels['unknown'] = 'onbekannt'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Orthographie'; $labels['checkspelling'] = 'Orthographie kontrolléieren'; $labels['resumeediting'] = 'Weider editéieren'; $labels['revertto'] = 'Zréck bei'; +$labels['restore'] = 'Erëmhirstellen'; +$labels['restoremessage'] = 'Message erëmhirstellen'; +$labels['responses'] = 'Äntwerten'; +$labels['insertresponse'] = 'Äntwert afügen'; +$labels['manageresponses'] = 'Äntwerte geréieren'; +$labels['savenewresponse'] = 'Nei Äntwert späicheren'; +$labels['editresponses'] = 'Äntwerten Editéieren'; +$labels['editresponse'] = 'Äntwert editéieren'; +$labels['responsename'] = 'Numm'; +$labels['responsetext'] = 'Äntwert-Text'; $labels['attach'] = 'Drunhänken'; $labels['attachments'] = 'Unhäng'; $labels['upload'] = 'Eroplueden'; @@ -316,7 +327,11 @@ $labels['searchdelete'] = 'Sich läschen'; $labels['import'] = 'Importéieren'; $labels['importcontacts'] = 'Kontakter importéieren'; $labels['importfromfile'] = 'Aus Fichier importéieren:'; +$labels['importtarget'] = 'Kontakter dobäisetze bei'; $labels['importreplace'] = 'Dat ganzt Adressbuch ersetzen'; +$labels['importgroups'] = 'Gruppen-Zouweisung importéieren'; +$labels['importgroupsall'] = 'All (nei Gruppen uleeën falls néideg)'; +$labels['importgroupsexisting'] = 'Just fir Gruppen déi schon existéieren'; $labels['importdesc'] = 'Du kanns Kontakter aus engem existéierenden Adressbuch eroplueden.<br/>Mir ënnerstëtze momentan en Adress-Import vum <a href="http://en.wikipedia.org/wiki/VCard">vCard</a>- oder CSV (mat Komma getrennt)-Date-Format.'; $labels['done'] = 'Erleedegt'; $labels['settingsfor'] = 'Astellunge fir'; @@ -424,6 +439,9 @@ $labels['standardwindows'] = 'Popup-Fënstere wéi normal Fënstere behandelen'; $labels['forwardmode'] = 'Messagë-Weiderleedung'; $labels['inline'] = 'am Message'; $labels['asattachment'] = 'als Unhank'; +$labels['replyallmode'] = 'Standard-Aktioun vum [U jiddwereen äntweren]-Knäppchen'; +$labels['replyalldefault'] = 'u jiddwereen äntweren'; +$labels['replyalllist'] = 'just der Mailinglëscht äntweren (wann eng fonnt gëtt) '; $labels['folder'] = 'Dossier'; $labels['folders'] = 'Dossieren'; $labels['foldername'] = 'Dossiersnumm'; diff --git a/program/localization/lb_LU/messages.inc b/program/localization/lb_LU/messages.inc index 8ef0b2f6c..41dada829 100644 --- a/program/localization/lb_LU/messages.inc +++ b/program/localization/lb_LU/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,8 @@ $messages['invalidrequest'] = 'Ongëlteg Ufro! Et goufe keng Date gespäichert.' $messages['invalidhost'] = 'Ongëltege Server-Numm.'; $messages['nomessagesfound'] = 'Keng Messagen an der Mailbox fonnt.'; $messages['loggedout'] = 'Du hues dech erfollegräich ofgemellt. Äddi!'; -$messages['mailboxempty'] = 'D\'Mailbox ass eidel.'; +$messages['mailboxempty'] = 'D\'Mailbox ass eidel'; +$messages['nomessages'] = 'Keng Messagen'; $messages['refreshing'] = 'Lueden nei...'; $messages['loading'] = 'Lueden...'; $messages['uploading'] = 'Fichier gëtt eropgelueden...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Message erfollegräich verschéckt.'; $messages['savingmessage'] = 'Message gëtt gespäichert...'; $messages['messagesaved'] = 'Message als Brouillon gespäichert.'; $messages['successfullysaved'] = 'Erfollegräich gespäichert.'; +$messages['savingresponse'] = 'Äntwert-Text gëtt gespäichert...'; +$messages['deleteresponseconfirm'] = 'Wëlls du dësen Äntwert-Text wierklech läschen?'; $messages['addedsuccessfully'] = 'Kontakt erfollegräich an d\'Adressbuch gesat.'; $messages['contactexists'] = 'Et existéiert schon e Kontakt mat der selweschter E-Mail-Adress.'; $messages['contactnameexists'] = 'Et existéiert schon e Kontakt mam selweschten Numm.'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'Den ugefrotene Kontakt gouf net fonnt.'; $messages['contactsearchonly'] = 'Gëff e puer Sichbegrëffer a fir Kontakter ze fannen'; $messages['sendingfailed'] = 'De Message konnt net verschéckt ginn.'; $messages['senttooquickly'] = 'Waart wann ech gelift $sec Sekonn(en) bevir s du de Message verschécks. '; +$messages['errorsavingsent'] = 'Beim Späichere vum geschéckte Message ass e Feeler opgetruden.'; +$messages['errorsaving'] = 'Beim Späicheren ass e Feeler opgetrueden.'; $messages['errormoving'] = 'D\'Messagë konnten net verréckelt ginn.'; $messages['errorcopying'] = 'D\'Messagë konnten net kopéiert ginn.'; $messages['errordeleting'] = 'D\'Messagë konnten net geläscht ginn.'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'Gëff w.e.gl op mannst een Empfänger an.'; $messages['nosubjectwarning'] = 'D\'Feld "Sujet" ass eidel. Wëlls du elo eent uginn?'; $messages['nobodywarning'] = 'Soll dëse Message ouni Text verschéckt ginn?'; $messages['notsentwarning'] = 'De Message gouf net verschéckt. Wëlls du e verwerfen?'; +$messages['restoresavedcomposedata'] = 'Et gouf e Message fonnt dee scho geschriwwen awer nach net verschéckt ginn ass.\n\nSujet: $subject\nGespäichert: $date\n\nSoll de Message recuperéiert ginn?'; $messages['noldapserver'] = 'Wiel w.e.gl en LDAP-Server fir d\'Sich aus.'; $messages['nosearchname'] = 'Gëff w.e.gl en Numm oder eng E-Mail-Adress fir de Kontakt an.'; $messages['notuploadedwarning'] = 'Net all d\'Unhäng goufen eropgelueden. Waart w.e.gl e Moment oder briech den Upload of.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'SMTP-Feeler: $msg'; $messages['emailformaterror'] = 'Ongëlteg E-Mail-Adress: $email'; $messages['toomanyrecipients'] = 'Zevill Empfänger. Reduzéier d\'Zuel vun den Empfänger op $max.'; $messages['maxgroupmembersreached'] = 'D\'Unzuel vu Gruppememberen iwwersteigt de Maximum vun $max.'; +$messages['internalerror'] = 'En interne Feeler ass opgetrueden. Probéier w.e.gl nach eng Kéier.'; $messages['contactdelerror'] = 'Kontakter konnten net geläscht ginn.'; $messages['contactdeleted'] = 'Kontakter erfollegräich geläscht.'; $messages['contactrestoreerror'] = 'Déi geläschte Kontakter konnten net recuperéiert ginn.'; diff --git a/program/localization/lt_LT/labels.inc b/program/localization/lt_LT/labels.inc index 129b0de47..63194f275 100644 --- a/program/localization/lt_LT/labels.inc +++ b/program/localization/lt_LT/labels.inc @@ -197,6 +197,14 @@ $labels['spellcheck'] = 'Tikrinti raÅ¡ybÄ…'; $labels['checkspelling'] = 'Tikrinti raÅ¡ybÄ…'; $labels['resumeediting'] = 'TÄ™sti redagavimÄ…'; $labels['revertto'] = 'Atstatyti į'; +$labels['responses'] = 'Atsakymai'; +$labels['insertresponse'] = 'Ä®terpti atsakymÄ…'; +$labels['manageresponses'] = 'Tvarkyti atsakymus'; +$labels['savenewresponse'] = 'Ä®raÅ¡yti naujÄ… atsakymÄ…'; +$labels['editresponses'] = 'Taisyti atsakymus'; +$labels['editresponse'] = 'Taisyti atsakymÄ…'; +$labels['responsename'] = 'Pavadinimas'; +$labels['responsetext'] = 'Atsakymo tekstas'; $labels['attach'] = 'PridÄ—ti failÄ…'; $labels['attachments'] = 'PridÄ—ti failai'; $labels['upload'] = 'Ä®kelti'; @@ -316,7 +324,11 @@ $labels['searchdelete'] = 'PaÅ¡alinti radinių aplankÄ…'; $labels['import'] = 'Importuoti'; $labels['importcontacts'] = 'Importuoti adresatus'; $labels['importfromfile'] = 'Importuoti iÅ¡ failo:'; +$labels['importtarget'] = 'PridÄ—ti adresatus į'; $labels['importreplace'] = 'PerraÅ¡yti visÄ… adresų knygÄ…'; +$labels['importgroups'] = 'Importuoti priskyrimus grupÄ—ms'; +$labels['importgroupsall'] = 'Visus (sukurti trÅ«kstamas grupes)'; +$labels['importgroupsexisting'] = 'Tik esamoms grupÄ—ms'; $labels['importdesc'] = 'Galite įkelti kontaktus iÅ¡ jau turimos adresų knygos. <br/>Å iuo metu galima importuoti kontaktus iÅ¡ <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> arba CSV (comma-separated) duomenų formatų.'; $labels['done'] = 'Baigta'; $labels['settingsfor'] = 'Nuostatos'; @@ -424,6 +436,9 @@ $labels['standardwindows'] = 'IÅ¡kylanÄiuosius langus traktuoti kaip įprastus' $labels['forwardmode'] = 'LaiÅ¡kų persiuntimo bÅ«das'; $labels['inline'] = 'kaip citatÄ…'; $labels['asattachment'] = 'kaip priedas'; +$labels['replyallmode'] = 'Numatytasis mygtuko „Atsakyti visiems“ veiksmas'; +$labels['replyalldefault'] = 'atsakyti visiems'; +$labels['replyalllist'] = 'atsakyti el. paÅ¡to grupei (jei aptikta)'; $labels['folder'] = 'Aplankas'; $labels['folders'] = 'Aplankai'; $labels['foldername'] = 'Aplanko vardas'; diff --git a/program/localization/lt_LT/messages.inc b/program/localization/lt_LT/messages.inc index f3feedd47..d9c83f873 100644 --- a/program/localization/lt_LT/messages.inc +++ b/program/localization/lt_LT/messages.inc @@ -44,6 +44,8 @@ $messages['messagesent'] = 'LaiÅ¡kas sÄ—kmingai nusiųstas.'; $messages['savingmessage'] = 'LaiÅ¡kas įraÅ¡omas…'; $messages['messagesaved'] = 'LaiÅ¡kas įraÅ¡ytas į JuodraÅ¡Äių aplankÄ….'; $messages['successfullysaved'] = 'SÄ—kmingai įraÅ¡yta.'; +$messages['savingresponse'] = 'Ä®raÅ¡omas atsakymo tekstas…'; +$messages['deleteresponseconfirm'] = 'Ar tikrai norite paÅ¡alinti šį atsakymo tekstÄ…?'; $messages['addedsuccessfully'] = 'Asmuo įtrauktas į adresų knygÄ….'; $messages['contactexists'] = 'Adresatas, turintis šį el. paÅ¡to adresÄ…, jau egzistuoja.'; $messages['contactnameexists'] = 'Adresatas tokiu vardu jau egzistuoja.'; @@ -54,6 +56,8 @@ $messages['contactnotfound'] = 'IeÅ¡kotas adresatas nerastas.'; $messages['contactsearchonly'] = 'Ä®veskite reikÅ¡minius žodžius adresatų paieÅ¡kai'; $messages['sendingfailed'] = 'LaiÅ¡ko iÅ¡siųsti nepavyko.'; $messages['senttooquickly'] = 'Turite luktelÄ—ti $sec sek., kad galÄ—tumÄ—te iÅ¡siųsti laiÅ¡kÄ….'; +$messages['errorsavingsent'] = 'Ä®raÅ¡ant iÅ¡siųstÄ… laiÅ¡kÄ…, įvyko klaida.'; +$messages['errorsaving'] = 'Ä®vyko klaida įraÅ¡ant.'; $messages['errormoving'] = 'LaiÅ¡ko(-ų) perkelti nepavyko.'; $messages['errorcopying'] = 'LaiÅ¡ko(-ų) nukopijuoti nepavyko.'; $messages['errordeleting'] = 'LaiÅ¡ko(-ų) paÅ¡alinti nepavyko.'; @@ -140,6 +144,7 @@ $messages['smtperror'] = 'SMTP klaida: $msg'; $messages['emailformaterror'] = 'Netinkamas el. paÅ¡to adresas: $email'; $messages['toomanyrecipients'] = 'Per daug gavÄ—jų. Sumažinkite jų bent iki $max.'; $messages['maxgroupmembersreached'] = 'GrupÄ—s narių skaiÄius virÅ¡ijo maksimalų leistinÄ… ($max).'; +$messages['internalerror'] = 'Ä®vyko klaida. PraÅ¡om bandyti iÅ¡ naujo.'; $messages['contactdelerror'] = 'Nepavyko paÅ¡alinti adresato(-ų).'; $messages['contactdeleted'] = 'Adresatas(-ai) sÄ—kmingai paÅ¡alintas(-i).'; $messages['contactrestoreerror'] = 'Nepavyko atkurti paÅ¡alinto(-ų) adresato(-ų).'; diff --git a/program/localization/lv_LV/labels.inc b/program/localization/lv_LV/labels.inc index 95afc4c49..185d75180 100644 --- a/program/localization/lv_LV/labels.inc +++ b/program/localization/lv_LV/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to no $count'; $labels['copy'] = 'KopÄ“t'; $labels['move'] = 'PÄrvietot'; $labels['moveto'] = 'PÄrvietot uz...'; +$labels['copyto'] = 'KopÄ“t uz ...'; $labels['download'] = 'lejupielÄdÄ“t'; $labels['open'] = 'AtvÄ“rt'; $labels['showattachment'] = 'RÄdÄ«t'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'IzrunÄt'; $labels['checkspelling'] = 'PÄrbaudÄ«t pareizrakstÄ«bu'; $labels['resumeediting'] = 'TurpinÄt rediģēšanu'; $labels['revertto'] = 'Atgriezt uz'; +$labels['restore'] = 'Atjaunot'; +$labels['restoremessage'] = 'Atjaunot vÄ“stuli?'; +$labels['responses'] = 'Atbildes'; +$labels['insertresponse'] = 'Ievietot atbildi'; +$labels['manageresponses'] = 'PÄrvaldÄ«t atbildes'; +$labels['savenewresponse'] = 'SaglabÄt jauno atbildi'; +$labels['editresponses'] = 'Rediģēt atbildes'; +$labels['editresponse'] = 'Rediģēt atbildi'; +$labels['responsename'] = 'VÄrds'; +$labels['responsetext'] = 'Atbildes teksts'; $labels['attach'] = 'Pievienot'; $labels['attachments'] = 'Pielikumi'; $labels['upload'] = 'AugÅ¡upielÄdÄ“t'; @@ -318,6 +329,7 @@ $labels['importcontacts'] = 'ImportÄ“t kontaktus'; $labels['importfromfile'] = 'ImportÄ“t no faila:'; $labels['importtarget'] = 'Kontaktus pievienot'; $labels['importreplace'] = 'Aizvietot visu adreÅ¡u grÄmatu'; +$labels['importgroups'] = 'ImportÄ“t grupu piesaistes'; $labels['importgroupsall'] = 'Visus (ja nepiecieÅ¡ams, izveidojiet grupas)'; $labels['importgroupsexisting'] = 'Tikai esoÅ¡Äm grupÄm'; $labels['importdesc'] = 'JÅ«s varat ieimportÄ“t kontaktus no jau esoÅ¡as adreÅ¡u grÄmatas.<br/>Uz doto brÄ«di tiek atbalstÄ«ti <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> vai CSV (ar komatu atdalÄ«tie) datu formÄti.'; @@ -427,6 +439,9 @@ $labels['standardwindows'] = 'IzlÄ“coÅ¡ie logi kÄ parasti logi'; $labels['forwardmode'] = 'VÄ“stuļu pÄrsÅ«tÄ«Å¡ana'; $labels['inline'] = 'iekļaujot'; $labels['asattachment'] = 'kÄ pielikumu'; +$labels['replyallmode'] = '[AtbildÄ“t visiem] pogas noklusÄ“tÄ darbÄ«ba'; +$labels['replyalldefault'] = 'atbildÄ“t visiem'; +$labels['replyalllist'] = 'atbildÄ“t tikai sarakstei (ja tÄda tiek atrasta)'; $labels['folder'] = 'Mapi'; $labels['folders'] = 'Mapes'; $labels['foldername'] = 'Mapes nosaukums'; diff --git a/program/localization/lv_LV/messages.inc b/program/localization/lv_LV/messages.inc index f27b01b84..6f1622c16 100644 --- a/program/localization/lv_LV/messages.inc +++ b/program/localization/lv_LV/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,6 @@ $messages['invalidrequest'] = 'NederÄ«gs pieprasÄ«jums! Dati netika saglabÄti . $messages['invalidhost'] = 'NederÄ«gs servera nosaukums'; $messages['nomessagesfound'] = 'Å ajÄ pastkastÄ“ nav vÄ“stuļu'; $messages['loggedout'] = 'JÅ«s esat veiksmÄ«gi atslÄ“dzies no sistÄ“mas. Uz redzÄ“Å¡anos!'; -$messages['mailboxempty'] = 'Pastkaste ir tukÅ¡a'; $messages['refreshing'] = 'Atjauno...'; $messages['loading'] = 'Notiek ielÄde...'; $messages['uploading'] = 'AugÅ¡upielÄde failu...'; @@ -44,6 +43,8 @@ $messages['messagesent'] = 'VÄ“stule nosÅ«tÄ«ta veiksmÄ«gi'; $messages['savingmessage'] = 'VÄ“stule tiek saglabÄta ...'; $messages['messagesaved'] = 'VÄ“stule saglabÄta Uzmetumos'; $messages['successfullysaved'] = 'VeiksmÄ«gi saglabÄts.'; +$messages['savingresponse'] = 'Tiek saglabÄts atbildes teksts ...'; +$messages['deleteresponseconfirm'] = 'Vai JÅ«s tieÅ¡Äm gribat dzÄ“st Å¡o atbildes tekstu?'; $messages['addedsuccessfully'] = 'Kontakts veiksmÄ«gi pievienots adreÅ¡u grÄmatai'; $messages['contactexists'] = 'Kontakts ar Å¡Ädu e-pasta adresi jau eksistÄ“'; $messages['contactnameexists'] = 'Kontakts ar Å¡Ädu vÄrdu jau eksistÄ“.'; @@ -54,6 +55,8 @@ $messages['contactnotfound'] = 'PieprasÄ«tais kontakts nav atrasts'; $messages['contactsearchonly'] = 'Lai atrastu kontaktus, ievadiet meklÄ“Å¡anas kritÄ“rijus'; $messages['sendingfailed'] = 'VÄ“stule netika nosÅ«tÄ«ta'; $messages['senttooquickly'] = 'LÅ«dzu uzgaidiet $sec sekundi(-es) pirms sÅ«tiet Å¡o vÄ“stuli'; +$messages['errorsavingsent'] = 'SaglabÄjot nosÅ«tÄ«to vÄ“stuli notika kļūda - vÄ“stule netika saglabÄta'; +$messages['errorsaving'] = 'SaglabÄjot vÄ“stuli notika kļūda - vÄ“stule netika saglabÄta'; $messages['errormoving'] = 'VÄ“stule(s) netika pÄrvietota(s)'; $messages['errorcopying'] = 'VÄ“stules pÄrkopÄ“t neizdevÄs'; $messages['errordeleting'] = 'VÄ“stules izdzÄ“st neizdevÄs'; @@ -78,6 +81,7 @@ $messages['norecipientwarning'] = 'LÅ«dzu ievadiet vismaz vienu saņēmÄ“ju'; $messages['nosubjectwarning'] = 'Lauks "temats" ir tukÅ¡s. Vai vÄ“laties to aizpildÄ«t tagad?'; $messages['nobodywarning'] = 'SÅ«tÄ«t vÄ“stuli bez teksta?'; $messages['notsentwarning'] = 'VÄ“stule netika nosÅ«tÄ«ta. Vai tieÅ¡Äm vÄ“laties atcelt vÄ“stules rakstÄ«Å¡anu?'; +$messages['restoresavedcomposedata'] = 'Ir atrasta pirms kÄda laika uzrakstÄ«ta, bet nenosÅ«tÄ«ta vÄ“stule.\n\nTÄ“ma: $subject\nSaglabÄta:$date\n\nVai atjaunot Å¡o vÄ“stuli?'; $messages['noldapserver'] = 'Lai meklÄ“tu, lÅ«dzu izvÄ“laties LDAP serveri'; $messages['nosearchname'] = 'LÅ«dzu ievadiet kontaktpersonas vÄrdu vai e-pasta adresi'; $messages['notuploadedwarning'] = 'Visi pielikumi vÄ“l nav augÅ¡upielÄdÄ“ti - lÅ«dzu uzgaidiet vai atceļiet augÅ¡upielÄdi'; @@ -140,6 +144,7 @@ $messages['smtperror'] = 'SMTP kļūda: $msg'; $messages['emailformaterror'] = 'Nepareiza e-pasta adrese: $email'; $messages['toomanyrecipients'] = 'PÄrÄk daudz saņēmÄ“ju. Samaziniet skaitu lÄ«dz $max.'; $messages['maxgroupmembersreached'] = 'Grupas dalÄ«bnieku skaits pÄrsniedz limitu $max.'; +$messages['internalerror'] = 'AtgadÄ«jÄs servera iekÅ¡Ä“jÄ kļūda. LÅ«dzu mÄ“Ä£iniet vÄ“lreiz.'; $messages['contactdelerror'] = 'Kontaktus izdzÄ“st neizdevÄs.'; $messages['contactdeleted'] = 'Kontakti izdzÄ“sti veiksmÄ«gi.'; $messages['contactrestoreerror'] = 'IzdzÄ“stos kontaktus atjaunot neizdevÄs.'; diff --git a/program/localization/ml_IN/messages.inc b/program/localization/ml_IN/messages.inc index 9abaeda99..5d6d9f011 100644 --- a/program/localization/ml_IN/messages.inc +++ b/program/localization/ml_IN/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/localization/nl_NL/labels.inc b/program/localization/nl_NL/labels.inc index f0e4a74b4..e4f4794b6 100644 --- a/program/localization/nl_NL/labels.inc +++ b/program/localization/nl_NL/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to van $count'; $labels['copy'] = 'Kopiëren'; $labels['move'] = 'Verplaats'; $labels['moveto'] = 'Verplaats naar...'; +$labels['copyto'] = 'Kopiëren naar...'; $labels['download'] = 'Download'; $labels['open'] = 'Openen'; $labels['showattachment'] = 'Toon'; @@ -105,7 +106,7 @@ $labels['writenewmessage'] = 'Maak een nieuw bericht'; $labels['reply'] = 'Beantwoorden'; $labels['replytomessage'] = 'Beantwoord het bericht'; $labels['replytoallmessage'] = 'Beantwoord lijst of afzender en alle ontvangers'; -$labels['replyall'] = 'Beantwoord alle ontvangers'; +$labels['replyall'] = 'Beantwoord iedereen'; $labels['replylist'] = 'Beantwoord lijst'; $labels['forward'] = 'Doorsturen'; $labels['forwardinline'] = 'Doorsturen in bericht'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Spelling'; $labels['checkspelling'] = 'Controleer spelling'; $labels['resumeediting'] = 'Doorgaan met opstellen'; $labels['revertto'] = 'Terugwijzigen in'; +$labels['restore'] = 'Herstellen'; +$labels['restoremessage'] = 'Bericht herstellen?'; +$labels['responses'] = 'Reacties'; +$labels['insertresponse'] = 'Reactie invoegen'; +$labels['manageresponses'] = 'Reacties beheren'; +$labels['savenewresponse'] = 'Nieuwe reactie opslaan'; +$labels['editresponses'] = 'Bewerk reactie'; +$labels['editresponse'] = 'Bewerk reactie'; +$labels['responsename'] = 'Naam'; +$labels['responsetext'] = 'Reactie'; $labels['attach'] = 'Bijvoegen'; $labels['attachments'] = 'Bijlagen'; $labels['upload'] = 'Toevoegen'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Behandel pop-ups als normale vensters'; $labels['forwardmode'] = 'Berichten doorsturen'; $labels['inline'] = 'invoegen'; $labels['asattachment'] = 'als bijlage'; +$labels['replyallmode'] = 'Standaardactie van [Beantwoord iedereen]-knop'; +$labels['replyalldefault'] = 'iedereen beantwoorden'; +$labels['replyalllist'] = 'alleen maillijst beantwoorden (indien gevonden)'; $labels['folder'] = 'Map'; $labels['folders'] = 'Mappen'; $labels['foldername'] = 'Mapnaam'; diff --git a/program/localization/nl_NL/messages.inc b/program/localization/nl_NL/messages.inc index 22f9e0f6b..2595c2259 100644 --- a/program/localization/nl_NL/messages.inc +++ b/program/localization/nl_NL/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,8 @@ $messages['invalidrequest'] = 'Ongeldige aanvraag! Er zijn geen gegevens opgesla $messages['invalidhost'] = 'Ongeldige servernaam.'; $messages['nomessagesfound'] = 'Geen berichten gevonden in deze mailbox.'; $messages['loggedout'] = 'Succesvol uitgelogd. Tot ziens!'; -$messages['mailboxempty'] = 'Mailbox is leeg.'; +$messages['mailboxempty'] = 'Mailbox is leeg'; +$messages['nomessages'] = 'Geen berichten'; $messages['refreshing'] = 'Vernieuwen...'; $messages['loading'] = 'Laden...'; $messages['uploading'] = 'Bestand wordt geüpload...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Bericht succesvol verstuurd.'; $messages['savingmessage'] = 'Bericht wordt opgeslagen...'; $messages['messagesaved'] = 'Bericht opgeslagen in Concepten.'; $messages['successfullysaved'] = 'Succesvol opgeslagen.'; +$messages['savingresponse'] = 'Reactie wordt opgeslagen...'; +$messages['deleteresponseconfirm'] = 'Weet u zeker dat u deze reactie wilt verwijderen?'; $messages['addedsuccessfully'] = 'Contactpersoon succesvol toegevoegd aan het adresboek.'; $messages['contactexists'] = 'Er bestaat al een contactpersoon met dit e-mailadres.'; $messages['contactnameexists'] = 'Er bestaat al een contactpersoon met deze naam.'; @@ -80,6 +83,7 @@ $messages['norecipientwarning'] = 'Geef tenminste één ontvanger op.'; $messages['nosubjectwarning'] = 'U heeft geen onderwerp ingevoerd. Wilt u nu een onderwerp opgeven?'; $messages['nobodywarning'] = 'Dit bericht zonder inhoud versturen?'; $messages['notsentwarning'] = 'Het bericht is niet verstuurd. Wilt u uw bericht weggooien?'; +$messages['restoresavedcomposedata'] = 'Eerder opgesteld, maar niet-verzonden bericht gevonden.\n\nOnderwerp: $subject\nOpgeslagen: $date\n\nWilt u dit bericht herstellen?'; $messages['noldapserver'] = 'Selecteer een LDAP-server om te zoeken.'; $messages['nosearchname'] = 'Vul de naam of e-mailadres in van een contactpersoon.'; $messages['notuploadedwarning'] = 'Nog niet alle bijlagen zijn geüpload. Wacht even of annuleer de upload.'; diff --git a/program/localization/pl_PL/labels.inc b/program/localization/pl_PL/labels.inc index 4c13fb7c6..741306b5c 100644 --- a/program/localization/pl_PL/labels.inc +++ b/program/localization/pl_PL/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from - $to z $count'; $labels['copy'] = 'Kopiuj'; $labels['move'] = 'PrzenieÅ›'; $labels['moveto'] = 'PrzenieÅ› do...'; +$labels['copyto'] = 'Kopiuj do...'; $labels['download'] = 'Pobierz'; $labels['open'] = 'Otwórz'; $labels['showattachment'] = 'Pokaż'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Pisownia'; $labels['checkspelling'] = 'Sprawdź pisowniÄ™'; $labels['resumeediting'] = 'ZakoÅ„cz sprawdzanie pisowni'; $labels['revertto'] = 'Powróć do'; +$labels['restore'] = 'Przywróć'; +$labels['restoremessage'] = 'Przyrócić wiadomość?'; +$labels['responses'] = 'Odpowiedzi'; +$labels['insertresponse'] = 'Wstaw odpowiedź'; +$labels['manageresponses'] = 'ZarzÄ…dzaj odpowiedziami'; +$labels['savenewresponse'] = 'Zapisz nowÄ… odpowiedź'; +$labels['editresponses'] = 'Edytuj odpowiedzi'; +$labels['editresponse'] = 'Edytuj odpowiedź'; +$labels['responsename'] = 'Nazwa'; +$labels['responsetext'] = 'Tekst odpowiedzi'; $labels['attach'] = 'ZaÅ‚Ä…cz'; $labels['attachments'] = 'ZaÅ‚Ä…czniki'; $labels['upload'] = 'PrzeÅ›lij'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Traktuj okna wyskakujÄ…ce jako standardowe okna'; $labels['forwardmode'] = 'Przekazywanie wiadomoÅ›ci'; $labels['inline'] = 'w treÅ›ci'; $labels['asattachment'] = 'jako zaÅ‚Ä…cznik'; +$labels['replyallmode'] = 'DomyÅ›la akcja przycisku [Odpowiedz wszystkim]'; +$labels['replyalldefault'] = 'odpowiedz wszystkim'; +$labels['replyalllist'] = 'odpowiedz tylko do listy mailingowej (jeÅ›li wykryto)'; $labels['folder'] = 'Folder'; $labels['folders'] = 'Foldery'; $labels['foldername'] = 'Nazwa folderu'; diff --git a/program/localization/pl_PL/messages.inc b/program/localization/pl_PL/messages.inc index 0ad357b69..fd4583c83 100644 --- a/program/localization/pl_PL/messages.inc +++ b/program/localization/pl_PL/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,8 @@ $messages['invalidrequest'] = 'BÅ‚Ä™dne żądanie! Nie zapisano danych.'; $messages['invalidhost'] = 'BÅ‚Ä™dna nazwa serwera.'; $messages['nomessagesfound'] = 'Brak wiadomoÅ›ci w skrzynce.'; $messages['loggedout'] = 'Użytkownik wylogowaÅ‚ siÄ™ poprawnie.'; -$messages['mailboxempty'] = 'Skrzynka jest pusta!'; +$messages['mailboxempty'] = 'Folder jest pusty'; +$messages['nomessages'] = 'Brak wiadomoÅ›ci'; $messages['refreshing'] = 'OdÅ›wieżanie...'; $messages['loading'] = 'Åadowanie...'; $messages['uploading'] = 'Zapisywanie pliku...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Wiadomość zostaÅ‚a wysÅ‚ana.'; $messages['savingmessage'] = 'Zapisywanie wiadomoÅ›ci...'; $messages['messagesaved'] = 'Wiadomość zostaÅ‚a zapisana w folderze Kopie robocze.'; $messages['successfullysaved'] = 'Zapisano pomyÅ›lnie.'; +$messages['savingresponse'] = 'Zapisywanie tekstu odpowiedzi...'; +$messages['deleteresponseconfirm'] = 'Czy na pewno chcesz usunąć tÄ… odpowiedź?'; $messages['addedsuccessfully'] = 'Kontakt zostaÅ‚ dodany.'; $messages['contactexists'] = 'Kontakt o podanym adresie e-mail już istnieje!'; $messages['contactnameexists'] = 'Kontakt z podanÄ… nazwÄ… już istnieje!'; @@ -80,6 +83,7 @@ $messages['norecipientwarning'] = 'Podaj co najmniej jednego odbiorcÄ™!'; $messages['nosubjectwarning'] = 'Nie podano tematu wiadomoÅ›ci. Czy chcesz go teraz uzupeÅ‚nić?'; $messages['nobodywarning'] = 'Ta wiadomość jest pusta, czy mimo to chcesz jÄ… wysÅ‚ać?'; $messages['notsentwarning'] = 'Wiadomość nie zostaÅ‚a wysÅ‚ana. Czy chcesz usunąć tÄ™ wiadomość?'; +$messages['restoresavedcomposedata'] = 'Wykryto poprzednio tworzonÄ… ale nie wysÅ‚anÄ… wiadomość.\n\nTemat: $subject\nZapisano: $date\n\nCzy przywrócić tÄ… wiadomość?'; $messages['noldapserver'] = 'Wybierz serwer LDAP!'; $messages['nosearchname'] = 'Podaj nazwÄ™ kontaktu lub jego adres e-mail.'; $messages['notuploadedwarning'] = 'Nie wszystkie zaÅ‚Ä…czniki zostaÅ‚y pobrane. Poczekaj lub anuluj pobieranie.'; diff --git a/program/localization/pt_BR/labels.inc b/program/localization/pt_BR/labels.inc index 13db63e99..e5aececc9 100644 --- a/program/localization/pt_BR/labels.inc +++ b/program/localization/pt_BR/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from - $to de $count'; $labels['copy'] = 'Copiar'; $labels['move'] = 'Mover'; $labels['moveto'] = 'Mover para...'; +$labels['copyto'] = 'Copiar para...'; $labels['download'] = 'Baixar'; $labels['open'] = 'Abrir'; $labels['showattachment'] = 'Exibir'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Revisar'; $labels['checkspelling'] = 'Verificar ortografia'; $labels['resumeediting'] = 'Continuar a edição'; $labels['revertto'] = 'Reverter para'; +$labels['restore'] = 'Restaurar'; +$labels['restoremessage'] = 'Restaurar mensagem?'; +$labels['responses'] = 'Respostas'; +$labels['insertresponse'] = 'Inserir uma resposta'; +$labels['manageresponses'] = 'Gerenciar respostas'; +$labels['savenewresponse'] = 'Salvar nova resposta'; +$labels['editresponses'] = 'Editar respostas'; +$labels['editresponse'] = 'Editar resposta'; +$labels['responsename'] = 'Nome'; +$labels['responsetext'] = 'Texto da resposta'; $labels['attach'] = 'Anexar'; $labels['attachments'] = 'Anexos'; $labels['upload'] = 'Enviar arquivo'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Usar popups como janelas do navegador'; $labels['forwardmode'] = 'Encaminhamento de mensagens'; $labels['inline'] = 'Em linha (no corpo da mensagem)'; $labels['asattachment'] = 'como anexo'; +$labels['replyallmode'] = 'Ação padrão do botão [Responder a todos]'; +$labels['replyalldefault'] = 'responder a todos'; +$labels['replyalllist'] = 'responder somente à lista de discussão (se identificada)'; $labels['folder'] = 'Pasta'; $labels['folders'] = 'Pastas'; $labels['foldername'] = 'Nome da pasta'; diff --git a/program/localization/pt_BR/messages.inc b/program/localization/pt_BR/messages.inc index 2f5782373..0fcb27ff7 100644 --- a/program/localization/pt_BR/messages.inc +++ b/program/localization/pt_BR/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -33,6 +33,7 @@ $messages['invalidhost'] = 'Endereço de servidor inválido.'; $messages['nomessagesfound'] = 'Nenhuma mensagem encontrada nessa caixa de mensagens'; $messages['loggedout'] = 'Sua sessão foi finalizada com sucesso. Até logo!'; $messages['mailboxempty'] = 'A caixa de mensagens está vazia'; +$messages['nomessages'] = 'Sem mensagens'; $messages['refreshing'] = 'Atualizando...'; $messages['loading'] = 'Carregando...'; $messages['uploading'] = 'Enviando arquivo...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Mensagem enviada com sucesso'; $messages['savingmessage'] = 'Salvando Mensagem...'; $messages['messagesaved'] = 'Mensagem salva em Rascunhos'; $messages['successfullysaved'] = 'Salvo com sucesso'; +$messages['savingresponse'] = 'Salvando texto de resposta...'; +$messages['deleteresponseconfirm'] = 'Você realmente deseja apagar este texto de resposta?'; $messages['addedsuccessfully'] = 'Contato incluÃdo com sucesso no catálogo de endereços.'; $messages['contactexists'] = 'Já existe um contato com esse mesmo e-mail.'; $messages['contactnameexists'] = 'Já existe um contato com o mesmo nome.'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'O contato solicitado não foi encontrado.'; $messages['contactsearchonly'] = 'Informe os termos de pesquisa para localizar os contatos'; $messages['sendingfailed'] = 'Falha no envio da mensagem.'; $messages['senttooquickly'] = 'Aguarde $sec s para enviar a mensagem.'; +$messages['errorsavingsent'] = 'Ocorreu um erro ao salvar a mensagem enviada.'; +$messages['errorsaving'] = 'Ocorreu um erro ao salvar.'; $messages['errormoving'] = 'Não foi possÃvel mover a(s) mensagem(ns).'; $messages['errorcopying'] = 'Não foi possÃvel copiar a(s) mensagem(ns).'; $messages['errordeleting'] = 'Não foi possÃvel apagar a(s) mensagem(ns).'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'Por favor, informe pelo menos um destinatári $messages['nosubjectwarning'] = 'O campo "Assunto" está vazio. Deseja incluÃ-lo agora?'; $messages['nobodywarning'] = 'Enviar a mensagem sem texto?'; $messages['notsentwarning'] = 'A mensagem não foi enviada. Deseja descartar sua mensagem?'; +$messages['restoresavedcomposedata'] = 'Uma mensagem criada anteriormente, mas não enviada, foi localizada.\n\nTÃtulo: $subject\nSalva em: $date\n\nDeseja restaurar esta mensagem?'; $messages['noldapserver'] = 'Por favor, selecione um servidor LDAP para a pesquisa'; $messages['nosearchname'] = 'Por favor, informe o nome do contato ou seu endereço de e-mail.'; $messages['notuploadedwarning'] = 'Há anexos ainda não enviados. Aguarde ou cancele o envio.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'Erro SMTP: $msg'; $messages['emailformaterror'] = 'Endereço de e-mail inválido: $email'; $messages['toomanyrecipients'] = 'Há muitos destinatários. Reduza o número de destinatários para $max.'; $messages['maxgroupmembersreached'] = 'O número de membros do grupo excede o máximo de $max'; +$messages['internalerror'] = 'Ocorreu um erro interno. Por favor tente novamente.'; $messages['contactdelerror'] = 'Não foi possÃvel excluir o(s) contato(s).'; $messages['contactdeleted'] = 'Contato(s) excluÃdo(s) com sucesso.'; $messages['contactrestoreerror'] = 'Não foi possivel recuperar o(s) contato(s) excluÃdo(s).'; diff --git a/program/localization/pt_PT/labels.inc b/program/localization/pt_PT/labels.inc index b12830031..457a308f2 100644 --- a/program/localization/pt_PT/labels.inc +++ b/program/localization/pt_PT/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to de $count'; $labels['copy'] = 'Copiar'; $labels['move'] = 'Mover'; $labels['moveto'] = 'mover para...'; +$labels['copyto'] = 'Copiar para...'; $labels['download'] = 'descarregar'; $labels['open'] = 'Abrir'; $labels['showattachment'] = 'Mostrar'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Corrector Ortográfico'; $labels['checkspelling'] = 'Verificar ortografia'; $labels['resumeediting'] = 'Continuar a edição'; $labels['revertto'] = 'Reverter para'; +$labels['restore'] = 'Restaurar'; +$labels['restoremessage'] = 'Restaurar mensagem?'; +$labels['responses'] = 'Respostas'; +$labels['insertresponse'] = 'Insira uma resposta'; +$labels['manageresponses'] = 'Gerir respostas'; +$labels['savenewresponse'] = 'Gravar nova resposta'; +$labels['editresponses'] = 'Editar respostas'; +$labels['editresponse'] = 'Editar resposta'; +$labels['responsename'] = 'Nome'; +$labels['responsetext'] = 'Texto da resposta'; $labels['attach'] = 'Anexar'; $labels['attachments'] = 'Anexos'; $labels['upload'] = 'Carregar'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Lidar com popups como janelas padrão'; $labels['forwardmode'] = 'Reencaminhamento de mensagens'; $labels['inline'] = 'em linha'; $labels['asattachment'] = 'como anexo'; +$labels['replyallmode'] = 'Ação predefinida do botão [Responder a todos]'; +$labels['replyalldefault'] = 'responder a todos'; +$labels['replyalllist'] = 'responder só à lista de discussão (se identificada)'; $labels['folder'] = 'Pasta'; $labels['folders'] = 'Pastas'; $labels['foldername'] = 'Nome da pasta'; diff --git a/program/localization/pt_PT/messages.inc b/program/localization/pt_PT/messages.inc index 06e78198d..a6618d33e 100644 --- a/program/localization/pt_PT/messages.inc +++ b/program/localization/pt_PT/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -33,6 +33,7 @@ $messages['invalidhost'] = 'Nome do servidor inválido.'; $messages['nomessagesfound'] = 'Não existem mensagens nesta pasta.'; $messages['loggedout'] = 'A sua sessão foi encerrada com sucesso. Até breve!'; $messages['mailboxempty'] = 'A caixa de entrada está vazia'; +$messages['nomessages'] = 'Não existem mensagens'; $messages['refreshing'] = 'A actualizar...'; $messages['loading'] = 'A carregar...'; $messages['uploading'] = 'A enviar ficheiro...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Mensagem enviada com sucesso'; $messages['savingmessage'] = 'A guardar mensagem...'; $messages['messagesaved'] = 'Mensagem guardada como rascunho'; $messages['successfullysaved'] = 'Guardado com sucesso'; +$messages['savingresponse'] = 'A guardar texto de resposta...'; +$messages['deleteresponseconfirm'] = 'Deseja realmente apagar este texto de resposta?'; $messages['addedsuccessfully'] = 'Contacto adicionado com sucesso'; $messages['contactexists'] = 'Já existe um contacto com este e-mail'; $messages['contactnameexists'] = 'Já existe um contacto com este nome.'; @@ -80,6 +83,7 @@ $messages['norecipientwarning'] = 'Por favor, insira pelo menos um destinatário $messages['nosubjectwarning'] = 'O campo "Assunto" não foi preenchido. Deseja incluÃ-lo agora?'; $messages['nobodywarning'] = 'Enviar a mensagem sem texto?'; $messages['notsentwarning'] = 'A mensagem não foi enviada, deseja apagá-la?'; +$messages['restoresavedcomposedata'] = 'Uma mensagem, anteriormente, composta mas não enviada foi encontrado.\n\nAssunto: $subject\nGuardada: $date\n\nDeseja restaurar esta mensagem?'; $messages['noldapserver'] = 'Seleccione um servidor LDAP para efectuar a pesquisa'; $messages['nosearchname'] = 'Por favor, insira o nome do contacto ou endereço de e-mail'; $messages['notuploadedwarning'] = 'Nem todos os anexos foram ainda enviados. Por favor aguarde ou cancele o envio.'; diff --git a/program/localization/ro_RO/messages.inc b/program/localization/ro_RO/messages.inc index c3e74597f..fb555ad47 100644 --- a/program/localization/ro_RO/messages.inc +++ b/program/localization/ro_RO/messages.inc @@ -44,6 +44,8 @@ $messages['messagesent'] = 'Mesajul a fost trimis cu succes!'; $messages['savingmessage'] = 'Salvare mesaj...'; $messages['messagesaved'] = 'Mesajul a fost salvat în Ciorne'; $messages['successfullysaved'] = 'Salvat cu succes.'; +$messages['savingresponse'] = 'Se salvează textul pentru răspuns...'; +$messages['deleteresponseconfirm'] = 'Chiar vrei să È™tergi acest text pentru răspuns?'; $messages['addedsuccessfully'] = 'Contactul a fost adăugat cu succes în agendă'; $messages['contactexists'] = 'Un contact cu această adresă de e-mail există deja.'; $messages['contactnameexists'] = 'Există deja un contact cu acelaÅŸi nume.'; @@ -54,6 +56,8 @@ $messages['contactnotfound'] = 'Contactul solicitat nu a fost găsit.'; $messages['contactsearchonly'] = 'Introdu niÅŸte termeni de căutare pentru a găsi contactele'; $messages['sendingfailed'] = 'Nu s-a reuÅŸit trimiterea mesajului'; $messages['senttooquickly'] = 'Vă rugăm aÅŸteptaÅ£i $sec sec. înainte de a trimite acest mesaj'; +$messages['errorsavingsent'] = 'A intervenit o eroare în timp ce se efectua salvarea mesajului trimis.'; +$messages['errorsaving'] = 'A intervenit o eroare în timp ce se efectua salvarea.'; $messages['errormoving'] = 'Nu am putut muta mesajul (mesajele).'; $messages['errorcopying'] = 'Nu am putut copia mesajul (mesajele).'; $messages['errordeleting'] = 'Nu am putut ÅŸterge mesajul (mesajele).'; @@ -140,6 +144,7 @@ $messages['smtperror'] = 'Eroare SMTP: $msg'; $messages['emailformaterror'] = 'Adresă de e-mail incorectă: $email'; $messages['toomanyrecipients'] = 'Prea mulÅ£i destinatari. ReduceÅ£i numărul de destinatari la $max.'; $messages['maxgroupmembersreached'] = 'Numărul de membri ai grupului depăşeÅŸte maximul de $max.'; +$messages['internalerror'] = 'A avut loc o eroare internă. Te rog încearcă din nou.'; $messages['contactdelerror'] = 'Nu am putut ÅŸterge contact(ele).'; $messages['contactdeleted'] = 'Contact(ele) au fost ÅŸterse cu succes.'; $messages['contactrestoreerror'] = 'Nu am putut restaura contact(ele) ÅŸterse.'; diff --git a/program/localization/ru_RU/labels.inc b/program/localization/ru_RU/labels.inc index 109793666..6df06a56b 100644 --- a/program/localization/ru_RU/labels.inc +++ b/program/localization/ru_RU/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to из $count'; $labels['copy'] = 'Копировать'; $labels['move'] = 'ПеремеÑтить'; $labels['moveto'] = 'ПеремеÑтить в...'; +$labels['copyto'] = 'Копировать в...'; $labels['download'] = 'Загрузить'; $labels['open'] = 'Открыть'; $labels['showattachment'] = 'Показать'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'ОрфографиÑ'; $labels['checkspelling'] = 'Проверить орфографию'; $labels['resumeediting'] = 'Продолжить редактирование'; $labels['revertto'] = 'Отменить правки'; +$labels['restore'] = 'ВоÑÑтановить'; +$labels['restoremessage'] = 'ВоÑÑтановить Ñообщение?'; +$labels['responses'] = 'Ответы'; +$labels['insertresponse'] = 'Ð’Ñтавить ответ'; +$labels['manageresponses'] = 'Управление ответами'; +$labels['savenewresponse'] = 'Сохранить новый ответ'; +$labels['editresponses'] = 'Редактировать ответы'; +$labels['editresponse'] = 'Редактировать ответ'; +$labels['responsename'] = 'Ðазвание'; +$labels['responsetext'] = 'ТекÑта ответа'; $labels['attach'] = 'Вложить'; $labels['attachments'] = 'ВложениÑ'; $labels['upload'] = 'Загрузить'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Обрабатывать вÑплывающие о $labels['forwardmode'] = 'ПереÑылка Ñообщений'; $labels['inline'] = 'в текÑте'; $labels['asattachment'] = 'как вложение'; +$labels['replyallmode'] = 'ДейÑтвие по умолчанию кнопки [Ответить вÑем]'; +$labels['replyalldefault'] = 'ответить вÑем'; +$labels['replyalllist'] = 'ответить только в ÑпиÑок раÑÑылки (еÑли найден)'; $labels['folder'] = 'Папка'; $labels['folders'] = 'Папки'; $labels['foldername'] = 'Ð˜Ð¼Ñ Ð¿Ð°Ð¿ÐºÐ¸'; diff --git a/program/localization/ru_RU/messages.inc b/program/localization/ru_RU/messages.inc index d8da5ee5c..8dfbe3df8 100644 --- a/program/localization/ru_RU/messages.inc +++ b/program/localization/ru_RU/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,8 @@ $messages['invalidrequest'] = 'Ðеверный запроÑ! Информаци $messages['invalidhost'] = 'Ðеверное Ð¸Ð¼Ñ Ñервера.'; $messages['nomessagesfound'] = 'Сообщений не найдено'; $messages['loggedout'] = 'Ваша ÑеÑÑÐ¸Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð°. Ð’Ñего доброго!'; -$messages['mailboxempty'] = 'Почтовый Ñщик пуÑÑ‚.'; +$messages['mailboxempty'] = 'Почтовый Ñщик пуÑÑ‚'; +$messages['nomessages'] = 'Ð¡Ð¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾Ñ‚ÑутÑтвуют'; $messages['refreshing'] = 'Обновление...'; $messages['loading'] = 'Загрузка...'; $messages['uploading'] = 'Файл загружаетÑÑ…'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Сообщение отправлено.'; $messages['savingmessage'] = 'Сохранение ÑообщениÑ...'; $messages['messagesaved'] = 'Сохранено в Черновиках.'; $messages['successfullysaved'] = 'Сохранено.'; +$messages['savingresponse'] = 'Сохранение текÑта ответа...'; +$messages['deleteresponseconfirm'] = 'Ð’Ñ‹ дейÑтвительно хотите удалить Ñтот текÑÑ‚ ответа?'; $messages['addedsuccessfully'] = 'Контакт добавлен в адреÑную книгу.'; $messages['contactexists'] = 'Контакт Ñ Ñтим адреÑом e-mail уже ÑущеÑтвует.'; $messages['contactnameexists'] = 'Контакт Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже ÑущеÑтвует.'; @@ -80,6 +83,7 @@ $messages['norecipientwarning'] = 'ПожалуйÑта, введите Ñ…Ð¾Ñ‚Ñ $messages['nosubjectwarning'] = 'Поле Тема не заполнено. Хотите заполнить его ÑейчаÑ?'; $messages['nobodywarning'] = 'Отправить Ñообщение без текÑта?'; $messages['notsentwarning'] = 'Сообщение не было отправлено. Ð’Ñ‹ хотите отказатьÑÑ Ð¾Ñ‚ отправки?'; +$messages['restoresavedcomposedata'] = 'Ðайдено ранее ÑоÑтавленное, но неотправленное Ñообщение.\n\nТема: $subject\nСохранено: $date\n\nХотите воÑÑтановить Ñто Ñообщение?'; $messages['noldapserver'] = 'ПожалуйÑта, выберите LDAP Ñервер Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка.'; $messages['nosearchname'] = 'ПожалуйÑта, введите Ð¸Ð¼Ñ Ð¸Ð»Ð¸ Ð°Ð´Ñ€ÐµÑ E-Mail'; $messages['notuploadedwarning'] = 'Ð’Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð·Ð°Ð³Ñ€ÑƒÐ¶ÐµÐ½Ñ‹ не полноÑтью. Подождите или отмените загрузку.'; diff --git a/program/localization/sk_SK/csv2vcard.inc b/program/localization/sk_SK/csv2vcard.inc new file mode 100644 index 000000000..c53273af5 --- /dev/null +++ b/program/localization/sk_SK/csv2vcard.inc @@ -0,0 +1,84 @@ +<?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: Marek MeÄiar <mmmeciar@gmail.com> | + +-----------------------------------------------------------------------+ +*/ +$map = array(); +$map['anniversary'] = "VýroÄie"; +$map['assistants_name'] = "Meno asistenta"; +$map['assistants_phone'] = "Telefón asistenta"; +$map['birthday'] = "Narodeniny"; +$map['business_city'] = "Mesto (práca)"; +$map['business_countryregion'] = "Krajina/oblasÅ¥ (práca)"; +$map['business_fax'] = "Fax do práce"; +$map['business_phone'] = "Telefón do práce"; +$map['business_phone_2'] = "Telefón do práce 2"; +$map['business_postal_code'] = "PSÄŒ (práca)"; +$map['business_state'] = "Okres (práca)"; +$map['business_street'] = "Ulica (práca)"; +$map['car_phone'] = "Autotelefón"; +$map['categories'] = "Kategórie"; +$map['company'] = "SpoloÄnosÅ¥"; +$map['department'] = "Oddelenie"; +$map['email_address'] = "E-mailová adresa"; +$map['first_name'] = "Krstné meno"; +$map['gender'] = "Pohlavie"; +$map['home_city'] = "Mesto (domov)"; +$map['home_countryregion'] = "Krajina/oblasÅ¥ (domov)"; +$map['home_fax'] = "Fax domov"; +$map['home_phone'] = "Telefón domov"; +$map['home_phone_2'] = "Telefón domov 2"; +$map['home_postal_code'] = "PSÄŒ (domov)"; +$map['home_state'] = "Okres (domov)"; +$map['home_street'] = "Ulica (domov)"; +$map['job_title'] = "Funkcia"; +$map['last_name'] = "Priezvisko"; +$map['managers_name'] = "Meno manažéra"; +$map['middle_name'] = "ÄŽalÅ¡ie meno"; +$map['mobile_phone'] = "Mobilný telefón"; +$map['notes'] = "Poznámky"; +$map['other_city'] = "Iné mesto"; +$map['other_countryregion'] = "Krajina/oblasÅ¥ (iné)"; +$map['other_fax'] = "Iný fax"; +$map['other_phone'] = "Iný telefón"; +$map['other_postal_code'] = "Iné PSÄŒ"; +$map['other_state'] = "Krajina/oblasÅ¥ (iné)"; +$map['other_street'] = "Iná ulica"; +$map['pager'] = "Operátor"; +$map['primary_phone'] = "Primárny telefón"; +$map['spouse'] = "Manžel(ka)"; +$map['suffix'] = "PrÃpona"; +$map['title'] = "Titul"; +$map['web_page'] = "Webová stránka"; +$map['birth_day'] = "Deň narodenia"; +$map['birth_month'] = "Mesiac narodenia"; +$map['birth_year'] = "Rok narodenia"; +$map['display_name'] = "Zobrazované meno"; +$map['fax_number'] = "Fax"; +$map['home_address'] = "Adresa domov"; +$map['home_country'] = "Å tát domov"; +$map['home_zipcode'] = "PSÄŒ domov"; +$map['mobile_number'] = "Mobil"; +$map['nickname'] = "Prezývka"; +$map['organization'] = "Organizácia"; +$map['pager_number'] = "Pager"; +$map['primary_email'] = "E-mailová adresa"; +$map['secondary_email'] = "ÄŽalÅ¡ia e-mailová adresa"; +$map['web_page_1'] = "Webová stránka 1"; +$map['web_page_2'] = "Webová stránka 2"; +$map['work_phone'] = "Telefón do zamestnania"; +$map['work_address'] = "Pracovná adresa"; +$map['work_country'] = "Å tát zamestnania"; +$map['work_zipcode'] = "PSÄŒ zamestnania"; diff --git a/program/localization/sk_SK/labels.inc b/program/localization/sk_SK/labels.inc index 36d9850a0..630869bea 100644 --- a/program/localization/sk_SK/labels.inc +++ b/program/localization/sk_SK/labels.inc @@ -29,34 +29,35 @@ $labels['drafts'] = 'Koncepty'; $labels['sent'] = 'Odoslané'; $labels['trash'] = 'Kôš'; $labels['junk'] = 'Nevyžiadaná poÅ¡ta'; -$labels['show_real_foldernames'] = 'Pri osobitných prieÄinkoch zobrazovaÅ¥ reálne názvy'; +$labels['show_real_foldernames'] = 'Pri osobitných prieÄinkoch zobrazovaÅ¥ skutoÄné názvy'; $labels['subject'] = 'Predmet'; -$labels['from'] = 'Odosielateľ'; +$labels['from'] = 'Od'; $labels['sender'] = 'Odosielateľ'; -$labels['to'] = 'Adresát'; +$labels['to'] = 'Komu'; $labels['cc'] = 'Kópia'; -$labels['bcc'] = 'Tajná kópia'; +$labels['bcc'] = 'Skrytá kópia'; $labels['replyto'] = 'OdpovedaÅ¥ na'; -$labels['followupto'] = 'PokraÄovaÅ¥ na'; +$labels['followupto'] = 'PreposlaÅ¥ na'; $labels['date'] = 'Dátum'; $labels['size'] = 'VeľkosÅ¥'; $labels['priority'] = 'Priorita'; $labels['organization'] = 'Organizácia'; -$labels['readstatus'] = 'ÄŒÃtaÅ¥ stav'; +$labels['readstatus'] = 'PreÄÃtaÅ¥ stav'; $labels['listoptions'] = 'Nastavenia zoznamu...'; $labels['mailboxlist'] = 'PrieÄinky'; -$labels['messagesfromto'] = 'Správy od $from do $to z $count'; -$labels['threadsfromto'] = 'Konverzácie od $from do $to z $count'; -$labels['messagenrof'] = 'Správa $nr z $count'; +$labels['messagesfromto'] = 'Správy: $from – $to, z $count'; +$labels['threadsfromto'] = 'Konverzácie: $from – $to, z $count'; +$labels['messagenrof'] = 'Správa Ä. $nr z $count'; $labels['fromtoshort'] = '$from – $to z $count'; $labels['copy'] = 'KopÃrovaÅ¥'; $labels['move'] = 'Presunúť'; -$labels['moveto'] = 'presunúť do...'; -$labels['download'] = 'stiahnuÅ¥'; +$labels['moveto'] = 'Presunúť do...'; +$labels['copyto'] = 'KopÃrovaÅ¥ do...'; +$labels['download'] = 'StiahnuÅ¥'; $labels['open'] = 'OtvoriÅ¥'; $labels['showattachment'] = 'ZobraziÅ¥'; $labels['showanyway'] = 'ZobraziÅ¥ aj napriek tomu'; -$labels['filename'] = 'Meno súboru'; +$labels['filename'] = 'Názov súboru'; $labels['filesize'] = 'VeľkosÅ¥ súboru'; $labels['addtoaddressbook'] = 'PridaÅ¥ do adresára'; $labels['sun'] = 'Ne'; @@ -103,100 +104,110 @@ $labels['checkmail'] = 'SkontrolovaÅ¥ nové správy'; $labels['compose'] = 'VytvoriÅ¥ správu'; $labels['writenewmessage'] = 'VytvoriÅ¥ novú správu'; $labels['reply'] = 'OdpovedaÅ¥'; -$labels['replytomessage'] = 'OdpovedaÅ¥'; -$labels['replytoallmessage'] = 'OdpovedaÅ¥ vÅ¡etkým'; +$labels['replytomessage'] = 'OdpovedaÅ¥ na správu'; +$labels['replytoallmessage'] = 'OdpovedaÅ¥ do zoznamu alebo odosielateľovi a vÅ¡etkým prÃjemcom'; $labels['replyall'] = 'OdpovedaÅ¥ vÅ¡etkým'; -$labels['replylist'] = 'Zoznam odpovedÃ'; -$labels['forward'] = 'Dopredu'; -$labels['forwardinline'] = 'PoslaÅ¥ Äalej'; +$labels['replylist'] = 'Zoznam pre odpovedanie'; +$labels['forward'] = 'PoslaÅ¥ Äalej'; +$labels['forwardinline'] = 'PoslaÅ¥ Äalej v správe'; $labels['forwardattachment'] = 'PoslaÅ¥ Äalej ako prÃlohu'; -$labels['forwardmessage'] = 'PoslaÅ¥ Äalej'; -$labels['deletemessage'] = 'ZmazaÅ¥ správu'; +$labels['forwardmessage'] = 'PoslaÅ¥ správu Äalej'; +$labels['deletemessage'] = 'VymazaÅ¥ správu'; $labels['movemessagetotrash'] = 'Presunúť správu do koÅ¡a'; -$labels['printmessage'] = 'VytlaÄiÅ¥ správu'; +$labels['printmessage'] = 'VytlaÄiÅ¥ túto správu'; $labels['previousmessage'] = 'ZobraziÅ¥ predchádzajúcu správu'; $labels['firstmessage'] = 'ZobraziÅ¥ prvú správu'; $labels['nextmessage'] = 'ZobraziÅ¥ ÄalÅ¡iu správu'; $labels['lastmessage'] = 'ZobraziÅ¥ poslednú správu'; -$labels['backtolist'] = 'Späť na zoznam správ'; -$labels['viewsource'] = 'UkázaÅ¥ zdroj správy'; +$labels['backtolist'] = 'Naspäť na zoznam správ'; +$labels['viewsource'] = 'ZobraziÅ¥ zdrojový text'; $labels['mark'] = 'OznaÄiÅ¥'; $labels['markmessages'] = 'OznaÄiÅ¥ správy'; $labels['markread'] = 'Ako preÄÃtané'; $labels['markunread'] = 'Ako nepreÄÃtané'; -$labels['markflagged'] = 'Ako oznaÄené'; -$labels['markunflagged'] = 'Ako neoznaÄené'; -$labels['moreactions'] = 'ÄŽalÅ¡ie akcie...'; -$labels['more'] = 'ÄŽalÅ¡ie'; +$labels['markflagged'] = 'Ako oznaÄené znaÄkou'; +$labels['markunflagged'] = 'Ako neoznaÄené znaÄkou'; +$labels['moreactions'] = 'Viac akciÃ...'; +$labels['more'] = 'Viac'; $labels['back'] = 'Dozadu'; $labels['options'] = 'Možnosti'; $labels['select'] = 'Výber'; -$labels['all'] = 'VÅ¡etky'; +$labels['all'] = 'VÅ¡etko'; $labels['none'] = 'NiÄ'; $labels['currpage'] = 'Aktuálna stránka'; $labels['unread'] = 'NepreÄÃtané'; -$labels['flagged'] = 'OznaÄené'; -$labels['unanswered'] = 'NeoznaÄené'; +$labels['flagged'] = 'OznaÄené znaÄkou'; +$labels['unanswered'] = 'Bez odpovede'; $labels['withattachment'] = 'S prÃlohou'; -$labels['deleted'] = 'Zmazané'; +$labels['deleted'] = 'Vymazané'; $labels['undeleted'] = 'Nevymazané'; -$labels['invert'] = 'PrevrátiÅ¥'; +$labels['invert'] = 'ObrátiÅ¥'; $labels['filter'] = 'Filter'; $labels['list'] = 'Zoznam'; $labels['threads'] = 'Konverzácie'; $labels['expand-all'] = 'RozbaliÅ¥ vÅ¡etko'; $labels['expand-unread'] = 'RozbaliÅ¥ nepreÄÃtané'; $labels['collapse-all'] = 'ZbaliÅ¥ vÅ¡etko'; -$labels['threaded'] = 'SpájaÅ¥ do konverzáciÃ'; +$labels['threaded'] = 'Spojené do konverzáciÃ'; $labels['autoexpand_threads'] = 'RozbaliÅ¥ konverzácie'; -$labels['do_expand'] = 'vÅ¡etky konverzácie'; +$labels['do_expand'] = 'vÅ¡etky'; $labels['expand_only_unread'] = 'len s nepreÄÃtanými správami'; -$labels['fromto'] = 'Odosielateľ/PrÃjemca'; -$labels['flag'] = 'Vlajka'; +$labels['fromto'] = 'Od/Komu'; +$labels['flag'] = 'ZnaÄka'; $labels['attachment'] = 'PrÃloha'; -$labels['nonesort'] = 'NiÄ'; +$labels['nonesort'] = 'Žiadne'; $labels['sentdate'] = 'Dátum odoslania'; $labels['arrival'] = 'Dátum prijatia'; $labels['asc'] = 'vzostupne'; $labels['desc'] = 'zostupne'; -$labels['listcolumns'] = 'Zoznam stĺpcov'; -$labels['listsorting'] = 'Triedenie stĺpcov'; -$labels['listorder'] = 'Usporiadanie'; +$labels['listcolumns'] = 'Stĺpce'; +$labels['listsorting'] = 'ZoraÄovanie'; +$labels['listorder'] = 'Systém zoraÄovania'; $labels['listmode'] = 'Režim zobrazenia zoznamu'; -$labels['folderactions'] = 'Akcie so zložkou...'; -$labels['compact'] = 'ZhustiÅ¥ prieÄinok'; +$labels['folderactions'] = 'Akcie pre prieÄinky...'; +$labels['compact'] = 'ZhustiÅ¥'; $labels['empty'] = 'VyprázdniÅ¥'; $labels['importmessages'] = 'ImportovaÅ¥ správy'; -$labels['quota'] = 'Zaplnenie schránky'; +$labels['quota'] = 'Úložné miesto'; $labels['unknown'] = 'neznáme'; $labels['unlimited'] = 'neobmedzené'; $labels['quicksearch'] = 'Rýchle vyhľadávanie'; -$labels['resetsearch'] = 'VyÄistiÅ¥ vyhľadávanie'; -$labels['searchmod'] = 'Parametre hľadanie'; +$labels['resetsearch'] = 'Reset vyhľadávania'; +$labels['searchmod'] = 'ZmeniÅ¥ kritériá vyhľadávania'; $labels['msgtext'] = 'Celá správa'; -$labels['body'] = 'Telo'; +$labels['body'] = 'Telo (obsah)'; $labels['type'] = 'Typ'; $labels['namex'] = 'Meno'; $labels['openinextwin'] = 'OtvoriÅ¥ v novom okne'; -$labels['emlsave'] = 'StiahnuÅ¥'; +$labels['emlsave'] = 'StiahnuÅ¥ (.eml)'; $labels['changeformattext'] = 'ZobraziÅ¥ vo formáte Äistého textu'; $labels['changeformathtml'] = 'ZobraziÅ¥ vo formáte HTML'; -$labels['editasnew'] = 'UpraviÅ¥ ako novú'; +$labels['editasnew'] = 'UpraviÅ¥ ako novú správu'; $labels['send'] = 'OdoslaÅ¥'; $labels['sendmessage'] = 'OdoslaÅ¥ správu'; -$labels['savemessage'] = 'UložiÅ¥ do rozpÃsaných'; -$labels['addattachment'] = 'PridaÅ¥ prÃlohu'; +$labels['savemessage'] = 'UložiÅ¥ správu ako koncept'; +$labels['addattachment'] = 'PriložiÅ¥ súbor'; $labels['charset'] = 'Znaková sada'; $labels['editortype'] = 'Typ editora'; $labels['returnreceipt'] = 'Potvrdenie o doruÄenÃ'; -$labels['dsn'] = 'DoruÄenie oznámenia o stave'; -$labels['mailreplyintro'] = '$date odosielateľ napÃsal:'; +$labels['dsn'] = 'Oznámenie o stave doruÄenia'; +$labels['mailreplyintro'] = 'Dňa $date $sender napÃsal(a):'; $labels['originalmessage'] = 'Pôvodná správa'; -$labels['editidents'] = 'EditovaÅ¥ identity'; +$labels['editidents'] = 'UpraviÅ¥ identitu odosielateľa'; $labels['spellcheck'] = 'Pravopis'; $labels['checkspelling'] = 'SkontrolovaÅ¥ pravopis'; $labels['resumeediting'] = 'PokraÄovaÅ¥ v úpravách'; $labels['revertto'] = 'VrátiÅ¥ sa na'; +$labels['restore'] = 'ObnoviÅ¥'; +$labels['restoremessage'] = 'ObnoviÅ¥ správu?'; +$labels['responses'] = 'Odpovede'; +$labels['insertresponse'] = 'VložiÅ¥ odpoveÄ'; +$labels['manageresponses'] = 'SpravovaÅ¥ odpovede'; +$labels['savenewresponse'] = 'UložiÅ¥ novú odpoveÄ'; +$labels['editresponses'] = 'UpraviÅ¥ odpovede'; +$labels['editresponse'] = 'UpraviÅ¥ odpoveÄ'; +$labels['responsename'] = 'Meno'; +$labels['responsetext'] = 'Text odpovede'; $labels['attach'] = 'PriložiÅ¥'; $labels['attachments'] = 'PrÃlohy'; $labels['upload'] = 'NahraÅ¥'; @@ -209,54 +220,54 @@ $labels['normal'] = 'Normálna'; $labels['high'] = 'Vysoká'; $labels['highest'] = 'NajvyÅ¡Å¡ia'; $labels['nosubject'] = '(bez predmetu)'; -$labels['showimages'] = 'UkázaÅ¥ obrázky'; -$labels['alwaysshow'] = 'Vždy zobraziÅ¥ obrázky od $sender'; -$labels['isdraft'] = 'Toto je rozpÃsaná správa'; -$labels['andnmore'] = '$nr viac...'; -$labels['togglemoreheaders'] = 'ZobraziÅ¥ viac záhlavà správ'; -$labels['togglefullheaders'] = 'Prepnúť zobrazenie nespracovaných záhlavà správ'; +$labels['showimages'] = 'ZobraziÅ¥ obrázky'; +$labels['alwaysshow'] = 'Vždy zobraziÅ¥ obrázky od odosielateľa $sender'; +$labels['isdraft'] = 'Toto je koncept'; +$labels['andnmore'] = 'PoÄet ÄalÅ¡Ãch: $nr...'; +$labels['togglemoreheaders'] = 'ZobraziÅ¥ viac hlaviÄiek správ'; +$labels['togglefullheaders'] = 'Prepnúť zobrazenie úplných hlaviÄiek správ'; $labels['htmltoggle'] = 'HTML'; $labels['plaintoggle'] = 'ÄŒistý text'; -$labels['savesentmessagein'] = 'UkladaÅ¥ odoslané správy do'; -$labels['dontsave'] = 'NeukladaÅ¥'; +$labels['savesentmessagein'] = 'UložiÅ¥ odoslanú správu do'; +$labels['dontsave'] = 'neukladaÅ¥'; $labels['maxuploadsize'] = 'Maximálna povolená veľkosÅ¥ súboru je $size'; $labels['addcc'] = 'PridaÅ¥ kópiu'; $labels['addbcc'] = 'PridaÅ¥ skrytú kopiu'; -$labels['addreplyto'] = 'PridaÅ¥ odpoveÄ'; -$labels['addfollowupto'] = 'PridaÅ¥ pokraÄovaÅ¥ na'; -$labels['mdnrequest'] = 'Odosielateľ tejto správy chce byÅ¥ upozornený na to, že ste správu obdržali. Chcete potvrdiÅ¥ prijatie správy?'; -$labels['receiptread'] = 'Potvrdenie o prijatà správy'; -$labels['yourmessage'] = 'Toto je potvrdenie o prijatà VaÅ¡ej správy'; -$labels['receiptnote'] = 'Poznámka: Toto potvrdenie negarantuje, že správa bola prÃjemcom preÄÃtaná a porozumel jej obsahu.'; -$labels['name'] = 'Názov'; +$labels['addreplyto'] = 'PridaÅ¥ pole OdpovedaÅ¥ na'; +$labels['addfollowupto'] = 'PridaÅ¥ pole PreposlaÅ¥ na'; +$labels['mdnrequest'] = 'Odosielateľ tejto správy chce byÅ¥ informovaný o tom, že ste túto správu ÄÃtali. Chcete mu potvrdiÅ¥ prijatie správy?'; +$labels['receiptread'] = 'Potvrdenie o doruÄenà (a preÄÃtanÃ) správy'; +$labels['yourmessage'] = 'Toto je potvrdenie o doruÄenà vaÅ¡ej správy'; +$labels['receiptnote'] = 'Poznámka: Toto potvrdenie znamená len to, že správa sa zobrazila na poÄÃtaÄi prÃjemcu. Nie je vÅ¡ak zaruÄené, že prÃjemca správu ÄÃtal a porozumel jej obsahu.'; +$labels['name'] = 'Zobrazované meno'; $labels['firstname'] = 'Meno'; $labels['surname'] = 'Priezvisko'; -$labels['middlename'] = 'Stredné meno'; +$labels['middlename'] = 'Stredná ÄasÅ¥ mena'; $labels['nameprefix'] = 'Titul'; -$labels['namesuffix'] = 'PrÃpona'; +$labels['namesuffix'] = 'Dodatok za menom'; $labels['nickname'] = 'Prezývka'; -$labels['jobtitle'] = 'Názov práce'; -$labels['department'] = 'Oddelenie'; +$labels['jobtitle'] = 'OznaÄenie povolania'; +$labels['department'] = 'Oddelenie/firma/zastúpenie'; $labels['gender'] = 'Pohlavie'; -$labels['maidenname'] = 'DievÄenské meno'; -$labels['email'] = 'E-Mail'; +$labels['maidenname'] = 'Rodné priezvisko'; +$labels['email'] = 'E-mail'; $labels['phone'] = 'Telefón'; $labels['address'] = 'Adresa'; $labels['street'] = 'Ulica'; $labels['locality'] = 'Mesto'; -$labels['zipcode'] = 'Smerovacie Äéslo'; -$labels['region'] = 'Kraj'; +$labels['zipcode'] = 'PSÄŒ'; +$labels['region'] = 'Región'; $labels['country'] = 'Krajina'; -$labels['birthday'] = 'Dátum narodenia'; +$labels['birthday'] = 'Narodeniny'; $labels['anniversary'] = 'VýroÄie'; -$labels['website'] = 'Web stránka'; +$labels['website'] = 'Internetová stránka'; $labels['instantmessenger'] = 'IM'; $labels['notes'] = 'Poznámky'; $labels['male'] = 'muž'; $labels['female'] = 'žena'; $labels['manager'] = 'Manažér'; $labels['assistant'] = 'Asistent'; -$labels['spouse'] = 'Partner'; +$labels['spouse'] = 'Partner/ka'; $labels['allfields'] = 'VÅ¡etky polia'; $labels['search'] = 'HľadaÅ¥'; $labels['advsearch'] = 'RozÅ¡Ãrené vyhľadávanie'; @@ -264,10 +275,10 @@ $labels['advanced'] = 'RozÅ¡Ãrené'; $labels['other'] = 'Ostatné'; $labels['typehome'] = 'Domov'; $labels['typework'] = 'Práca'; -$labels['typeother'] = 'Ostatné'; -$labels['typemobile'] = 'Mobil'; -$labels['typemain'] = 'Hlavný'; -$labels['typehomefax'] = 'Domáci fax'; +$labels['typeother'] = 'Iné'; +$labels['typemobile'] = 'Mobilný telefón'; +$labels['typemain'] = 'Hlavné ÄÃslo'; +$labels['typehomefax'] = 'Fax - domov'; $labels['typeworkfax'] = 'Fax - práca'; $labels['typecar'] = 'Auto'; $labels['typepager'] = 'Pager'; @@ -276,7 +287,7 @@ $labels['typeassistant'] = 'Asistent'; $labels['typehomepage'] = 'Domovská stránka'; $labels['typeblog'] = 'Blog'; $labels['typeprofile'] = 'Profil'; -$labels['addfield'] = 'PridaÅ¥ položku...'; +$labels['addfield'] = 'PridaÅ¥ pole...'; $labels['addcontact'] = 'PridaÅ¥ nový kontakt'; $labels['editcontact'] = 'UpraviÅ¥ kontakt'; $labels['contacts'] = 'Kontakty'; @@ -285,199 +296,202 @@ $labels['personalinfo'] = 'Osobné informácie'; $labels['edit'] = 'UpraviÅ¥'; $labels['cancel'] = 'ZruÅ¡iÅ¥'; $labels['save'] = 'UložiÅ¥'; -$labels['delete'] = 'ZmazaÅ¥'; +$labels['delete'] = 'VymazaÅ¥'; $labels['rename'] = 'PremenovaÅ¥'; -$labels['addphoto'] = 'PridaÅ¥'; -$labels['replacephoto'] = 'NahradiÅ¥'; -$labels['uploadphoto'] = 'NahraÅ¥ fotku'; +$labels['addphoto'] = 'PridaÅ¥ fotografiu'; +$labels['replacephoto'] = 'NahradiÅ¥ fotografiu'; +$labels['uploadphoto'] = 'NahraÅ¥ fotografiu'; $labels['newcontact'] = 'VytvoriÅ¥ nový kontakt'; -$labels['deletecontact'] = 'ZmazaÅ¥ zvolené kontakty'; +$labels['deletecontact'] = 'VymazaÅ¥ vybrané kontakty'; $labels['composeto'] = 'VytvoriÅ¥ správu pre'; -$labels['contactsfromto'] = 'Kontakty od $from do $to z $count'; +$labels['contactsfromto'] = 'Kontakty: $from – $to, z $count'; $labels['print'] = 'TlaÄ'; -$labels['export'] = 'Export'; +$labels['export'] = 'ExportovaÅ¥'; $labels['exportall'] = 'ExportovaÅ¥ vÅ¡etko'; $labels['exportsel'] = 'ExportovaÅ¥ vybrané'; $labels['exportvcards'] = 'ExportovaÅ¥ kontakty vo formáte vCard'; $labels['newcontactgroup'] = 'VytvoriÅ¥ novú skupinu kontaktov'; $labels['grouprename'] = 'PremenovaÅ¥ skupinu'; -$labels['groupdelete'] = 'ZmazaÅ¥ skupinu'; +$labels['groupdelete'] = 'VymazaÅ¥ skupinu'; $labels['groupremoveselected'] = 'OdstrániÅ¥ vybrané kontakty zo skupiny'; -$labels['previouspage'] = 'Predchádzajúca stránka'; -$labels['firstpage'] = 'Prvá stránka'; -$labels['nextpage'] = 'Nasledujúca stránka'; -$labels['lastpage'] = 'Posledná stránka'; +$labels['previouspage'] = 'ZobraziÅ¥ predchádzajúcu stranu'; +$labels['firstpage'] = 'ZobraziÅ¥ prvú stranu'; +$labels['nextpage'] = 'ZobraziÅ¥ nasledujúcu stranu'; +$labels['lastpage'] = 'ZobraziÅ¥ poslednú stranu'; $labels['group'] = 'Skupina'; $labels['groups'] = 'Skupiny'; $labels['listgroup'] = 'Zoznam Älenov skupiny'; $labels['personaladrbook'] = 'Osobné adresy'; -$labels['searchsave'] = 'UložiÅ¥ vyhľadávanie'; -$labels['searchdelete'] = 'ZmazaÅ¥ vyhľadávanie'; +$labels['searchsave'] = 'UložiÅ¥ výsledky vyhľadávania'; +$labels['searchdelete'] = 'VymazaÅ¥ výsledky vyhľadávania'; $labels['import'] = 'Import'; $labels['importcontacts'] = 'ImportovaÅ¥ kontakty'; $labels['importfromfile'] = 'ImportovaÅ¥ zo súboru:'; $labels['importtarget'] = 'PridaÅ¥ kontakty do'; -$labels['importreplace'] = 'NahradiÅ¥ celý zoznam kontaktov'; +$labels['importreplace'] = 'NahradiÅ¥ celý adresár kontaktov'; $labels['importgroups'] = 'ImportovaÅ¥ priradenia do skupÃn'; -$labels['importgroupsall'] = 'VÅ¡etky (vytvoriÅ¥ skupiny, ak je to potrebné)'; +$labels['importgroupsall'] = 'VÅ¡etky (vytvoriÅ¥ skupiny ak je to potrebné)'; $labels['importgroupsexisting'] = 'Len pre existujúce skupiny'; $labels['importdesc'] = 'Môžete vložiÅ¥ kontakty zo svojho existujúceho adresára.<br/>Momentálne je možné importovanie adries z formátu <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> alebo CSV (údaje oddeľované Äiarkou).'; $labels['done'] = 'Hotovo'; $labels['settingsfor'] = 'Nastavenia pre'; -$labels['about'] = 'O programe'; -$labels['preferences'] = 'Vlastnosti'; +$labels['about'] = 'O systéme'; +$labels['preferences'] = 'Nastavenia'; $labels['userpreferences'] = 'PoužÃvateľské nastavenia'; $labels['editpreferences'] = 'UpraviÅ¥ použÃvateľské nastavenia'; -$labels['identities'] = 'Profily'; -$labels['manageidentities'] = 'SpravovaÅ¥ profily pre tento úÄet'; -$labels['newidentity'] = 'Nový profil'; +$labels['identities'] = 'Identity'; +$labels['manageidentities'] = 'SpravovaÅ¥ identity pre tento úÄet'; +$labels['newidentity'] = 'Nová identita'; $labels['newitem'] = 'Nová položka'; $labels['edititem'] = 'UpraviÅ¥ položku'; -$labels['preferhtml'] = 'UprednostniÅ¥ HTML zobrazenie'; +$labels['preferhtml'] = 'ZobraziÅ¥ HTML'; $labels['defaultcharset'] = 'Predvolené kódovanie'; $labels['htmlmessage'] = 'HTML správa'; $labels['messagepart'] = 'ÄŒasÅ¥'; $labels['digitalsig'] = 'Digitálny podpis'; $labels['dateformat'] = 'Formát dátumu'; $labels['timeformat'] = 'Formát Äasu'; -$labels['prettydate'] = 'KrajÅ¡Ã dátum'; -$labels['setdefault'] = 'ObnoviÅ¥ pôvodné'; +$labels['prettydate'] = 'Krátke formáty dátumov'; +$labels['setdefault'] = 'NastaviÅ¥ ako Å¡tandardné'; $labels['autodetect'] = 'Automaticky'; $labels['language'] = 'Jazyk'; $labels['timezone'] = 'ÄŒasová zóna'; -$labels['pagesize'] = 'Riadky na stránku'; +$labels['pagesize'] = 'PoÄet záznamov na stránku'; $labels['signature'] = 'Podpis'; $labels['dstactive'] = 'Letný Äas'; $labels['showinextwin'] = 'OtvoriÅ¥ správu v novom okne'; $labels['composeextwin'] = 'PÃsaÅ¥ v novom okne'; -$labels['htmleditor'] = 'VytvoriÅ¥ HTML správu'; -$labels['htmlonreply'] = 'len v odpovedi na HTML správy'; -$labels['htmlonreplyandforward'] = 'pri preposielanà alebo odpovedi na HTML správu'; +$labels['htmleditor'] = 'VytváraÅ¥ HTML správy'; +$labels['htmlonreply'] = 'len v odpovedi na HTML správu'; +$labels['htmlonreplyandforward'] = 'pri odosielanà Äalej alebo pri odpovedi na HTML správu'; $labels['htmlsignature'] = 'HTML podpis'; -$labels['showemail'] = 'ZobrazovaÅ¥ e-mailovú adresu so zobrazeným menom'; -$labels['previewpane'] = 'UkázaÅ¥ náhľad'; -$labels['skin'] = 'Vzhľad'; +$labels['showemail'] = 'ZobrazovaÅ¥ e-mailovú adresu so zobrazovaným menom'; +$labels['previewpane'] = 'ZobraziÅ¥ panel s náhľadom na správu'; +$labels['skin'] = 'Vzhľad rozhrania'; $labels['logoutclear'] = 'VyprázdniÅ¥ kôš pri odhlásenÃ'; $labels['logoutcompact'] = 'ZhustiÅ¥ prieÄinok DoruÄená poÅ¡ta pri odhlásenÃ'; $labels['uisettings'] = 'PoužÃvateľské rozhranie'; $labels['serversettings'] = 'Nastavenia servera'; -$labels['mailboxview'] = 'Pohľad na schránku'; -$labels['mdnrequests'] = 'Upozornenia odosielateľovi'; -$labels['askuser'] = 'spýtaÅ¥ sa použÃvateľa'; -$labels['autosend'] = 'poslaÅ¥ potvrdenie automaticky'; -$labels['autosendknown'] = 'poslaÅ¥ potvrdenie iba mojÃm kontaktom'; -$labels['autosendknownignore'] = 'poslaÅ¥ potvrdenie mojÃm kontaktom, inak ignorovaÅ¥'; +$labels['mailboxview'] = 'Zobrazenie schránky'; +$labels['mdnrequests'] = 'Pri žiadosti o potvrdenie o doruÄenÃ'; +$labels['askuser'] = 'opýtaÅ¥ sa použÃvateľa'; +$labels['autosend'] = 'odoslaÅ¥ potvrdenie'; +$labels['autosendknown'] = 'odoslaÅ¥ potvrdenie iba mojim kontaktom'; +$labels['autosendknownignore'] = 'odoslaÅ¥ potvrdenie známym odosielateľom, inak ignorovaÅ¥'; $labels['ignore'] = 'ignorovaÅ¥'; -$labels['readwhendeleted'] = 'OznaÄiÅ¥ správu'; -$labels['flagfordeletion'] = 'Pri odstránenà správy iba oznaÄiÅ¥ správu ako odstránenú'; -$labels['skipdeleted'] = 'NezobrazovaÅ¥ zmazané správy'; -$labels['deletealways'] = 'OdstrániÅ¥ správy, ak zlyhá ich presun do koÅ¡a'; -$labels['deletejunk'] = 'HneÄ mazaÅ¥ správy v Spame'; -$labels['showremoteimages'] = 'ZobrazovaÅ¥ obrázky uložené mimo mail'; -$labels['fromknownsenders'] = 'od známych užÃvateľov'; +$labels['readwhendeleted'] = 'OznaÄiÅ¥ správu ako preÄÃtanú pri jej vymazávanÃ'; +$labels['flagfordeletion'] = 'Namiesto vymazania správy ju iba oznaÄiÅ¥ ako vymazanú'; +$labels['skipdeleted'] = 'NezobrazovaÅ¥ vymazané správy'; +$labels['deletealways'] = 'VymazaÅ¥ správy, ak zlyhá ich presun do koÅ¡a'; +$labels['deletejunk'] = 'HneÄ vymazávaÅ¥ správy v prieÄinku Nevyžiadaná poÅ¡ta (spam)'; +$labels['showremoteimages'] = 'ZobrazovaÅ¥ obrázky uložené mimo správy'; +$labels['fromknownsenders'] = 'pri známych odosielateľoch'; $labels['always'] = 'vždy'; -$labels['showinlineimages'] = 'ZobraziÅ¥ pripojené obrázky pod správou'; +$labels['showinlineimages'] = 'ZobrazovaÅ¥ priložené obrázky pod správou'; $labels['autosavedraft'] = 'Automaticky uložiÅ¥ koncept'; $labels['everynminutes'] = 'každých $n minút'; -$labels['refreshinterval'] = 'ObnoviÅ¥ (skontrolovaÅ¥ nové správy a podobne)'; +$labels['refreshinterval'] = 'ObnoviÅ¥ (skontrolovaÅ¥ nové správy atÄ.)'; $labels['never'] = 'nikdy'; $labels['immediately'] = 'ihneÄ'; $labels['messagesdisplaying'] = 'Zobrazovanie správ'; $labels['messagescomposition'] = 'Vytváranie správ'; $labels['mimeparamfolding'] = 'Názvy prÃloh'; -$labels['2231folding'] = 'Full RFC 2231 (Thunderbird)'; +$labels['2231folding'] = 'Úplné RFC 2231 (Thunderbird)'; $labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)'; -$labels['2047folding'] = 'Full RFC 2047 (other)'; +$labels['2047folding'] = 'Úplné RFC 2047 (iné)'; $labels['force7bit'] = 'PoužiÅ¥ kódovanie MIME pre 8-bitové znaky'; $labels['advancedoptions'] = 'RozÅ¡Ãrené nastavenia'; -$labels['focusonnewmessage'] = 'AktivovaÅ¥ okno prehliadaÄa pri prÃchozà správe'; -$labels['checkallfolders'] = 'KontrolovaÅ¥ nové správy vo vÅ¡etkých zložkách'; -$labels['displaynext'] = 'ZobraziÅ¥ ÄalÅ¡iu správu po zmazanie / prenosu správy'; -$labels['defaultfont'] = 'Prednastavený font HTML správ'; +$labels['focusonnewmessage'] = 'AktivovaÅ¥ okno prehliadaÄa pri novej správe'; +$labels['checkallfolders'] = 'KontrolovaÅ¥ nové správy vo vÅ¡etkých prieÄinkoch'; +$labels['displaynext'] = 'ZobraziÅ¥ ÄalÅ¡iu správu po vymazanÃ/presunutà správy'; +$labels['defaultfont'] = 'Predvolené pÃsmo pre HTML správu'; $labels['mainoptions'] = 'Hlavné nastavenia'; $labels['browseroptions'] = 'Nastavenia prehliadania'; $labels['section'] = 'Sekcia'; $labels['maintenance'] = 'Údržba'; $labels['newmessage'] = 'Nová správa'; $labels['signatureoptions'] = 'Nastavenia podpÃsania'; -$labels['whenreplying'] = 'Pri odpovedanÃ'; +$labels['whenreplying'] = 'Pri odpovedi'; $labels['replyempty'] = 'necitovaÅ¥ pôvodnú správu'; -$labels['replytopposting'] = 'zaÄaÅ¥ novú správu nad pôvodňou'; -$labels['replybottomposting'] = 'zaÄaÅ¥ novú správu pod pôvodňou'; +$labels['replytopposting'] = 'zaÄaÅ¥ odpoveÄ nad citovanou správou'; +$labels['replybottomposting'] = 'zaÄaÅ¥ odpoveÄ pod citovanou správou'; $labels['replyremovesignature'] = 'Pri odpovedanà odstrániÅ¥ zo správy pôvodný podpis'; $labels['autoaddsignature'] = 'Automaticky pridaÅ¥ podpis'; $labels['newmessageonly'] = 'iba k novým správam'; -$labels['replyandforwardonly'] = 'len k odpovede a preposÃlanej správe'; -$labels['insertsignature'] = 'Vložit podpis'; -$labels['previewpanemarkread'] = 'OznaÄiÅ¥ zobrazenej správy ako preÄÃtané'; +$labels['replyandforwardonly'] = 'iba k odpovediam a preposielaným správam'; +$labels['insertsignature'] = 'VložiÅ¥ podpis'; +$labels['previewpanemarkread'] = 'OznaÄiÅ¥ správu v náhľade ako preÄÃtanú'; $labels['afternseconds'] = 'po $n sekundách'; -$labels['reqmdn'] = 'Vždy požadovaÅ¥ doruÄenku'; -$labels['reqdsn'] = 'Vždy vyžadovaÅ¥ potvrdenie o doruÄenà správy'; -$labels['replysamefolder'] = 'UmietniÅ¥ odpoveÄ do adresára, kde je umiestnená správa, na ktorú sa odpovedalo'; -$labels['defaultabook'] = 'Predvolený adresár'; -$labels['autocompletesingle'] = 'VynechaÅ¥ alternatÃvnu emailovú adresu pri automatickom dopĺňanÃ'; -$labels['listnamedisplay'] = 'ZobraziÅ¥ kontakt ako'; +$labels['reqmdn'] = 'Vždy vyžadovaÅ¥ potvrdenie o doruÄenÃ'; +$labels['reqdsn'] = 'Vždy vyžadovaÅ¥ oznámenie o stave doruÄenia'; +$labels['replysamefolder'] = 'UmiestňovaÅ¥ odpovede do rovnakého prieÄinka ako pôvodnú správu'; +$labels['defaultabook'] = 'Predvolený adresár kontaktov'; +$labels['autocompletesingle'] = 'VynechaÅ¥ alternatÃvne e-mailové adresy pri automatickom dopĺňanÃ'; +$labels['listnamedisplay'] = 'ZobraziÅ¥ kontakty ako'; $labels['spellcheckbeforesend'] = 'SkontrolovaÅ¥ pravopis pred odoslanÃm správy'; -$labels['spellcheckoptions'] = 'Voľby kontroly pravopisu'; +$labels['spellcheckoptions'] = 'Nastavenia kontroly pravopisu'; $labels['spellcheckignoresyms'] = 'IgnorovaÅ¥ slová so symbolmi'; $labels['spellcheckignorenums'] = 'IgnorovaÅ¥ slová s ÄÃslami'; -$labels['spellcheckignorecaps'] = 'IgnorovaÅ¥ slová pÃsané veľkými pÃsmenami'; +$labels['spellcheckignorecaps'] = 'IgnorovaÅ¥ slová pÃsané iba veľkými pÃsmenami'; $labels['addtodict'] = 'PridaÅ¥ do slovnÃka'; -$labels['mailtoprotohandler'] = 'ZaregistrovaÅ¥ handler pre odkazy „mailto:“'; +$labels['mailtoprotohandler'] = 'ZaregistrovaÅ¥ priradenie pre odkazy typu „mailto:“'; $labels['standardwindows'] = 'S vyskakovacÃmi oknami pracovaÅ¥ ako so Å¡tandardnými oknami'; -$labels['forwardmode'] = 'Preposielanie správ'; -$labels['inline'] = 'v tele spávy'; +$labels['forwardmode'] = 'Odosielanie správ Äalej'; +$labels['inline'] = 'vo vnútri správy'; $labels['asattachment'] = 'ako prÃloha'; +$labels['replyallmode'] = 'Predvolená akcia pre tlaÄidlo [OdpovedaÅ¥ vÅ¡etkým]'; +$labels['replyalldefault'] = 'odpovedaÅ¥ vÅ¡etkým'; +$labels['replyalllist'] = 'odpovedaÅ¥ len do mailing-listu (ak bol nájdený)'; $labels['folder'] = 'PrieÄinok'; $labels['folders'] = 'PrieÄinky'; -$labels['foldername'] = 'Názov prieÄinku'; -$labels['subscribed'] = 'Prihlásený k odberu'; -$labels['messagecount'] = 'PoÄet správ'; +$labels['foldername'] = 'Názov prieÄinka'; +$labels['subscribed'] = 'Odber aktÃvny'; +$labels['messagecount'] = 'Správy'; $labels['create'] = 'VytvoriÅ¥'; -$labels['createfolder'] = 'Vytvor nový prieÄinok'; +$labels['createfolder'] = 'VytvoriÅ¥ nový prieÄinok'; $labels['managefolders'] = 'SpravovaÅ¥ prieÄinky'; $labels['specialfolders'] = 'Å peciálne prieÄinky'; $labels['properties'] = 'Vlastnosti'; -$labels['folderproperties'] = 'Vlastnosti adresára'; -$labels['parentfolder'] = 'RodiÄovský adresár'; +$labels['folderproperties'] = 'Vlastnosti prieÄinka'; +$labels['parentfolder'] = 'RodiÄovský prieÄinok'; $labels['location'] = 'Umiestnenie'; $labels['info'] = 'Informácia'; -$labels['getfoldersize'] = 'Kliknúť pre zÃskanie leľkosti adresára'; -$labels['changesubscription'] = 'Kliknúť pre zmenu prihlásenia odberu'; +$labels['getfoldersize'] = 'Na zistenie veľkosti prieÄinka kliknite sem'; +$labels['changesubscription'] = 'Na zmenu odberu kliknite sem'; $labels['foldertype'] = 'Typ prieÄinka'; $labels['personalfolder'] = 'Súkromný prieÄinok'; -$labels['otherfolder'] = 'Iné užÃvateľove adresáre'; -$labels['sharedfolder'] = 'Verejný adresár'; -$labels['sortby'] = 'TriediÅ¥ podľa'; -$labels['sortasc'] = 'TriediÅ¥ vzostupne'; -$labels['sortdesc'] = 'TriediÅ¥ zostupne'; -$labels['undo'] = 'VrátiÅ¥'; -$labels['installedplugins'] = 'NainÅ¡talované zásuvné moduly'; +$labels['otherfolder'] = 'Iné prieÄinky použÃvateľa'; +$labels['sharedfolder'] = 'Verejný prieÄinok'; +$labels['sortby'] = 'ZoradiÅ¥ podľa'; +$labels['sortasc'] = 'ZoradiÅ¥ vzostupne'; +$labels['sortdesc'] = 'ZoradiÅ¥ zostupne'; +$labels['undo'] = 'Späť'; +$labels['installedplugins'] = 'NainÅ¡talované prÃdavné moduly'; $labels['plugin'] = 'Zásuvný modul'; $labels['version'] = 'Verzia'; -$labels['source'] = 'Zdroj'; +$labels['source'] = 'Zdrojový kód'; $labels['license'] = 'Licencia'; -$labels['support'] = 'ZÃskaÅ¥ podporu'; +$labels['support'] = 'Podpora'; $labels['B'] = 'B'; $labels['KB'] = 'KB'; $labels['MB'] = 'MB'; $labels['GB'] = 'GB'; $labels['unicode'] = 'Unicode'; $labels['english'] = 'AngliÄtina'; -$labels['westerneuropean'] = 'Západná Európa'; -$labels['easterneuropean'] = 'Východná Európa'; +$labels['westerneuropean'] = 'Západoeurópske'; +$labels['easterneuropean'] = 'Východoeurópske'; $labels['southeasterneuropean'] = 'Juho-východná Európa'; $labels['baltic'] = 'BaltÅ¡tina'; -$labels['cyrillic'] = 'Cyriliky'; -$labels['arabic'] = 'ArabÄina'; -$labels['greek'] = 'GréÄtina'; -$labels['hebrew'] = 'HebrejÄina'; -$labels['turkish'] = 'NordÅ¡tina'; -$labels['nordic'] = 'TureÄtina'; -$labels['thai'] = 'TajÅ¡tina'; +$labels['cyrillic'] = 'Cyrilika'; +$labels['arabic'] = 'Arabsky'; +$labels['greek'] = 'Grécky'; +$labels['hebrew'] = 'Hebrejsky'; +$labels['turkish'] = 'Turecky'; +$labels['nordic'] = 'Nórsky'; +$labels['thai'] = 'Thajsky'; $labels['celtic'] = 'KeltÅ¡tina'; $labels['vietnamese'] = 'VietnamÄina'; -$labels['japanese'] = 'JaponÄina'; -$labels['korean'] = 'KorejÄina'; -$labels['chinese'] = 'ÄŒÃnÅ¡tina'; +$labels['japanese'] = 'Japonsky'; +$labels['korean'] = 'Kórejsky'; +$labels['chinese'] = 'ÄŒÃnsky'; ?> diff --git a/program/localization/sk_SK/messages.inc b/program/localization/sk_SK/messages.inc index db830c2a7..d5cf323db 100644 --- a/program/localization/sk_SK/messages.inc +++ b/program/localization/sk_SK/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -16,154 +16,161 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ $messages['errortitle'] = 'Vyskytla sa chyba!'; -$messages['loginfailed'] = 'Chybné prihlásenie'; -$messages['cookiesdisabled'] = 'Váš internetový prehliadaÄ nepodporuje cookies, ktoré sú potrebné pre prihlásenie'; -$messages['sessionerror'] = 'VaÅ¡e prihlásenie je neplatné alebo vyprÅ¡ala jeho platnosÅ¥'; -$messages['storageerror'] = 'Nepodarilo sa spojiÅ¥ s IMAP serverom'; +$messages['loginfailed'] = 'Prihlasovanie bolo neúspeÅ¡né.'; +$messages['cookiesdisabled'] = 'Váš internetový prehliadaÄ nepodporuje cookies, ktoré sú potrebné na prihlásenie.'; +$messages['sessionerror'] = 'VaÅ¡a relácia nie je platná alebo vyprÅ¡ala jej platnosÅ¥.'; +$messages['storageerror'] = 'Nepodarilo sa spojiÅ¥ s úložným serverom.'; $messages['servererror'] = 'Chyba servera!'; $messages['servererrormsg'] = 'Chyba servera: $msg'; -$messages['dberror'] = 'Databázová chyba!'; -$messages['requesttimedout'] = 'ÄŒas požiadavky vyprÅ¡al'; -$messages['errorreadonly'] = 'Nemožno vykonaÅ¥ operáciu. Adresár je len na ÄÃtanie'; -$messages['errornoperm'] = 'Nemožno vykonaÅ¥ operáciu. PrÃstup odmietnutý'; -$messages['erroroverquota'] = 'Nemožno vykonaÅ¥ operáciu. Na disku nie je dostatok voľného miesta.'; -$messages['erroroverquotadelete'] = 'Na disku nie je dostatok voľného miesta. Vymažte nejakú správu pomocou klávesov SHIFT+DEL.'; -$messages['invalidrequest'] = 'Chybný požiadavek. Žiadne údaje neboli uložené.'; -$messages['invalidhost'] = 'Neplatný názov servera'; -$messages['nomessagesfound'] = 'Vo VaÅ¡ej schránke nie je žiadna správa'; +$messages['dberror'] = 'Chyba databázy!'; +$messages['requesttimedout'] = 'ÄŒas na vykonanie požiadavky uplynul'; +$messages['errorreadonly'] = 'Akciu nemožno vykonaÅ¥. PrieÄinok je urÄený len na ÄÃtanie.'; +$messages['errornoperm'] = 'Akciu nemožno vykonaÅ¥. PrÃstup bol odmietnutý.'; +$messages['erroroverquota'] = 'Akciu nemožno vykonaÅ¥. Nie je dostatok voľného miesta.'; +$messages['erroroverquotadelete'] = 'Nie je dostatok voľného miesta. Vymažte nejakú správu pomocou klávesov SHIFT+DEL.'; +$messages['invalidrequest'] = 'Neplatná požiadavka! Neuložili sa žiadne údaje.'; +$messages['invalidhost'] = 'Neplatný názov servera.'; +$messages['nomessagesfound'] = 'V tomto prieÄinku nie je žiadna správa.'; $messages['loggedout'] = 'Odhlásenie prebehlo úspeÅ¡ne. Dovidenia.'; $messages['mailboxempty'] = 'Schránka je prázdna'; +$messages['nomessages'] = 'Žiadne správy'; $messages['refreshing'] = 'Obnovuje sa...'; $messages['loading'] = 'NaÄÃtava sa...'; -$messages['uploading'] = 'Nahrávám súbor...'; -$messages['uploadingmany'] = 'Nahrávam súbory...'; +$messages['uploading'] = 'Nahráva sa súbor...'; +$messages['uploadingmany'] = 'Nahrávajú sa súbory...'; $messages['loadingdata'] = 'NaÄÃtavajú sa údaje...'; $messages['checkingmail'] = 'Kontrolujú sa nové správy...'; $messages['sendingmessage'] = 'Správa sa odosiela...'; -$messages['messagesent'] = 'Správa bola úspeÅ¡ne odoslaná'; +$messages['messagesent'] = 'Správa bola úspeÅ¡ne odoslaná.'; $messages['savingmessage'] = 'Správa sa ukladá...'; -$messages['messagesaved'] = 'Správa bola uložená medzi RozpÃsané správy'; -$messages['successfullysaved'] = 'ÚspeÅ¡ne uložená'; -$messages['addedsuccessfully'] = 'Kontakt bol pridaný do adresára'; -$messages['contactexists'] = 'Kontakt s touto e-mailovou adresou už existuje'; -$messages['contactnameexists'] = 'Kontakt s rovnakým menom už existuje.'; -$messages['blockedimages'] = 'Z bezpeÄnostných dôvodov sú v správe zablokované obrázky.'; -$messages['encryptedmessage'] = 'Táto správa je zaÅ¡ifrovaná, a nie je možné ju zobraziÅ¥!'; -$messages['nocontactsfound'] = 'Nemáte žiadne kontakty'; -$messages['contactnotfound'] = 'Požadovaný kontakt nebol nájdený'; -$messages['contactsearchonly'] = 'Zadaj nejaký vyhľadávacà výraz pre hľadanie kontaktov.'; -$messages['sendingfailed'] = 'Odosielanie správy zlyhalo'; -$messages['senttooquickly'] = 'PoÄkajte $sec sekúnd pred odoslanÃm tejto správy'; -$messages['errormoving'] = 'Správa sa nedá presunúť'; -$messages['errorcopying'] = 'Správa sa nedá skopÃrovaÅ¥'; -$messages['errordeleting'] = 'Správa sa nedá zmazaÅ¥'; -$messages['errormarking'] = 'Správa sa nedá oznaÄiÅ¥'; -$messages['deletecontactconfirm'] = 'Ste si istý, že chcete zmazaÅ¥ zvolený(é) kontakt(y)?'; -$messages['deletegroupconfirm'] = 'SkutoÄne chceÅ¡ zmazaÅ¥ vybranú skupinu?'; -$messages['deletemessagesconfirm'] = 'Ste si istý, že chcete zmazaÅ¥ zvolenú(é) správu(y)?'; -$messages['deletefolderconfirm'] = 'Ste si istý, že chcete zmazaÅ¥ tento prieÄinok?'; -$messages['purgefolderconfirm'] = 'Ste si istý, že chcete zmazaÅ¥ vÅ¡etky správy v tomto prieÄinku?'; -$messages['contactdeleting'] = 'Mažem kontakt(y)...'; -$messages['groupdeleting'] = 'Mažem skupinu...'; -$messages['folderdeleting'] = 'Odstraňuje sa prieÄinok ...'; -$messages['foldermoving'] = 'PreÄinok sa presúva ...'; -$messages['foldersubscribing'] = 'Prihlasujem sa k adresáru...'; -$messages['folderunsubscribing'] = 'Odhlasujem sa z adresára...'; -$messages['formincomplete'] = 'Formulár nie je kompletne vyplnený'; -$messages['noemailwarning'] = 'ProsÃm, vložte platnú emailovú adresu'; -$messages['nonamewarning'] = 'ProsÃm, zadajte meno'; -$messages['nopagesizewarning'] = 'ProsÃm, zadajte veľkosÅ¥ strany'; -$messages['nosenderwarning'] = 'ProsÃm, zadajte adresu odosielateľa'; -$messages['norecipientwarning'] = 'ProsÃm, vložte aspoň jedného prÃjemcu'; -$messages['nosubjectwarning'] = 'Predmet správy je prázdny. Chcete ho teraz zadaÅ¥?'; +$messages['messagesaved'] = 'Správa bola uložená ako koncept.'; +$messages['successfullysaved'] = 'Ukladanie bolo úspeÅ¡ne dokonÄené.'; +$messages['savingresponse'] = 'Ukladanie textu odpovede...'; +$messages['deleteresponseconfirm'] = 'Naozaj chcete vymazaÅ¥ text odpovede?'; +$messages['addedsuccessfully'] = 'Kontakt bol pridaný do adresára.'; +$messages['contactexists'] = 'Kontakt s touto e-mailovou adresou už existuje.'; +$messages['contactnameexists'] = 'Kontakt s takýmto menom už existuje.'; +$messages['blockedimages'] = 'Kvôli ochrane vášho súkromia boli v tejto správe zablokované vzdialené obrázky.'; +$messages['encryptedmessage'] = 'Táto správa je zaÅ¡ifrovaná, a nie je možné ju zobraziÅ¥. PrepáÄte!'; +$messages['nocontactsfound'] = 'NenaÅ¡li sa žiadne kontakty.'; +$messages['contactnotfound'] = 'Požadovaný kontakt sa nenaÅ¡iel.'; +$messages['contactsearchonly'] = 'Zadajte nejaký výraz pre vyhľadanie kontaktov'; +$messages['sendingfailed'] = 'Nepodarilo sa odoslaÅ¥ správu.'; +$messages['senttooquickly'] = 'PoÄkajte $sec sekúnd pred odoslanÃm tejto správy.'; +$messages['errorsavingsent'] = 'PoÄas ukladania odoslanej správy sa vyskytla chyba.'; +$messages['errorsaving'] = 'PoÄas ukladania sa vyskytla chyba.'; +$messages['errormoving'] = 'Správu/správy nemožno presunúť.'; +$messages['errorcopying'] = 'Správu/správy nemožno skopÃrovaÅ¥,'; +$messages['errordeleting'] = 'Správu/správy nemožno vymazaÅ¥.'; +$messages['errormarking'] = 'Nemožno oznaÄiÅ¥ správu/správy.'; +$messages['deletecontactconfirm'] = 'Naozaj chcete vymazaÅ¥ vybrané kontakty?'; +$messages['deletegroupconfirm'] = 'Naozaj chcete vymazaÅ¥ vybranú skupinu?'; +$messages['deletemessagesconfirm'] = 'Naozaj chcete vymazaÅ¥ vybrané správy?'; +$messages['deletefolderconfirm'] = 'Naozaj chcete vymazaÅ¥ tento prieÄinok?'; +$messages['purgefolderconfirm'] = 'Naozaj chcete vyprázdniÅ¥ tento prieÄinok?'; +$messages['contactdeleting'] = 'Vymazávajú sa kontakty...'; +$messages['groupdeleting'] = 'Vymazáva sa skupina...'; +$messages['folderdeleting'] = 'Vymazáva sa prieÄinok ...'; +$messages['foldermoving'] = 'Presúva sa prieÄinok...'; +$messages['foldersubscribing'] = 'Prebieha prihlasovanie k prieÄinku...'; +$messages['folderunsubscribing'] = 'Prebieha odhlasovanie z prieÄinka...'; +$messages['formincomplete'] = 'Formulár nie je kompletne vyplnený.'; +$messages['noemailwarning'] = 'ProsÃm zadajte platnú e-mailovú adresu.'; +$messages['nonamewarning'] = 'ProsÃm zadajte meno.'; +$messages['nopagesizewarning'] = 'ProsÃm zadajte poÄet záznamov na stranu.'; +$messages['nosenderwarning'] = 'ProsÃm zadajte adresu odosielateľa.'; +$messages['norecipientwarning'] = 'ProsÃm zadajte aspoň jedného prÃjemcu.'; +$messages['nosubjectwarning'] = '"Predmet" správy je prázdny. Chcete ho teraz zadaÅ¥?'; $messages['nobodywarning'] = 'Chcete odoslaÅ¥ správu bez textu?'; $messages['notsentwarning'] = 'Správa nebola odoslaná, chcete ju zruÅ¡iÅ¥?'; -$messages['noldapserver'] = 'ProsÃm, zvoľte LDAP server na vyhľadávanie'; -$messages['nosearchname'] = 'ProsÃm vložte meno alebo emailovú adresu'; -$messages['notuploadedwarning'] = 'EÅ¡te neboli nahrané vÅ¡etky prÃlohy. PoÄkajte prosÃm alebo nahrávanie zruÅ¡te.'; -$messages['searchsuccessful'] = 'nájdených $nr správ'; -$messages['contactsearchsuccessful'] = 'Bolo nájdených $nr kontaktov.'; -$messages['searchnomatch'] = 'Hľadaný výraz nebol nájdený'; +$messages['restoresavedcomposedata'] = 'NaÅ¡la sa starÅ¡ia správa, ktorú ste napÃsali ale neodoslali.\n\nPredmet: $subject\nUložené: $date\n\nChcete túto správu obnoviÅ¥?'; +$messages['noldapserver'] = 'ProsÃm vyberte server LDAP pre vyhľadávanie.'; +$messages['nosearchname'] = 'ProsÃm zadajte meno alebo e-mailovú adresu kontaktu.'; +$messages['notuploadedwarning'] = 'EÅ¡te neboli nahrané vÅ¡etky súbory. ProsÃm Äakajte alebo nahrávanie zruÅ¡te.'; +$messages['searchsuccessful'] = 'Nájdené správy: $nr.'; +$messages['contactsearchsuccessful'] = 'Nájdené kontakty: $nr.'; +$messages['searchnomatch'] = 'Hľadaný výraz sa nenaÅ¡iel.'; $messages['searching'] = 'Vyhľadáva sa...'; $messages['checking'] = 'Kontroluje sa...'; -$messages['nospellerrors'] = 'Pri kontrole pravopisu neboli nájdené chyby'; -$messages['folderdeleted'] = 'PrieÄinok bol zmazaný'; -$messages['foldersubscribed'] = 'ÚspeÅ¡ne prihlásený k adresáru'; -$messages['folderunsubscribed'] = 'ÚspeÅ¡ne odhlásený z adresára'; -$messages['folderpurged'] = 'Adresár bol vyprázdnený'; -$messages['folderexpunged'] = 'Adresár bol zhustený'; -$messages['deletedsuccessfully'] = 'ÚspeÅ¡ne zmazané'; -$messages['converting'] = 'Odstraňuje sa formátovanie správy...'; -$messages['messageopenerror'] = 'Nedá sa naÄÃtaÅ¥ správa zo servera'; -$messages['fileuploaderror'] = 'NaÄÃtanie súboru nebolo úspeÅ¡né'; -$messages['filesizeerror'] = 'NaÄÃtavaný súbor prekroÄil maximálnu veľkosÅ¥ $size'; +$messages['nospellerrors'] = 'Pri kontrole pravopisu neboli nájdené chyby.'; +$messages['folderdeleted'] = 'PrieÄinok bol úspeÅ¡ne vymazaný.'; +$messages['foldersubscribed'] = 'Prihlásenie k prieÄinku bolo úspeÅ¡né.'; +$messages['folderunsubscribed'] = 'Odhlásenie z prieÄinka bolo úspeÅ¡né.'; +$messages['folderpurged'] = 'PrieÄinok bol úspeÅ¡ne vyprázdnený.'; +$messages['folderexpunged'] = 'Komprimovanie obsahu prieÄinka bolo úspeÅ¡né.'; +$messages['deletedsuccessfully'] = 'Vymazanie bolo úspeÅ¡né.'; +$messages['converting'] = 'Odstraňuje sa formátovanie...'; +$messages['messageopenerror'] = 'Správu nemožno naÄÃtaÅ¥ zo servera.'; +$messages['fileuploaderror'] = 'Nahrávanie súboru bolo neúspeÅ¡né.'; +$messages['filesizeerror'] = 'Nahraný súbor prekroÄil maximálnu veľkosÅ¥ $size.'; $messages['copysuccess'] = 'PoÄet úspeÅ¡ne skopÃrovaných kontaktov: $nr.'; $messages['movesuccess'] = 'PoÄet úspeÅ¡ne presunutých kontaktov: $nr.'; -$messages['copyerror'] = 'Kontakty nie je možné kopÃrovaÅ¥.'; +$messages['copyerror'] = 'Kontakty nemožno kopÃrovaÅ¥.'; $messages['moveerror'] = 'Kontakty nemožno presúvaÅ¥.'; -$messages['sourceisreadonly'] = 'Tento zdroj adries je len na ÄÃtanie'; -$messages['errorsavingcontact'] = 'Nedá sa uložiÅ¥ adresa kontaktu'; -$messages['movingmessage'] = 'Správa sa presúva...'; -$messages['copyingmessage'] = 'Správa sa kopÃruje...'; -$messages['copyingcontact'] = 'KopÃrujem kontakt(y)'; -$messages['movingcontact'] = 'Presúvanie kontaktu (kontaktov)...'; -$messages['deletingmessage'] = 'Mažem správu(y)...'; -$messages['markingmessage'] = 'OznaÄujem správu(y)...'; -$messages['addingmember'] = 'Pridávam kontakt(y) do skupiny...'; -$messages['removingmember'] = 'Odoberám kontakt(y) zo skupiny'; -$messages['receiptsent'] = 'Potvrdenie o prijatà správy bolo odoslané'; -$messages['errorsendingreceipt'] = 'Potvrdenie o prijatà správy sa nedalo odoslaÅ¥'; -$messages['deleteidentityconfirm'] = 'SkutoÄne chcete zmazaÅ¥ túto identitu?'; -$messages['nodeletelastidentity'] = 'Identita sa nedá odstrániÅ¥, je posledná a musà zostaÅ¥.'; -$messages['forbiddencharacter'] = 'Názov prieÄinka obsahuje nepovolený znak'; -$messages['selectimportfile'] = 'Zvoľte súbor, ktorý chcete naÄÃtaÅ¥'; -$messages['addresswriterror'] = 'Zvolený adresár kontaktov je iba na ÄÃtanie'; -$messages['contactaddedtogroup'] = 'Kontakty boli úspeÅ¡ne presunuty do tejto skupiny'; -$messages['contactremovedfromgroup'] = 'Kontakty boli úspeÅ¡ne odstráneny z tejto skupiny'; -$messages['nogroupassignmentschanged'] = 'Priradenia do skupÃn neboli zmenené.'; -$messages['importwait'] = 'Prebieha import, poÄkajte ...'; -$messages['importformaterror'] = 'Import nebol úspeÅ¡ný! Odoslaný súbor nie je platným súborom, z ktorého je možné vykonaÅ¥ import údajov.'; -$messages['importconfirm'] = '<b>ÚspeÅ¡ne sa naÄÃtalo $inserted kontaktov, preskoÄilo sa $skipped existujúcich záznamov</b>:<p><em>$names</em></p>'; -$messages['importconfirmskipped'] = '<b>PreskoÄených $skipped existujúcich záznamov</b>'; +$messages['sourceisreadonly'] = 'Tento zdroj adries je urÄený len na ÄÃtanie.'; +$messages['errorsavingcontact'] = 'Zmeny nebolo možné uložiÅ¥.'; +$messages['movingmessage'] = 'Prebieha presúvanie správ(y)...'; +$messages['copyingmessage'] = 'Prebieha kopÃrovanie správ(y)...'; +$messages['copyingcontact'] = 'Prebieha kopÃrovanie kontaktov...'; +$messages['movingcontact'] = 'Presúvanie kontaktov...'; +$messages['deletingmessage'] = 'Prebieha vymazávanie správ(y)...'; +$messages['markingmessage'] = 'Prebieha oznaÄovanie správ(y)...'; +$messages['addingmember'] = 'Prebieha pridávanie kontaktov do skupiny...'; +$messages['removingmember'] = 'Prebieha odstraňovanie kontaktov zo skupiny...'; +$messages['receiptsent'] = 'Potvrdenie o preÄÃtanà bolo odoslané.'; +$messages['errorsendingreceipt'] = 'Potvrdenie nemožno odoslaÅ¥.'; +$messages['deleteidentityconfirm'] = 'Naozaj chcete vymazaÅ¥ túto identitu?'; +$messages['nodeletelastidentity'] = 'Túto identitu nemožno vymazaÅ¥, pretože je posledná.'; +$messages['forbiddencharacter'] = 'Názov prieÄinka obsahuje nepovolený znak.'; +$messages['selectimportfile'] = 'Zvoľte súbor, ktorý chcete importovaÅ¥ na server.'; +$messages['addresswriterror'] = 'Do vybraného adresára nie je možné zapisovaÅ¥ údaje.'; +$messages['contactaddedtogroup'] = 'Kontakty boli úspeÅ¡ne pridané do tejto skupiny.'; +$messages['contactremovedfromgroup'] = 'Kontakty boli úspeÅ¡ne odstránené z tejto skupiny.'; +$messages['nogroupassignmentschanged'] = 'Priradenia do skupÃn sa nezmenili.'; +$messages['importwait'] = 'Prebieha importovanie, prosÃm Äakajte...'; +$messages['importformaterror'] = 'Importovanie nebolo úspeÅ¡né! Nahraný súbor nie je platným súborom údajov pre importovanie.'; +$messages['importconfirm'] = '<b>PoÄet úspeÅ¡ne naimportovaných kontaktov: $inserted</b>'; +$messages['importconfirmskipped'] = '<b>PoÄet preskoÄených existujúcich záznamov: $skipped</b>'; $messages['importmessagesuccess'] = 'PoÄet úspeÅ¡ne naimportovaných správ: $nr'; -$messages['importmessageerror'] = 'Importovanie bolo neúspeÅ¡né! Odoslaný súbor nie je platným súborom pre správu alebo poÅ¡tový prieÄinok'; -$messages['opnotpermitted'] = 'Operácia nie je povolená!'; -$messages['nofromaddress'] = 'Zvolená identita neobsahuje e-mailovú adresu'; -$messages['editorwarning'] = 'Prepnutie na editor obyÄajného textu spôsobà stratu formátovania. Chcete napriek tomu pokraÄovaÅ¥?'; -$messages['httpreceivedencrypterror'] = 'Vyskytla sa vážna chyba v konfigurácii. Kontaktujte bezodkladne administrátora. <b>VaÅ¡a správa nemohla byÅ¥ odoslaná.</b>'; -$messages['smtpconnerror'] = 'Chyba SMTP: Pripojenie na server zlyhalo'; -$messages['smtpautherror'] = 'Chyba SMTP: Autorizácie zlyhala'; -$messages['smtpfromerror'] = 'Chyba SMTP: Nemožno nastaviÅ¥ odosielateľa ($msg)'; -$messages['smtptoerror'] = 'Chyba SMTP: Nemožno pridaÅ¥ prÃjemca ($msg)'; -$messages['smtprecipientserror'] = 'Chyba SMTP: Nemožno spracovaÅ¥ zoznam prÃjemcov'; +$messages['importmessageerror'] = 'Importovanie bolo neúspeÅ¡né! Odoslaný súbor nie je platným súborom pre importovanie'; +$messages['opnotpermitted'] = 'Táto operácia nie je povolená!'; +$messages['nofromaddress'] = 'Pri vybranej identite chýba e-mailová adresa.'; +$messages['editorwarning'] = 'Prepnutie na editor Äistého textu spôsobà stratu formátovania. Naozaj chcete pokraÄovaÅ¥?'; +$messages['httpreceivedencrypterror'] = 'Vyskytla sa vážna chyba v konfigurácii. IhneÄ kontaktujte administrátora. <b>VaÅ¡u správu nemožno odoslaÅ¥.</b>'; +$messages['smtpconnerror'] = 'Chyba SMTP ($code): NeúspeÅ¡né pripojenie k serveru.'; +$messages['smtpautherror'] = 'Chyba SMTP ($code): NeúspeÅ¡ná autentifikácia.'; +$messages['smtpfromerror'] = 'Chyba SMTP ($code): Nemožno nastaviÅ¥ odosielateľa "$from" ($msg).'; +$messages['smtptoerror'] = 'Chyba SMTP ($code): Nemožno pridaÅ¥ prÃjemcu "$to" ($msg).'; +$messages['smtprecipientserror'] = 'Chyba SMTP: Nemožno spracovaÅ¥ zoznam prÃjemcov.'; $messages['smtperror'] = 'Chyba SMTP: $msg'; $messages['emailformaterror'] = 'Neplatná e-mailová adresa: $email'; -$messages['toomanyrecipients'] = 'PrÃliÅ¡ veľa prÃjemcov. ZmenÅ¡ite poÄet prÃjemcov na $max.'; -$messages['maxgroupmembersreached'] = 'PoÄet Älenov skupiny dosiahol maxima z $max'; -$messages['contactdelerror'] = 'Nemôžem vymazaÅ¥ kontakt(y)'; -$messages['contactdeleted'] = 'Kontakt(y) bol vymazaný'; -$messages['contactrestoreerror'] = 'Nemôžem obnoviÅ¥ zmazané kontakty'; -$messages['contactrestored'] = 'Kontakty boli úspeÅ¡ne obnovené'; -$messages['groupdeleted'] = 'Skupina bola vymazaná'; -$messages['grouprenamed'] = 'Skupina bola premenovaná'; -$messages['groupcreated'] = 'Skupina bola vytvorená'; -$messages['savedsearchdeleted'] = 'Uložené vyhľadávanie bolo vymazané.'; -$messages['savedsearchdeleteerror'] = 'Nemôžem zmazaÅ¥ uložené vyhľadávanie.'; -$messages['savedsearchcreated'] = 'Uložené vyhľadávanie bolo vytvorené.'; -$messages['savedsearchcreateerror'] = 'Nemôžem vytvoriÅ¥ uložené vyhľadávanie'; -$messages['messagedeleted'] = 'Správa(y) bola vymazaná'; -$messages['messagemoved'] = 'Správa(y) bola presunutá'; -$messages['messagecopied'] = 'Správa(y) bola skopÃrovaná'; -$messages['messagemarked'] = 'Správa(y) bola oznaÄená'; -$messages['autocompletechars'] = 'Zadajte najmenej $min znamkov pre automatické dopĺňanie'; -$messages['autocompletemore'] = 'Bolo nájdených viac záznamov. NapÃÅ¡te prosÃm viac znakov.'; -$messages['namecannotbeempty'] = 'Meno nemôže byÅ¥ prázdne'; -$messages['nametoolong'] = 'Meno je prÃliÅ¡ dlhé'; -$messages['folderupdated'] = 'Adresár bol aktualizovaný'; -$messages['foldercreated'] = 'Adresár bol vytvorený'; -$messages['invalidimageformat'] = 'Zlý formát obrázku'; -$messages['mispellingsfound'] = 'V správe boli nájdené pravopisné chyby'; -$messages['parentnotwritable'] = 'Nemôžem vytvoriÅ¥/presunúť adresár do zvoleného nadradeného adresára. Nemáte oprávnenia na zmenu.'; +$messages['toomanyrecipients'] = 'PrÃliÅ¡ veľa prÃjemcov. Zredukujte poÄet prÃjemcov na $max.'; +$messages['maxgroupmembersreached'] = 'PoÄet Älenov skupiny prekraÄuje maximum: $max'; +$messages['internalerror'] = 'DoÅ¡lo k internej chybe systému. ProsÃm skúste to eÅ¡te raz.'; +$messages['contactdelerror'] = 'Nemožno vymazaÅ¥ kontakt(y).'; +$messages['contactdeleted'] = 'Kontakty boli úspeÅ¡ne vymazané.'; +$messages['contactrestoreerror'] = 'Nemožno obnoviÅ¥ vymazané kontakty.'; +$messages['contactrestored'] = 'Kontakty boli úspeÅ¡ne obnovené.'; +$messages['groupdeleted'] = 'Skupina bola úspeÅ¡ne vymazaná.'; +$messages['grouprenamed'] = 'Skupina bola úspeÅ¡ne premenovaná.'; +$messages['groupcreated'] = 'Skupina bola úspeÅ¡ne vytvorená.'; +$messages['savedsearchdeleted'] = 'Uložené výsledky vyhľadávania boli úspeÅ¡ne vymazané.'; +$messages['savedsearchdeleteerror'] = 'Nemožno vymazaÅ¥ uložené výsledky vyhľadávania.'; +$messages['savedsearchcreated'] = 'Uložené výsledky vyhľadávania boli úspeÅ¡ne vytvorené.'; +$messages['savedsearchcreateerror'] = 'Nemožno vytvoriÅ¥ uložené výsledky vyhľadávania.'; +$messages['messagedeleted'] = 'Vymazanie správ(y) bolo úspeÅ¡né.'; +$messages['messagemoved'] = 'Presunutie správ(y) bolo úspeÅ¡né.'; +$messages['messagecopied'] = 'KopÃrovanie správ(y) bolo úspeÅ¡né.'; +$messages['messagemarked'] = 'OznaÄovanie správ(y) bolo úspeÅ¡né.'; +$messages['autocompletechars'] = 'Zadajte najmenej $min znakov pre automatické dopĺňanie.'; +$messages['autocompletemore'] = 'NaÅ¡lo sa viacero záznamov. Zadajte prosÃm viac znakov.'; +$messages['namecannotbeempty'] = 'Meno nemôže byÅ¥ prázdne.'; +$messages['nametoolong'] = 'Meno je prÃliÅ¡ dlhé.'; +$messages['folderupdated'] = 'PrieÄinok bol úspeÅ¡ne aktualizovaný.'; +$messages['foldercreated'] = 'PrieÄinok bol úspeÅ¡ne vytvorený.'; +$messages['invalidimageformat'] = 'Neplatný formát obrázka'; +$messages['mispellingsfound'] = 'V správe boli nájdené pravopisné chyby.'; +$messages['parentnotwritable'] = 'Nemožno vytvoriÅ¥/presunúť prieÄinok do vybraného rodiÄovského prieÄinka. Nemáte prÃstupové oprávnenia.'; $messages['messagetoobig'] = 'ÄŒasÅ¥ správy je prÃliÅ¡ veľká na spracovanie.'; $messages['attachmentvalidationerror'] = 'UPOZORNENIE! Táto prÃloha je podozrivá, pretože jej typ sa nezhoduje s typom uvedeným v správe. Ak odosielateľovi prÃlohy nedôverujete, nemali by ste prÃlohu otváraÅ¥. Môže totiž obsahovaÅ¥ Å¡kodlivý obsah.<br/><br/><em>OÄakávaná hodnota: $expected; nájdená hodnota: $detected</em>'; $messages['noscriptwarning'] = 'Upozornenie: Táto webmailová služba vyžaduje Javascript! Ak ju chcete použÃvaÅ¥, prosÃm aktivujte Javascript v nastaveniach svojho prehliadaÄa.'; diff --git a/program/localization/sl_SI/labels.inc b/program/localization/sl_SI/labels.inc index f93684d69..cdba04170 100644 --- a/program/localization/sl_SI/labels.inc +++ b/program/localization/sl_SI/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from – $to od $count'; $labels['copy'] = 'Kopiraj'; $labels['move'] = 'Premakni'; $labels['moveto'] = 'Premakni v...'; +$labels['copyto'] = 'Kopiraj v...'; $labels['download'] = 'Prenesi'; $labels['open'] = 'Odpri'; $labels['showattachment'] = 'Prikaži'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'ÄŒrkovanje'; $labels['checkspelling'] = 'Preglej pravopis'; $labels['resumeediting'] = 'Nadaljuj z urejanjem'; $labels['revertto'] = 'Razveljavi'; +$labels['restore'] = 'Obnovi'; +$labels['restoremessage'] = 'Obnovi sporoÄilo'; +$labels['responses'] = 'Odgovori'; +$labels['insertresponse'] = 'Vnesi odgovor'; +$labels['manageresponses'] = 'Uredi odgovore'; +$labels['savenewresponse'] = 'Shrani nove odgovore'; +$labels['editresponses'] = 'Uredi odgovore'; +$labels['editresponse'] = 'Uredi odgovor'; +$labels['responsename'] = 'Ime'; +$labels['responsetext'] = 'Tekst za odgovor'; $labels['attach'] = 'Pripni'; $labels['attachments'] = 'Priponke'; $labels['upload'] = 'Naloži'; @@ -316,7 +327,11 @@ $labels['searchdelete'] = 'IzbriÅ¡i iskanje'; $labels['import'] = 'Uvozi'; $labels['importcontacts'] = 'Uvozi stike'; $labels['importfromfile'] = 'Uvozi iz datoteke:'; +$labels['importtarget'] = 'Dodaj stike v'; $labels['importreplace'] = 'Zamenjaj celoten imenik'; +$labels['importgroups'] = 'Vnesi skupinske zadolžitve'; +$labels['importgroupsall'] = 'Vse (ustvari skupine, Äe je potrebno)'; +$labels['importgroupsexisting'] = 'Samo za obstojeÄe skupine'; $labels['importdesc'] = 'Stike lahko naložite iz obstojeÄega imenika. <br/>Trenutno je podprt uvoz stikov v zapisu <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ali v CSV (z vejico loÄene vrednosti) zapisu.'; $labels['done'] = 'DokonÄano'; $labels['settingsfor'] = 'Nastavitve za'; @@ -424,6 +439,9 @@ $labels['standardwindows'] = 'Prikaži pojavna okna kot obiÄajna'; $labels['forwardmode'] = 'Posredovanje sporoÄil'; $labels['inline'] = 'medvrstiÄno'; $labels['asattachment'] = 'Kot priponka'; +$labels['replyallmode'] = 'Privzete možnosti gumba [Odgovori vsem]'; +$labels['replyalldefault'] = 'odgovori vsem'; +$labels['replyalllist'] = 'odgovori na dopisni seznam (v kolikor ta obstaja)'; $labels['folder'] = 'Mapa'; $labels['folders'] = 'Mape'; $labels['foldername'] = 'Ime mape'; diff --git a/program/localization/sl_SI/messages.inc b/program/localization/sl_SI/messages.inc index f1beffc0f..9b4370922 100644 --- a/program/localization/sl_SI/messages.inc +++ b/program/localization/sl_SI/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -33,6 +33,7 @@ $messages['invalidhost'] = 'Nepravilno ime strežnika'; $messages['nomessagesfound'] = 'V poÅ¡tnem predalu ni sporoÄil.'; $messages['loggedout'] = 'Odjava je bila uspeÅ¡na.'; $messages['mailboxempty'] = 'PoÅ¡tni predal je prazen.'; +$messages['nomessages'] = 'Ni sporoÄil'; $messages['refreshing'] = 'Osvežujem...'; $messages['loading'] = 'Nalaganje...'; $messages['uploading'] = 'Prenos dokumenta na strežnik...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'SporoÄilo je bilo uspeÅ¡no poslano.'; $messages['savingmessage'] = 'Shranjevanje sporoÄila...'; $messages['messagesaved'] = 'SporoÄilo je bilo shranjeno v Osnutke'; $messages['successfullysaved'] = 'UspeÅ¡no shranjeno.'; +$messages['savingresponse'] = 'Shranjevanje odgovora...'; +$messages['deleteresponseconfirm'] = 'Ste prepriÄani, da želite izbrisati ta odgovor?'; $messages['addedsuccessfully'] = 'Stik je bil uspeÅ¡no dodan v imenik.'; $messages['contactexists'] = 'Stik s tem elektronskim naslovom že obstaja.'; $messages['contactnameexists'] = 'Stik s tem imenom že obstaja'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'Iskanega stika ni bilo mogoÄe najti.'; $messages['contactsearchonly'] = 'VpiÅ¡ite iskalni parameter za iskanje stika'; $messages['sendingfailed'] = 'SporoÄila ni bilo mogoÄe poslati.'; $messages['senttooquickly'] = 'PoÄakajte $sec sekund in nato znova poskusite s poÅ¡iljanjem sporoÄila.'; +$messages['errorsavingsent'] = 'Pri shranjevanju poslanega sporoÄila je priÅ¡lo do napake.'; +$messages['errorsaving'] = 'Pri shranjevanju je priÅ¡lo do napake.'; $messages['errormoving'] = 'SporoÄila ni bilo mogoÄe premakniti.'; $messages['errorcopying'] = 'SporoÄila ni bilo mogoÄe kopirati.'; $messages['errordeleting'] = 'SporoÄila ni bilo mogoÄe izbrisati.'; @@ -78,6 +83,7 @@ $messages['norecipientwarning'] = 'Vnesite vsaj enega prejemnika sporoÄila'; $messages['nosubjectwarning'] = 'Polje "Zadeva" je prazno. Želite dodati tekst v to polje?'; $messages['nobodywarning'] = 'Želite poslati sporoÄilo brez vsebine?'; $messages['notsentwarning'] = 'SporoÄilo ni bilo poslano. Želite zavreÄi to sporoÄilo?'; +$messages['restoresavedcomposedata'] = 'Ali želite nadaljevati z urejanjem Å¡e neodposlanega osnutka:\n\nZadeva: $subject\nShranjeno dne: $date\n\n '; $messages['noldapserver'] = 'Izberite LDAP strežnik, v katerem želite iskati?'; $messages['nosearchname'] = 'Vnesite ime ali elektronski naslov stika'; $messages['notuploadedwarning'] = 'Priponke se Å¡e nalagajo na strežnik. PoÄakajte ali prekinite prenos.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'Napaka pri poÅ¡iljanju:$msg'; $messages['emailformaterror'] = 'Nepravilen elektronski naslov: $email'; $messages['toomanyrecipients'] = 'Navedli ste preveÄ prejemnikov. ZmanjÅ¡ajte Å¡tevilo prejemnikov na $max'; $messages['maxgroupmembersreached'] = 'Å tevilo Älanov skupine presega najveÄje dovoljeno Å¡tevilo $max.'; +$messages['internalerror'] = 'PriÅ¡lo je do napake. Poskusite znova.'; $messages['contactdelerror'] = 'Stika/ov ni bilo mogoÄe izbrisati'; $messages['contactdeleted'] = 'Stik/i so bili uspeÅ¡no izbrisani'; $messages['contactrestoreerror'] = 'Ni bilo mogoÄe obnoviti izbrisanih stikov.'; diff --git a/program/localization/sv_SE/labels.inc b/program/localization/sv_SE/labels.inc index 48f71ab57..6b7765269 100644 --- a/program/localization/sv_SE/labels.inc +++ b/program/localization/sv_SE/labels.inc @@ -51,7 +51,8 @@ $labels['messagenrof'] = 'Meddelande $nr av $count'; $labels['fromtoshort'] = '$from – $to av $count'; $labels['copy'] = 'Kopiera'; $labels['move'] = 'Flytta'; -$labels['moveto'] = 'Flytta till:'; +$labels['moveto'] = 'Flytta till...'; +$labels['copyto'] = 'Kopiera till...'; $labels['download'] = 'Ladda ner'; $labels['open'] = 'Öppna'; $labels['showattachment'] = 'Visa'; @@ -100,8 +101,8 @@ $labels['longdec'] = 'december'; $labels['today'] = 'idag'; $labels['refresh'] = 'Uppdatera'; $labels['checkmail'] = 'Hämta nya meddelanden'; -$labels['compose'] = 'Nytt meddelande'; -$labels['writenewmessage'] = 'Nytt meddelande'; +$labels['compose'] = 'Meddelande'; +$labels['writenewmessage'] = 'Skriv nytt meddelande'; $labels['reply'] = 'Svara'; $labels['replytomessage'] = 'Svara avsändaren'; $labels['replytoallmessage'] = 'Svara avsändaren och alla mottagare'; @@ -112,7 +113,7 @@ $labels['forwardinline'] = 'Vidarebefordra infogat'; $labels['forwardattachment'] = 'Vidarebefordra som bilaga'; $labels['forwardmessage'] = 'Vidarebefordra meddelande'; $labels['deletemessage'] = 'Ta bort meddelande'; -$labels['movemessagetotrash'] = 'Flytta meddelande till papperskorgen'; +$labels['movemessagetotrash'] = 'Flytta meddelande till Papperskorg'; $labels['printmessage'] = 'Skriv ut'; $labels['previousmessage'] = 'Visa föregÃ¥ende meddelande'; $labels['firstmessage'] = 'Visa första meddelandet'; @@ -126,7 +127,7 @@ $labels['markread'] = 'Läst'; $labels['markunread'] = 'Oläst'; $labels['markflagged'] = 'Flaggat'; $labels['markunflagged'] = 'Oflaggat'; -$labels['moreactions'] = 'Fler Ã¥tgärder'; +$labels['moreactions'] = 'Fler Ã¥tgärder...'; $labels['more'] = 'Fler'; $labels['back'] = 'Tillbaka'; $labels['options'] = 'Alternativ'; @@ -139,7 +140,7 @@ $labels['flagged'] = 'Flaggade'; $labels['unanswered'] = 'Obesvarade'; $labels['withattachment'] = 'Med bilaga'; $labels['deleted'] = 'Borttagna'; -$labels['undeleted'] = 'Inte borttaget'; +$labels['undeleted'] = 'Inte borttagna'; $labels['invert'] = 'Invertera'; $labels['filter'] = 'Filter'; $labels['list'] = 'Lista'; @@ -163,7 +164,7 @@ $labels['listcolumns'] = 'Kolumner'; $labels['listsorting'] = 'Sortering'; $labels['listorder'] = 'Ordning'; $labels['listmode'] = 'Visningsläge'; -$labels['folderactions'] = 'Hantera kataloger'; +$labels['folderactions'] = 'Hantera kataloger...'; $labels['compact'] = 'Packa'; $labels['empty'] = 'Töm'; $labels['importmessages'] = 'Importera meddelanden'; @@ -197,12 +198,22 @@ $labels['spellcheck'] = 'Rättstava'; $labels['checkspelling'] = 'Kontrollera stavning'; $labels['resumeediting'] = 'Ã…teruppta redigering'; $labels['revertto'] = 'Ã…tergÃ¥ till'; +$labels['restore'] = 'Ã…terskapa'; +$labels['restoremessage'] = 'Ã…terskapa meddelande?'; +$labels['responses'] = 'Responser'; +$labels['insertresponse'] = 'Infoga respons'; +$labels['manageresponses'] = 'Hantera responser'; +$labels['savenewresponse'] = 'Spara ny respons'; +$labels['editresponses'] = 'Ändra responser'; +$labels['editresponse'] = 'Ändra respons'; +$labels['responsename'] = 'Namn'; +$labels['responsetext'] = 'Responstext'; $labels['attach'] = 'Bifoga'; $labels['attachments'] = 'Bilagor'; $labels['upload'] = 'Bifoga'; $labels['uploadprogress'] = '$percent ($current av $total)'; $labels['close'] = 'Stäng'; -$labels['messageoptions'] = 'Meddelandealternativ'; +$labels['messageoptions'] = 'Meddelandealternativ...'; $labels['low'] = 'LÃ¥g'; $labels['lowest'] = 'Lägst'; $labels['normal'] = 'Normal'; @@ -213,8 +224,8 @@ $labels['showimages'] = 'Visa bilder'; $labels['alwaysshow'] = 'Visa alltid bilder frÃ¥n $sender'; $labels['isdraft'] = 'Detta meddelande är ett utkast.'; $labels['andnmore'] = '$nr fler...'; -$labels['togglemoreheaders'] = 'Visa fler meddelandehuvuden'; -$labels['togglefullheaders'] = 'Växla meddelandehuvuden'; +$labels['togglemoreheaders'] = 'Växla ytterligare meddelandeinformation'; +$labels['togglefullheaders'] = 'Växla teknisk meddelandeinformation'; $labels['htmltoggle'] = 'HTML'; $labels['plaintoggle'] = 'Text'; $labels['savesentmessagein'] = 'Spara kopia i'; @@ -239,9 +250,9 @@ $labels['jobtitle'] = 'Titel'; $labels['department'] = 'Avdelning'; $labels['gender'] = 'Kön'; $labels['maidenname'] = 'Flicknamn'; -$labels['email'] = 'E-post'; +$labels['email'] = 'Mailadress'; $labels['phone'] = 'Telefon'; -$labels['address'] = 'Adress'; +$labels['address'] = 'Postadress'; $labels['street'] = 'Gata'; $labels['locality'] = 'Ort'; $labels['zipcode'] = 'Postnummer'; @@ -311,7 +322,7 @@ $labels['group'] = 'Grupp'; $labels['groups'] = 'Kontaktgrupper'; $labels['listgroup'] = 'Visa gruppmedlemmar'; $labels['personaladrbook'] = 'Personliga adresser'; -$labels['searchsave'] = 'Lägg till sökning'; +$labels['searchsave'] = 'Spara sökning'; $labels['searchdelete'] = 'Ta bort sökning'; $labels['import'] = 'Importera'; $labels['importcontacts'] = 'Importera kontakter'; @@ -357,8 +368,8 @@ $labels['htmlsignature'] = 'HTML-signatur'; $labels['showemail'] = 'Visa namn och adress'; $labels['previewpane'] = 'Visa meddelandefältet'; $labels['skin'] = 'Stilmall för användargränssnitt'; -$labels['logoutclear'] = 'Töm papperskorgen vid utloggning'; -$labels['logoutcompact'] = 'Packa inkorgen vid utloggning'; +$labels['logoutclear'] = 'Töm Papperskorg vid utloggning'; +$labels['logoutcompact'] = 'Packa Inkorg vid utloggning'; $labels['uisettings'] = 'Användargränssnitt'; $labels['serversettings'] = 'Serverinställningar'; $labels['mailboxview'] = 'Hantering av meddelanden'; @@ -400,10 +411,10 @@ $labels['section'] = 'Avdelning'; $labels['maintenance'] = 'UnderhÃ¥ll'; $labels['newmessage'] = 'Nytt meddelande'; $labels['signatureoptions'] = 'Signaturalternativ'; -$labels['whenreplying'] = 'Vid svar fortsätt skriv'; +$labels['whenreplying'] = 'Vid svar'; $labels['replyempty'] = 'Inkludera inte ursprungligt meddelande'; -$labels['replytopposting'] = 'Ovanför befintligt meddelande'; -$labels['replybottomposting'] = 'Nedanför befintligt meddelande'; +$labels['replytopposting'] = 'Skriv nytt meddelande ovanför befintligt'; +$labels['replybottomposting'] = 'Skriv nytt meddelande nedanför befintligt'; $labels['replyremovesignature'] = 'Ta bort befintlig signatur frÃ¥n meddelandet vid svar'; $labels['autoaddsignature'] = 'Infoga signatur automatiskt'; $labels['newmessageonly'] = 'Vid nytt meddelande'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Hantera popup-rutor som standardfönster'; $labels['forwardmode'] = 'Vidarebefordra meddelande'; $labels['inline'] = 'Infogat'; $labels['asattachment'] = 'Bilaga'; +$labels['replyallmode'] = 'Standardfunktion för knappen Svara alla'; +$labels['replyalldefault'] = 'Svara alla'; +$labels['replyalllist'] = 'Svara endast lista (i förekommande fall)'; $labels['folder'] = 'Katalog'; $labels['folders'] = 'Kataloger'; $labels['foldername'] = 'Katalognamn'; diff --git a/program/localization/sv_SE/messages.inc b/program/localization/sv_SE/messages.inc index 2773ae4c7..546147606 100644 --- a/program/localization/sv_SE/messages.inc +++ b/program/localization/sv_SE/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -24,15 +24,14 @@ $messages['servererror'] = 'Serverfel!'; $messages['servererrormsg'] = 'Serverfel: $msg'; $messages['dberror'] = 'Databasfel!'; $messages['requesttimedout'] = 'Begäran tog för lÃ¥ng tid'; -$messages['errorreadonly'] = 'Ã…tgärden kunde inte utföras. Katalogen är skrivskyddad'; -$messages['errornoperm'] = 'Ã…tgärden kunde inte utföras. Otillräcklig befogenhet'; +$messages['errorreadonly'] = 'Ã…tgärden kunde inte utföras. Katalogen är skrivskyddad.'; +$messages['errornoperm'] = 'Ã…tgärden kunde inte utföras. Otillräcklig befogenhet.'; $messages['erroroverquota'] = 'Ã…tgärden kunde inte utföras. Otillräckligt lagringsutrymme.'; $messages['erroroverquotadelete'] = 'Otillräckligt lagringsutrymme. Tryck pÃ¥ SHIFT och DEL för att ta bort ett meddelande.'; $messages['invalidrequest'] = 'Ogiltig begäran! Informationen sparades inte.'; $messages['invalidhost'] = 'Ogiltigt servernamn.'; -$messages['nomessagesfound'] = 'Inga meddelanden'; +$messages['nomessagesfound'] = 'Inga meddelanden.'; $messages['loggedout'] = 'Du är utloggad. Välkommen Ã¥ter!'; -$messages['mailboxempty'] = 'Katalogen är tom'; $messages['refreshing'] = 'Uppdaterar...'; $messages['loading'] = 'Laddar...'; $messages['uploading'] = 'Överför fil...'; @@ -43,21 +42,25 @@ $messages['sendingmessage'] = 'Skickar meddelande...'; $messages['messagesent'] = 'Meddelandet har skickats.'; $messages['savingmessage'] = 'Sparar meddelande...'; $messages['messagesaved'] = 'Meddelandet har sparats i Utkast'; -$messages['successfullysaved'] = 'Informationen har sparats.'; +$messages['successfullysaved'] = 'Sparat.'; +$messages['savingresponse'] = 'Sparar responstext...'; +$messages['deleteresponseconfirm'] = 'Vill du verkligen ta bort denna responstext?'; $messages['addedsuccessfully'] = 'Kontakten har lagts till i adressboken.'; -$messages['contactexists'] = 'En kontakt med den här adressen finns redan'; -$messages['contactnameexists'] = 'En kontakt med det här namnet finns redan'; +$messages['contactexists'] = 'En kontakt med den här adressen finns redan.'; +$messages['contactnameexists'] = 'En kontakt med det här namnet finns redan.'; $messages['blockedimages'] = 'Externt länkade bilder i meddelandet har blockerats.'; $messages['encryptedmessage'] = 'Meddelandet är krypterat och kan tyvärr inte visas.'; -$messages['nocontactsfound'] = 'Inga kontakter hittades'; -$messages['contactnotfound'] = 'EfterfrÃ¥gad kontakt hittades inte'; +$messages['nocontactsfound'] = 'Inga kontakter hittades.'; +$messages['contactnotfound'] = 'EfterfrÃ¥gad kontakt hittades inte.'; $messages['contactsearchonly'] = 'Ange sökord för att hitta kontakter'; -$messages['sendingfailed'] = 'Meddelandet kunde inte skickas'; -$messages['senttooquickly'] = 'Vänta ytterligare $sec sekunder med att skicka meddelandet'; -$messages['errormoving'] = 'Meddelandet kunde inte flyttas'; -$messages['errorcopying'] = 'Meddelandet kunde inte kopieras'; -$messages['errordeleting'] = 'Meddelandet kunde inte tas bort'; -$messages['errormarking'] = 'Meddelandet kunde inte markeras'; +$messages['sendingfailed'] = 'Meddelandet kunde inte skickas.'; +$messages['senttooquickly'] = 'Vänta ytterligare $sec sekunder med att skicka meddelandet.'; +$messages['errorsavingsent'] = 'Det skickade meddelandet kunde inte sparas.'; +$messages['errorsaving'] = 'Meddelandet kunde inte sparas.'; +$messages['errormoving'] = 'Meddelandet kunde inte flyttas.'; +$messages['errorcopying'] = 'Meddelandet kunde inte kopieras.'; +$messages['errordeleting'] = 'Meddelandet kunde inte tas bort.'; +$messages['errormarking'] = 'Meddelandet kunde inte markeras.'; $messages['deletecontactconfirm'] = 'Vill du verkligen ta bort valda kontakter?'; $messages['deletegroupconfirm'] = 'Vill du verkligen ta bort den valda gruppen?'; $messages['deletemessagesconfirm'] = 'Vill du verkligen ta bort valda meddelanden?'; @@ -69,40 +72,41 @@ $messages['folderdeleting'] = 'Tar bort katalog...'; $messages['foldermoving'] = 'Flyttar katalog...'; $messages['foldersubscribing'] = 'Startar prenumeration pÃ¥ katalog...'; $messages['folderunsubscribing'] = 'Avslutar prenumeration pÃ¥ katalog...'; -$messages['formincomplete'] = 'Formuläret var inte komplett ifyllt'; -$messages['noemailwarning'] = 'Ange en giltig adress'; -$messages['nonamewarning'] = 'Ange ett namn'; -$messages['nopagesizewarning'] = 'Ange en sidstorlek'; -$messages['nosenderwarning'] = 'Ange en avsändaradress'; -$messages['norecipientwarning'] = 'Ange minst en mottagare'; -$messages['nosubjectwarning'] = 'Ämnesraden är tom. Vill du ange ämne nu?'; +$messages['formincomplete'] = 'Formuläret var inte komplett ifyllt.'; +$messages['noemailwarning'] = 'Ange en giltig adress.'; +$messages['nonamewarning'] = 'Ange ett namn.'; +$messages['nopagesizewarning'] = 'Ange en sidstorlek.'; +$messages['nosenderwarning'] = 'Ange en avsändaradress.'; +$messages['norecipientwarning'] = 'Ange minst en mottagare.'; +$messages['nosubjectwarning'] = 'Ämnesraden är tom. Vill du ange ett ämne nu?'; $messages['nobodywarning'] = 'Skicka det här meddelandet utan text?'; $messages['notsentwarning'] = 'Meddelandet har inte skickats. Vill du avbryta meddelandet?'; -$messages['noldapserver'] = 'Ange en LDAP-server för att söka'; -$messages['nosearchname'] = 'Ange ett kontaktnamn eller en adress'; +$messages['restoresavedcomposedata'] = 'Ett tidigare skrivet men inte skickat meddelande upptäcktes.\n\nÄmne: $subject\nSparat: $date\n\nVill du Ã¥terskapa meddelandet?'; +$messages['noldapserver'] = 'Ange en LDAP-server för att söka.'; +$messages['nosearchname'] = 'Ange ett kontaktnamn eller en adress.'; $messages['notuploadedwarning'] = 'Alla bilagor har inte överförts ännu. Vänta eller avbryt överföringen.'; $messages['searchsuccessful'] = '$nr meddelanden hittades.'; $messages['contactsearchsuccessful'] = '$nr kontakter hittades.'; -$messages['searchnomatch'] = 'Sökningen gav inget resultat'; +$messages['searchnomatch'] = 'Sökningen gav inget resultat.'; $messages['searching'] = 'Söker...'; $messages['checking'] = 'Kontrollerar...'; -$messages['nospellerrors'] = 'Inget stavfel hittades'; +$messages['nospellerrors'] = 'Inget stavfel hittades.'; $messages['folderdeleted'] = 'Katalogen togs bort.'; $messages['foldersubscribed'] = 'Prenumeration pÃ¥ katalog startad.'; $messages['folderunsubscribed'] = 'Prenumeration pÃ¥ katalog avslutad.'; -$messages['folderpurged'] = 'Katalog rensad.'; -$messages['folderexpunged'] = 'Katalog tömd.'; -$messages['deletedsuccessfully'] = 'Lyckad borttagning.'; -$messages['converting'] = 'Tar bort formatering frÃ¥n meddelande...'; -$messages['messageopenerror'] = 'Meddelandet kunde inte hämtas frÃ¥n servern'; -$messages['fileuploaderror'] = 'Filuppladdning misslyckades'; -$messages['filesizeerror'] = 'Den uppladdade filens storlek överstiger högsta tillÃ¥tna $size'; +$messages['folderpurged'] = 'Katalog tömd.'; +$messages['folderexpunged'] = 'Katalog rensad.'; +$messages['deletedsuccessfully'] = 'Borttaget.'; +$messages['converting'] = 'Tar bort formatering...'; +$messages['messageopenerror'] = 'Meddelandet kunde inte hämtas frÃ¥n servern.'; +$messages['fileuploaderror'] = 'Filuppladdning misslyckades.'; +$messages['filesizeerror'] = 'Den uppladdade filens storlek överstiger högsta tillÃ¥tna $size.'; $messages['copysuccess'] = '$nr kontakter har kopierats.'; $messages['movesuccess'] = '$nr kontakter har flyttats.'; $messages['copyerror'] = 'NÃ¥gra kontakter kunde inte kopieras.'; $messages['moveerror'] = 'NÃ¥gra kontakter kunde inte flyttas.'; -$messages['sourceisreadonly'] = 'Denna adresskälla är skrivskyddad'; -$messages['errorsavingcontact'] = 'Kontaktadressen kunde inte sparas'; +$messages['sourceisreadonly'] = 'Denna adresskälla är skrivskyddad.'; +$messages['errorsavingcontact'] = 'Kontaktadressen kunde inte sparas.'; $messages['movingmessage'] = 'Flyttar meddelande...'; $messages['copyingmessage'] = 'Kopierar meddelande...'; $messages['copyingcontact'] = 'Kopierar kontakter...'; @@ -112,12 +116,12 @@ $messages['markingmessage'] = 'Markerar meddelande...'; $messages['addingmember'] = 'Lägger till kontakter i gruppen...'; $messages['removingmember'] = 'Tar bort kontakter frÃ¥n gruppen...'; $messages['receiptsent'] = 'Mottagarkvitto har skickats.'; -$messages['errorsendingreceipt'] = 'Mottagarkvitto kunde inte skickas'; +$messages['errorsendingreceipt'] = 'Mottagarkvitto kunde inte skickas.'; $messages['deleteidentityconfirm'] = 'Vill du verkligen ta bort denna identitet?'; $messages['nodeletelastidentity'] = 'Du kan inte ta bort identiteten, den är din sista.'; -$messages['forbiddencharacter'] = 'Katalognamnet innehÃ¥ller otillÃ¥tna tecken'; -$messages['selectimportfile'] = 'Välj en fil att ladda upp'; -$messages['addresswriterror'] = 'Angiven adressbok är skrivskyddad'; +$messages['forbiddencharacter'] = 'Katalognamnet innehÃ¥ller otillÃ¥tna tecken.'; +$messages['selectimportfile'] = 'Välj en fil att ladda upp.'; +$messages['addresswriterror'] = 'Markerad adressbok är skrivskyddad.'; $messages['contactaddedtogroup'] = 'Kontakterna har lagts till i gruppen.'; $messages['contactremovedfromgroup'] = 'Kontakterna har tagits bort frÃ¥n gruppen.'; $messages['nogroupassignmentschanged'] = 'Ingen grupptillhörighet ändrades.'; @@ -125,46 +129,47 @@ $messages['importwait'] = 'Importerar, var god vänta...'; $messages['importformaterror'] = 'Importen misslyckades! Filen har inte korrekt dataformat.'; $messages['importconfirm'] = '<b>Lyckad import av $inserted kontakter</b>'; $messages['importconfirmskipped'] = '<b>Hoppade över $skipped befintliga poster</b>'; -$messages['importmessagesuccess'] = '$nr meddelanden har importerats.'; -$messages['importmessageerror'] = 'Importen misslyckades! Filen innehÃ¥ller inte nÃ¥got meddelande eller nÃ¥gon brevlÃ¥da'; +$messages['importmessagesuccess'] = '$nr meddelanden har importerats'; +$messages['importmessageerror'] = 'Importen misslyckades! Filen är inte ett giltigt meddelande eller en brevlÃ¥da'; $messages['opnotpermitted'] = 'OtillÃ¥ten operation!'; -$messages['nofromaddress'] = 'Adress saknas i den valda identiteten'; +$messages['nofromaddress'] = 'Adress saknas i den valda identiteten.'; $messages['editorwarning'] = 'Genom att växla till text-läge gÃ¥r formateringen förlorad. Vill du fortsätta?'; $messages['httpreceivedencrypterror'] = 'Ett irreparabelt fel har uppstÃ¥tt. Kontakta administratören omgÃ¥ende. <b>Meddelandet kan inte skickas.</b>'; -$messages['smtpconnerror'] = 'SMTP-fel ($code): Anslutning till servern misslyckades'; -$messages['smtpautherror'] = 'SMTP-fel ($code): Inloggningen misslyckades'; -$messages['smtpfromerror'] = 'SMTP-fel ($code): Kan inte sätta avsändaradress till "$from" ($msg)'; -$messages['smtptoerror'] = 'SMTP-fel ($code): Kan inte lägga till mottagaradress "$to" ($msg)'; -$messages['smtprecipientserror'] = 'SMTP-fel: Felaktigt formaterad lista med mottagaradresser'; +$messages['smtpconnerror'] = 'SMTP-fel ($code): Anslutning till servern misslyckades.'; +$messages['smtpautherror'] = 'SMTP-fel ($code): Inloggningen misslyckades.'; +$messages['smtpfromerror'] = 'SMTP-fel ($code): Kan inte sätta avsändaradress till "$from" ($msg).'; +$messages['smtptoerror'] = 'SMTP-fel ($code): Kan inte lägga till mottagaradress "$to" ($msg).'; +$messages['smtprecipientserror'] = 'SMTP-fel: Felaktigt formaterad lista med mottagaradresser.'; $messages['smtperror'] = 'SMTP-fel: $msg'; $messages['emailformaterror'] = 'Felaktig adress: $email'; -$messages['toomanyrecipients'] = 'FörmÃ¥nga mottagare. Minska antalet till högst $max'; -$messages['maxgroupmembersreached'] = 'Antalet gruppmedlemmar fÃ¥r inte överstiga $max'; -$messages['contactdelerror'] = 'Kontakt kunde inte tas bort'; +$messages['toomanyrecipients'] = 'FörmÃ¥nga mottagare. Minska antalet till högst $max.'; +$messages['maxgroupmembersreached'] = 'Antalet gruppmedlemmar fÃ¥r inte överstiga $max.'; +$messages['internalerror'] = 'Ett internt fel uppstod. Försök igen.'; +$messages['contactdelerror'] = 'Kontakt kunde inte tas bort.'; $messages['contactdeleted'] = 'Kontakt borttagen.'; -$messages['contactrestoreerror'] = 'Borttagna kontakter kunde inte Ã¥terskapas'; +$messages['contactrestoreerror'] = 'Borttagna kontakter kunde inte Ã¥terskapas.'; $messages['contactrestored'] = 'Kontakter Ã¥terskapade.'; $messages['groupdeleted'] = 'Grupp borttagen.'; $messages['grouprenamed'] = 'Gruppnamn ändrat.'; $messages['groupcreated'] = 'Grupp skapad.'; $messages['savedsearchdeleted'] = 'Sparad sökning borttagen.'; -$messages['savedsearchdeleteerror'] = 'Kunde inte ta bort sparad sökning'; +$messages['savedsearchdeleteerror'] = 'Kunde inte ta bort sparad sökning.'; $messages['savedsearchcreated'] = 'Sparad sökning tillagd.'; -$messages['savedsearchcreateerror'] = 'Kunde inte lägga till sparad sökning'; +$messages['savedsearchcreateerror'] = 'Kunde inte lägga till sparad sökning.'; $messages['messagedeleted'] = 'Meddelande borttaget.'; $messages['messagemoved'] = 'Meddelande flyttat.'; $messages['messagecopied'] = 'Meddelande kopierat.'; $messages['messagemarked'] = 'Meddelande markerat.'; -$messages['autocompletechars'] = 'Ange minst $min tecken för automatisk komplettering'; -$messages['autocompletemore'] = 'Flera passande informationsposter funna. Skriv fler tecken.'; -$messages['namecannotbeempty'] = 'Namnet fÃ¥r inte vara tomt'; -$messages['nametoolong'] = 'Namnet är för lÃ¥ngt'; +$messages['autocompletechars'] = 'Ange minst $min tecken för automatisk komplettering.'; +$messages['autocompletemore'] = 'Ytterligare passande poster funna. Skriv fler tecken.'; +$messages['namecannotbeempty'] = 'Namnet fÃ¥r inte vara tomt.'; +$messages['nametoolong'] = 'Namnet är för lÃ¥ngt.'; $messages['folderupdated'] = 'Katalog uppdaterad.'; $messages['foldercreated'] = 'Katalog skapad.'; -$messages['invalidimageformat'] = 'Ogiltigt bildfilsformat'; -$messages['mispellingsfound'] = 'Stavfel hittades i meddelandet'; +$messages['invalidimageformat'] = 'Ogiltigt bildfilsformat.'; +$messages['mispellingsfound'] = 'Stavfel hittades i meddelandet.'; $messages['parentnotwritable'] = 'Katalogen kunde inte skapas eller flyttas. Ã…tkomsträttighet saknas.'; -$messages['messagetoobig'] = 'Denna del av meddelandet är alltför stor för att hantera.'; +$messages['messagetoobig'] = 'Meddelandet är alltför stort att behandla.'; $messages['attachmentvalidationerror'] = 'VARNING! Bilagan misstänks vara av annan typ än vad som anges i meddelandet. Om du inte litar pÃ¥ avsändaren ska du inte öppna bilagan.<br/><br/><em>Angiven typ: $expected; funnen typ: $detected</em>'; $messages['noscriptwarning'] = 'Varning: Denna webbmailtjänst fungerar inte utan Javascript! Aktivera Javascript i webbläsarens inställningar.'; ?> diff --git a/program/localization/ti/labels.inc b/program/localization/ti/labels.inc new file mode 100644 index 000000000..2919f47c0 --- /dev/null +++ b/program/localization/ti/labels.inc @@ -0,0 +1,62 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | localization/<lang>/labels.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. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ +*/ +$labels['welcome'] = 'ሰናዠáˆáˆáŒ»áŠ¥ ናብ $product'; +$labels['username'] = 'ሽáˆá‹“ሙና'; +$labels['password'] = 'መáˆáˆˆáŠ ቃáˆ'; +$labels['server'] = 'á‹áˆƒá‰¢ áŒáˆáŒ‹áˆŽá‰µ'; +$labels['login'] = 'áŠáŠ£á‰±'; +$labels['logout'] = 'áŠá‹áŒ½áŠ¥'; +$labels['mail'] = 'ደብዳበ'; +$labels['settings'] = 'ከመንታá‹'; +$labels['addressbook'] = 'መጽሓá አድራሻ'; +$labels['inbox'] = 'ሳጹን አታዊ'; +$labels['drafts'] = 'ወጡን ጽሑá'; +$labels['sent'] = 'á‹á‰°áˆˆáŠ£áŠ¸'; +$labels['trash'] = 'እንዳጉሓá'; +$labels['junk'] = 'እንዳቅንጠመንጢ'; +$labels['subject'] = 'ዋኒን'; +$labels['from'] = 'ካብ'; +$labels['sender'] = 'áˆáŠ£áŠº(ት)'; +$labels['to'] = 'ናብ'; +$labels['cc'] = 'ካኮ'; +$labels['bcc'] = 'ሕካኮ'; +$labels['replyto'] = 'ተመላሲ ናብ'; +$labels['followupto'] = 'ናብ...á‹áˆµá‹“በ'; +$labels['date'] = 'ዕለት'; +$labels['size'] = 'መጠን'; +$labels['priority'] = 'ህጹጽáŠá‰µ'; +$labels['organization'] = 'á‹á‹µá‰¥'; +$labels['readstatus'] = 'áˆáŠ•á‰£á‰¡'; +$labels['listoptions'] = 'መማáˆáŒ½á‰³á‰µ á‹áˆá‹áˆ'; +$labels['mailboxlist'] = 'ማህዸራት'; +$labels['messagesfromto'] = '$countዠመáˆáŠ¥áŠ½á‰² ካብ $from ናብ $to '; +$labels['sun'] = 'ሰንበ'; +$labels['mon'] = 'ሰኑá‹'; +$labels['tue'] = 'ሰሉስ'; +$labels['wed'] = 'ረቡዕ'; +$labels['thu'] = 'ሓሙስ'; +$labels['fri'] = 'á‹“áˆá‰¢'; +$labels['sat'] = 'ቀዳáˆ'; +$labels['sunday'] = 'ሰንበት'; +$labels['monday'] = 'ሰኑá‹'; +$labels['tuesday'] = 'ሰሉስ'; +$labels['wednesday'] = 'ረቡዕ'; +$labels['thursday'] = 'ሓሙስ'; +$labels['friday'] = 'á‹“áˆá‰¢ '; +$labels['saturday'] = 'ቀዳáˆ'; +?> diff --git a/program/localization/ur_PK/messages.inc b/program/localization/ti/messages.inc index da4e39679..278a0897a 100644 --- a/program/localization/ur_PK/messages.inc +++ b/program/localization/ti/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -15,4 +15,10 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ +$messages['errortitle'] = 'ተጓንᎠጋዶ'; +$messages['loginfailed'] = 'ከá‹á‹² áˆáŠ¥á‰³á‹Ž áˆáˆºáˆ‰'; +$messages['cookiesdisabled'] = 'ጎስጓሲ ኢንተáˆáŠ”ት ዛላማላ አá‹á‰•á‰ áˆáŠ•'; +$messages['sessionerror'] = 'እዋኑ á‹áˆ“ለᎠወዠዋጋ ዘá‹á‰¥áˆ‰ ካáˆáŠ áˆáŒ¥á‰ƒáˆ áŠáˆáŠáˆ እዩ::'; +$messages['storageerror'] = 'ናብ á‹áˆƒá‰¢ áŒáˆáŒ‹áˆ‰á‰µ ቆᎠረኽቢ አá‹á‰°áŠ»áˆˆáŠ•::'; +$messages['servererror'] = 'ጋዶ á‹áˆƒá‰¢á‰µ áŒáˆáŒ‹áˆ‰á‰µ'; ?> diff --git a/program/localization/tr_TR/labels.inc b/program/localization/tr_TR/labels.inc index bcecd51f7..99122ccad 100644 --- a/program/localization/tr_TR/labels.inc +++ b/program/localization/tr_TR/labels.inc @@ -52,6 +52,7 @@ $labels['fromtoshort'] = '$from - $to , Toplam: $count'; $labels['copy'] = 'Kopyala'; $labels['move'] = 'Taşı'; $labels['moveto'] = 'Åžuraya taşı...'; +$labels['copyto'] = 'Åžuraya kopyala...'; $labels['download'] = 'Ä°ndir'; $labels['open'] = 'Aç'; $labels['showattachment'] = 'Göster'; @@ -197,6 +198,16 @@ $labels['spellcheck'] = 'Yazım denetimi'; $labels['checkspelling'] = 'Yazım denetimi yap'; $labels['resumeediting'] = 'Düzenlemeye devam et'; $labels['revertto'] = 'Geri çevir:'; +$labels['restore'] = 'Geri yükle'; +$labels['restoremessage'] = 'Mesajı geri yükle?'; +$labels['responses'] = 'Yanıtlar'; +$labels['insertresponse'] = 'Yanıt ekle'; +$labels['manageresponses'] = 'Yanıtları yönet'; +$labels['savenewresponse'] = 'Yeni yanıt kaydet'; +$labels['editresponses'] = 'Yanıtları düzenle'; +$labels['editresponse'] = 'Yanıtı düzenle'; +$labels['responsename'] = 'Ad'; +$labels['responsetext'] = 'Yanıt metni'; $labels['attach'] = 'Ekle'; $labels['attachments'] = 'Ekler'; $labels['upload'] = 'Yükle'; @@ -428,6 +439,9 @@ $labels['standardwindows'] = 'Popup pencerelerini standart pencere olarak yönet $labels['forwardmode'] = 'Posta yönlendirme'; $labels['inline'] = 'postanın içinde'; $labels['asattachment'] = 'ek olarak'; +$labels['replyallmode'] = '[Tümünü yanıtla] düğmesinin varsayılan eylemi'; +$labels['replyalldefault'] = 'Hepsini yanıtla'; +$labels['replyalllist'] = 'Sadece postalama listesindekileri yanıtla (eÄŸer varsa)'; $labels['folder'] = 'Klasör'; $labels['folders'] = 'Klasörler'; $labels['foldername'] = 'Klasör Adı'; diff --git a/program/localization/tr_TR/messages.inc b/program/localization/tr_TR/messages.inc index 0b2ac1e46..cf3607498 100644 --- a/program/localization/tr_TR/messages.inc +++ b/program/localization/tr_TR/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -30,9 +30,10 @@ $messages['erroroverquota'] = 'Ä°ÅŸlem gerçekleÅŸtirilemedi. BoÅŸ alan yok.'; $messages['erroroverquotadelete'] = 'BoÅŸ alan yok. SHIFT+DEL tuÅŸ kombinasyonunu kullanarak mesajı silin.'; $messages['invalidrequest'] = 'Geçersiz Ä°stek! Veri kaydedilmedi'; $messages['invalidhost'] = 'Geçersiz sunucu adı.'; -$messages['nomessagesfound'] = 'Posta kutusunda ileti bulunamadı'; +$messages['nomessagesfound'] = 'Posta kutusunda ileti bulunamadı.'; $messages['loggedout'] = 'Oturumu baÅŸarılı bir ÅŸekilde kapattınız. Güle güle!'; $messages['mailboxempty'] = 'Posta kutusu boÅŸ'; +$messages['nomessages'] = 'Mesaj yok'; $messages['refreshing'] = 'Yenileniyor...'; $messages['loading'] = 'Yükleniyor...'; $messages['uploading'] = 'Dosya yükleniyor...'; @@ -44,6 +45,8 @@ $messages['messagesent'] = 'Posta gönderildi'; $messages['savingmessage'] = 'Posta kaydediliyor...'; $messages['messagesaved'] = 'Posta taslaklara kaydedildi'; $messages['successfullysaved'] = 'Kaydedildi'; +$messages['savingresponse'] = 'Yanıt metni kaydediliyor...'; +$messages['deleteresponseconfirm'] = 'Yanıt metnini gerçekten silmek istiyor musunuz?'; $messages['addedsuccessfully'] = 'KiÅŸi adres defterine eklendi'; $messages['contactexists'] = 'Rehberde bu e-posta adresine sahip biri zaten var'; $messages['contactnameexists'] = 'Rehberde bu ada sahip biri zaten var.'; @@ -54,6 +57,8 @@ $messages['contactnotfound'] = 'Ä°stenen kiÅŸi bulunamadı'; $messages['contactsearchonly'] = 'KiÅŸi aramak için arama terimleri giriniz'; $messages['sendingfailed'] = 'Posta gönderilemedi'; $messages['senttooquickly'] = 'Lütfen bu postayı göndermeden önce $sec saniye bekleyin'; +$messages['errorsavingsent'] = 'Gönderilen postayı kaydederken hata oluÅŸtu.'; +$messages['errorsaving'] = 'Kaydederken bir hata oluÅŸtu.'; $messages['errormoving'] = 'Posta taşınamadı'; $messages['errorcopying'] = 'Posta kopyalanamadı'; $messages['errordeleting'] = 'Posta silinemedi'; @@ -63,7 +68,7 @@ $messages['deletegroupconfirm'] = 'Seçili grupları silmek istediÄŸinizden emi $messages['deletemessagesconfirm'] = 'Seçili postaları silmek istediÄŸinizden emin misiniz?'; $messages['deletefolderconfirm'] = 'Bu klasörü silmek istediÄŸinizden emin misiniz?'; $messages['purgefolderconfirm'] = 'Bu klasördeki tüm postaları silmek istediÄŸinizden emin misiniz?'; -$messages['contactdeleting'] = 'KiÅŸi(er) siliniyor...'; +$messages['contactdeleting'] = 'KiÅŸi(ler) siliniyor...'; $messages['groupdeleting'] = 'Grup siliniyor...'; $messages['folderdeleting'] = 'Klasör siliniyor...'; $messages['foldermoving'] = 'Klasör taşınıyor...'; @@ -78,31 +83,32 @@ $messages['norecipientwarning'] = 'Lütfen en az bir alıcı belirtin'; $messages['nosubjectwarning'] = '"Konu" kutusu boÅŸ bırakılmış. Åžimdi bir konu belirtmek ister misiniz?'; $messages['nobodywarning'] = 'Postayı boÅŸ olarak gönder?'; $messages['notsentwarning'] = 'Posta gönderilmedi. Postanızı iptal etmek istiyor musunuz?'; +$messages['restoresavedcomposedata'] = 'Daha önce oluÅŸturulmuÅŸ fakat gönderilmemiÅŸ mesaj bulundu.\n\nKonu: $subject\Kaydetme zamanı: $date\n\nBu mesajı geri yüklemek istiyor musunuz?'; $messages['noldapserver'] = 'Lütfen arama için bir LDAP sunucu seçin'; $messages['nosearchname'] = 'Lütfen bir kiÅŸi ismi veya e-posta adresi girin'; $messages['notuploadedwarning'] = 'Henüz tüm ekli dosyalar yüklenmedi. Lütfen bekleyin ya da yüklemeyi iptal edin.'; $messages['searchsuccessful'] = '$nr posta bulundu'; -$messages['contactsearchsuccessful'] = '$nr kiÅŸi bulundu'; -$messages['searchnomatch'] = 'Aramanıza uygun hiçbir sonuç bulunamadı'; +$messages['contactsearchsuccessful'] = '$nr kiÅŸi bulundu.'; +$messages['searchnomatch'] = 'Aramanıza uygun hiçbir sonuç bulunamadı.'; $messages['searching'] = 'Aranıyor...'; $messages['checking'] = 'Denetleniyor...'; -$messages['nospellerrors'] = 'Yazım hatası bulunamadı'; -$messages['folderdeleted'] = 'Klasör silindi'; -$messages['foldersubscribed'] = 'Klasöre abone olundu'; -$messages['folderunsubscribed'] = 'Klasör aboneliÄŸi kaldırıldı'; -$messages['folderpurged'] = 'Klasör sıklaÅŸtırıldı'; -$messages['folderexpunged'] = 'Klasör boÅŸaltıldı'; -$messages['deletedsuccessfully'] = 'Silindi'; +$messages['nospellerrors'] = 'Yazım hatası bulunamadı.'; +$messages['folderdeleted'] = 'Klasör baÅŸarıyla silindi.'; +$messages['foldersubscribed'] = 'Klasöre baÅŸarıyla abone olundu.'; +$messages['folderunsubscribed'] = 'Klasör aboneliÄŸi baÅŸarıyla kaldırıldı.'; +$messages['folderpurged'] = 'Klasör baÅŸarıyla sıklaÅŸtırıldı.'; +$messages['folderexpunged'] = 'Klasör baÅŸarıyla boÅŸaltıldı.'; +$messages['deletedsuccessfully'] = 'BaÅŸarıyla silindi.'; $messages['converting'] = 'Postanın biçimlendirmesi kaldırılıyor...'; -$messages['messageopenerror'] = 'Sunucudan posta yüklenemedi'; -$messages['fileuploaderror'] = 'Dosya yükleme baÅŸarısız'; -$messages['filesizeerror'] = 'Yüklenen dosya en büyük dosya boyunu ($size) aşıyor'; +$messages['messageopenerror'] = 'Sunucudan posta yüklenemedi.'; +$messages['fileuploaderror'] = 'Dosya yükleme baÅŸarısız.'; +$messages['filesizeerror'] = 'Yüklenen dosya en büyük dosya boyunu ($size) aşıyor.'; $messages['copysuccess'] = '$nr adet kiÅŸi baÅŸarıyla kopyalandı.'; $messages['movesuccess'] = '$nr adet kiÅŸi baÅŸarıyla taşındı.'; $messages['copyerror'] = 'KiÅŸiler kopyalanamadı.'; $messages['moveerror'] = 'KiÅŸiler taşınamadı.'; -$messages['sourceisreadonly'] = 'Adres kaynağı salt okunur durumda'; -$messages['errorsavingcontact'] = 'KiÅŸinin adresi kaydedilemedi'; +$messages['sourceisreadonly'] = 'Adres kaynağı salt okunur durumda.'; +$messages['errorsavingcontact'] = 'KiÅŸi adresi kaydedilemedi.'; $messages['movingmessage'] = 'Posta(lar) taşınıyor...'; $messages['copyingmessage'] = 'Posta(lar) kopyalanıyor...'; $messages['copyingcontact'] = 'KiÅŸile(ler) kopyalanıyor...'; @@ -111,19 +117,19 @@ $messages['deletingmessage'] = 'Posta(lar) siliniyor...'; $messages['markingmessage'] = 'Posta(lar) iÅŸaretleniyor...'; $messages['addingmember'] = 'Gruba kiÅŸi(ler) ekleniyor...'; $messages['removingmember'] = 'Gruptan kiÅŸi(ler) siliniyor...'; -$messages['receiptsent'] = 'Okundu onayı gönderildi'; -$messages['errorsendingreceipt'] = 'Okundu onayı gönderilemedi'; +$messages['receiptsent'] = 'Okundu onayı baÅŸarıyla gönderildi.'; +$messages['errorsendingreceipt'] = 'Okundu onayı gönderilemedi.'; $messages['deleteidentityconfirm'] = 'Bu kimliÄŸi silmek istediÄŸinizden emin misiniz?'; -$messages['nodeletelastidentity'] = 'Son kimliÄŸiniz olduÄŸu için bu kimliÄŸi silemezsiniz'; -$messages['forbiddencharacter'] = 'Klasör ismi yasaklanmış bir karakter içeriyor'; -$messages['selectimportfile'] = 'Lütfen yüklenecek dosyayı seçin'; -$messages['addresswriterror'] = 'Seçili adres defterine yazılamaz'; -$messages['contactaddedtogroup'] = 'KiÅŸiler bu gruba eklendi'; +$messages['nodeletelastidentity'] = 'Son kimliÄŸiniz olduÄŸu için bu kimliÄŸi silemezsiniz.'; +$messages['forbiddencharacter'] = 'Klasör ismi yasaklanmış bir karakter içeriyor.'; +$messages['selectimportfile'] = 'Lütfen yüklenecek dosyayı seçin.'; +$messages['addresswriterror'] = 'Seçili adres defteri yazılabilir durumda deÄŸil.'; +$messages['contactaddedtogroup'] = 'KiÅŸiler bu baÅŸarıyla gruba eklendi.'; $messages['contactremovedfromgroup'] = 'KiÅŸiler bu gruptan çıkarıldı'; $messages['nogroupassignmentschanged'] = 'Grup atamalarında bir deÄŸiÅŸiklik yapılmadı'; $messages['importwait'] = 'Aktarılıyor, lütfen bekleyin...'; $messages['importformaterror'] = 'İçe aktarım baÅŸarısız. Yüklenen dosya geçerli bir içe aktarım dosyası deÄŸil.'; -$messages['importconfirm'] = '<b>$inserted kiÅŸi baÅŸarıyla aktarıldı</b>'; +$messages['importconfirm'] = '<b>$inserted kiÅŸiler baÅŸarıyla aktarıldı</b>'; $messages['importconfirmskipped'] = '<b>Var olan $skipped girdi atlandı</b>'; $messages['importmessagesuccess'] = '$nr adet mesaj baÅŸarıyla içe aktarıldı'; $messages['importmessageerror'] = 'İçe aktarım baÅŸarısız. Yüklenen dosya geçerli bir içe aktarım dosyası deÄŸil.'; @@ -140,6 +146,7 @@ $messages['smtperror'] = 'SMTP Hatası: $msg'; $messages['emailformaterror'] = 'Hatalı e-posta adresi: $email'; $messages['toomanyrecipients'] = 'Çok fazla alıcı. En fazla $max alıcı girebilirsiniz.'; $messages['maxgroupmembersreached'] = 'Grup üyelerinin sayısı $max sınırını aşıyor.'; +$messages['internalerror'] = 'Dahili bir hata oluÅŸtu. Lütfen tekrar deneyin.'; $messages['contactdelerror'] = 'KiÅŸi(ler) silinemedi'; $messages['contactdeleted'] = 'KiÅŸi(ler) silindi'; $messages['contactrestoreerror'] = 'Silinen kiÅŸi(ler) geri getirilemiyor.'; diff --git a/program/localization/uk_UA/labels.inc b/program/localization/uk_UA/labels.inc index f530c212e..8603dd10c 100644 --- a/program/localization/uk_UA/labels.inc +++ b/program/localization/uk_UA/labels.inc @@ -136,6 +136,7 @@ $labels['currpage'] = 'Поточна Ñторінка'; $labels['unread'] = 'Ðепрочитані'; $labels['flagged'] = 'Із зірочкою'; $labels['unanswered'] = 'Без відповіді'; +$labels['withattachment'] = 'З вкладеннÑм'; $labels['deleted'] = 'Видалені'; $labels['undeleted'] = 'Ðе видалено'; $labels['invert'] = 'Інвертувати виділеннÑ'; @@ -173,13 +174,14 @@ $labels['resetsearch'] = 'ОчиÑтити пошук'; $labels['searchmod'] = 'Де шукати'; $labels['msgtext'] = 'Ð’ уÑьому лиÑÑ‚Ñ–'; $labels['body'] = 'Тіло повідомленнÑ'; +$labels['type'] = 'Тип'; $labels['namex'] = 'Ім\'Ñ'; $labels['openinextwin'] = 'Відкрити в новому вікні'; $labels['emlsave'] = 'Зберегти (.eml)'; $labels['changeformattext'] = 'Ð’Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð² текÑтовому форматі'; $labels['changeformathtml'] = 'Ð’Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ñƒ форматі HTML'; $labels['editasnew'] = 'Редагувати Ñк новий'; -$labels['send'] = 'Відправлено'; +$labels['send'] = 'Відправити'; $labels['sendmessage'] = 'ÐадіÑлати зараз'; $labels['savemessage'] = 'Зберегти чернетку'; $labels['addattachment'] = 'ВклаÑти файл'; @@ -194,6 +196,9 @@ $labels['spellcheck'] = 'ОрфографіÑ'; $labels['checkspelling'] = 'Перевірити орфографію'; $labels['resumeediting'] = 'Продовжити редагуваннÑ'; $labels['revertto'] = 'Відмінити редагуваннÑ'; +$labels['restore'] = 'Відновити'; +$labels['restoremessage'] = 'ВІдновити повідомленнÑ?'; +$labels['responsename'] = 'Ім’Ñ'; $labels['attach'] = 'ВклаÑти'; $labels['attachments'] = 'Вкладені файли'; $labels['upload'] = 'ВклаÑти'; @@ -312,6 +317,7 @@ $labels['searchdelete'] = 'Видалити пошук'; $labels['import'] = 'Імпорт'; $labels['importcontacts'] = 'Імпортувати контакти'; $labels['importfromfile'] = 'Імпортувати з файлу:'; +$labels['importtarget'] = 'Додати контакт до'; $labels['importreplace'] = 'Замінити вÑÑŽ адреÑну книгу'; $labels['importgroupsexisting'] = 'Лише Ð´Ð»Ñ Ñ–Ñнуючих груп'; $labels['importdesc'] = 'Ви можете завантажити контакти з Ñ–Ñнуючої адреÑної книги.<br/>Ð’ даний Ñ‡Ð°Ñ Ð¼Ð¸ підтримуємо імпорт Ð°Ð´Ñ€ÐµÑ Ð² форматі візитної картки <a href="http://en.wikipedia.org/wiki/VCard"> vCard</ a> або CSV (дані розділені комами).'; @@ -419,6 +425,8 @@ $labels['mailtoprotohandler'] = 'ЗареєÑтрувати обробник дР$labels['forwardmode'] = 'ПереÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½ÑŒ'; $labels['inline'] = 'у текÑÑ‚Ñ–'; $labels['asattachment'] = 'Ñк вкладеннÑ'; +$labels['replyallmode'] = 'Типова Ð´Ñ–Ñ Ð´Ð»Ñ ÐºÐ½Ð¾Ð¿ÐºÐ¸ [ВідповіÑти вÑім]'; +$labels['replyalldefault'] = 'відповіÑти уÑім'; $labels['folder'] = 'Папка'; $labels['folders'] = 'Папки'; $labels['foldername'] = 'Ðазва папки'; diff --git a/program/localization/uk_UA/messages.inc b/program/localization/uk_UA/messages.inc index 669190c2e..5e4e6c631 100644 --- a/program/localization/uk_UA/messages.inc +++ b/program/localization/uk_UA/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -27,11 +27,11 @@ $messages['requesttimedout'] = 'Тайм-аут запиту'; $messages['errorreadonly'] = 'Ðеможливо виконати операцію. Папка доÑтупна тільки Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ.'; $messages['errornoperm'] = 'Ðеможливо виконати операцію. ДоÑтуп заборонено'; $messages['erroroverquota'] = 'Ðеможливо виконати операцію. Ðемає вільного міÑÑ†Ñ Ð½Ð° диÑку.'; +$messages['erroroverquotadelete'] = 'ÐедоÑтатньо вільного міÑÑ†Ñ Ð½Ð° диÑку. СкориÑтайтеÑÑŒ SHIFT+DEL Ð´Ð»Ñ Ð²Ð¸Ð´Ð°Ð»ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ.'; $messages['invalidrequest'] = 'Ðевірний запит! Дані не збережено.'; $messages['invalidhost'] = 'Ðевірне ім\'Ñ Ñерверу.'; $messages['nomessagesfound'] = 'ЛиÑтів не знайдено'; $messages['loggedout'] = 'Вашу ÑеÑÑ–ÑŽ завершено. Ð’Ñього найкращого!'; -$messages['mailboxempty'] = 'Поштова Ñкринька порожнÑ'; $messages['refreshing'] = 'ОновленнÑ...'; $messages['loading'] = 'ЗавантаженнÑ...'; $messages['uploading'] = 'Файл відправлÑєтьÑÑ...'; @@ -43,6 +43,8 @@ $messages['messagesent'] = 'ЛиÑÑ‚ уÑпішно відправлено'; $messages['savingmessage'] = 'Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð»Ð¸Ñта...'; $messages['messagesaved'] = 'Збережено в Чернетках'; $messages['successfullysaved'] = 'Збережено'; +$messages['savingresponse'] = 'Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ñ‚ÐµÐºÑту відповіді...'; +$messages['deleteresponseconfirm'] = 'Справді бажаєте видалити цей текÑÑ‚ відповіді?'; $messages['addedsuccessfully'] = 'Контакт уÑпішно доданий до ÑпиÑку контактів'; $messages['contactexists'] = 'Контакт з такою електронною адреÑою вже Ñ–Ñнує'; $messages['contactnameexists'] = 'Контакт з таким Ñамим іменем вже Ñ–Ñнує.'; @@ -53,6 +55,8 @@ $messages['contactnotfound'] = 'Запитаний контакт не знайР$messages['contactsearchonly'] = 'Введіть деÑкі критерії пошуку, щоб знайти контакти'; $messages['sendingfailed'] = 'Ðе вдалоÑÑ Ð²Ñ–Ð´Ð¿Ñ€Ð°Ð²Ð¸Ñ‚Ð¸ лиÑта'; $messages['senttooquickly'] = 'Будь лаÑка, зачекайте $sec Ñекунд Ð´Ð»Ñ Ð²Ñ–Ð´Ð¿Ñ€Ð°Ð²ÐºÐ¸ лиÑта'; +$messages['errorsavingsent'] = 'Помилка при збереженні відправленого повідомленнÑ.'; +$messages['errorsaving'] = 'Помилка при збереженні.'; $messages['errormoving'] = 'Ðе вдалоÑÑ Ð¿ÐµÑ€ÐµÐ¼Ñ–Ñтити лиÑти'; $messages['errorcopying'] = 'Ðе вдалоÑÑ Ð·ÐºÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ñ‚Ð¸ лиÑти'; $messages['errordeleting'] = 'Ðе вдалоÑÑ Ð²Ð¸Ð´Ð°Ð»Ð¸Ñ‚Ð¸ лиÑти'; @@ -96,11 +100,16 @@ $messages['converting'] = 'Ð’Ð¸Ð´Ð°Ð»ÐµÐ½Ð½Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ...'; $messages['messageopenerror'] = 'Ðе вдалоÑÑ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð· Ñервера'; $messages['fileuploaderror'] = 'Ðе вдалоÑÑ Ð²ÐºÐ»Ð°Ñти файл'; $messages['filesizeerror'] = 'Розмір вибраного файлу перевищує макÑимально дозволений ($size)'; +$messages['copysuccess'] = 'УÑпішно Ñкопійовано $nr контактів'; +$messages['movesuccess'] = 'УÑпішно переміщено $nr контактів'; +$messages['copyerror'] = 'Ðе вдалоÑÑ Ñкопіювати жодного контакту.'; +$messages['moveerror'] = 'ÐевдалоÑÑŒ переміÑтити контакти.'; $messages['sourceisreadonly'] = 'Дане джерело Ð°Ð´Ñ€ÐµÑ Ð´Ð¾Ñтупне лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ'; $messages['errorsavingcontact'] = 'Ðеможливо зберегти адреÑу контакту'; $messages['movingmessage'] = 'ÐŸÐµÑ€ÐµÐ¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð»Ð¸Ñта...'; $messages['copyingmessage'] = 'ÐšÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ Ð»Ð¸Ñта...'; $messages['copyingcontact'] = 'ÐšÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ð°ÐºÑ‚Ñƒ(ів)...'; +$messages['movingcontact'] = 'ПеренеÑÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ð°ÐºÑ‚Ñƒ(ів)...'; $messages['deletingmessage'] = 'Ð’Ð¸Ð´Ð°Ð»ÐµÐ½Ð½Ñ Ð»Ð¸Ñта (ів)'; $messages['markingmessage'] = 'ÐŸÐ¾Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð»Ð¸Ñта (ів)'; $messages['addingmember'] = 'Ð”Ð¾Ð´Ð°Ð½Ð½Ñ ÐºÐ¾Ð½Ñ‚Ð°ÐºÑ‚Ñƒ(ів) до групи...'; @@ -119,6 +128,7 @@ $messages['importwait'] = 'ІмпортуваннÑ, будь лаÑка, зач $messages['importformaterror'] = 'Помилка імпорту! Завантажений файл має невідомий формат даних.'; $messages['importconfirm'] = '<b>УÑпішно імпортовано $inserted контактів, пропущено $skipped Ñ–Ñнуючих</b>:<p><em>$names</em></p>'; $messages['importconfirmskipped'] = '<b>Пропущені $skipped наÑвні запиÑи</b>'; +$messages['importmessagesuccess'] = 'УÑпішно імпортовано $nr повідомлень'; $messages['importmessageerror'] = 'Імпорт не вдавÑÑ! Завантажений файл не Ñ” припуÑтимим Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð°Ð±Ð¾ файлом поштової Ñкриньки'; $messages['opnotpermitted'] = 'Ð”Ñ–Ñ Ð·Ð°Ð±Ð¾Ñ€Ð¾Ð½ÐµÐ½Ð°!'; $messages['nofromaddress'] = 'Ð’ обраному профілі не виÑтачає адреÑи електронної пошти'; @@ -133,6 +143,7 @@ $messages['smtperror'] = 'Помилка SMTP: $msg'; $messages['emailformaterror'] = 'Ðевірна електронна адреÑа: $email'; $messages['toomanyrecipients'] = 'Занадто багато отримувачів. Зменшіть Ñ—Ñ… чиÑло до $max.'; $messages['maxgroupmembersreached'] = 'ЧиÑло Ð°Ð´Ñ€ÐµÑ Ñƒ групі перевищило макÑимум у $max.'; +$messages['internalerror'] = 'Виникла Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°. Будь лаÑка, Ñпробуйте ще раз.'; $messages['contactdelerror'] = 'Ðеможливо видалити контакт(и)'; $messages['contactdeleted'] = 'Контакт(и) видалено уÑпішно'; $messages['contactrestoreerror'] = 'Ðеможливо відновити видалений(Ñ–) контакт(и).'; diff --git a/program/localization/vi_VN/labels.inc b/program/localization/vi_VN/labels.inc index 6bd6d4402..d0a63ead2 100644 --- a/program/localization/vi_VN/labels.inc +++ b/program/localization/vi_VN/labels.inc @@ -15,26 +15,27 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ */ -$labels['welcome'] = 'Chà o bạn đã đến vá»›i $product'; +$labels['welcome'] = 'Chà o mừng bạn đã sá» dụng $product'; $labels['username'] = 'Tên đăng nháºp'; $labels['password'] = 'Máºt khẩu'; $labels['server'] = 'Máy chủ'; $labels['login'] = 'Äăng nháºp'; $labels['logout'] = 'Thoát'; $labels['mail'] = 'ThÆ°'; -$labels['settings'] = 'Tùy chá»n'; +$labels['settings'] = 'Thiết láºp cấu hình'; $labels['addressbook'] = 'Sổ địa chỉ'; $labels['inbox'] = 'Há»™p thÆ°'; $labels['drafts'] = 'ThÆ° nháp'; $labels['sent'] = 'Äã gá»i'; -$labels['trash'] = 'Sá»t rác'; +$labels['trash'] = 'Thùng rác'; $labels['junk'] = 'ThÆ° rác'; +$labels['show_real_foldernames'] = 'Hiển thị tên tháºt cho các thÆ° mục đặc biệt'; $labels['subject'] = 'Tiêu Ä‘á»'; -$labels['from'] = 'NgÆ°á»i gá»i'; +$labels['from'] = 'Gá»i từ'; $labels['sender'] = 'NgÆ°á»i gá»i'; $labels['to'] = 'NgÆ°á»i nháºn'; $labels['cc'] = 'Äồng kÃnh gá»i'; -$labels['bcc'] = 'NgÆ°á»i đồng nháºn (ngừoi nháºn không thấy email của ngÆ°á»i khác cùng được nháºn thÆ°)'; +$labels['bcc'] = 'NgÆ°á»i đồng nháºn (ngÆ°á»i nháºn không thấy email của ngÆ°á»i khác cùng được nháºn thÆ°)'; $labels['replyto'] = 'Trả lá»i cho'; $labels['followupto'] = 'Äánh dấu thÆ° cần theo dõi'; $labels['date'] = 'Ngà y'; @@ -51,7 +52,9 @@ $labels['fromtoshort'] = '$from - $to của $count'; $labels['copy'] = 'Sao chép'; $labels['move'] = 'Di Chuyển'; $labels['moveto'] = 'Di chuyển tá»›i...'; +$labels['copyto'] = 'Sao dữ liệu đến...'; $labels['download'] = 'Tải vá»'; +$labels['open'] = 'Mở'; $labels['showattachment'] = 'Hiển thị'; $labels['showanyway'] = 'Tiếp tục hiển thị'; $labels['filename'] = 'Tên táºp tin'; @@ -164,6 +167,7 @@ $labels['listmode'] = 'Xem dạng danh sách'; $labels['folderactions'] = 'Thao tác vá»›i thÆ° mục'; $labels['compact'] = 'Nén'; $labels['empty'] = 'Trống'; +$labels['importmessages'] = 'Nháºp thÆ°'; $labels['quota'] = 'Lượng Ä‘Ä©a sá» dụng'; $labels['unknown'] = 'Không rõ'; $labels['unlimited'] = 'không giá»›i hạn'; @@ -194,6 +198,16 @@ $labels['spellcheck'] = 'Äánh vần'; $labels['checkspelling'] = 'Kiểm tra chÃnh tả'; $labels['resumeediting'] = 'Tiếp tục soạn thảo'; $labels['revertto'] = 'Trở lại vá»›i'; +$labels['restore'] = 'Khôi phục'; +$labels['restoremessage'] = 'Khôi phục thÆ°?'; +$labels['responses'] = 'Các phản hồi'; +$labels['insertresponse'] = 'Thêm má»™t phản hồi'; +$labels['manageresponses'] = 'Quản lý các phản hồi'; +$labels['savenewresponse'] = 'LÆ°u má»™t phản hồi má»›i'; +$labels['editresponses'] = 'Sá»a các phản hồi'; +$labels['editresponse'] = 'Sá»a phản hồi'; +$labels['responsename'] = 'Tên'; +$labels['responsetext'] = 'Thông tin phản hồi'; $labels['attach'] = 'ÄÃnh kèm'; $labels['attachments'] = 'Các Ä‘Ãnh kèm'; $labels['upload'] = 'Tải lên'; @@ -313,7 +327,11 @@ $labels['searchdelete'] = 'Xóa tìm kiếm'; $labels['import'] = 'Nháºp'; $labels['importcontacts'] = 'Nháºp liên lạc'; $labels['importfromfile'] = 'Nháºp từ táºp tin:'; +$labels['importtarget'] = 'Thêm các địa chỉ liên hệ và o'; $labels['importreplace'] = 'Thay thế toà n bá»™ sổ địa chỉ'; +$labels['importgroups'] = 'Nháºp nhóm'; +$labels['importgroupsall'] = 'Tất cả (tạo nhóm nếu cần thiết)'; +$labels['importgroupsexisting'] = 'Chỉ dà nh cho các nhóm Ä‘ang tồn tại'; $labels['importdesc'] = 'Bạn có thể cáºp nháºt các liên hệ từ má»™t sổ địa chỉ có sẵn.<br />Hiện tại, chúng tôi há»— trợ nháºp địa chỉ từ dạng dữ liệu <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> hoặc CSV (dạng thức dữ liệu ngăn cách bằng dấu phẩy)'; $labels['done'] = 'Hoà n tất'; $labels['settingsfor'] = 'Thiết láºp cho'; @@ -347,6 +365,7 @@ $labels['htmleditor'] = 'Soạn thÆ° dạng HTML'; $labels['htmlonreply'] = 'Chỉ trả lá»i lại bằng thÆ° HTML'; $labels['htmlonreplyandforward'] = 'Khi chuyển tiếp hoặc trả lá»i thÆ° theo định dạng HTML'; $labels['htmlsignature'] = 'Chữ ký HTML'; +$labels['showemail'] = 'Hiển thị địa chỉ email kèm theo tên '; $labels['previewpane'] = 'Hiển thị ô Xem thá»'; $labels['skin'] = 'Bá» mặt giao diện'; $labels['logoutclear'] = 'Xóa sạch rác khi thoát'; @@ -416,9 +435,13 @@ $labels['spellcheckignorenums'] = 'Bá» qua các từ kèm số'; $labels['spellcheckignorecaps'] = 'Bá» qua các từ được viết hoa'; $labels['addtodict'] = 'Thêm và o từ Ä‘iển'; $labels['mailtoprotohandler'] = 'Xác định cách xá» lý giao thức mailto: liên kết'; +$labels['standardwindows'] = 'Mở các popup nhÆ° là các cá»a sổ thông thÆ°á»ng'; $labels['forwardmode'] = 'Chuyển tiếp thÆ°'; $labels['inline'] = 'ná»™i tuyến'; $labels['asattachment'] = 'dạng gá»i kèm'; +$labels['replyallmode'] = 'Thao tác mặc định cho nút [Trả lá»i tất cả]'; +$labels['replyalldefault'] = 'Trả lá»i tất cả'; +$labels['replyalllist'] = 'Chỉ gá»i trả lá»i đến danh sách thÆ° (nếu có tồn tại)'; $labels['folder'] = 'ThÆ° mục'; $labels['folders'] = 'Các thÆ° mục'; $labels['foldername'] = 'Tên thÆ° mục'; diff --git a/program/localization/vi_VN/messages.inc b/program/localization/vi_VN/messages.inc index b2d7c71ff..5c9983e33 100644 --- a/program/localization/vi_VN/messages.inc +++ b/program/localization/vi_VN/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ -$messages['errortitle'] = 'Xuất hiện 1 lá»—i'; +$messages['errortitle'] = 'Có lá»—i xảy ra.'; $messages['loginfailed'] = 'Không đăng nháºp được'; $messages['cookiesdisabled'] = 'Trình duyệt không há»— trợ cookies'; $messages['sessionerror'] = 'Phiên là m việc không hợp lệ hoặc đã hết hạn'; @@ -26,11 +26,12 @@ $messages['dberror'] = 'Lá»—i cÆ¡ sở dữ liệu'; $messages['requesttimedout'] = 'Yêu cầu hết hạn'; $messages['errorreadonly'] = 'Không thể thá»±c hiện thao tác. ThÆ° mục chỉ cho phép Ä‘á»c.'; $messages['errornoperm'] = 'Bạn không đủ quyá»n hạn để thá»±c hiện thao tác nà y.'; +$messages['erroroverquota'] = 'Không thể thá»±c hiện thao tác do không còn đủ chá»— trống trên ổ Ä‘Ä©a.'; +$messages['erroroverquotadelete'] = 'Không còn dÆ° chá»— trống trên ổ Ä‘Ä©a. Sá» dụng tổ hợp phÃm SHIFT+DEL để xoá thÆ°.'; $messages['invalidrequest'] = 'Yêu cầu không hợp lệ! Không có dữ liệu nà o được lÆ°u.'; $messages['invalidhost'] = 'Sai thông tin máy chủ'; $messages['nomessagesfound'] = 'Không thấy có thÆ° nà o trong há»™p thÆ° nà y.'; $messages['loggedout'] = 'Phiên là m việc đã kết thúc thà nh công. Hẹn gặp lại!'; -$messages['mailboxempty'] = 'Há»™p thÆ° rá»—ng'; $messages['refreshing'] = 'Äang tải xuống bản cáºp nháºt má»›i...'; $messages['loading'] = 'Äang tải...'; $messages['uploading'] = 'Äang tải lên táºp tin...'; @@ -42,6 +43,8 @@ $messages['messagesent'] = 'ThÆ° đã được gá»i thà nh công.'; $messages['savingmessage'] = 'Äang lÆ°u thÆ°...'; $messages['messagesaved'] = 'ThÆ° đã được lÆ°u lại và o há»™p thÆ° Nháp.'; $messages['successfullysaved'] = 'Äã lÆ°u thà nh công'; +$messages['savingresponse'] = 'Äang lÆ°u thông tin...'; +$messages['deleteresponseconfirm'] = 'Bạn có thá»±c sá»± muốn xoá thông tin nà y?'; $messages['addedsuccessfully'] = 'Liên hệ đã được thêm và o sổ địa chỉ thà nh công.'; $messages['contactexists'] = 'Liên hệ trùng địa chỉ email đã tồn tại'; $messages['contactnameexists'] = 'Liên hệ trùng tên đã tồn tại.'; @@ -52,6 +55,8 @@ $messages['contactnotfound'] = 'Không tìm thấy liên lạc được yêu cẠ$messages['contactsearchonly'] = 'Gõ má»™t và i từ tìm kiếm để tìm liên hệ'; $messages['sendingfailed'] = 'Không gá»i được thÆ°'; $messages['senttooquickly'] = 'Xin đợi và i giây trÆ°á»›c khi gá»i thÆ° nà y'; +$messages['errorsavingsent'] = 'Có lá»—i xảy ra khi lÆ°u lại thÆ° đã gá»i.'; +$messages['errorsaving'] = 'Lá»—i trong quá trình lÆ°u.'; $messages['errormoving'] = 'Không thể chuyển được thÆ°'; $messages['errorcopying'] = 'Không thể sao chép thÆ°'; $messages['errordeleting'] = 'Không thể xóa được thÆ°'; @@ -76,6 +81,7 @@ $messages['norecipientwarning'] = 'Xin nháºp it nhất 1 ngÆ°á»i nháºn.'; $messages['nosubjectwarning'] = 'Mục "Tiêu Ä‘á»" vẫn còn trống. Bạn có muốn nháºp tiêu Ä‘á» bây giá» không?'; $messages['nobodywarning'] = 'Gá»i thÆ° không có ná»™i dung?'; $messages['notsentwarning'] = 'ThÆ° chÆ°a được gá»i. Bá» qua thÆ° Ä‘ang soạn?'; +$messages['restoresavedcomposedata'] = 'Tìm thấy má»™t thÆ° đã được soạn trÆ°á»›c nhÆ°ng chÆ°a gá»i.\n\nTiêu Ä‘á»: $subject\nLÆ°u ngà y: $date\n\nBạn có muốn khôi phục lại thÆ° nà y?'; $messages['noldapserver'] = 'Chá»n máy chủ ldap server để tìm'; $messages['nosearchname'] = 'Nháºp liên hệ hoặc địa chỉ email.'; $messages['notuploadedwarning'] = 'Tất cả các Ä‘Ãnh kèm vẫn chÆ°a được tải lên hết. Xin đợi hoặc hủy việc tải lên.'; @@ -95,11 +101,16 @@ $messages['converting'] = 'Loại bỠđịnh dạng...'; $messages['messageopenerror'] = 'Không thể tải thÆ° từ máy chủ'; $messages['fileuploaderror'] = 'Tải táºp tin lên thất bại'; $messages['filesizeerror'] = 'Táºp tin được tải lên vượt quá dung lượng tối Ä‘a....'; +$messages['copysuccess'] = 'Sao chép thà nh công $nr địa chỉ.'; +$messages['movesuccess'] = 'Äã chuyển thà nh công $nr địa chỉ liên hệ.'; +$messages['copyerror'] = 'Không thể sao chép địa chỉ liên hệ nà o.'; +$messages['moveerror'] = 'Không thể chuyển địa chỉ liên hệ nà o.'; $messages['sourceisreadonly'] = 'Nguồn địa chỉ nà y chỉ cho Ä‘á»c'; $messages['errorsavingcontact'] = 'Không thể lÆ°u địa chỉ liên lạc'; $messages['movingmessage'] = 'Äang chuyển thÆ°...'; $messages['copyingmessage'] = 'Äang sao chép thÆ°...'; $messages['copyingcontact'] = 'Äang sao chép liên lạc...'; +$messages['movingcontact'] = 'Äang chuyển (các) địa chỉ liên hệ...'; $messages['deletingmessage'] = 'Äang xóa thÆ°...'; $messages['markingmessage'] = 'Äánh dấu thÆ°...'; $messages['addingmember'] = 'Äang thêm liên lạc và o nhóm...'; @@ -118,6 +129,8 @@ $messages['importwait'] = 'Äang nháºp, xin chá»...'; $messages['importformaterror'] = 'Nháºp dữ liệu lá»—i. Tệp tin vừa tải lên không phải tệp dữ liệu chÃnh xác.'; $messages['importconfirm'] = 'Äã nháºp $inserted liên hệ đã chèn và o thà nh công.'; $messages['importconfirmskipped'] = 'Äã bá» qua được $skipped mục tồn tại.'; +$messages['importmessagesuccess'] = 'Äã nháºp thà nh công $nr thÆ°.'; +$messages['importmessageerror'] = 'Nháºp dữ liệu bị lá»—i. Tệp tin vừa tải lên không có định dạng chÃnh xác của tệp cấu hình hòm thÆ° hoặc má»™t thÆ° Ä‘Æ¡n lẻ.'; $messages['opnotpermitted'] = 'Thao tác không được cho phép!'; $messages['nofromaddress'] = 'Äịa chỉ email mất ở trong nháºn dạng đã chá»n'; $messages['editorwarning'] = 'Việc chuyển soạn thảo text gốc sẽ gây ra toà n bá»™ định dạng text đã có bị mất. Bạn có muốn tiếp tục không?'; @@ -131,6 +144,7 @@ $messages['smtperror'] = 'Lá»—i SMTP: $msg'; $messages['emailformaterror'] = 'Äịa chỉ email không hợp lệ'; $messages['toomanyrecipients'] = 'Quá nhiá»u ngÆ°á»i nháºn. Hãy giảm số lượng ngÆ°á»i nháºn xuống tối Ä‘a là $max.'; $messages['maxgroupmembersreached'] = 'Số lượng thà nh viên trong nhóm vượt quá mức tối Ä‘a là $max.'; +$messages['internalerror'] = 'Xuất hiện má»™t lá»—i ná»™i bá»™. Xin hãy thá» lại'; $messages['contactdelerror'] = 'Không thể xóa liên lạc'; $messages['contactdeleted'] = 'Liên lạc được xóa thà nh công'; $messages['contactrestoreerror'] = 'Không thể khôi phục liên lạc đã xóa'; diff --git a/program/localization/zh_CN/labels.inc b/program/localization/zh_CN/labels.inc index 1d9c04733..c3b14396c 100644 --- a/program/localization/zh_CN/labels.inc +++ b/program/localization/zh_CN/labels.inc @@ -29,6 +29,7 @@ $labels['drafts'] = 'è‰ç¨¿ç®±'; $labels['sent'] = 'å·²å‘é€é‚®ä»¶'; $labels['trash'] = 'å·²åˆ é™¤é‚®ä»¶'; $labels['junk'] = '垃圾邮件'; +$labels['show_real_foldernames'] = '显示特殊文件夹的åå—'; $labels['subject'] = '主题'; $labels['from'] = 'å‘件人'; $labels['sender'] = 'å‘件人'; @@ -165,6 +166,7 @@ $labels['listmode'] = 'åˆ—è¡¨è§†å›¾æ ·å¼'; $labels['folderactions'] = '文件夹æ“作...'; $labels['compact'] = '压缩'; $labels['empty'] = '清空'; +$labels['importmessages'] = '导入邮件'; $labels['quota'] = '邮箱容é‡'; $labels['unknown'] = '未知'; $labels['unlimited'] = 'æ— é™åˆ¶'; @@ -173,6 +175,8 @@ $labels['resetsearch'] = '清空'; $labels['searchmod'] = '修改æœç´¢'; $labels['msgtext'] = 'æ•´å°é‚®ä»¶'; $labels['body'] = 'æ£æ–‡'; +$labels['type'] = '类型:'; +$labels['namex'] = '姓å'; $labels['openinextwin'] = '在新窗å£ä¸æ‰“å¼€'; $labels['emlsave'] = '下载(.eml)'; $labels['changeformattext'] = 'ä»¥æ–‡æœ¬æ ¼å¼æ˜¾ç¤º'; @@ -193,6 +197,16 @@ $labels['spellcheck'] = '拼写'; $labels['checkspelling'] = '拼写检查'; $labels['resumeediting'] = '继ç»ç¼–辑'; $labels['revertto'] = 'æ¢å¤è‡³'; +$labels['restore'] = 'æ¢å¤ä¿¡æ¯'; +$labels['restoremessage'] = '是å¦æ¢å¤ä¿¡æ¯ï¼Ÿ'; +$labels['responses'] = '回å¤'; +$labels['insertresponse'] = 'æ’入回å¤'; +$labels['manageresponses'] = '管ç†å›žå¤'; +$labels['savenewresponse'] = 'ä¿å˜æ–°å›žå¤'; +$labels['editresponses'] = '编辑回å¤'; +$labels['editresponse'] = '编辑回å¤'; +$labels['responsename'] = '姓å'; +$labels['responsetext'] = '以文本形å¼å›žå¤'; $labels['attach'] = 'é™„åŠ '; $labels['attachments'] = '附件'; $labels['upload'] = 'ä¸Šä¼ '; @@ -305,13 +319,18 @@ $labels['nextpage'] = '下一页'; $labels['lastpage'] = '末页'; $labels['group'] = '分组'; $labels['groups'] = '分组'; +$labels['listgroup'] = '列出è”系人åå•'; $labels['personaladrbook'] = '个人通讯录'; $labels['searchsave'] = 'ä¿å˜æœç´¢'; $labels['searchdelete'] = 'åˆ é™¤æœç´¢'; $labels['import'] = '导入'; $labels['importcontacts'] = '导入通讯录'; $labels['importfromfile'] = '从文件导入'; +$labels['importtarget'] = 'æ·»åŠ è”系人至'; $labels['importreplace'] = '替æ¢å…¨éƒ¨é€šè®¯å½•'; +$labels['importgroups'] = '导入群组任务'; +$labels['importgroupsall'] = '全部(如果需è¦åˆ™åˆ›å»ºæ–°çš„群组)'; +$labels['importgroupsexisting'] = 'ä»…é™äºŽå·²æœ‰ç¾¤ç»„'; $labels['importdesc'] = '您å¯ä»¥ä»Žé€šè®¯å½•æ–‡ä»¶ä¸Šä¼ è”系人,目å‰å·²æ”¯æŒ <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> å’Œ CSV(逗å·åˆ†éš”)æ ¼å¼'; $labels['done'] = '完æˆ'; $labels['settingsfor'] = '设置'; @@ -415,9 +434,13 @@ $labels['spellcheckignorenums'] = '忽略带数å—çš„å•è¯'; $labels['spellcheckignorecaps'] = '忽略所有大写å—æ¯çš„å•è¯'; $labels['addtodict'] = 'æ·»åŠ åˆ°å—å…¸ä¸'; $labels['mailtoprotohandler'] = 'æ³¨å†Œä¸ºå¤„ç† mailto 链接的程åº'; +$labels['standardwindows'] = 'ä»¥æ ‡å‡†çª—å£çš„å½¢å¼å¼¹å‡ºçª—å£'; $labels['forwardmode'] = '邮件转å‘æ–¹å¼'; $labels['inline'] = '内嵌'; $labels['asattachment'] = '作为附件'; +$labels['replyallmode'] = '[回å¤æ‰€æœ‰]按钮的默认动作'; +$labels['replyalldefault'] = '回å¤å…¨éƒ¨'; +$labels['replyalllist'] = 'åªå›žå¤é‚®ä»¶åˆ—表ä¸çš„è”系人(找到的)'; $labels['folder'] = '文件夹管ç†'; $labels['folders'] = '文件夹管ç†'; $labels['foldername'] = '邮件夹å称'; diff --git a/program/localization/zh_CN/messages.inc b/program/localization/zh_CN/messages.inc index bf6e8cf2f..4adebcc74 100644 --- a/program/localization/zh_CN/messages.inc +++ b/program/localization/zh_CN/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,6 @@ $messages['invalidrequest'] = 'è¯·æ±‚æ— æ•ˆï¼æœªä¿å˜æ•°æ®ã€‚'; $messages['invalidhost'] = 'æ— æ•ˆçš„ä¸»æœºå。'; $messages['nomessagesfound'] = 'æ¤é‚®ä»¶å¤¹å†…æ— é‚®ä»¶ã€‚'; $messages['loggedout'] = '您已æˆåŠŸæ³¨é”€ï¼Œå†è§ï¼'; -$messages['mailboxempty'] = '邮件夹为空。'; $messages['refreshing'] = 'æ£åœ¨åˆ·æ–°...'; $messages['loading'] = 'æ£åœ¨è½½å…¥...'; $messages['uploading'] = 'æ£åœ¨ä¸Šä¼ 文件...'; @@ -44,6 +43,8 @@ $messages['messagesent'] = '邮件已å‘é€ã€‚'; $messages['savingmessage'] = 'æ£åœ¨ä¿å˜é‚®ä»¶...'; $messages['messagesaved'] = '邮件已暂å˜è‡³è‰ç¨¿ç®±ã€‚'; $messages['successfullysaved'] = 'ä¿å˜æˆåŠŸã€‚'; +$messages['savingresponse'] = 'æ£åœ¨ä¿å˜å“应文本...'; +$messages['deleteresponseconfirm'] = '是å¦ç¡®è®¤åˆ 除å“应文本?'; $messages['addedsuccessfully'] = 'è”ç³»äººå·²æ·»åŠ ã€‚'; $messages['contactexists'] = '当å‰è”系人的电å邮件地å€å·²å˜åœ¨ã€‚'; $messages['contactnameexists'] = 'å·²å˜åœ¨åŒåè”系人。'; @@ -54,6 +55,8 @@ $messages['contactnotfound'] = '未找到指定的è”系人。'; $messages['contactsearchonly'] = '请输入è”系人的æœç´¢æ¡ä»¶'; $messages['sendingfailed'] = 'å‘é€å¤±è´¥ã€‚'; $messages['senttooquickly'] = '您需è¦ç‰å¾…$sec秒æ‰èƒ½å‘é€é‚®ä»¶ã€‚'; +$messages['errorsavingsent'] = 'ä¿å˜å·²å‘é€é‚®ä»¶æ—¶å‘生错误。'; +$messages['errorsaving'] = 'ä¿å˜æ—¶å‘生错误。'; $messages['errormoving'] = 'æ— æ³•ç§»åŠ¨é‚®ä»¶ã€‚'; $messages['errorcopying'] = 'æ— æ³•å¤åˆ¶é‚®ä»¶ã€‚'; $messages['errordeleting'] = 'æ— æ³•åˆ é™¤é‚®ä»¶ã€‚'; @@ -78,6 +81,7 @@ $messages['norecipientwarning'] = '至少输入一个收件人。'; $messages['nosubjectwarning'] = '主题为空。您è¦è¾“入一个主题å—?'; $messages['nobodywarning'] = 'è¦å‘é€æ²¡æœ‰æ£æ–‡çš„邮件å—?'; $messages['notsentwarning'] = '邮件未å‘é€ã€‚您确定è¦ç¦»å¼€å¹¶èˆå¼ƒå½“å‰é‚®ä»¶å—?'; +$messages['restoresavedcomposedata'] = '您有一å°é‚®ä»¶å°šæœªå‘é€.\n\nSubject: $subject\nSaved: $date\n\n您是å¦è¦æ¢å¤è¿™å°é‚®ä»¶ï¼Ÿ'; $messages['noldapserver'] = '请选择一个用æ¥æŸ¥æ‰¾çš„ LDAP æœåŠ¡å™¨ã€‚'; $messages['nosearchname'] = '请输入è”系人姓å或电å邮件地å€ã€‚'; $messages['notuploadedwarning'] = 'é™„ä»¶å°šæœªå…¨éƒ¨ä¸Šä¼ ï¼Œè¯·è€å¿ƒç‰å¾…或者å–æ¶ˆä¸Šä¼ ã€‚'; @@ -140,6 +144,7 @@ $messages['smtperror'] = 'SMTP 错误: $msg'; $messages['emailformaterror'] = 'æ— æ•ˆçš„é‚®ä»¶åœ°å€ï¼š$email'; $messages['toomanyrecipients'] = '收件人太多,请å‡å°‘人数至 $max。'; $messages['maxgroupmembersreached'] = '组员数é‡è¶…过最大值 $max。'; +$messages['internalerror'] = 'é‡åˆ°ä¸€ä¸ªå†…部错误,请é‡è¯•ã€‚'; $messages['contactdelerror'] = 'æ— æ³•åˆ é™¤è”系人。'; $messages['contactdeleted'] = 'åˆ é™¤è”系人æˆåŠŸã€‚'; $messages['contactrestoreerror'] = 'æ— æ³•æ¢å¤å·²åˆ 除的è”系人。'; diff --git a/program/localization/zh_TW/labels.inc b/program/localization/zh_TW/labels.inc index 4250e5137..e913f7117 100644 --- a/program/localization/zh_TW/labels.inc +++ b/program/localization/zh_TW/labels.inc @@ -37,7 +37,7 @@ $labels['to'] = '收件者'; $labels['cc'] = '副本'; $labels['bcc'] = '密件副本'; $labels['replyto'] = '回覆至'; -$labels['followupto'] = '信件跟隨至'; +$labels['followupto'] = '郵件列表回覆地å€'; $labels['date'] = '日期'; $labels['size'] = '大å°'; $labels['priority'] = 'å„ªå…ˆé †åº'; @@ -45,13 +45,14 @@ $labels['organization'] = '組織'; $labels['readstatus'] = '讀信狀態'; $labels['listoptions'] = '列表é¸é …...'; $labels['mailboxlist'] = '資料夾'; -$labels['messagesfromto'] = '郵件 $from 至 $to,共有 $count å°éƒµä»¶'; -$labels['threadsfromto'] = '郵件串 $from 至 $to,共有 $count 個'; +$labels['messagesfromto'] = '郵件 $from 至 $to,共 $count å°'; +$labels['threadsfromto'] = '郵件串 $from 至 $to,共 $count 個'; $labels['messagenrof'] = '第 $nr å°éƒµä»¶ï¼Œå…±æœ‰ $count å°'; -$labels['fromtoshort'] = '自 $from – $to 統計 $count'; +$labels['fromtoshort'] = '$from – $to å…± $count 個'; $labels['copy'] = '複製'; $labels['move'] = '移動'; $labels['moveto'] = '移至...'; +$labels['copyto'] = '複製到...'; $labels['download'] = '下載'; $labels['open'] = 'é–‹å•Ÿ'; $labels['showattachment'] = '顯示'; @@ -148,7 +149,7 @@ $labels['expand-all'] = '全部展開'; $labels['expand-unread'] = '展開未讀å–'; $labels['collapse-all'] = '全部收起'; $labels['threaded'] = '郵件串'; -$labels['autoexpand_threads'] = 'åªå±•é–‹éƒµä»¶ä¸²'; +$labels['autoexpand_threads'] = '展開郵件串'; $labels['do_expand'] = '所有郵件串'; $labels['expand_only_unread'] = 'åªå±•é–‹æœªè®€è¨Šæ¯'; $labels['fromto'] = '寄件者/收件者'; @@ -175,6 +176,7 @@ $labels['resetsearch'] = 'é‡è¨æœå°‹'; $labels['searchmod'] = '修改æœå°‹'; $labels['msgtext'] = 'æ•´å°éƒµä»¶'; $labels['body'] = '內文'; +$labels['type'] = 'é¡žåž‹'; $labels['namex'] = 'å稱'; $labels['openinextwin'] = '在新視窗開啟'; $labels['emlsave'] = '下載(.eml)'; @@ -184,7 +186,7 @@ $labels['editasnew'] = '以新郵件編輯'; $labels['send'] = '寄出'; $labels['sendmessage'] = 'ç«‹å³å¯„出'; $labels['savemessage'] = '儲å˜æˆè‰ç¨¿'; -$labels['addattachment'] = 'å¢žåŠ é™„ä»¶æª”æ¡ˆ'; +$labels['addattachment'] = 'åŠ å…¥é™„ä»¶æª”æ¡ˆ'; $labels['charset'] = '郵件編碼'; $labels['editortype'] = '編輯器類型'; $labels['returnreceipt'] = 'è¦æ±‚讀å–回æ¢'; @@ -196,6 +198,16 @@ $labels['spellcheck'] = '拼å—'; $labels['checkspelling'] = '拼å—檢查'; $labels['resumeediting'] = '繼續編輯'; $labels['revertto'] = 'æ¢å¾©è‡³'; +$labels['restore'] = '回復'; +$labels['restoremessage'] = '回復郵件?'; +$labels['responses'] = 'é è¨å›žæ‡‰'; +$labels['insertresponse'] = 'æ’å…¥é è¨å›žæ‡‰'; +$labels['manageresponses'] = '管ç†é è¨å›žæ‡‰'; +$labels['savenewresponse'] = '新增é è¨å›žæ‡‰'; +$labels['editresponses'] = '編輯é è¨å›žæ‡‰'; +$labels['editresponse'] = 'é è¨å›žæ‡‰'; +$labels['responsename'] = 'å稱'; +$labels['responsetext'] = 'é è¨å›žæ‡‰å…§å®¹'; $labels['attach'] = '附件'; $labels['attachments'] = 'é™„åŠ æª”æ¡ˆ'; $labels['upload'] = '上傳'; @@ -222,7 +234,7 @@ $labels['maxuploadsize'] = '上傳檔案大å°é™åˆ¶ç‚º $size'; $labels['addcc'] = '新增副本'; $labels['addbcc'] = '新增密件副本'; $labels['addreplyto'] = '新增回覆地å€'; -$labels['addfollowupto'] = '新增 信件跟隨至'; +$labels['addfollowupto'] = '新增郵件列表回覆地å€'; $labels['mdnrequest'] = 'æ¤éƒµä»¶çš„å¯„ä»¶è€…å¸Œæœ›åœ¨ä½ é–±è®€æ¤éƒµä»¶æ™‚å—åˆ°é€šçŸ¥ã€‚ä½ æƒ³è¦é€šçŸ¥å¯„件者嗎?'; $labels['receiptread'] = '郵件回æ¢ï¼ˆå·²é–±è®€ï¼‰'; $labels['yourmessage'] = 'é€™æ˜¯ä½ éƒµä»¶çš„éƒµä»¶å›žæ¢'; @@ -259,7 +271,7 @@ $labels['spouse'] = 'é…å¶'; $labels['allfields'] = '所有欄ä½'; $labels['search'] = 'æœå°‹'; $labels['advsearch'] = '進階æœå°‹'; -$labels['advanced'] = '進階è¨å®š'; +$labels['advanced'] = '進階'; $labels['other'] = '其他'; $labels['typehome'] = 'ä½å®¶'; $labels['typework'] = '工作'; @@ -292,7 +304,7 @@ $labels['uploadphoto'] = '上傳相片'; $labels['newcontact'] = '建立新è¯çµ¡äººè³‡æ–™'; $labels['deletecontact'] = '刪除所é¸æ“‡çš„è¯çµ¡äºº'; $labels['composeto'] = '寄信至所é¸æ“‡çš„è¯çµ¡äºº'; -$labels['contactsfromto'] = 'è¯çµ¡äºº $from 至 $to,共有 $count 人'; +$labels['contactsfromto'] = 'è¯çµ¡äºº $from 至 $to,共 $count 人'; $labels['print'] = '列å°'; $labels['export'] = '匯出通訊錄'; $labels['exportall'] = '匯出全部'; @@ -308,16 +320,19 @@ $labels['nextpage'] = '顯示下一é '; $labels['lastpage'] = '顯示最後一é '; $labels['group'] = '群組'; $labels['groups'] = '群組'; +$labels['listgroup'] = '列出群組æˆå“¡'; $labels['personaladrbook'] = '個人通訊錄'; $labels['searchsave'] = '儲å˜æœå°‹çµæžœ'; $labels['searchdelete'] = '刪除æœå°‹çµæžœ'; $labels['import'] = '匯入通訊錄'; -$labels['importcontacts'] = '由檔案匯入通訊錄'; +$labels['importcontacts'] = '匯入通訊錄'; $labels['importfromfile'] = 'é¸æ“‡ä½ è¦åŒ¯å…¥çš„檔案:'; -$labels['importreplace'] = '以匯入的資料å–代已å˜åœ¨çš„é‡è¤‡è³‡æ–™'; -$labels['importgroupsall'] = '全部(如有必è¦,新增群組)'; +$labels['importtarget'] = '新增è¯çµ¡äººåˆ°'; +$labels['importreplace'] = 'å–代整個'; +$labels['importgroups'] = '匯入群組'; +$labels['importgroupsall'] = '全部(å¿…è¦æ™‚新增群組)'; $labels['importgroupsexisting'] = '僅é™æ–¼æ—¢æœ‰ç¾¤çµ„'; -$labels['importdesc'] = '您å¯ä»¥å°‡å·²å˜åœ¨çš„資料匯入通訊錄,目å‰æ”¯æ´åŒ¯å…¥ <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> 與 CSV (逗點分隔)æ ¼å¼è³‡æ–™'; +$labels['importdesc'] = '您å¯ä»¥å°‡ç¾æœ‰çš„è¯çµ¡äººåŒ¯å…¥é€šè¨ŠéŒ„。<br/>ç›®å‰æ”¯æ´åŒ¯å…¥ <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> 與 CSV (逗點分隔)æ ¼å¼ã€‚'; $labels['done'] = '完æˆ'; $labels['settingsfor'] = 'è¨å®š'; $labels['about'] = '關於'; @@ -341,7 +356,7 @@ $labels['setdefault'] = 'è¨æˆé è¨å€¼'; $labels['autodetect'] = '自動é¸æ“‡'; $labels['language'] = '語言'; $labels['timezone'] = '時å€'; -$labels['pagesize'] = 'æ¯é 郵件數'; +$labels['pagesize'] = 'æ¯é 顯示列數'; $labels['signature'] = 'ç°½å檔'; $labels['dstactive'] = '日光節約時間'; $labels['showinextwin'] = '在新視窗ä¸é¡¯ç¤ºéƒµä»¶'; @@ -359,23 +374,23 @@ $labels['uisettings'] = '使用者介é¢'; $labels['serversettings'] = '伺æœå™¨è¨å®š'; $labels['mailboxview'] = '信箱顯示'; $labels['mdnrequests'] = '讀å–回æ¢å›žæ‡‰'; -$labels['askuser'] = 'è©¢å•ä½¿ç”¨è€…'; +$labels['askuser'] = 'è©¢å•æˆ‘'; $labels['autosend'] = '自動é€å‡º'; -$labels['autosendknown'] = 'åªå°æˆ‘çš„è¯çµ¡äººå‚³é€å›žæ¢ï¼Œå…¶ä»–è©¢å•ä½¿ç”¨è€…'; -$labels['autosendknownignore'] = 'åªå°æˆ‘çš„è¯çµ¡äººå‚³é€å›žæ¢ï¼Œå…¶ä»–忽略'; +$labels['autosendknown'] = '傳é€å›žæ¢çµ¦æˆ‘çš„è¯çµ¡äººï¼Œå…¶ä»–則詢å•æˆ‘'; +$labels['autosendknownignore'] = '傳é€å›žæ¢çµ¦æˆ‘çš„è¯çµ¡äººï¼Œå…¶ä»–則忽略'; $labels['ignore'] = '完全忽略'; $labels['readwhendeleted'] = '將刪除的郵件標示為已讀å–'; -$labels['flagfordeletion'] = '刪除郵件時將原始郵件標示為已刪除'; +$labels['flagfordeletion'] = '刪除郵件時åªå°‡éƒµä»¶æ¨™ç¤ºç‚ºå·²åˆªé™¤'; $labels['skipdeleted'] = 'ä¸è¦é¡¯ç¤ºå·²åˆªé™¤çš„郵件'; -$labels['deletealways'] = '如果移到垃圾桶失敗,就直接刪除'; -$labels['deletejunk'] = '直接從垃圾郵件刪除'; +$labels['deletealways'] = '如果移動郵件到垃圾桶失敗,就直接刪除'; +$labels['deletejunk'] = '直接刪除垃圾郵件ä¸çš„郵件'; $labels['showremoteimages'] = '顯示é 端郵件內文ä¸çš„圖片'; $labels['fromknownsenders'] = '從已知的寄件者'; $labels['always'] = '是'; $labels['showinlineimages'] = 'å°‡é™„åŠ æª”æ¡ˆçš„åœ–ç‰‡é¡¯ç¤ºæ–¼éƒµä»¶æœ€å¾Œ'; $labels['autosavedraft'] = '自動儲å˜è‰ç¨¿'; $labels['everynminutes'] = 'æ¯ $n 分é˜'; -$labels['refreshinterval'] = 'é‡æ–°æ•´ç† (確èªæ˜¯å¦æ–°éƒµä»¶)'; +$labels['refreshinterval'] = 'é‡æ–°æ•´ç† (檢查新郵件ç‰)'; $labels['never'] = 'æ°¸ä¸'; $labels['immediately'] = '馬上'; $labels['messagesdisplaying'] = '郵件顯示'; @@ -385,10 +400,10 @@ $labels['2231folding'] = '完全 RFC 2231 模å¼ï¼ˆThunderbird)'; $labels['miscfolding'] = 'RFC 2047/2231 æ··åˆæ¨¡å¼ï¼ˆMS Outlook)'; $labels['2047folding'] = '完全 RFC 2047 模å¼ï¼ˆå…¶ä»–)'; $labels['force7bit'] = 'å° 8 ä½å…ƒå—元使用 MIME 編碼'; -$labels['advancedoptions'] = '顯示進階è¨å®šé¸é …'; +$labels['advancedoptions'] = '進階é¸é …'; $labels['focusonnewmessage'] = '收到新郵件時使ç€è¦½å™¨ç²å¾—焦點'; $labels['checkallfolders'] = '檢查所有資料夾ä¸çš„新郵件'; -$labels['displaynext'] = '郵件刪除ï¼ç§»å‹•æ™‚顯示下一個郵件'; +$labels['displaynext'] = '郵件刪除/移動時顯示下一å°éƒµä»¶'; $labels['defaultfont'] = 'HTMLæ ¼å¼é è¨å—åž‹'; $labels['mainoptions'] = '主è¦é¸é …'; $labels['browseroptions'] = 'ç€è¦½é¸é …'; @@ -398,8 +413,8 @@ $labels['newmessage'] = '新郵件'; $labels['signatureoptions'] = 'ç°½å檔é¸é …'; $labels['whenreplying'] = '回覆時'; $labels['replyempty'] = 'ä¸è¦åŒ…å«åŽŸä¾†çš„信件內容'; -$labels['replytopposting'] = '在原來的上方開始新訊æ¯'; -$labels['replybottomposting'] = '在原來的下方開始新訊æ¯'; +$labels['replytopposting'] = '在原文的上方開始新訊æ¯'; +$labels['replybottomposting'] = '在原文的下方開始新訊æ¯'; $labels['replyremovesignature'] = '回覆時移除原有簽å檔'; $labels['autoaddsignature'] = 'è‡ªå‹•é™„åŠ ç°½å'; $labels['newmessageonly'] = 'åªæœ‰æ–°è¨Šæ¯'; @@ -411,18 +426,22 @@ $labels['reqmdn'] = 'æ°¸é ç´¢å–讀å–回æ¢'; $labels['reqdsn'] = '總是è¦æ±‚傳é€ç‹€æ…‹é€šçŸ¥'; $labels['replysamefolder'] = '將回信放在與原信件相åŒçš„資料夾'; $labels['defaultabook'] = 'é è¨é€šè¨ŠéŒ„'; -$labels['autocompletesingle'] = '在自動完æˆä¸ç•¥éŽå¦ä¸€å€‹email'; -$labels['listnamedisplay'] = '標記è¯çµ¡äººç‚º'; +$labels['autocompletesingle'] = '在自動完æˆæ™‚ç•¥éŽå…¶ä»–電郵地å€'; +$labels['listnamedisplay'] = 'è¯çµ¡äººé¡¯ç¤ºæ–¹å¼'; $labels['spellcheckbeforesend'] = '寄é€å‰åŸ·è¡Œæ‹¼å—檢查'; $labels['spellcheckoptions'] = '拼å—檢查é¸é …'; $labels['spellcheckignoresyms'] = '忽略符號'; $labels['spellcheckignorenums'] = '忽略數å—'; $labels['spellcheckignorecaps'] = '忽略大寫å—æ¯'; $labels['addtodict'] = 'åŠ å…¥è©žå…¸'; -$labels['mailtoprotohandler'] = '註冊mailto:å”定處ç†ç¨‹å¼'; +$labels['mailtoprotohandler'] = '註冊為 mailto: 連çµçš„é è¨è™•ç†å¸¸å¼'; +$labels['standardwindows'] = '以新視窗顯示彈出å¼å°è©±æ¡†'; $labels['forwardmode'] = '郵件轉寄方å¼'; $labels['inline'] = '放入內文'; $labels['asattachment'] = '當æˆé™„件'; +$labels['replyallmode'] = '「全部回覆ã€æŒ‰éˆ•çš„é è¨å‹•ä½œ'; +$labels['replyalldefault'] = '全部回覆'; +$labels['replyalllist'] = 'åªå›žè¦†éƒµä»¶åˆ—表 (如有)'; $labels['folder'] = '資料夾'; $labels['folders'] = '資料夾'; $labels['foldername'] = '資料夾å稱'; diff --git a/program/localization/zh_TW/messages.inc b/program/localization/zh_TW/messages.inc index c52116a55..430ad16d1 100644 --- a/program/localization/zh_TW/messages.inc +++ b/program/localization/zh_TW/messages.inc @@ -5,7 +5,7 @@ | localization/<lang>/messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -32,7 +32,6 @@ $messages['invalidrequest'] = 'è¦æ±‚無效ï¼æœªå„²å˜ä»»ä½•è³‡æ–™ã€‚'; $messages['invalidhost'] = '無效的伺æœå™¨å稱'; $messages['nomessagesfound'] = 'æ¤éƒµä»¶åŒ£æ²’有任何郵件'; $messages['loggedout'] = 'ä½ å·²æˆåŠŸåœ°ç™»å‡ºä¸¦çµæŸå·¥ä½œéšŽæ®µäº†ã€‚å†è¦‹ï¼'; -$messages['mailboxempty'] = '郵件匣是空的'; $messages['refreshing'] = 'é‡æ–°æ•´ç†ä¸...'; $messages['loading'] = '載入ä¸...'; $messages['uploading'] = '上傳檔案ä¸...'; @@ -44,6 +43,8 @@ $messages['messagesent'] = '郵件寄出æˆåŠŸ'; $messages['savingmessage'] = '儲å˜éƒµä»¶ä¸...'; $messages['messagesaved'] = '郵件已經儲å˜è‡³è‰ç¨¿åŒ£'; $messages['successfullysaved'] = '儲å˜æˆåŠŸ'; +$messages['savingresponse'] = '儲å˜é è¨å›žæ‡‰ä¸...'; +$messages['deleteresponseconfirm'] = 'ä½ ç¢ºå®šè¦åˆªé™¤é€™å€‹é è¨å›žæ‡‰å—Žï¼Ÿ'; $messages['addedsuccessfully'] = 'è¯çµ¡äººå·²ç¶“æˆåŠŸåœ°æ–°å¢žè‡³é€šè¨ŠéŒ„'; $messages['contactexists'] = 'æ¤è¯çµ¡äººçš„é›»å郵件ä½å€å·²å˜åœ¨'; $messages['contactnameexists'] = 'å·²å˜åœ¨ç›¸åŒå稱的連絡人'; @@ -54,6 +55,8 @@ $messages['contactnotfound'] = '找ä¸åˆ°è¦æ±‚çš„è¯çµ¡äºº'; $messages['contactsearchonly'] = '輸入關éµå—找尋連絡人'; $messages['sendingfailed'] = '郵件寄出失敗'; $messages['senttooquickly'] = 'ä½ å¯„å‡ºçš„éƒµä»¶å¤ªéŽæ–¼é »ç¹ï¼Œè«‹ç¨å€™ $sec 秒後å†è©¦ä¸€æ¬¡ã€‚'; +$messages['errorsavingsent'] = '儲å˜éƒµä»¶åˆ°å¯„件備份時發生錯誤。'; +$messages['errorsaving'] = '儲å˜æ™‚發生錯誤。'; $messages['errormoving'] = '無法移動æ¤éƒµä»¶'; $messages['errorcopying'] = '無法訊æ¯'; $messages['errordeleting'] = '無法刪除æ¤éƒµä»¶'; @@ -78,6 +81,7 @@ $messages['norecipientwarning'] = '請輸入至少一ä½æ”¶ä¿¡è€…'; $messages['nosubjectwarning'] = '「主旨ã€æ¬„æ˜¯ç©ºçš„ã€‚ä½ è¦è¼¸å…¥ä¸€å€‹ä¸»æ—¨å—Žï¼Ÿ'; $messages['nobodywarning'] = 'è¦å‚³é€æ²’有內文的郵件嗎?'; $messages['notsentwarning'] = 'éƒµä»¶å°šæœªå¯„å‡ºã€‚ä½ ç¢ºå®šè¦é›¢é–‹ä¸¦ä¸”æ¨æ£„æ¤éƒµä»¶ï¼Ÿ'; +$messages['restoresavedcomposedata'] = '發ç¾ä¸€å°ä¸Šæ¬¡ç·¨å¯«ä½†å°šæœªå¯„出的郵件。\n\n主旨: $subject\n日期: $date\n\nä½ è¦å›žå¾©é€™å°éƒµä»¶å—Žï¼Ÿ'; $messages['noldapserver'] = 'è«‹é¸æ“‡ä¸€å€‹ LDAP 伺æœå™¨é€²è¡Œæœå°‹'; $messages['nosearchname'] = '請輸入一個è¯çµ¡äººå§“å或電å郵件ä½å€'; $messages['notuploadedwarning'] = 'å°šæœ‰é™„åŠ æª”æ¡ˆæœªä¸Šå‚³å®Œç•¢ï¼Œè«‹ç‰å¾…或å–消上傳'; @@ -95,8 +99,8 @@ $messages['folderexpunged'] = '資料夾æˆåŠŸå£“縮'; $messages['deletedsuccessfully'] = '刪除æˆåŠŸ'; $messages['converting'] = 'ç§»é™¤éƒµä»¶æ ¼å¼ä¸...'; $messages['messageopenerror'] = '無法從伺æœå™¨è¼‰å…¥éƒµä»¶'; -$messages['fileuploaderror'] = '檔案上傳失敗'; -$messages['filesizeerror'] = '上傳的檔案超éŽäº† $size 的大å°é™åˆ¶'; +$messages['fileuploaderror'] = '檔案上傳失敗。'; +$messages['filesizeerror'] = '上傳的檔案超éŽäº† $size 的大å°é™åˆ¶ã€‚'; $messages['copysuccess'] = 'æˆåŠŸè¤‡è£½ $nr 個è¯çµ¡äººã€‚'; $messages['movesuccess'] = 'æˆåŠŸç§»å‹• $nr 個è¯çµ¡äººã€‚'; $messages['copyerror'] = '無法複製任何è¯çµ¡äººã€‚'; @@ -116,17 +120,17 @@ $messages['errorsendingreceipt'] = '無法傳é€å›žæ¢'; $messages['deleteidentityconfirm'] = '您確定è¦åˆªé™¤é€™ä½é€£çµ¡äººå—Ž?'; $messages['nodeletelastidentity'] = 'ä½ ä¸èƒ½åˆªé™¤æ¤èº«ä»½ï¼Œå› 為åªå‰©ä¸€å€‹èº«ä»½ã€‚'; $messages['forbiddencharacter'] = '資料夾å稱ä¸åŒ…å«éžæ³•çš„å—å…ƒ'; -$messages['selectimportfile'] = 'è«‹é¸æ“‡ä¸€å€‹ä¸Šå‚³çš„檔案'; +$messages['selectimportfile'] = 'è«‹é¸æ“‡ä¸€å€‹è¦ä¸Šå‚³çš„檔案。'; $messages['addresswriterror'] = '無法寫入é¸æ“‡çš„通訊錄'; $messages['contactaddedtogroup'] = 'æˆåŠŸæŠŠè¯çµ¡äººåŠ å…¥æ¤ç¾¤çµ„'; $messages['contactremovedfromgroup'] = 'æˆåŠŸæŠŠç§»é™¤æ¤ç¾¤çµ„ä¸çš„è¯çµ¡äºº'; $messages['nogroupassignmentschanged'] = '群組資料沒有異動'; $messages['importwait'] = '匯入ä¸ï¼Œè«‹ç¨å€™...'; -$messages['importformaterror'] = '匯入失敗ï¼ä¸Šè¼‰çš„æª”æ¡ˆæ ¼å¼ä¸æ”¯æ´'; +$messages['importformaterror'] = '匯入失敗ï¼ä¸æ”¯æ´ä¸Šè¼‰çš„æª”æ¡ˆæ ¼å¼ã€‚'; $messages['importconfirm'] = '<b>æˆåŠŸåŒ¯å…¥ $inserted ç†è³‡æ–™ï¼Œç•¥éŽ $skipped ç†å·²å˜åœ¨çš„資料</b>:<p><em>$names</em></p>'; $messages['importconfirmskipped'] = '<b>ç•¥éŽ $skipped 個已å˜åœ¨çš„é …ç›®</b>'; $messages['importmessagesuccess'] = 'æˆåŠŸåŒ¯å…¥ $nr å°éƒµä»¶'; -$messages['importmessageerror'] = '匯入失敗ï¼ä¸Šè¼‰çš„檔案ä¸æ˜¯æœ‰æ•ˆçš„郵件或資料夾檔案'; +$messages['importmessageerror'] = '匯入失敗ï¼ä¸Šè¼‰çš„檔案ä¸æ˜¯æœ‰æ•ˆçš„郵件或資料夾檔案。'; $messages['opnotpermitted'] = 'ä¸å…許的æ“作'; $messages['nofromaddress'] = '在é¸æ“‡çš„身分ä¸éºå¤±äº†é›»å郵件ä½å€'; $messages['editorwarning'] = '切æ›åˆ°ç´”æ–‡å—編輯模å¼å°‡æœƒéºå¤±æ‰€æœ‰è¨å®šçš„樣å¼ã€‚您確定è¦ç¹¼çºŒå—Žï¼Ÿ'; @@ -140,6 +144,7 @@ $messages['smtperror'] = 'SMTP 錯誤:$msg'; $messages['emailformaterror'] = '錯誤電å郵件:$email'; $messages['toomanyrecipients'] = '太多收件人。請減少至 $max 人'; $messages['maxgroupmembersreached'] = '太多群組æˆå“¡ï¼Œè¶…éŽæœ€å¤§äººæ•¸ $max 人'; +$messages['internalerror'] = '發生內部錯誤。請å†æ¬¡å˜—試。'; $messages['contactdelerror'] = '無法刪除è¯çµ¡äºº'; $messages['contactdeleted'] = 'è¯çµ¡äººæˆåŠŸåˆªé™¤'; $messages['contactrestoreerror'] = '無法復原刪除的連絡人'; diff --git a/program/steps/addressbook/copy.inc b/program/steps/addressbook/copy.inc index d4387194a..9114cb1fd 100644 --- a/program/steps/addressbook/copy.inc +++ b/program/steps/addressbook/copy.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/copy.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2007, The Roundcube Dev Team | + | Copyright (C) 2007-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -25,15 +25,14 @@ if (!$OUTPUT->ajax_call) $cids = rcmail_get_cids(); -$target = get_input_value('_to', RCUBE_INPUT_POST); -$target_group = get_input_value('_togid', RCUBE_INPUT_POST); +$target = rcube_utils::get_input_value('_to', rcube_utils::INPUT_POST); +$target_group = rcube_utils::get_input_value('_togid', rcube_utils::INPUT_POST); $success = 0; $errormsg = 'copyerror'; $maxnum = $RCMAIL->config->get('max_group_members', 0); -foreach ($cids as $source => $cid) -{ +foreach ($cids as $source => $cid) { // Something wrong, target not specified if (!strlen($target)) { break; diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc index 3bb2ef500..3d57d7074 100644 --- a/program/steps/addressbook/delete.inc +++ b/program/steps/addressbook/delete.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/delete.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -30,8 +30,7 @@ $delcnt = 0; $undo_time = $RCMAIL->config->get('undo_timeout', 0); $RCMAIL->session->remove('contact_undo'); -foreach ($cids as $source => $cid) -{ +foreach ($cids as $source => $cid) { $CONTACTS = rcmail_contact_source($source); if ($CONTACTS->readonly) { @@ -51,8 +50,21 @@ foreach ($cids as $source => $cid) $deleted = !$plugin['abort'] ? $CONTACTS->delete($cid, $undo_time < 1) : $plugin['result']; if (!$deleted) { - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'contactdelerror', 'error'); - $OUTPUT->command('list_contacts'); + if ($plugin['message']) { + $error = $plugin['message']; + } + else if (($error = $CONTACTS->get_error()) && $error['message']) { + $error = $error['message']; + } + else { + $error = 'contactdelerror'; + } + + $source = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); + $group = rcube_utils::get_input_value('_gid', rcube_utils::INPUT_GPC); + + $OUTPUT->show_message($error, 'error'); + $OUTPUT->command('list_contacts', $source, $group); $OUTPUT->send(); } else { @@ -113,8 +125,8 @@ $OUTPUT->command('set_rowcount', rcmail_get_rowcount_text($result)); if (!empty($_SESSION['contact_undo'])) { $_SESSION['contact_undo']['ts'] = time(); - $msg = html::span(null, rcube_label('contactdeleted')) - . ' ' . html::a(array('onclick' => JS_OBJECT_NAME.".command('undo', '', this)"), rcube_label('undo')); + $msg = html::span(null, $RCMAIL->gettext('contactdeleted')) + . ' ' . html::a(array('onclick' => rcmail_output::JS_OBJECT_NAME.".command('undo', '', this)"), $RCMAIL->gettext('undo')); $OUTPUT->show_message($msg, 'confirmation', null, true, $undo_time); } diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc index 7ddd3e516..3bbbfccdf 100644 --- a/program/steps/addressbook/edit.inc +++ b/program/steps/addressbook/edit.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/edit.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2007, The Roundcube Dev Team | + | 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. | @@ -36,12 +36,12 @@ if ($RCMAIL->action == 'edit') { // editing not allowed here if ($CONTACTS->readonly || $record['readonly']) { $OUTPUT->show_message('sourceisreadonly'); - rcmail_overwrite_action('show'); + $RCMAIL->overwrite_action('show'); return; } } else { - $source = get_input_value('_source', RCUBE_INPUT_GPC); + $source = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); if (strlen($source)) { $CONTACTS = $RCMAIL->get_address_book($source, true); @@ -59,6 +59,25 @@ else { $SOURCE_ID = $source; rcmail_set_sourcename($CONTACTS); + +$OUTPUT->add_handlers(array( + 'contactedithead' => 'rcmail_contact_edithead', + 'contacteditform' => 'rcmail_contact_editform', + 'contactphoto' => 'rcmail_contact_photo', + 'photouploadform' => 'rcmail_upload_photo_form', + 'sourceselector' => 'rcmail_source_selector', + 'filedroparea' => 'rcmail_photo_drop_area', +)); + +if ($RCMAIL->action == 'add' && $OUTPUT->template_exists('contactadd')) { + $OUTPUT->send('contactadd'); +} + +// this will be executed if no template for addcontact exists +$OUTPUT->send('contactedit'); + + + function rcmail_get_edit_record() { global $RCMAIL, $CONTACTS; @@ -70,7 +89,7 @@ function rcmail_get_edit_record() else if ($RCMAIL->action != 'add' && !(($result = $CONTACTS->get_result()) && ($record = $result->first())) ) { - $RCMAIL->output->show_message('contactnotfound'); + $RCMAIL->output->show_message('contactnotfound', 'error'); return false; } @@ -125,7 +144,7 @@ function rcmail_contact_editform($attrib) $form = array( 'contact' => array( - 'name' => rcube_label('properties'), + 'name' => $RCMAIL->gettext('properties'), 'content' => array( 'email' => array('size' => $i_size, 'visible' => true), 'phone' => array('size' => $i_size, 'visible' => true), @@ -135,7 +154,7 @@ function rcmail_contact_editform($attrib) ), ), 'personal' => array( - 'name' => rcube_label('personalinfo'), + 'name' => $RCMAIL->gettext('personalinfo'), 'content' => array( 'gender' => array('visible' => true), 'maidenname' => array('size' => $i_size), @@ -150,7 +169,7 @@ function rcmail_contact_editform($attrib) if (isset($CONTACT_COLTYPES['notes'])) { $form['notes'] = array( - 'name' => rcube_label('notes'), + 'name' => $RCMAIL->gettext('notes'), 'content' => array( 'notes' => array('size' => $t_cols, 'rows' => $t_rows, 'label' => false, 'visible' => true, 'limit' => 1), ), @@ -169,37 +188,56 @@ function rcmail_contact_editform($attrib) function rcmail_upload_photo_form($attrib) { - global $OUTPUT; - - // set defaults - $attrib += array('id' => 'rcmUploadform', 'buttons' => 'yes'); - - // find max filesize value - $max_filesize = parse_bytes(ini_get('upload_max_filesize')); - $max_postsize = parse_bytes(ini_get('post_max_size')); - if ($max_postsize && $max_postsize < $max_filesize) - $max_filesize = $max_postsize; - $max_filesize = show_bytes($max_filesize); - - $hidden = new html_hiddenfield(array('name' => '_cid', 'value' => $GLOBALS['cid'])); - $input = new html_inputfield(array('type' => 'file', 'name' => '_photo', 'size' => $attrib['size'])); - $button = new html_inputfield(array('type' => 'button')); - - $out = html::div($attrib, - $OUTPUT->form_tag(array('id' => $attrib['id'].'Frm', 'name' => 'uploadform', 'method' => 'post', 'enctype' => 'multipart/form-data'), - $hidden->show() . - html::div(null, $input->show()) . - html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) . - (get_boolean($attrib['buttons']) ? html::div('buttons', - $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) . ' ' . - $button->show(rcube_label('upload'), array('class' => 'button mainaction', 'onclick' => JS_OBJECT_NAME . ".command('upload-photo', this.form)")) - ) : '') - ) - ); - - $OUTPUT->add_label('addphoto','replacephoto'); - $OUTPUT->add_gui_object('uploadform', $attrib['id'].'Frm'); - return $out; + global $RCMAIL, $OUTPUT; + + // set defaults + $attrib += array('id' => 'rcmUploadform', 'buttons' => 'yes'); + + // find max filesize value + $max_filesize = parse_bytes(ini_get('upload_max_filesize')); + $max_postsize = parse_bytes(ini_get('post_max_size')); + + if ($max_postsize && $max_postsize < $max_filesize) { + $max_filesize = $max_postsize; + } + $max_filesize = $RCMAIL->show_bytes($max_filesize); + + $hidden = new html_hiddenfield(array('name' => '_cid', 'value' => $GLOBALS['cid'])); + $input = new html_inputfield(array('type' => 'file', 'name' => '_photo', 'size' => $attrib['size'])); + $button = new html_inputfield(array('type' => 'button')); + + $content = $hidden->show() . html::div(null, $input->show()) + . html::div('hint', $RCMAIL->gettext(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))); + + if (rcube_utils::get_boolean($attrib['buttons'])) { + $content .= html::div('buttons', + $button->show($RCMAIL->gettext('close'), array( + 'class' => 'button', + 'onclick' => "$('#$attrib[id]').hide()" + )) + . ' ' . + $button->show($RCMAIL->gettext('upload'), array( + 'class' => 'button mainaction', + 'onclick' => rcmail_output::JS_OBJECT_NAME . ".command('upload-photo', this.form)" + )) + ); + } + + $out = html::div($attrib, + $OUTPUT->form_tag(array( + 'id' => $attrib['id'] . 'Frm', + 'name' => 'uploadform', + 'method' => 'post', + 'enctype' => 'multipart/form-data' + ), + $content + ) + ); + + $OUTPUT->add_label('addphoto','replacephoto'); + $OUTPUT->add_gui_object('uploadform', $attrib['id'].'Frm'); + + return $out; } // similar function as in /steps/settings/edit_identity.inc @@ -247,7 +285,7 @@ function rcmail_source_selector($attrib) $attrib['name'] = '_source'; $attrib['is_escaped'] = true; - $attrib['onchange'] = JS_OBJECT_NAME . ".command('save', 'reload', this.form)"; + $attrib['onchange'] = rcmail_output::JS_OBJECT_NAME . ".command('save', 'reload', this.form)"; $select = new html_select($attrib); @@ -270,19 +308,3 @@ function rcmail_photo_drop_area($attrib) $OUTPUT->set_env('filedrop', array('action' => 'upload-photo', 'fieldname' => '_photo', 'single' => 1, 'filter' => '^image/.+')); } } - - -$OUTPUT->add_handlers(array( - 'contactedithead' => 'rcmail_contact_edithead', - 'contacteditform' => 'rcmail_contact_editform', - 'contactphoto' => 'rcmail_contact_photo', - 'photouploadform' => 'rcmail_upload_photo_form', - 'sourceselector' => 'rcmail_source_selector', - 'filedroparea' => 'rcmail_photo_drop_area', -)); - -if ($RCMAIL->action == 'add' && $OUTPUT->template_exists('contactadd')) - $OUTPUT->send('contactadd'); - -// this will be executed if no template for addcontact exists -$OUTPUT->send('contactedit'); diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc index 1e988feab..2b45e5cd1 100644 --- a/program/steps/addressbook/export.inc +++ b/program/steps/addressbook/export.inc @@ -6,7 +6,7 @@ | | | This file is part of the Roundcube Webmail client | | Copyright (C) 2008-2013, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | Copyright (C) 2011-2013, Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -21,49 +21,8 @@ +-----------------------------------------------------------------------+ */ - -/** - * Copy contact record properties into a vcard object - */ -function prepare_for_export(&$record, $source = null) -{ - $groups = $source && $source->groups && $source->export_groups ? $source->get_record_groups($record['ID']) : null; - - if (empty($record['vcard'])) { - $vcard = new rcube_vcard(); - if ($source) { - $vcard->extend_fieldmap($source->vcard_map); - } - $vcard->load($record['vcard']); - $vcard->reset(); - - foreach ($record as $key => $values) { - list($field, $section) = explode(':', $key); - foreach ((array)$values as $value) { - if (is_array($value) || @strlen($value)) { - $vcard->set($field, $value, strtoupper($section)); - } - } - } - - // append group names - if ($groups) { - $vcard->set('groups', join(',', $groups), null); - } - - $record['vcard'] = $vcard->export(true); - } - // patch categories to alread existing vcard block - else if ($record['vcard'] && !empty($groups) && !strpos($record['vcard'], 'CATEGORIES:')) { - $vgroups = 'CATEGORIES:' . rcube_vcard::vcard_quote(join(',', $groups)); - $record['vcard'] = str_replace('END:VCARD', $vgroups . rcube_vcard::$eol . 'END:VCARD', $record['vcard']); - } -} - - // Use search result -if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']])) -{ +if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']])) { $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name'); $search = (array)$_SESSION['search'][$_REQUEST['_search']]; $records = array(); @@ -140,7 +99,7 @@ else { } // send downlaod headers -header('Content-Type: text/x-vcard; charset='.RCMAIL_CHARSET); +header('Content-Type: text/x-vcard; charset='.RCUBE_CHARSET); header('Content-Disposition: attachment; filename="contacts.vcf"'); while ($result && ($row = $result->next())) { @@ -153,3 +112,42 @@ while ($result && ($row = $result->next())) { } exit; + + +/** + * Copy contact record properties into a vcard object + */ +function prepare_for_export(&$record, $source = null) +{ + $groups = $source && $source->groups && $source->export_groups ? $source->get_record_groups($record['ID']) : null; + + if (empty($record['vcard'])) { + $vcard = new rcube_vcard(); + if ($source) { + $vcard->extend_fieldmap($source->vcard_map); + } + $vcard->load($record['vcard']); + $vcard->reset(); + + foreach ($record as $key => $values) { + list($field, $section) = explode(':', $key); + foreach ((array)$values as $value) { + if (is_array($value) || @strlen($value)) { + $vcard->set($field, $value, strtoupper($section)); + } + } + } + + // append group names + if ($groups) { + $vcard->set('groups', join(',', $groups), null); + } + + $record['vcard'] = $vcard->export(true); + } + // patch categories to alread existing vcard block + else if ($record['vcard'] && !empty($groups) && !strpos($record['vcard'], 'CATEGORIES:')) { + $vgroups = 'CATEGORIES:' . rcube_vcard::vcard_quote(join(',', $groups)); + $record['vcard'] = str_replace('END:VCARD', $vgroups . rcube_vcard::$eol . 'END:VCARD', $record['vcard']); + } +} diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index f94d15338..be0dd2a33 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/func.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | 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. | @@ -23,37 +23,37 @@ $SEARCH_MODS_DEFAULT = array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1 // general definition of contact coltypes $CONTACT_COLTYPES = array( - 'name' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('name'), 'category' => 'main'), - 'firstname' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('firstname'), 'category' => 'main'), - 'surname' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('surname'), 'category' => 'main'), - 'email' => array('type' => 'text', 'size' => 40, 'maxlength' => 254, 'label' => rcube_label('email'), 'subtypes' => array('home','work','other'), 'category' => 'main'), - 'middlename' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('middlename'), 'category' => 'main'), - 'prefix' => array('type' => 'text', 'size' => 8, 'maxlength' => 20, 'limit' => 1, 'label' => rcube_label('nameprefix'), 'category' => 'main'), - 'suffix' => array('type' => 'text', 'size' => 8, 'maxlength' => 20, 'limit' => 1, 'label' => rcube_label('namesuffix'), 'category' => 'main'), - 'nickname' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('nickname'), 'category' => 'main'), - 'jobtitle' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('jobtitle'), 'category' => 'main'), - 'organization' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('organization'), 'category' => 'main'), - 'department' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('department'), 'category' => 'main'), - 'gender' => array('type' => 'select', 'limit' => 1, 'label' => rcube_label('gender'), 'options' => array('male' => rcube_label('male'), 'female' => rcube_label('female')), 'category' => 'personal'), - 'maidenname' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('maidenname'), 'category' => 'personal'), - 'phone' => array('type' => 'text', 'size' => 40, 'maxlength' => 20, 'label' => rcube_label('phone'), 'subtypes' => array('home','home2','work','work2','mobile','main','homefax','workfax','car','pager','video','assistant','other'), 'category' => 'main'), - 'address' => array('type' => 'composite', 'label' => rcube_label('address'), 'subtypes' => array('home','work','other'), 'childs' => array( - 'street' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('street'), 'category' => 'main'), - 'locality' => array('type' => 'text', 'size' => 28, 'maxlength' => 50, 'label' => rcube_label('locality'), 'category' => 'main'), - 'zipcode' => array('type' => 'text', 'size' => 8, 'maxlength' => 15, 'label' => rcube_label('zipcode'), 'category' => 'main'), - 'region' => array('type' => 'text', 'size' => 12, 'maxlength' => 50, 'label' => rcube_label('region'), 'category' => 'main'), - 'country' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('country'), 'category' => 'main'), - ), 'category' => 'main'), - 'birthday' => array('type' => 'date', 'size' => 12, 'maxlength' => 16, 'label' => rcube_label('birthday'), 'limit' => 1, 'render_func' => 'rcmail_format_date_col', 'category' => 'personal'), - 'anniversary' => array('type' => 'date', 'size' => 12, 'maxlength' => 16, 'label' => rcube_label('anniversary'), 'limit' => 1, 'render_func' => 'rcmail_format_date_col', 'category' => 'personal'), - 'website' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('website'), 'subtypes' => array('homepage','work','blog','profile','other'), 'category' => 'main'), - 'im' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('instantmessenger'), 'subtypes' => array('aim','icq','msn','yahoo','jabber','skype','other'), 'category' => 'main'), - 'notes' => array('type' => 'textarea', 'size' => 40, 'rows' => 15, 'maxlength' => 500, 'label' => rcube_label('notes'), 'limit' => 1), - 'photo' => array('type' => 'image', 'limit' => 1, 'category' => 'main'), - 'assistant' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('assistant'), 'category' => 'personal'), - 'manager' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('manager'), 'category' => 'personal'), - 'spouse' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('spouse'), 'category' => 'personal'), - // TODO: define fields for vcards like GEO, KEY + 'name' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('name'), 'category' => 'main'), + 'firstname' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('firstname'), 'category' => 'main'), + 'surname' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('surname'), 'category' => 'main'), + 'email' => array('type' => 'text', 'size' => 40, 'maxlength' => 254, 'label' => $RCMAIL->gettext('email'), 'subtypes' => array('home','work','other'), 'category' => 'main'), + 'middlename' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('middlename'), 'category' => 'main'), + 'prefix' => array('type' => 'text', 'size' => 8, 'maxlength' => 20, 'limit' => 1, 'label' => $RCMAIL->gettext('nameprefix'), 'category' => 'main'), + 'suffix' => array('type' => 'text', 'size' => 8, 'maxlength' => 20, 'limit' => 1, 'label' => $RCMAIL->gettext('namesuffix'), 'category' => 'main'), + 'nickname' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('nickname'), 'category' => 'main'), + 'jobtitle' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('jobtitle'), 'category' => 'main'), + 'organization' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('organization'), 'category' => 'main'), + 'department' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('department'), 'category' => 'main'), + 'gender' => array('type' => 'select', 'limit' => 1, 'label' => $RCMAIL->gettext('gender'), 'options' => array('male' => $RCMAIL->gettext('male'), 'female' => $RCMAIL->gettext('female')), 'category' => 'personal'), + 'maidenname' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('maidenname'), 'category' => 'personal'), + 'phone' => array('type' => 'text', 'size' => 40, 'maxlength' => 20, 'label' => $RCMAIL->gettext('phone'), 'subtypes' => array('home','home2','work','work2','mobile','main','homefax','workfax','car','pager','video','assistant','other'), 'category' => 'main'), + 'address' => array('type' => 'composite', 'label' => $RCMAIL->gettext('address'), 'subtypes' => array('home','work','other'), 'childs' => array( + 'street' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => $RCMAIL->gettext('street'), 'category' => 'main'), + 'locality' => array('type' => 'text', 'size' => 28, 'maxlength' => 50, 'label' => $RCMAIL->gettext('locality'), 'category' => 'main'), + 'zipcode' => array('type' => 'text', 'size' => 8, 'maxlength' => 15, 'label' => $RCMAIL->gettext('zipcode'), 'category' => 'main'), + 'region' => array('type' => 'text', 'size' => 12, 'maxlength' => 50, 'label' => $RCMAIL->gettext('region'), 'category' => 'main'), + 'country' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => $RCMAIL->gettext('country'), 'category' => 'main'), + ), 'category' => 'main'), + 'birthday' => array('type' => 'date', 'size' => 12, 'maxlength' => 16, 'label' => $RCMAIL->gettext('birthday'), 'limit' => 1, 'render_func' => 'rcmail_format_date_col', 'category' => 'personal'), + 'anniversary' => array('type' => 'date', 'size' => 12, 'maxlength' => 16, 'label' => $RCMAIL->gettext('anniversary'), 'limit' => 1, 'render_func' => 'rcmail_format_date_col', 'category' => 'personal'), + 'website' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => $RCMAIL->gettext('website'), 'subtypes' => array('homepage','work','blog','profile','other'), 'category' => 'main'), + 'im' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => $RCMAIL->gettext('instantmessenger'), 'subtypes' => array('aim','icq','msn','yahoo','jabber','skype','other'), 'category' => 'main'), + 'notes' => array('type' => 'textarea', 'size' => 40, 'rows' => 15, 'maxlength' => 500, 'label' => $RCMAIL->gettext('notes'), 'limit' => 1), + 'photo' => array('type' => 'image', 'limit' => 1, 'category' => 'main'), + 'assistant' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('assistant'), 'category' => 'personal'), + 'manager' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('manager'), 'category' => 'personal'), + 'spouse' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => $RCMAIL->gettext('spouse'), 'category' => 'personal'), + // TODO: define fields for vcards like GEO, KEY ); $PAGE_SIZE = $RCMAIL->config->get('addressbook_pagesize', $RCMAIL->config->get('pagesize', 50)); @@ -83,12 +83,12 @@ if (!$RCMAIL->action && !$OUTPUT->ajax_call) { $OUTPUT->set_env('writable_source', $writeable); $OUTPUT->set_env('compose_extwin', $RCMAIL->config->get('compose_extwin',false)); - $OUTPUT->set_pagetitle(rcube_label('addressbook')); + $OUTPUT->set_pagetitle($RCMAIL->gettext('addressbook')); $_SESSION['addressbooks_count'] = $count; $_SESSION['addressbooks_count_writeable'] = $writeable; // select address book - $source = get_input_value('_source', RCUBE_INPUT_GPC); + $source = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); // use first directory by default if (!strlen($source) || !isset($js_list[$source])) { @@ -109,13 +109,38 @@ if ($undo = $_SESSION['contact_undo']) { $RCMAIL->session->remove('contact_undo'); } +// register UI objects +$OUTPUT->add_handlers(array( + 'directorylist' => 'rcmail_directory_list', +// 'groupslist' => 'rcmail_contact_groups', + 'addresslist' => 'rcmail_contacts_list', + 'addresslisttitle' => 'rcmail_contacts_list_title', + 'addressframe' => 'rcmail_contact_frame', + 'recordscountdisplay' => 'rcmail_rowcount_display', + 'searchform' => array($OUTPUT, 'search_form') +)); + +// register action aliases +$RCMAIL->register_action_map(array( + 'add' => 'edit.inc', + 'group-create' => 'groups.inc', + 'group-rename' => 'groups.inc', + 'group-delete' => 'groups.inc', + 'group-addmembers' => 'groups.inc', + 'group-delmembers' => 'groups.inc', + 'search-create' => 'search.inc', + 'search-delete' => 'search.inc', +)); + + + // instantiate a contacts object according to the given source function rcmail_contact_source($source=null, $init_env=false, $writable=false) { global $RCMAIL, $OUTPUT, $CONTACT_COLTYPES, $PAGE_SIZE; if (!strlen($source)) { - $source = get_input_value('_source', RCUBE_INPUT_GPC); + $source = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); } // Get object @@ -129,13 +154,13 @@ function rcmail_contact_source($source=null, $init_env=false, $writable=false) $CONTACTS->set_page(isset($_SESSION['page']) ? $_SESSION['page'] : 1); if (!empty($_REQUEST['_gid'])) - $CONTACTS->set_group(get_input_value('_gid', RCUBE_INPUT_GPC)); + $CONTACTS->set_group(rcube_utils::get_input_value('_gid', rcube_utils::INPUT_GPC)); if (!$init_env) return $CONTACTS; $OUTPUT->set_env('readonly', $CONTACTS->readonly); - $OUTPUT->set_env('source', $source); + $OUTPUT->set_env('source', (string) $source); // reduce/extend $CONTACT_COLTYPES with specification from the current $CONTACT object if (is_array($CONTACTS->coltypes)) { @@ -162,13 +187,13 @@ function rcmail_contact_source($source=null, $init_env=false, $writable=false) function rcmail_set_sourcename($abook) { - global $OUTPUT; + global $OUTPUT, $RCMAIL; // get address book name (for display) if ($abook && $_SESSION['addressbooks_count'] > 1) { $name = $abook->get_name(); if (!$name) { - $name = rcube_label('personaladrbook'); + $name = $RCMAIL->gettext('personaladrbook'); } $OUTPUT->set_env('sourcename', html_entity_decode($name, ENT_COMPAT, 'UTF-8')); } @@ -189,17 +214,17 @@ function rcmail_directory_list($attrib) 'id' => 'rcmli%s', 'class' => '%s', 'noclose' => true), html::a(array('href' => '%s', 'rel' => '%s', - 'onclick' => "return ".JS_OBJECT_NAME.".command('list','%s',this)"), '%s')); + 'onclick' => "return ".rcmail_output::JS_OBJECT_NAME.".command('list','%s',this)"), '%s')); $sources = (array) $OUTPUT->get_env('address_sources'); reset($sources); // currently selected source - $current = get_input_value('_source', RCUBE_INPUT_GPC); + $current = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); foreach ($sources as $j => $source) { $id = strval(strlen($source['id']) ? $source['id'] : $j); - $js_id = JQ($id); + $js_id = rcube::JQ($id); // set class name(s) $class_name = 'addressbook'; @@ -214,7 +239,7 @@ function rcmail_directory_list($attrib) $out .= sprintf($line_templ, rcube_utils::html_identifier($id, true), $class_name, - Q(rcmail_url(null, array('_source' => $id))), + rcube::Q($RCMAIL->url(array('_source' => $id))), $source['id'], $js_id, $name); @@ -229,13 +254,13 @@ function rcmail_directory_list($attrib) $line_templ = html::tag('li', array( 'id' => 'rcmli%s', 'class' => '%s'), html::a(array('href' => '#', 'rel' => 'S%s', - 'onclick' => "return ".JS_OBJECT_NAME.".command('listsearch', '%s', this)"), '%s')); + 'onclick' => "return ".rcmail_output::JS_OBJECT_NAME.".command('listsearch', '%s', this)"), '%s')); // Saved searches $sources = $RCMAIL->user->list_searches(rcube_user::SEARCH_ADDRESSBOOK); foreach ($sources as $j => $source) { $id = $source['id']; - $js_id = JQ($id); + $js_id = rcube::JQ($id); // set class name(s) $class_name = 'contactsearch'; @@ -248,7 +273,7 @@ function rcmail_directory_list($attrib) rcube_utils::html_identifier('S'.$id, true), $class_name, $id, - $js_id, (!empty($source['name']) ? Q($source['name']) : Q($id))); + $js_id, (!empty($source['name']) ? rcube::Q($source['name']) : rcube::Q($id))); } $OUTPUT->set_env('contactgroups', $jsdata); @@ -275,7 +300,7 @@ function rcmail_contact_groups($args) 'id' => 'rcmli%s', 'class' => 'contactgroup'), html::a(array('href' => '#', 'rel' => '%s:%s', - 'onclick' => "return ".JS_OBJECT_NAME.".command('listgroup',{'source':'%s','id':'%s'},this)"), '%s')); + 'onclick' => "return ".rcmail_output::JS_OBJECT_NAME.".command('listgroup',{'source':'%s','id':'%s'},this)"), '%s')); // append collapse/expand toggle and open a new <ul> $is_collapsed = strpos($RCMAIL->config->get('collapsed_abooks',''), '&'.rawurlencode($args['source']).'&') !== false; @@ -285,7 +310,7 @@ function rcmail_contact_groups($args) $groups_html .= sprintf($line_templ, rcube_utils::html_identifier('G' . $args['source'] . $group['ID'], true), $args['source'], $group['ID'], - $args['source'], $group['ID'], Q($group['name']) + $args['source'], $group['ID'], rcube::Q($group['name']) ); $args['jsdata']['G'.$args['source'].$group['ID']] = array( 'source' => $args['source'], 'id' => $group['ID'], @@ -304,7 +329,7 @@ function rcmail_contact_groups($args) // return the contacts list as HTML table function rcmail_contacts_list($attrib) { - global $CONTACTS, $OUTPUT; + global $RCMAIL, $CONTACTS, $OUTPUT; // define list of cols to be displayed $a_show_cols = array('name','action'); @@ -314,7 +339,7 @@ function rcmail_contacts_list($attrib) $attrib['id'] = 'rcmAddressList'; // create XHTML table - $out = rcube_table_output($attrib, array(), $a_show_cols, $CONTACTS->primary_key); + $out = $RCMAIL->table_output($attrib, array(), $a_show_cols, $CONTACTS->primary_key); // set client env $OUTPUT->add_gui_object('contactslist', $attrib['id']); @@ -330,7 +355,7 @@ function rcmail_contacts_list($attrib) function rcmail_js_contacts_list($result, $prefix='') { - global $OUTPUT; + global $OUTPUT, $RCMAIL; if (empty($result) || $result->count == 0) return; @@ -357,7 +382,7 @@ function rcmail_js_contacts_list($result, $prefix='') $val = ''; switch ($col) { case 'name': - $val = Q(rcube_addressbook::compose_list_name($row)); + $val = rcube::Q(rcube_addressbook::compose_list_name($row)); break; case 'action': @@ -365,8 +390,8 @@ function rcmail_js_contacts_list($result, $prefix='') $val = html::a(array( 'href' => '#list', 'rel' => $row['ID'], - 'title' => rcube_label('listgroup'), - 'onclick' => sprintf("return %s.command('pushgroup',{'source':'%s','id':'%s'},this,event)", JS_OBJECT_NAME, $source_id, $row['CID']), + 'title' => $RCMAIL->gettext('listgroup'), + 'onclick' => sprintf("return %s.command('pushgroup',{'source':'%s','id':'%s'},this,event)", rcmail_output::JS_OBJECT_NAME, $source_id, $row['CID']), ), '»'); } else @@ -374,7 +399,7 @@ function rcmail_js_contacts_list($result, $prefix='') break; default: - $val = Q($row[$col]); + $val = rcube::Q($row[$col]); break; } @@ -391,7 +416,7 @@ function rcmail_js_contacts_list($result, $prefix='') function rcmail_contacts_list_title($attrib) { - global $OUTPUT; + global $OUTPUT, $RCMAIL; $attrib += array('label' => 'contacts', 'id' => 'rcmabooklisttitle', 'tag' => 'span'); unset($attrib['name']); @@ -399,7 +424,7 @@ function rcmail_contacts_list_title($attrib) $OUTPUT->add_gui_object('addresslist_title', $attrib['id']); $OUTPUT->add_label('contacts'); - return html::tag($attrib['tag'], $attrib, rcube_label($attrib['label']), html::$common_attrib); + return html::tag($attrib['tag'], $attrib, $RCMAIL->gettext($attrib['label']), html::$common_attrib); } @@ -417,23 +442,23 @@ function rcmail_contact_frame($attrib) function rcmail_rowcount_display($attrib) { - global $OUTPUT; + global $RCMAIL; if (!$attrib['id']) $attrib['id'] = 'rcmcountdisplay'; - $OUTPUT->add_gui_object('countdisplay', $attrib['id']); + $RCMAIL->output->add_gui_object('countdisplay', $attrib['id']); if ($attrib['label']) $_SESSION['contactcountdisplay'] = $attrib['label']; - return html::span($attrib, rcube_label('loading')); + return html::span($attrib, $RCMAIL->gettext('loading')); } function rcmail_get_rowcount_text($result=null) { - global $CONTACTS, $PAGE_SIZE; + global $RCMAIL, $CONTACTS, $PAGE_SIZE; // read nr of contacts if (!$result) { @@ -441,9 +466,9 @@ function rcmail_get_rowcount_text($result=null) } if ($result->count == 0) - $out = rcube_label('nocontactsfound'); + $out = $RCMAIL->gettext('nocontactsfound'); else - $out = rcube_label(array( + $out = $RCMAIL->gettext(array( 'name' => $_SESSION['contactcountdisplay'] ? $_SESSION['contactcountdisplay'] : 'contactsfromto', 'vars' => array( 'from' => $result->first + 1, @@ -457,13 +482,15 @@ function rcmail_get_rowcount_text($result=null) function rcmail_get_type_label($type) { + global $RCMAIL; + $label = 'type'.$type; - if (rcube_label_exists($label, '*', $domain)) - return rcube_label($label, $domain); + if ($RCMAIL->text_exists($label, '*', $domain)) + return $RCMAIL->gettext($label, $domain); else if (preg_match('/\w+(\d+)$/', $label, $m) && ($label = preg_replace('/(\d+)$/', '', $label)) - && rcube_label_exists($label, '*', $domain)) - return rcube_label($label, $domain) . ' ' . $m[1]; + && $RCMAIL->text_exists($label, '*', $domain)) + return $RCMAIL->gettext($label, $domain) . ' ' . $m[1]; return ucfirst($type); } @@ -480,7 +507,7 @@ function rcmail_contact_form($form, $record, $attrib = null) $form = $plugin['form']; $record = $plugin['record']; $edit_mode = $RCMAIL->action != 'show'; - $del_button = $attrib['deleteicon'] ? html::img(array('src' => $RCMAIL->output->get_skin_file($attrib['deleteicon']), 'alt' => rcube_label('delete'))) : rcube_label('delete'); + $del_button = $attrib['deleteicon'] ? html::img(array('src' => $RCMAIL->output->get_skin_file($attrib['deleteicon']), 'alt' => $RCMAIL->gettext('delete'))) : $RCMAIL->gettext('delete'); unset($attrib['deleteicon']); $out = ''; @@ -507,7 +534,7 @@ function rcmail_contact_form($form, $record, $attrib = null) continue; $select_add = new html_select(array('class' => 'addfieldmenu', 'rel' => $section)); - $select_add->add(rcube_label('addfield'), ''); + $select_add->add($RCMAIL->gettext('addfield'), ''); // render head section with name fields (not a regular list of rows) if ($section == 'head') { @@ -539,7 +566,7 @@ function rcmail_contact_form($form, $record, $attrib = null) if ($RCMAIL->action == 'show') { if (!empty($record[$col])) - $fields .= html::span('namefield ' . $col, Q($record[$col])) . " "; + $fields .= html::span('namefield ' . $col, rcube::Q($record[$col])) . " "; } else { $colprop = (array)$fieldset['content'][$col] + (array)$coltypes[$col]; @@ -548,7 +575,7 @@ function rcmail_contact_form($form, $record, $attrib = null) $colprop['style'] = 'display:none'; $select_add->add($colprop['label'], $col); } - $fields .= rcmail_get_edit_field($col, $record[$col], $colprop, $colprop['type']); + $fields .= rcube_output::get_edit_field($col, $record[$col], $colprop, $colprop['type']); } } $content .= html::div($blockname, $fields); @@ -557,7 +584,7 @@ function rcmail_contact_form($form, $record, $attrib = null) if ($edit_mode) $content .= html::p('addfield', $select_add->show(null)); - $out .= html::tag('fieldset', $attrib, (!empty($fieldset['name']) ? html::tag('legend', null, Q($fieldset['name'])) : '') . $content) ."\n"; + $out .= html::tag('fieldset', $attrib, (!empty($fieldset['name']) ? html::tag('legend', null, rcube::Q($fieldset['name'])) : '') . $content) ."\n"; continue; } @@ -575,7 +602,7 @@ function rcmail_contact_form($form, $record, $attrib = null) // merge colprop with global coltype configuration $colprop += $coltypes[$field]; - $label = isset($colprop['label']) ? $colprop['label'] : rcube_label($col); + $label = isset($colprop['label']) ? $colprop['label'] : $RCMAIL->gettext($col); // prepare subtype selector in edit mode if ($edit_mode && is_array($colprop['subtypes'])) { @@ -636,10 +663,10 @@ function rcmail_contact_form($form, $record, $attrib = null) if ($edit_mode) { if ($colprop['subtypes'] || $colprop['limit'] != 1) $cp['array'] = true; - $composite['{'.$childcol.'}'] = rcmail_get_edit_field($childcol, $childvalue, $cp, $cp['type']) . " "; + $composite['{'.$childcol.'}'] = rcube_output::get_edit_field($childcol, $childvalue, $cp, $cp['type']) . " "; } else { - $childval = $cp['render_func'] ? call_user_func($cp['render_func'], $childvalue, $childcol) : Q($childvalue); + $childval = $cp['render_func'] ? call_user_func($cp['render_func'], $childvalue, $childcol) : rcube::Q($childvalue); $composite['{'.$childcol.'}'] = html::span('data ' . $childcol, $childval) . " "; } $j++; @@ -666,7 +693,7 @@ function rcmail_contact_form($form, $record, $attrib = null) $val = rcmail_format_date_col($val); } - $val = rcmail_get_edit_field($col, $val, $colprop, $colprop['type']); + $val = rcube_output::get_edit_field($col, $val, $colprop, $colprop['type']); $coltypes[$field]['count']++; } else if ($colprop['render_func']) @@ -674,7 +701,7 @@ function rcmail_contact_form($form, $record, $attrib = null) else if (is_array($colprop['options']) && isset($colprop['options'][$val])) $val = $colprop['options'][$val]; else - $val = Q($val); + $val = rcube::Q($val); // use subtype as label if ($colprop['subtypes']) @@ -682,12 +709,12 @@ function rcmail_contact_form($form, $record, $attrib = null) // add delete button/link if ($edit_mode && !($colprop['visible'] && $colprop['limit'] == 1)) - $val .= html::a(array('href' => '#del', 'class' => 'contactfieldbutton deletebutton', 'title' => rcube_label('delete'), 'rel' => $col), $del_button); + $val .= html::a(array('href' => '#del', 'class' => 'contactfieldbutton deletebutton', 'title' => $RCMAIL->gettext('delete'), 'rel' => $col), $del_button); // display row with label if ($label) { $rows .= html::div('row', - html::div('contactfieldlabel label', $select_subtype ? $select_subtype->show($subtype) : Q($label)) . + html::div('contactfieldlabel label', $select_subtype ? $select_subtype->show($subtype) : rcube::Q($label)) . html::div('contactfieldcontent '.$colprop['type'], $val)); } else // row without label @@ -703,7 +730,7 @@ function rcmail_contact_form($form, $record, $attrib = null) // wrap rows in fieldgroup container if ($rows) { $content .= html::tag('fieldset', array('class' => 'contactfieldgroup ' . ($colprop['subtypes'] ? 'contactfieldgroupmulti ' : '') . 'contactcontroller' . $col, 'style' => ($rows ? null : 'display:none')), - ($colprop['subtypes'] ? html::tag('legend', null, Q($colprop['label'])) : ' ') . + ($colprop['subtypes'] ? html::tag('legend', null, rcube::Q($colprop['label'])) : ' ') . $rows); } } @@ -722,7 +749,7 @@ function rcmail_contact_form($form, $record, $attrib = null) } if ($content) - $out .= html::tag('fieldset', null, html::tag('legend', null, Q($fieldset['name'])) . $content) ."\n"; + $out .= html::tag('fieldset', null, html::tag('legend', null, rcube::Q($fieldset['name'])) . $content) ."\n"; } if ($edit_mode) { @@ -792,7 +819,7 @@ function rcmail_contact_photo($attrib) function rcmail_format_date_col($val) { global $RCMAIL; - return format_date($val, $RCMAIL->config->get('date_format', 'Y-m-d'), false); + return $RCMAIL->format_date($val, $RCMAIL->config->get('date_format', 'Y-m-d'), false); } /** @@ -855,8 +882,8 @@ function rcmail_get_cids($filter = null) // forms. If _source is an empty string then the ID is a string // containing contact ID and source name in form: <ID>-<SOURCE> - $cid = get_input_value('_cid', RCUBE_INPUT_GPC); - $source = (string) get_input_value('_source', RCUBE_INPUT_GPC); + $cid = rcube_utils::get_input_value('_cid', rcube_utils::INPUT_GPC); + $source = (string) rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); if (is_array($cid)) { return $cid; @@ -893,27 +920,3 @@ function rcmail_get_cids($filter = null) return $filter !== null ? $result[$filter] : $result; } - - -// register UI objects -$OUTPUT->add_handlers(array( - 'directorylist' => 'rcmail_directory_list', -// 'groupslist' => 'rcmail_contact_groups', - 'addresslist' => 'rcmail_contacts_list', - 'addresslisttitle' => 'rcmail_contacts_list_title', - 'addressframe' => 'rcmail_contact_frame', - 'recordscountdisplay' => 'rcmail_rowcount_display', - 'searchform' => array($OUTPUT, 'search_form') -)); - -// register action aliases -$RCMAIL->register_action_map(array( - 'add' => 'edit.inc', - 'group-create' => 'groups.inc', - 'group-rename' => 'groups.inc', - 'group-delete' => 'groups.inc', - 'group-addmembers' => 'groups.inc', - 'group-delmembers' => 'groups.inc', - 'search-create' => 'search.inc', - 'search-delete' => 'search.inc', -)); diff --git a/program/steps/addressbook/groups.inc b/program/steps/addressbook/groups.inc index 3b9288a2b..aef93f2c7 100644 --- a/program/steps/addressbook/groups.inc +++ b/program/steps/addressbook/groups.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/groups.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2010, The Roundcube Dev Team | + | 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. | @@ -19,117 +19,136 @@ +-----------------------------------------------------------------------+ */ -$source = get_input_value('_source', RCUBE_INPUT_GPC); +$source = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); $CONTACTS = rcmail_contact_source($source); if ($CONTACTS->readonly || !$CONTACTS->groups) { - $OUTPUT->show_message('sourceisreadonly', 'warning'); - $OUTPUT->send(); + $OUTPUT->show_message('sourceisreadonly', 'warning'); + $OUTPUT->send(); } if ($RCMAIL->action == 'group-addmembers') { - if (($gid = get_input_value('_gid', RCUBE_INPUT_POST)) && ($ids = rcmail_get_cids($source))) { - $plugin = $RCMAIL->plugins->exec_hook('group_addmembers', array('group_id' => $gid, 'ids' => $ids, 'source' => $source)); - - $CONTACTS->set_group($gid); - $num2add = count($plugin['ids']); - - if (!$plugin['abort']) { - if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($CONTACTS->count()->count + $num2add > $maxnum)) { - $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum)); - $OUTPUT->send(); - } - $result = $CONTACTS->add_to_group($gid, $plugin['ids']); + if (($gid = rcube_utils::get_input_value('_gid', rcube_utils::INPUT_POST)) && ($ids = rcmail_get_cids($source))) { + $plugin = $RCMAIL->plugins->exec_hook('group_addmembers', array( + 'group_id' => $gid, + 'ids' => $ids, + 'source' => $source, + )); + + $CONTACTS->set_group($gid); + $num2add = count($plugin['ids']); + + if (!$plugin['abort']) { + if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($CONTACTS->count()->count + $num2add > $maxnum)) { + $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum)); + $OUTPUT->send(); + } + + $result = $CONTACTS->add_to_group($gid, $plugin['ids']); + } + else { + $result = $plugin['result']; + } + + if ($result) + $OUTPUT->show_message('contactaddedtogroup'); + else if ($plugin['abort'] || $CONTACTS->get_error()) + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); + else + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'nogroupassignmentschanged'); } - else { - $result = $plugin['result']; - } - - if ($result) - $OUTPUT->show_message('contactaddedtogroup'); - else if ($plugin['abort'] || $CONTACTS->get_error()) - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); - else - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'nogroupassignmentschanged'); - } } - else if ($RCMAIL->action == 'group-delmembers') { - if (($gid = get_input_value('_gid', RCUBE_INPUT_POST)) && ($ids = rcmail_get_cids($source))) { - $plugin = $RCMAIL->plugins->exec_hook('group_delmembers', array('group_id' => $gid, 'ids' => $ids, 'source' => $source)); + if (($gid = rcube_utils::get_input_value('_gid', rcube_utils::INPUT_POST)) && ($ids = rcmail_get_cids($source))) { + $plugin = $RCMAIL->plugins->exec_hook('group_delmembers', array( + 'group_id' => $gid, + 'ids' => $ids, + 'source' => $source, + )); + + if (!$plugin['abort']) + $result = $CONTACTS->remove_from_group($gid, $plugin['ids']); + else + $result = $plugin['result']; + + if ($result) { + $OUTPUT->show_message('contactremovedfromgroup'); + $OUTPUT->command('remove_group_contacts',array('source' => $source, 'gid' => $gid)); + } + else { + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); + } + } +} +else if ($RCMAIL->action == 'group-create') { + if ($name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true))) { + $plugin = $RCMAIL->plugins->exec_hook('group_create', array( + 'name' => $name, + 'source' => $source, + )); + + if (!$plugin['abort']) + $created = $CONTACTS->create_group($plugin['name']); + else + $created = $plugin['result']; + } - if (!$plugin['abort']) - $result = $CONTACTS->remove_from_group($gid, $plugin['ids']); - else - $result = $plugin['result']; + if ($created && $OUTPUT->ajax_call) { + $created['name'] = rcube::Q($created['name']); - if ($result) { - $OUTPUT->show_message('contactremovedfromgroup'); - $OUTPUT->command('remove_group_contacts',array('source' => $source, 'gid' => $gid)); + $OUTPUT->show_message('groupcreated', 'confirmation'); + $OUTPUT->command('insert_contact_group', array('source' => $source) + $created); } - else { - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); + else if (!$created) { + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); } - } -} - -else if ($RCMAIL->action == 'group-create') { - if ($name = trim(get_input_value('_name', RCUBE_INPUT_POST, true))) { - $plugin = $RCMAIL->plugins->exec_hook('group_create', array('name' => $name, 'source' => $source)); - - if (!$plugin['abort']) - $created = $CONTACTS->create_group($plugin['name']); - else - $created = $plugin['result']; - } - - if ($created && $OUTPUT->ajax_call) { - $created['name'] = Q($created['name']); - $OUTPUT->show_message('groupcreated', 'confirmation'); - $OUTPUT->command('insert_contact_group', array('source' => $source) + $created); - } - else if (!$created) { - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); - } } - else if ($RCMAIL->action == 'group-rename') { - if (($gid = get_input_value('_gid', RCUBE_INPUT_POST)) && ($name = trim(get_input_value('_name', RCUBE_INPUT_POST, true)))) { - $plugin = $RCMAIL->plugins->exec_hook('group_rename', array('group_id' => $gid, 'name' => $name, 'source' => $source)); - - if (!$plugin['abort']) - $newname = $CONTACTS->rename_group($gid, $plugin['name'], $newgid); - else - $newname = $plugin['result']; - } - - if ($newname && $OUTPUT->ajax_call) { - $OUTPUT->show_message('grouprenamed', 'confirmation'); - $OUTPUT->command('update_contact_group', array( - 'source' => $source, 'id' => $gid, 'name' => Q($newname), 'newid' => $newgid)); - } - else if (!$newname) - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); -} + if (($gid = rcube_utils::get_input_value('_gid', rcube_utils::INPUT_POST)) + && ($name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true))) + ) { + $plugin = $RCMAIL->plugins->exec_hook('group_rename', array( + 'group_id' => $gid, + 'name' => $name, + 'source' => $source, + )); + + if (!$plugin['abort']) + $newname = $CONTACTS->rename_group($gid, $plugin['name'], $newgid); + else + $newname = $plugin['result']; + } + if ($newname && $OUTPUT->ajax_call) { + $OUTPUT->show_message('grouprenamed', 'confirmation'); + $OUTPUT->command('update_contact_group', array( + 'source' => $source, 'id' => $gid, 'name' => rcube::Q($newname), 'newid' => $newgid)); + } + else if (!$newname) { + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); + } +} else if ($RCMAIL->action == 'group-delete') { - if ($gid = get_input_value('_gid', RCUBE_INPUT_POST)) { - $plugin = $RCMAIL->plugins->exec_hook('group_delete', array('group_id' => $gid, 'source' => $source)); - - if (!$plugin['abort']) - $deleted = $CONTACTS->delete_group($gid); - else - $deleted = $plugin['result']; - } - - if ($deleted) { - $OUTPUT->show_message('groupdeleted', 'confirmation'); - $OUTPUT->command('remove_group_item', array('source' => $source, 'id' => $gid)); - } - else - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); + if ($gid = rcube_utils::get_input_value('_gid', rcube_utils::INPUT_POST)) { + $plugin = $RCMAIL->plugins->exec_hook('group_delete', array( + 'group_id' => $gid, + 'source' => $source, + )); + + if (!$plugin['abort']) + $deleted = $CONTACTS->delete_group($gid); + else + $deleted = $plugin['result']; + } + + if ($deleted) { + $OUTPUT->show_message('groupdeleted', 'confirmation'); + $OUTPUT->command('remove_group_item', array('source' => $source, 'id' => $gid)); + } + else { + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); + } } // send response $OUTPUT->send(); - diff --git a/program/steps/addressbook/import.inc b/program/steps/addressbook/import.inc index 60f5d7b61..33e473242 100644 --- a/program/steps/addressbook/import.inc +++ b/program/steps/addressbook/import.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/import.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2009, The Roundcube Dev Team | + | Copyright (C) 2008-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -20,169 +20,14 @@ +-----------------------------------------------------------------------+ */ -/** - * Handler function to display the import/upload form - */ -function rcmail_import_form($attrib) -{ - global $RCMAIL, $OUTPUT; - $target = get_input_value('_target', RCUBE_INPUT_GPC); - - $attrib += array('id' => "rcmImportForm"); - - $writable_books = $RCMAIL->get_address_sources(true, true); - - $upload = new html_inputfield(array( - 'type' => 'file', - 'name' => '_file[]', - 'id' => 'rcmimportfile', - 'size' => 40, - 'multiple' => 'multiple', - )); - $form = html::p(null, html::label('rcmimportfile', rcube_label('importfromfile')) . $upload->show()); - $table = new html_table(array('cols' => 2)); - - // addressbook selector - if (count($writable_books) > 1) { - $select = new html_select(array('name' => '_target', 'id' => 'rcmimporttarget', 'is_escaped' => true)); - - foreach ($writable_books as $book) - $select->add($book['name'], $book['id']); - - $table->add('title', html::label('rcmimporttarget', rcube_label('importtarget'))); - $table->add(null, $select->show($target)); - } - else { - $abook = new html_hiddenfield(array('name' => '_target', 'value' => key($writable_books))); - $form .= $abook->show(); - } - - // selector for group import options - if (count($writable_books) >= 1 || $writable_books[0]->groups) { - $select = new html_select(array('name' => '_groups', 'id' => 'rcmimportgroups', 'is_escaped' => true)); - $select->add(rcube_label('none'), '0'); - $select->add(rcube_label('importgroupsall'), '1'); - $select->add(rcube_label('importgroupsexisting'), '2'); - - $table->add('title', html::label('rcmimportgroups', rcube_label('importgroups'))); - $table->add(null, $select->show(get_input_value('_groups', RCUBE_INPUT_GPC))); - } - - // checkbox to replace the entire address book - $check_replace = new html_checkbox(array('name' => '_replace', 'value' => 1, 'id' => 'rcmimportreplace')); - $table->add('title', html::label('rcmimportreplace', rcube_label('importreplace'))); - $table->add(null, $check_replace->show(get_input_value('_replace', RCUBE_INPUT_GPC))); - - $form .= $table->show(array('id' => null) + $attrib); - - $OUTPUT->set_env('writable_source', !empty($writable_books)); - $OUTPUT->add_label('selectimportfile','importwait'); - $OUTPUT->add_gui_object('importform', $attrib['id']); - - $out = html::p(null, Q(rcube_label('importdesc'), 'show')); - - $out .= $OUTPUT->form_tag(array( - 'action' => $RCMAIL->url('import'), - 'method' => 'post', - 'enctype' => 'multipart/form-data') + $attrib, - $form); - - return $out; -} - - -/** - * Render the confirmation page for the import process - */ -function rcmail_import_confirm($attrib) -{ - global $IMPORT_STATS; - - $vars = get_object_vars($IMPORT_STATS); - $vars['names'] = $vars['skipped_names'] = ''; - - $content = html::p(null, rcube_label(array( - 'name' => 'importconfirm', - 'nr' => $IMPORT_STATS->inserted, - 'vars' => $vars, - )) . ($IMPORT_STATS->names ? ':' : '.')); - - if ($IMPORT_STATS->names) - $content .= html::p('em', join(', ', array_map('Q', $IMPORT_STATS->names))); - - if ($IMPORT_STATS->skipped) { - $content .= html::p(null, rcube_label(array( - 'name' => 'importconfirmskipped', - 'nr' => $IMPORT_STATS->skipped, - 'vars' => $vars, - )) . ':'); - $content .= html::p('em', join(', ', array_map('Q', $IMPORT_STATS->skipped_names))); - } - - return html::div($attrib, $content); -} - - -/** - * Create navigation buttons for the current import step - */ -function rcmail_import_buttons($attrib) -{ - global $IMPORT_STATS, $OUTPUT; - $target = get_input_value('_target', RCUBE_INPUT_GPC); - - $attrib += array('type' => 'input'); - unset($attrib['name']); - - if (is_object($IMPORT_STATS)) { - $attrib['class'] = trim($attrib['class'] . ' mainaction'); - $out = $OUTPUT->button(array('command' => 'list', 'prop' => $target, 'label' => 'done') + $attrib); - } - else { - $out = $OUTPUT->button(array('command' => 'list', 'label' => 'cancel') + $attrib); - $out .= ' '; - $attrib['class'] = trim($attrib['class'] . ' mainaction'); - $out .= $OUTPUT->button(array('command' => 'import', 'label' => 'import') + $attrib); - } - - return $out; -} - - -/** - * Returns the matching group id. If group doesn't exist, it'll be created if allowed. - */ -function rcmail_import_group_id($group_name, $CONTACTS, $create, &$import_groups) -{ - $group_id = 0; - foreach ($import_groups as $key => $group) { - if (strtolower($group['name']) == strtolower($group_name)) { - $group_id = $group['ID']; - break; - } - } - - // create a new group - if (!$group_id && $create) { - $new_group = $CONTACTS->create_group($group_name); - if (!$new_group['ID']) - $new_group['ID'] = $new_group['id']; - $import_groups[] = $new_group; - $group_id = $new_group['ID']; - } - - return $group_id; -} - - /** The import process **/ $importstep = 'rcmail_import_form'; if (is_array($_FILES['_file'])) { - $replace = (bool)get_input_value('_replace', RCUBE_INPUT_GPC); - $target = get_input_value('_target', RCUBE_INPUT_GPC); - $with_groups = intval(get_input_value('_groups', RCUBE_INPUT_GPC)); + $replace = (bool)rcube_utils::get_input_value('_replace', rcube_utils::INPUT_GPC); + $target = rcube_utils::get_input_value('_target', rcube_utils::INPUT_GPC); + $with_groups = intval(rcube_utils::get_input_value('_groups', rcube_utils::INPUT_GPC)); $vcards = array(); $upload_error = null; @@ -232,7 +77,8 @@ if (is_array($_FILES['_file'])) { // no vcards detected if (!count($vcards)) { if ($upload_error == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { - $OUTPUT->show_message('filesizeerror', 'error', array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize'))))); + $size = $RCMAIL->show_bytes(parse_bytes(ini_get('upload_max_filesize'))); + $OUTPUT->show_message('filesizeerror', 'error', array('size' => $size)); } else if ($upload_error) { $OUTPUT->show_message('fileuploaderror', 'error'); @@ -249,7 +95,7 @@ if (is_array($_FILES['_file'])) { $IMPORT_STATS->inserted = $IMPORT_STATS->skipped = $IMPORT_STATS->invalid = $IMPORT_STATS->errors = 0; if ($replace) { - $CONTACTS->delete_all(); + $CONTACTS->delete_all($CONTACTS->groups && $with_groups < 2); } if ($with_groups) { @@ -276,7 +122,7 @@ if (is_array($_FILES['_file'])) { // We're using UTF8 internally $email = $vcard->email[0]; - $email = rcube_idn_to_utf8($email); + $email = rcube_utils::idn_to_utf8($email); if (!$replace) { $existing = null; @@ -330,12 +176,168 @@ if (is_array($_FILES['_file'])) { } -$OUTPUT->set_pagetitle(rcube_label('importcontacts')); +$OUTPUT->set_pagetitle($RCMAIL->gettext('importcontacts')); $OUTPUT->add_handlers(array( - 'importstep' => $importstep, - 'importnav' => 'rcmail_import_buttons', + 'importstep' => $importstep, + 'importnav' => 'rcmail_import_buttons', )); // render page $OUTPUT->send('importcontacts'); + + + +/** + * Handler function to display the import/upload form + */ +function rcmail_import_form($attrib) +{ + global $RCMAIL, $OUTPUT; + + $target = rcube_utils::get_input_value('_target', rcube_utils::INPUT_GPC); + + $attrib += array('id' => "rcmImportForm"); + + $writable_books = $RCMAIL->get_address_sources(true, true); + + $upload = new html_inputfield(array( + 'type' => 'file', + 'name' => '_file[]', + 'id' => 'rcmimportfile', + 'size' => 40, + 'multiple' => 'multiple', + )); + $form = html::p(null, html::label('rcmimportfile', $RCMAIL->gettext('importfromfile')) . $upload->show()); + $table = new html_table(array('cols' => 2)); + + // addressbook selector + if (count($writable_books) > 1) { + $select = new html_select(array('name' => '_target', 'id' => 'rcmimporttarget', 'is_escaped' => true)); + + foreach ($writable_books as $book) { + $select->add($book['name'], $book['id']); + } + + $table->add('title', html::label('rcmimporttarget', $RCMAIL->gettext('importtarget'))); + $table->add(null, $select->show($target)); + } + else { + $abook = new html_hiddenfield(array('name' => '_target', 'value' => key($writable_books))); + $form .= $abook->show(); + } + + // selector for group import options + if (count($writable_books) >= 1 || $writable_books[0]->groups) { + $select = new html_select(array('name' => '_groups', 'id' => 'rcmimportgroups', 'is_escaped' => true)); + $select->add($RCMAIL->gettext('none'), '0'); + $select->add($RCMAIL->gettext('importgroupsall'), '1'); + $select->add($RCMAIL->gettext('importgroupsexisting'), '2'); + + $table->add('title', html::label('rcmimportgroups', $RCMAIL->gettext('importgroups'))); + $table->add(null, $select->show(rcube_utils::get_input_value('_groups', rcube_utils::INPUT_GPC))); + } + + // checkbox to replace the entire address book + $check_replace = new html_checkbox(array('name' => '_replace', 'value' => 1, 'id' => 'rcmimportreplace')); + $table->add('title', html::label('rcmimportreplace', $RCMAIL->gettext('importreplace'))); + $table->add(null, $check_replace->show(rcube_utils::get_input_value('_replace', rcube_utils::INPUT_GPC))); + + $form .= $table->show(array('id' => null) + $attrib); + + $OUTPUT->set_env('writable_source', !empty($writable_books)); + $OUTPUT->add_label('selectimportfile','importwait'); + $OUTPUT->add_gui_object('importform', $attrib['id']); + + $out = html::p(null, rcube::Q($RCMAIL->gettext('importdesc'), 'show')) + . $OUTPUT->form_tag(array( + 'action' => $RCMAIL->url('import'), + 'method' => 'post', + 'enctype' => 'multipart/form-data') + $attrib, + $form); + + return $out; +} + +/** + * Render the confirmation page for the import process + */ +function rcmail_import_confirm($attrib) +{ + global $IMPORT_STATS, $RCMAIL; + + $vars = get_object_vars($IMPORT_STATS); + $vars['names'] = $vars['skipped_names'] = ''; + + $content = html::p(null, $RCMAIL->gettext(array( + 'name' => 'importconfirm', + 'nr' => $IMPORT_STATS->inserted, + 'vars' => $vars, + )) . ($IMPORT_STATS->names ? ':' : '.')); + + if ($IMPORT_STATS->names) { + $content .= html::p('em', join(', ', array_map('Q', $IMPORT_STATS->names))); + } + + if ($IMPORT_STATS->skipped) { + $content .= html::p(null, $RCMAIL->gettext(array( + 'name' => 'importconfirmskipped', + 'nr' => $IMPORT_STATS->skipped, + 'vars' => $vars, + )) . ':') + . html::p('em', join(', ', array_map('Q', $IMPORT_STATS->skipped_names))); + } + + return html::div($attrib, $content); +} + +/** + * Create navigation buttons for the current import step + */ +function rcmail_import_buttons($attrib) +{ + global $IMPORT_STATS, $OUTPUT; + + $target = rcube_utils::get_input_value('_target', rcube_utils::INPUT_GPC); + + $attrib += array('type' => 'input'); + unset($attrib['name']); + + if (is_object($IMPORT_STATS)) { + $attrib['class'] = trim($attrib['class'] . ' mainaction'); + $out = $OUTPUT->button(array('command' => 'list', 'prop' => $target, 'label' => 'done') + $attrib); + } + else { + $out = $OUTPUT->button(array('command' => 'list', 'label' => 'cancel') + $attrib); + $out .= ' '; + $attrib['class'] = trim($attrib['class'] . ' mainaction'); + $out .= $OUTPUT->button(array('command' => 'import', 'label' => 'import') + $attrib); + } + + return $out; +} + +/** + * Returns the matching group id. If group doesn't exist, it'll be created if allowed. + */ +function rcmail_import_group_id($group_name, $CONTACTS, $create, &$import_groups) +{ + $group_id = 0; + foreach ($import_groups as $key => $group) { + if (strtolower($group['name']) == strtolower($group_name)) { + $group_id = $group['ID']; + break; + } + } + + // create a new group + if (!$group_id && $create) { + $new_group = $CONTACTS->create_group($group_name); + if (!$new_group['ID']) + $new_group['ID'] = $new_group['id']; + $import_groups[] = $new_group; + $group_id = $new_group['ID']; + } + + return $group_id; +} diff --git a/program/steps/addressbook/mailto.inc b/program/steps/addressbook/mailto.inc index c3cbcadca..f5ff20bc0 100644 --- a/program/steps/addressbook/mailto.inc +++ b/program/steps/addressbook/mailto.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/mailto.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2007, The Roundcube Dev Team | + | Copyright (C) 2007-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -19,30 +19,27 @@ +-----------------------------------------------------------------------+ */ -$cids = rcmail_get_cids(); -$mailto = array(); +$cids = rcmail_get_cids(); +$mailto = array(); $recipients = null; -foreach ($cids as $source => $cid) -{ +foreach ($cids as $source => $cid) { $CONTACTS = $RCMAIL->get_address_book($source); - if ($CONTACTS->ready) - { + if ($CONTACTS->ready) { $CONTACTS->set_page(1); $CONTACTS->set_pagesize(count($cid) + 2); // +2 to skip counting query $recipients = $CONTACTS->search($CONTACTS->primary_key, $cid, 0, true, true, 'email'); } } -if (!empty($_REQUEST['_gid']) && isset($_REQUEST['_source'])) -{ - $source = get_input_value('_source', RCUBE_INPUT_GPC); +if (!empty($_REQUEST['_gid']) && isset($_REQUEST['_source'])) { + $source = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); $CONTACTS = $RCMAIL->get_address_book($source); - - $group_id = get_input_value('_gid', RCUBE_INPUT_GPC); + + $group_id = rcube_utils::get_input_value('_gid', rcube_utils::INPUT_GPC); $group_data = $CONTACTS->get_group($group_id); - + // group has an email address assigned: use that if ($group_data['email']) { $mailto[] = format_email_recipient($group_data['email'][0], $group_data['name']); @@ -55,16 +52,14 @@ if (!empty($_REQUEST['_gid']) && isset($_REQUEST['_source'])) } } -if ($recipients) -{ +if ($recipients) { while (is_object($recipients) && ($rec = $recipients->iterate())) { $emails = $CONTACTS->get_col_values('email', $rec, true); $mailto[] = format_email_recipient($emails[0], $rec['name']); } } -if (!empty($mailto)) -{ +if (!empty($mailto)) { $mailto_str = join(', ', $mailto); $mailto_id = substr(md5($mailto_str), 0, 16); $_SESSION['mailto'][$mailto_id] = urlencode($mailto_str); diff --git a/program/steps/addressbook/move.inc b/program/steps/addressbook/move.inc index f8204e9ee..6a70e7bda 100644 --- a/program/steps/addressbook/move.inc +++ b/program/steps/addressbook/move.inc @@ -25,8 +25,8 @@ if (!$OUTPUT->ajax_call) { } $cids = rcmail_get_cids(); -$target = get_input_value('_to', RCUBE_INPUT_POST); -$target_group = get_input_value('_togid', RCUBE_INPUT_POST); +$target = rcube_utils::get_input_value('_to', rcube_utils::INPUT_POST); +$target_group = rcube_utils::get_input_value('_togid', rcube_utils::INPUT_POST); $all = 0; $deleted = 0; diff --git a/program/steps/addressbook/photo.inc b/program/steps/addressbook/photo.inc index 658027de4..482185735 100644 --- a/program/steps/addressbook/photo.inc +++ b/program/steps/addressbook/photo.inc @@ -26,7 +26,7 @@ $source = key($cids); $cid = $cids ? array_shift($cids[$source]) : null; // read the referenced file -if (($file_id = get_input_value('_photo', RCUBE_INPUT_GPC)) && ($tempfile = $_SESSION['contacts']['files'][$file_id])) { +if (($file_id = rcube_utils::get_input_value('_photo', rcube_utils::INPUT_GPC)) && ($tempfile = $_SESSION['contacts']['files'][$file_id])) { $tempfile = $RCMAIL->plugins->exec_hook('attachment_display', $tempfile); if ($tempfile['status']) { if ($tempfile['data']) @@ -37,7 +37,7 @@ if (($file_id = get_input_value('_photo', RCUBE_INPUT_GPC)) && ($tempfile = $_SE } else { // by email, search for contact first - if ($email = get_input_value('_email', RCUBE_INPUT_GPC)) { + if ($email = rcube_utils::get_input_value('_email', rcube_utils::INPUT_GPC)) { foreach ($RCMAIL->get_address_sources() as $s) { $abook = $RCMAIL->get_address_book($s['id']); $result = $abook->search(array('email'), $email, 1, true, true, 'photo'); @@ -77,7 +77,7 @@ else { } // deliver alt image -if (!$data && ($alt_img = get_input_value('_alt', RCUBE_INPUT_GPC)) && is_file($alt_img)) { +if (!$data && ($alt_img = rcube_utils::get_input_value('_alt', rcube_utils::INPUT_GPC)) && is_file($alt_img)) { $data = file_get_contents($alt_img); } @@ -86,6 +86,6 @@ if (!$cid && $email) { $RCMAIL->output->future_expire_header(86400); } -header('Content-Type: ' . rc_image_content_type($data)); +header('Content-Type: ' . rcube_mime::image_content_type($data)); echo $data ? $data : file_get_contents('program/resources/blank.gif'); exit; diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc index 2adc53bcf..94556f96b 100644 --- a/program/steps/addressbook/save.inc +++ b/program/steps/addressbook/save.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/save.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | 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. | @@ -19,80 +19,87 @@ +-----------------------------------------------------------------------+ */ -$CONTACTS = rcmail_contact_source(null, true, true); -$cid = get_input_value('_cid', RCUBE_INPUT_POST); +$CONTACTS = rcmail_contact_source(null, true, true); +$cid = rcube_utils::get_input_value('_cid', rcube_utils::INPUT_POST); $return_action = empty($cid) ? 'add' : 'edit'; // Source changed, display the form again if (!empty($_GET['_reload'])) { - rcmail_overwrite_action($return_action); - return; + $RCMAIL->overwrite_action($return_action); + return; } // cannot edit record if ($CONTACTS->readonly) { - $OUTPUT->show_message('contactreadonly', 'error'); - rcmail_overwrite_action($return_action); - return; + $OUTPUT->show_message('contactreadonly', 'error'); + $RCMAIL->overwrite_action($return_action); + return; } // read POST values into hash array $a_record = array(); foreach ($GLOBALS['CONTACT_COLTYPES'] as $col => $colprop) { - $fname = '_'.$col; - if ($colprop['composite']) - continue; - // gather form data of composite fields - if ($colprop['childs']) { - $values = array(); - foreach ($colprop['childs'] as $childcol => $cp) { - $vals = get_input_value('_'.$childcol, RCUBE_INPUT_POST, true); - foreach ((array)$vals as $i => $val) - $values[$i][$childcol] = $val; + if ($colprop['composite']) { + continue; } - $subtypes = isset($_REQUEST['_subtype_' . $col]) ? (array)get_input_value('_subtype_' . $col, RCUBE_INPUT_POST) : array(''); - foreach ($subtypes as $i => $subtype) { - $suffix = $subtype ? ':'.$subtype : ''; - if ($values[$i]) - $a_record[$col.$suffix][] = $values[$i]; - } - } - // assign values and subtypes - else if (is_array($_POST[$fname])) { - $values = get_input_value($fname, RCUBE_INPUT_POST, true); - $subtypes = get_input_value('_subtype_' . $col, RCUBE_INPUT_POST); - - foreach ($values as $i => $val) { - if ($col == 'email') { - // extract email from full address specification, e.g. "Name" <addr@domain.tld> - $addr = rcube_mime::decode_address_list($val, 1, false); - if (!empty($addr) && ($addr = array_pop($addr)) && $addr['mailto']) { - $val = $addr['mailto']; + + $fname = '_'.$col; + + // gather form data of composite fields + if ($colprop['childs']) { + $values = array(); + foreach ($colprop['childs'] as $childcol => $cp) { + $vals = rcube_utils::get_input_value('_'.$childcol, rcube_utils::INPUT_POST, true); + foreach ((array)$vals as $i => $val) { + $values[$i][$childcol] = $val; + } } - } - $subtype = $subtypes[$i] ? ':'.$subtypes[$i] : ''; - $a_record[$col.$subtype][] = $val; + $subtypes = isset($_REQUEST['_subtype_' . $col]) ? (array)rcube_utils::get_input_value('_subtype_' . $col, rcube_utils::INPUT_POST) : array(''); + foreach ($subtypes as $i => $subtype) { + $suffix = $subtype ? ':'.$subtype : ''; + if ($values[$i]) { + $a_record[$col.$suffix][] = $values[$i]; + } + } } - } - else if (isset($_POST[$fname])) { - $a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST, true); - - // normalize the submitted date strings - if ($colprop['type'] == 'date') { - if ($timestamp = rcube_utils::strtotime($a_record[$col])) { - $a_record[$col] = date('Y-m-d', $timestamp); + // assign values and subtypes + else if (is_array($_POST[$fname])) { + $values = rcube_utils::get_input_value($fname, rcube_utils::INPUT_POST, true); + $subtypes = rcube_utils::get_input_value('_subtype_' . $col, rcube_utils::INPUT_POST); + + foreach ($values as $i => $val) { + if ($col == 'email') { + // extract email from full address specification, e.g. "Name" <addr@domain.tld> + $addr = rcube_mime::decode_address_list($val, 1, false); + if (!empty($addr) && ($addr = array_pop($addr)) && $addr['mailto']) { + $val = $addr['mailto']; + } + } + + $subtype = $subtypes[$i] ? ':'.$subtypes[$i] : ''; + $a_record[$col.$subtype][] = $val; } - else { - unset($a_record[$col]); + } + else if (isset($_POST[$fname])) { + $a_record[$col] = rcube_utils::get_input_value($fname, rcube_utils::INPUT_POST, true); + + // normalize the submitted date strings + if ($colprop['type'] == 'date') { + if ($a_record[$col] && ($dt = rcube_utils::anytodatetime($a_record[$col]))) { + $a_record[$col] = $dt->format('Y-m-d'); + } + else { + unset($a_record[$col]); + } } } - } } // Generate contact's display name (must be before validation) if (empty($a_record['name'])) { $a_record['name'] = rcube_addressbook::compose_display_name($a_record, true); + // Reset it if equals to email address (from compose_display_name()) $email = rcube_addressbook::get_col_values('email', $a_record, true); if ($a_record['name'] == $email[0]) { @@ -103,9 +110,9 @@ if (empty($a_record['name'])) { // do input checks (delegated to $CONTACTS instance) if (!$CONTACTS->validate($a_record)) { $err = (array)$CONTACTS->get_error(); - $OUTPUT->show_message($err['message'] ? Q($err['message']) : 'formincomplete', 'warning'); + $OUTPUT->show_message($err['message'] ? rcube::Q($err['message']) : 'formincomplete', 'warning'); $GLOBALS['EDIT_RECORD'] = $a_record; // store submitted data to be used in edit form - rcmail_overwrite_action($return_action); + $RCMAIL->overwrite_action($return_action); return; } @@ -127,123 +134,125 @@ if (isset($a_record['photo'])) { $RCMAIL->session->remove('contacts'); } -$source = get_input_value('_source', RCUBE_INPUT_GPC); +$source = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); // update an existing contact -if (!empty($cid)) -{ - $plugin = $RCMAIL->plugins->exec_hook('contact_update', - array('id' => $cid, 'record' => $a_record, 'source' => $source)); - $a_record = $plugin['record']; - - if (!$plugin['abort']) - $result = $CONTACTS->update($cid, $a_record); - else - $result = $plugin['result']; - - if ($result) { - // LDAP DN change - if (is_string($result) && strlen($result)>1) { - $newcid = $result; - // change cid in POST for 'show' action - $_POST['_cid'] = $newcid; - } +if (!empty($cid)) { + $plugin = $RCMAIL->plugins->exec_hook('contact_update', + array('id' => $cid, 'record' => $a_record, 'source' => $source)); + $a_record = $plugin['record']; - // define list of cols to be displayed - $a_js_cols = array(); - $record = $CONTACTS->get_record($newcid ? $newcid : $cid, true); - $record['email'] = reset($CONTACTS->get_col_values('email', $record, true)); - $record['name'] = rcube_addressbook::compose_list_name($record); - - foreach (array('name') as $col) - $a_js_cols[] = Q((string)$record[$col]); - - // update the changed col in list - $OUTPUT->command('parent.update_contact_row', $cid, $a_js_cols, $newcid, $source, $record); - - // show confirmation - $OUTPUT->show_message('successfullysaved', 'confirmation', null, false); - rcmail_overwrite_action('show'); - } - else { - // show error message - $err = $CONTACTS->get_error(); - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : ($err['message'] ? $err['message'] : 'errorsaving'), 'error', null, false); - rcmail_overwrite_action('show'); - } + if (!$plugin['abort']) + $result = $CONTACTS->update($cid, $a_record); + else + $result = $plugin['result']; + + if ($result) { + // LDAP DN change + if (is_string($result) && strlen($result)>1) { + $newcid = $result; + // change cid in POST for 'show' action + $_POST['_cid'] = $newcid; + } + + // define list of cols to be displayed + $a_js_cols = array(); + $record = $CONTACTS->get_record($newcid ? $newcid : $cid, true); + $record['email'] = reset($CONTACTS->get_col_values('email', $record, true)); + $record['name'] = rcube_addressbook::compose_list_name($record); + + foreach (array('name') as $col) { + $a_js_cols[] = rcube::Q((string)$record[$col]); + } + + // update the changed col in list + $OUTPUT->command('parent.update_contact_row', $cid, $a_js_cols, $newcid, $source, $record); + + // show confirmation + $OUTPUT->show_message('successfullysaved', 'confirmation', null, false); + $RCMAIL->overwrite_action('show'); + } + else { + // show error message + $err = $CONTACTS->get_error(); + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : ($err['message'] ? $err['message'] : 'errorsaving'), 'error', null, false); + $RCMAIL->overwrite_action('show'); + } } // insert a new contact else { - // Name of the addressbook already selected on the list - $orig_source = get_input_value('_orig_source', RCUBE_INPUT_GPC); - - if (!strlen($source)) - $source = $orig_source; - - // show notice if existing contacts with same e-mail are found - foreach ($CONTACTS->get_col_values('email', $a_record, true) as $email) { - if ($email && ($res = $CONTACTS->search('email', $email, 1, false, true)) && $res->count) { - $OUTPUT->show_message('contactexists', 'notice', null, false); - break; - } - } - - $plugin = $RCMAIL->plugins->exec_hook('contact_create', array( - 'record' => $a_record, 'source' => $source)); - $a_record = $plugin['record']; - - // insert record and send response - if (!$plugin['abort']) - $insert_id = $CONTACTS->insert($a_record); - else - $insert_id = $plugin['result']; - - if ($insert_id) { - $CONTACTS->reset(); - - // add new contact to the specified group - if ($CONTACTS->groups && $CONTACTS->group_id) { - $plugin = $RCMAIL->plugins->exec_hook('group_addmembers', array( - 'group_id' => $CONTACTS->group_id, 'ids' => $insert_id, 'source' => $source)); - - $counts = $CONTACTS->count(); - - if (!$plugin['abort']) { - if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($counts->count + 1 > $maxnum)) - $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum)); - - $CONTACTS->add_to_group($plugin['group_id'], $plugin['ids']); - } + // Name of the addressbook already selected on the list + $orig_source = rcube_utils::get_input_value('_orig_source', rcube_utils::INPUT_GPC); + + if (!strlen($source)) { + $source = $orig_source; } + + // show notice if existing contacts with same e-mail are found + foreach ($CONTACTS->get_col_values('email', $a_record, true) as $email) { + if ($email && ($res = $CONTACTS->search('email', $email, 1, false, true)) && $res->count) { + $OUTPUT->show_message('contactexists', 'notice', null, false); + break; + } + } + + $plugin = $RCMAIL->plugins->exec_hook('contact_create', array( + 'record' => $a_record, 'source' => $source)); + $a_record = $plugin['record']; + + // insert record and send response + if (!$plugin['abort']) + $insert_id = $CONTACTS->insert($a_record); else - $counts = $CONTACTS->count(); + $insert_id = $plugin['result']; + + if ($insert_id) { + $CONTACTS->reset(); + + // add new contact to the specified group + if ($CONTACTS->groups && $CONTACTS->group_id) { + $plugin = $RCMAIL->plugins->exec_hook('group_addmembers', array( + 'group_id' => $CONTACTS->group_id, 'ids' => $insert_id, 'source' => $source)); - if ((string)$source === (string)$orig_source) { - // add contact row or jump to the page where it should appear - $CONTACTS->reset(); - $result = $CONTACTS->search($CONTACTS->primary_key, $insert_id); + $counts = $CONTACTS->count(); - rcmail_js_contacts_list($result, 'parent.'); - $OUTPUT->command('parent.contact_list.select', html_identifier($insert_id)); + if (!$plugin['abort']) { + if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($counts->count + 1 > $maxnum)) + $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum)); - // update record count display - $CONTACTS->reset(); - $OUTPUT->command('parent.set_rowcount', rcmail_get_rowcount_text($counts)); + $CONTACTS->add_to_group($plugin['group_id'], $plugin['ids']); + } + } + else { + $counts = $CONTACTS->count(); + } + + if ((string)$source === (string)$orig_source) { + // add contact row or jump to the page where it should appear + $CONTACTS->reset(); + $result = $CONTACTS->search($CONTACTS->primary_key, $insert_id); + + rcmail_js_contacts_list($result, 'parent.'); + $OUTPUT->command('parent.contact_list.select', rcube_utils::html_identifier($insert_id)); + + // update record count display + $CONTACTS->reset(); + $OUTPUT->command('parent.set_rowcount', rcmail_get_rowcount_text($counts)); + } + else { + // re-set iframe + $OUTPUT->command('parent.show_contentframe'); + } + + // show confirmation + $OUTPUT->show_message('successfullysaved', 'confirmation', null, false); + $OUTPUT->send('iframe'); } else { - // re-set iframe - $OUTPUT->command('parent.show_contentframe'); + // show error message + $err = $CONTACTS->get_error(); + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : ($err['message'] ? $err['message'] : 'errorsaving'), 'error', null, false); + $RCMAIL->overwrite_action('add'); } - - // show confirmation - $OUTPUT->show_message('successfullysaved', 'confirmation', null, false); - $OUTPUT->send('iframe'); - } - else { - // show error message - $err = $CONTACTS->get_error(); - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : ($err['message'] ? $err['message'] : 'errorsaving'), 'error', null, false); - rcmail_overwrite_action('add'); - } } diff --git a/program/steps/addressbook/search.inc b/program/steps/addressbook/search.inc index d153c255a..bb22ec139 100644 --- a/program/steps/addressbook/search.inc +++ b/program/steps/addressbook/search.inc @@ -22,8 +22,8 @@ */ if ($RCMAIL->action == 'search-create') { - $id = get_input_value('_search', RCUBE_INPUT_POST); - $name = get_input_value('_name', RCUBE_INPUT_POST, true); + $id = rcube_utils::get_input_value('_search', rcube_utils::INPUT_POST); + $name = rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true); if (($params = $_SESSION['search_params']) && $params['id'] == $id) { @@ -46,7 +46,7 @@ if ($RCMAIL->action == 'search-create') { if ($result) { $OUTPUT->show_message('savedsearchcreated', 'confirmation'); - $OUTPUT->command('insert_saved_search', Q($name), Q($result)); + $OUTPUT->command('insert_saved_search', rcube::Q($name), rcube::Q($result)); } else $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'savedsearchcreateerror', 'error'); @@ -55,7 +55,7 @@ if ($RCMAIL->action == 'search-create') { } if ($RCMAIL->action == 'search-delete') { - $id = get_input_value('_sid', RCUBE_INPUT_POST); + $id = rcube_utils::get_input_value('_sid', rcube_utils::INPUT_POST); $plugin = $RCMAIL->plugins->exec_hook('saved_search_delete', array('id' => $id)); @@ -66,9 +66,9 @@ if ($RCMAIL->action == 'search-delete') { if ($result) { $OUTPUT->show_message('savedsearchdeleted', 'confirmation'); - $OUTPUT->command('remove_search_item', Q($id)); + $OUTPUT->command('remove_search_item', rcube::Q($id)); // contact list will be cleared, clear also page counter - $OUTPUT->command('set_rowcount', rcube_label('nocontactsfound')); + $OUTPUT->command('set_rowcount', $RCMAIL->gettext('nocontactsfound')); $OUTPUT->set_env('pagecount', 0); } else @@ -91,7 +91,7 @@ function rcmail_contact_search() global $RCMAIL, $OUTPUT, $SEARCH_MODS_DEFAULT, $PAGE_SIZE; $adv = isset($_POST['_adv']); - $sid = get_input_value('_sid', RCUBE_INPUT_GET); + $sid = rcube_utils::get_input_value('_sid', rcube_utils::INPUT_GET); // get search criteria from saved search if ($sid && ($search = $RCMAIL->user->get_search($sid))) { @@ -101,7 +101,7 @@ function rcmail_contact_search() // get fields/values from advanced search form else if ($adv) { foreach (array_keys($_POST) as $key) { - $s = trim(get_input_value($key, RCUBE_INPUT_POST, true)); + $s = trim(rcube_utils::get_input_value($key, rcube_utils::INPUT_POST, true)); if (strlen($s) && preg_match('/^_search_([a-zA-Z0-9_-]+)$/', $key, $m)) { $search[] = $s; $fields[] = $m[1]; @@ -115,8 +115,8 @@ function rcmail_contact_search() } // quick-search else { - $search = trim(get_input_value('_q', RCUBE_INPUT_GET, true)); - $fields = explode(',', get_input_value('_headers', RCUBE_INPUT_GET)); + $search = trim(rcube_utils::get_input_value('_q', rcube_utils::INPUT_GET, true)); + $fields = explode(',', rcube_utils::get_input_value('_headers', rcube_utils::INPUT_GET)); if (empty($fields)) { $fields = array_keys($SEARCH_MODS_DEFAULT); @@ -257,17 +257,17 @@ function rcmail_contact_search_form($attrib) $form = array( 'main' => array( - 'name' => rcube_label('properties'), + 'name' => $RCMAIL->gettext('properties'), 'content' => array( ), ), 'personal' => array( - 'name' => rcube_label('personalinfo'), + 'name' => $RCMAIL->gettext('personalinfo'), 'content' => array( ), ), 'other' => array( - 'name' => rcube_label('other'), + 'name' => $RCMAIL->gettext('other'), 'content' => array( ), ), @@ -297,7 +297,7 @@ function rcmail_contact_search_form($attrib) if ($colprop['type'] != 'image' && !$colprop['nosearch']) { $ftype = $colprop['type'] == 'select' ? 'select' : 'text'; - $label = isset($colprop['label']) ? $colprop['label'] : rcube_label($col); + $label = isset($colprop['label']) ? $colprop['label'] : $RCMAIL->gettext($col); $category = $colprop['category'] ? $colprop['category'] : 'other'; // load jquery UI datepicker for date fields @@ -307,8 +307,8 @@ function rcmail_contact_search_form($attrib) $colprop['size'] = $i_size; - $content = html::div('row', html::div('contactfieldlabel label', Q($label)) - . html::div('contactfieldcontent', rcmail_get_edit_field('search_'.$col, '', $colprop, $ftype))); + $content = html::div('row', html::div('contactfieldlabel label', rcube::Q($label)) + . html::div('contactfieldcontent', rcube_output::get_edit_field('search_'.$col, '', $colprop, $ftype))); $form[$category]['content'][] = $content; } @@ -332,7 +332,7 @@ function rcmail_contact_search_form($attrib) $content = html::div('contactfieldgroup', join("\n", $f['content'])); $out .= html::tag('fieldset', $attrib, - html::tag('legend', null, Q($f['name'])) + html::tag('legend', null, rcube::Q($f['name'])) . $content) . "\n"; } } diff --git a/program/steps/addressbook/show.inc b/program/steps/addressbook/show.inc index efab5e9e5..f4224a3e2 100644 --- a/program/steps/addressbook/show.inc +++ b/program/steps/addressbook/show.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/show.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | 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. | @@ -38,6 +38,15 @@ if ($cid && ($record = $CONTACTS->get_record($cid, true))) { // get address book name (for display) rcmail_set_sourcename($CONTACTS); +$OUTPUT->add_handlers(array( + 'contacthead' => 'rcmail_contact_head', + 'contactdetails' => 'rcmail_contact_details', + 'contactphoto' => 'rcmail_contact_photo', +)); + +$OUTPUT->send('contact'); + + function rcmail_contact_head($attrib) { @@ -45,7 +54,7 @@ function rcmail_contact_head($attrib) // check if we have a valid result if (!(($result = $CONTACTS->get_result()) && ($record = $result->first()))) { - $RCMAIL->output->show_message('contactnotfound'); + $RCMAIL->output->show_message('contactnotfound', 'error'); return false; } @@ -72,7 +81,6 @@ function rcmail_contact_details($attrib) // check if we have a valid result if (!(($result = $CONTACTS->get_result()) && ($record = $result->first()))) { - //$RCMAIL->output->show_message('contactnotfound'); return false; } @@ -80,7 +88,7 @@ function rcmail_contact_details($attrib) $form = array( 'contact' => array( - 'name' => rcube_label('properties'), + 'name' => $RCMAIL->gettext('properties'), 'content' => array( 'email' => array('size' => $i_size, 'render_func' => 'rcmail_render_email_value'), 'phone' => array('size' => $i_size), @@ -90,7 +98,7 @@ function rcmail_contact_details($attrib) ), ), 'personal' => array( - 'name' => rcube_label('personalinfo'), + 'name' => $RCMAIL->gettext('personalinfo'), 'content' => array( 'gender' => array('size' => $i_size), 'maidenname' => array('size' => $i_size), @@ -102,19 +110,19 @@ function rcmail_contact_details($attrib) ), ), ); - + if (isset($CONTACT_COLTYPES['notes'])) { $form['notes'] = array( - 'name' => rcube_label('notes'), + 'name' => $RCMAIL->gettext('notes'), 'content' => array( 'notes' => array('type' => 'textarea', 'label' => false), ), ); } - + if ($CONTACTS->groups) { $form['groups'] = array( - 'name' => rcube_label('groups'), + 'name' => $RCMAIL->gettext('groups'), 'content' => rcmail_contact_record_groups($record['ID']), ); } @@ -125,12 +133,14 @@ function rcmail_contact_details($attrib) function rcmail_render_email_value($email) { + global $RCMAIL; + return html::a(array( 'href' => 'mailto:' . $email, - 'onclick' => sprintf("return %s.command('compose','%s',this)", JS_OBJECT_NAME, JQ($email)), - 'title' => rcube_label('composeto'), + 'onclick' => sprintf("return %s.command('compose','%s',this)", rcmail_output::JS_OBJECT_NAME, rcube::JQ($email)), + 'title' => $RCMAIL->gettext('composeto'), 'class' => 'email', - ), Q($email)); + ), rcube::Q($email)); } @@ -141,7 +151,7 @@ function rcmail_render_url_value($url) 'href' => $prefix . $url, 'target' => '_blank', 'class' => 'url', - ), Q($url)); + ), rcube::Q($url)); } @@ -164,10 +174,10 @@ function rcmail_contact_record_groups($contact_id) $gid = $group['ID']; $table->add(null, $checkbox->show($members[$gid] ? $gid : null, array('value' => $gid, 'id' => 'ff_gid' . $gid))); - $table->add(null, html::label('ff_gid' . $gid, Q($group['name']))); + $table->add(null, html::label('ff_gid' . $gid, rcube::Q($group['name']))); } - $hiddenfields = new html_hiddenfield(array('name' => '_source', 'value' => get_input_value('_source', RCUBE_INPUT_GPC))); + $hiddenfields = new html_hiddenfield(array('name' => '_source', 'value' => rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC))); $hiddenfields->add(array('name' => '_cid', 'value' => $contact_id)); $form_start = $RCMAIL->output->request_form(array( @@ -182,12 +192,3 @@ function rcmail_contact_record_groups($contact_id) return $form_start . html::tag('fieldset', 'contactfieldgroup contactgroups', $table->show()) . $form_end; } - - -$OUTPUT->add_handlers(array( - 'contacthead' => 'rcmail_contact_head', - 'contactdetails' => 'rcmail_contact_details', - 'contactphoto' => 'rcmail_contact_photo', -)); - -$OUTPUT->send('contact'); diff --git a/program/steps/addressbook/undo.inc b/program/steps/addressbook/undo.inc index c23bd1cb6..ec3feb9c0 100644 --- a/program/steps/addressbook/undo.inc +++ b/program/steps/addressbook/undo.inc @@ -5,7 +5,7 @@ | program/steps/addressbook/undo.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2011, Kolab Systems AG | + | Copyright (C) 2011-2013, Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -20,14 +20,14 @@ */ // process ajax requests only -if (!$OUTPUT->ajax_call) +if (!$OUTPUT->ajax_call) { return; +} $undo = $_SESSION['contact_undo']; $delcnt = 0; -foreach ((array)$undo['data'] as $source => $cid) -{ +foreach ((array)$undo['data'] as $source => $cid) { $CONTACTS = rcmail_contact_source($source); $plugin = $RCMAIL->plugins->exec_hook('contact_undelete', array( diff --git a/program/steps/addressbook/upload_photo.inc b/program/steps/addressbook/upload_photo.inc index 035d67e83..dbb76d229 100644 --- a/program/steps/addressbook/upload_photo.inc +++ b/program/steps/addressbook/upload_photo.inc @@ -54,7 +54,7 @@ if ($filepath = $_FILES['_photo']['tmp_name']) { )); } else { - $attachment['error'] = rcube_label('invalidimageformat'); + $attachment['error'] = $RCMAIL->gettext('invalidimageformat'); } if ($attachment['status'] && !$attachment['abort']) { @@ -63,14 +63,16 @@ if ($filepath = $_FILES['_photo']['tmp_name']) { $OUTPUT->command('replace_contact_photo', $file_id); } else { // upload failed - $err = $_FILES['_photo']['error']; + $err = $_FILES['_photo']['error']; + $size = $RCMAIL->show_bytes(parse_bytes(ini_get('upload_max_filesize'))); + if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) - $msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize')))))); + $msg = $RCMAIL->gettext(array('name' => 'filesizeerror', 'vars' => array('size' => $size))); else if ($attachment['error']) $msg = $attachment['error']; else - $msg = rcube_label('fileuploaderror'); - + $msg = $RCMAIL->gettext('fileuploaderror'); + $OUTPUT->command('display_message', $msg, 'error'); } } @@ -78,9 +80,9 @@ else if ($_SERVER['REQUEST_METHOD'] == 'POST') { // if filesize exceeds post_max_size then $_FILES array is empty, // show filesizeerror instead of fileuploaderror if ($maxsize = ini_get('post_max_size')) - $msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes($maxsize))))); + $msg = $RCMAIL->gettext(array('name' => 'filesizeerror', 'vars' => array('size' => $RCMAIL->show_bytes(parse_bytes($maxsize))))); else - $msg = rcube_label('fileuploaderror'); + $msg = $RCMAIL->gettext('fileuploaderror'); $OUTPUT->command('display_message', $msg, 'error'); } diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc index 380557766..76bf2ee32 100644 --- a/program/steps/mail/addcontact.inc +++ b/program/steps/mail/addcontact.inc @@ -5,7 +5,7 @@ | program/steps/mail/addcontact.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -20,69 +20,74 @@ */ // only process ajax requests -if (!$OUTPUT->ajax_call) - return; +if (!$OUTPUT->ajax_call) { + return; +} // Get default addressbook $CONTACTS = $RCMAIL->get_address_book(-1, true); -if (!empty($_POST['_address']) && is_object($CONTACTS)) -{ - $contact_arr = rcube_mime::decode_address_list(get_input_value('_address', RCUBE_INPUT_POST, true), 1, false); - - if (!empty($contact_arr[1]['mailto'])) { - $contact = array( - 'email' => $contact_arr[1]['mailto'], - 'name' => $contact_arr[1]['name'] - ); - - // Validity checks - if (empty($contact['email'])) { - $OUTPUT->show_message('errorsavingcontact', 'error'); - $OUTPUT->send(); - } - - $email = rcube_idn_to_ascii($contact['email']); - if (!check_email($email, false)) { - $OUTPUT->show_message('emailformaterror', 'error', array('email' => $contact['email'])); - $OUTPUT->send(); +if (!empty($_POST['_address']) && is_object($CONTACTS)) { + $address = rcube_utils::get_input_value('_address', rcube_utils::INPUT_POST, true); + $contact_arr = rcube_mime::decode_address_list($address, 1, false); + + if (!empty($contact_arr[1]['mailto'])) { + $contact = array( + 'email' => $contact_arr[1]['mailto'], + 'name' => $contact_arr[1]['name'], + ); + + // Validity checks + if (empty($contact['email'])) { + $OUTPUT->show_message('errorsavingcontact', 'error'); + $OUTPUT->send(); + } + + $email = rcube_utils::idn_to_ascii($contact['email']); + if (!rcube_utils::check_email($email, false)) { + $OUTPUT->show_message('emailformaterror', 'error', array('email' => $contact['email'])); + $OUTPUT->send(); + } + + $contact['email'] = rcube_utils::idn_to_utf8($contact['email']); + + $contact = $RCMAIL->plugins->exec_hook('contact_displayname', $contact); + + if (empty($contact['firstname']) || empty($contact['surname'])) { + $contact['name'] = rcube_addressbook::compose_display_name($contact); + } + + // validate contact record + if (!$CONTACTS->validate($contact, true)) { + $error = $CONTACTS->get_error(); + // TODO: show dialog to complete record + // if ($error['type'] == rcube_addressbook::ERROR_VALIDATE) { } + + $OUTPUT->show_message($error['message'] ? $error['message'] : 'errorsavingcontact', 'error'); + $OUTPUT->send(); + } + + // check for existing contacts + $existing = $CONTACTS->search('email', $contact['email'], 1, false); + + if ($done = $existing->count) { + $OUTPUT->show_message('contactexists', 'warning'); + } + else { + $plugin = $RCMAIL->plugins->exec_hook('contact_create', array('record' => $contact, 'source' => null)); + $contact = $plugin['record']; + + $done = !$plugin['abort'] ? $CONTACTS->insert($contact) : $plugin['result']; + + if ($done) { + $OUTPUT->show_message('addedsuccessfully', 'confirmation'); + } + } } - - $contact['email'] = rcube_idn_to_utf8($contact['email']); - $contact = $RCMAIL->plugins->exec_hook('contact_displayname', $contact); - - if (empty($contact['firstname']) || empty($contact['surname'])) - $contact['name'] = rcube_addressbook::compose_display_name($contact); - - // validate contact record - if (!$CONTACTS->validate($contact, true)) { - $error = $CONTACTS->get_error(); - // TODO: show dialog to complete record - // if ($error['type'] == rcube_addressbook::ERROR_VALIDATE) { } - - $OUTPUT->show_message($error['message'] ? $error['message'] : 'errorsavingcontact', 'error'); - $OUTPUT->send(); - } - - // check for existing contacts - $existing = $CONTACTS->search('email', $contact['email'], 1, false); - - if ($done = $existing->count) - $OUTPUT->show_message('contactexists', 'warning'); - else { - $plugin = $RCMAIL->plugins->exec_hook('contact_create', array('record' => $contact, 'source' => null)); - $contact = $plugin['record']; - - $done = !$plugin['abort'] ? $CONTACTS->insert($contact) : $plugin['result']; - - if ($done) - $OUTPUT->show_message('addedsuccessfully', 'confirmation'); - } - } } -if (!$done) - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsavingcontact', 'error'); +if (!$done) { + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsavingcontact', 'error'); +} $OUTPUT->send(); - diff --git a/program/steps/mail/attachments.inc b/program/steps/mail/attachments.inc index 85aa9542b..85bc36cac 100644 --- a/program/steps/mail/attachments.inc +++ b/program/steps/mail/attachments.inc @@ -5,7 +5,7 @@ | program/steps/mail/attachments.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -21,62 +21,73 @@ // Upload progress update if (!empty($_GET['_progress'])) { - rcube_upload_progress(); + $RCMAIL->upload_progress(); } -$COMPOSE_ID = get_input_value('_id', RCUBE_INPUT_GPC); +$COMPOSE_ID = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC); $COMPOSE = null; if ($COMPOSE_ID && $_SESSION['compose_data_' . $COMPOSE_ID]) { - $SESSION_KEY = 'compose_data_' . $COMPOSE_ID; - $COMPOSE =& $_SESSION[$SESSION_KEY]; + $SESSION_KEY = 'compose_data_' . $COMPOSE_ID; + $COMPOSE =& $_SESSION[$SESSION_KEY]; } if (!$COMPOSE) { - die("Invalid session var!"); + die("Invalid session var!"); } // remove an attachment -if ($RCMAIL->action=='remove-attachment') -{ - $id = 'undefined'; - if (preg_match('/^rcmfile(\w+)$/', $_POST['_file'], $regs)) - $id = $regs[1]; - if ($attachment = $COMPOSE['attachments'][$id]) - $attachment = $RCMAIL->plugins->exec_hook('attachment_delete', $attachment); - if ($attachment['status']) { - if (is_array($COMPOSE['attachments'][$id])) { - $RCMAIL->session->remove($SESSION_KEY.'.attachments.'.$id); - $OUTPUT->command('remove_from_attachment_list', "rcmfile$id"); +if ($RCMAIL->action=='remove-attachment') { + $id = 'undefined'; + + if (preg_match('/^rcmfile(\w+)$/', $_POST['_file'], $regs)) { + $id = $regs[1]; + } + + if ($attachment = $COMPOSE['attachments'][$id]) { + $attachment = $RCMAIL->plugins->exec_hook('attachment_delete', $attachment); } - } - $OUTPUT->send(); - exit; + if ($attachment['status']) { + if (is_array($COMPOSE['attachments'][$id])) { + $RCMAIL->session->remove($SESSION_KEY.'.attachments.'.$id); + $OUTPUT->command('remove_from_attachment_list', "rcmfile$id"); + } + } + + $OUTPUT->send(); + exit; } -if ($RCMAIL->action=='display-attachment') -{ - $id = 'undefined'; - if (preg_match('/^rcmfile(\w+)$/', $_GET['_file'], $regs)) - $id = $regs[1]; - if ($attachment = $COMPOSE['attachments'][$id]) - $attachment = $RCMAIL->plugins->exec_hook('attachment_display', $attachment); - - if ($attachment['status']) { - if (empty($attachment['size'])) - $attachment['size'] = $attachment['data'] ? strlen($attachment['data']) : @filesize($attachment['path']); - - header('Content-Type: ' . $attachment['mimetype']); - header('Content-Length: ' . $attachment['size']); - - if ($attachment['data']) - echo $attachment['data']; - else if ($attachment['path']) - readfile($attachment['path']); - } - exit; +if ($RCMAIL->action=='display-attachment') { + $id = 'undefined'; + + if (preg_match('/^rcmfile(\w+)$/', $_GET['_file'], $regs)) { + $id = $regs[1]; + } + + if ($attachment = $COMPOSE['attachments'][$id]) { + $attachment = $RCMAIL->plugins->exec_hook('attachment_display', $attachment); + } + + if ($attachment['status']) { + if (empty($attachment['size'])) { + $attachment['size'] = $attachment['data'] ? strlen($attachment['data']) : @filesize($attachment['path']); + } + + header('Content-Type: ' . $attachment['mimetype']); + header('Content-Length: ' . $attachment['size']); + + if ($attachment['data']) { + echo $attachment['data']; + } + else if ($attachment['path']) { + readfile($attachment['path']); + } + } + + exit; } /***** attachment upload action *****/ @@ -84,93 +95,97 @@ if ($RCMAIL->action=='display-attachment') // clear all stored output properties (like scripts and env vars) $OUTPUT->reset(); -$uploadid = get_input_value('_uploadid', RCUBE_INPUT_GET); +$uploadid = rcube_utils::get_input_value('_uploadid', rcube_utils::INPUT_GET); if (is_array($_FILES['_attachments']['tmp_name'])) { - $multiple = count($_FILES['_attachments']['tmp_name']) > 1; - - foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath) { - // Process uploaded attachment if there is no error - $err = $_FILES['_attachments']['error'][$i]; - - if (!$err) { - $attachment = array( - 'path' => $filepath, - 'size' => $_FILES['_attachments']['size'][$i], - 'name' => $_FILES['_attachments']['name'][$i], - 'mimetype' => rc_mime_content_type($filepath, $_FILES['_attachments']['name'][$i], $_FILES['_attachments']['type'][$i]), - 'group' => $COMPOSE_ID, - ); - - $attachment = $RCMAIL->plugins->exec_hook('attachment_upload', $attachment); + $multiple = count($_FILES['_attachments']['tmp_name']) > 1; + + foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath) { + // Process uploaded attachment if there is no error + $err = $_FILES['_attachments']['error'][$i]; + + if (!$err) { + $attachment = $RCMAIL->plugins->exec_hook('attachment_upload', array( + 'path' => $filepath, + 'size' => $_FILES['_attachments']['size'][$i], + 'name' => $_FILES['_attachments']['name'][$i], + 'mimetype' => rcube_mime::file_content_type($filepath, $_FILES['_attachments']['name'][$i], $_FILES['_attachments']['type'][$i]), + 'group' => $COMPOSE_ID, + )); + } + + if (!$err && $attachment['status'] && !$attachment['abort']) { + $id = $attachment['id']; + + // store new attachment in session + unset($attachment['status'], $attachment['abort']); + $RCMAIL->session->append($SESSION_KEY.'.attachments', $id, $attachment); + + if (($icon = $COMPOSE['deleteicon']) && is_file($icon)) { + $button = html::img(array( + 'src' => $icon, + 'alt' => $RCMAIL->gettext('delete') + )); + } + else if ($COMPOSE['textbuttons']) { + $button = rcube::Q($RCMAIL->gettext('delete')); + } + else { + $button = ''; + } + + $content = html::a(array( + 'href' => "#delete", + 'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", rcmail_output::JS_OBJECT_NAME, $id), + 'title' => $RCMAIL->gettext('delete'), + 'class' => 'delete', + ), $button); + + $content .= rcube::Q($attachment['name']); + + $OUTPUT->command('add2attachment_list', "rcmfile$id", array( + 'html' => $content, + 'name' => $attachment['name'], + 'mimetype' => $attachment['mimetype'], + 'classname' => rcube_utils::file2class($attachment['mimetype'], $attachment['name']), + 'complete' => true), $uploadid); + } + else { // upload failed + if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { + $size = $RCMAIL->show_bytes(parse_bytes(ini_get('upload_max_filesize'))); + $msg = $RCMAIL->gettext(array('name' => 'filesizeerror', 'vars' => array('size' => $size))); + } + else if ($attachment['error']) { + $msg = $attachment['error']; + } + else { + $msg = $RCMAIL->gettext('fileuploaderror'); + } + + if ($attachment['error'] || $err != UPLOAD_ERR_NO_FILE) { + $OUTPUT->command('display_message', $msg, 'error'); + $OUTPUT->command('remove_from_attachment_list', $uploadid); + } + } } - - if (!$err && $attachment['status'] && !$attachment['abort']) { - $id = $attachment['id']; - - // store new attachment in session - unset($attachment['status'], $attachment['abort']); - $RCMAIL->session->append($SESSION_KEY.'.attachments', $id, $attachment); - - if (($icon = $COMPOSE['deleteicon']) && is_file($icon)) { - $button = html::img(array( - 'src' => $icon, - 'alt' => rcube_label('delete') +} +else if ($_SERVER['REQUEST_METHOD'] == 'POST') { + // if filesize exceeds post_max_size then $_FILES array is empty, + // show filesizeerror instead of fileuploaderror + if ($maxsize = ini_get('post_max_size')) { + $msg = $RCMAIL->gettext(array( + 'name' => 'filesizeerror', + 'vars' => array('size' => $RCMAIL->show_bytes(parse_bytes($maxsize))) )); - } - else if ($COMPOSE['textbuttons']) { - $button = Q(rcube_label('delete')); - } - else { - $button = ''; - } - - $content = html::a(array( - 'href' => "#delete", - 'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", JS_OBJECT_NAME, $id), - 'title' => rcube_label('delete'), - 'class' => 'delete', - ), $button); - - $content .= Q($attachment['name']); - - $OUTPUT->command('add2attachment_list', "rcmfile$id", array( - 'html' => $content, - 'name' => $attachment['name'], - 'mimetype' => $attachment['mimetype'], - 'classname' => rcmail_filetype2classname($attachment['mimetype'], $attachment['name']), - 'complete' => true), $uploadid); } - else { // upload failed - if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { - $msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize')))))); - } - else if ($attachment['error']) { - $msg = $attachment['error']; - } - else { - $msg = rcube_label('fileuploaderror'); - } - - if ($attachment['error'] || $err != UPLOAD_ERR_NO_FILE) { - $OUTPUT->command('display_message', $msg, 'error'); - $OUTPUT->command('remove_from_attachment_list', $uploadid); - } + else { + $msg = $RCMAIL->gettext('fileuploaderror'); } - } -} -else if ($_SERVER['REQUEST_METHOD'] == 'POST') { - // if filesize exceeds post_max_size then $_FILES array is empty, - // show filesizeerror instead of fileuploaderror - if ($maxsize = ini_get('post_max_size')) - $msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes($maxsize))))); - else - $msg = rcube_label('fileuploaderror'); - $OUTPUT->command('display_message', $msg, 'error'); - $OUTPUT->command('remove_from_attachment_list', $uploadid); + + $OUTPUT->command('display_message', $msg, 'error'); + $OUTPUT->command('remove_from_attachment_list', $uploadid); } // send html page with JS calls as response $OUTPUT->command('auto_save_start', false); $OUTPUT->send('iframe'); - diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index f9e8d71a4..c15de92cf 100644 --- a/program/steps/mail/autocomplete.inc +++ b/program/steps/mail/autocomplete.inc @@ -5,8 +5,8 @@ | program/steps/mail/autocomplete.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2011, Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | Copyright (C) 2008-2013, Roundcube Dev Team | + | Copyright (C) 2011-2013, Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -21,124 +21,137 @@ */ if ($RCMAIL->action == 'group-expand') { - $abook = $RCMAIL->get_address_book(get_input_value('_source', RCUBE_INPUT_GPC)); - if ($gid = get_input_value('_gid', RCUBE_INPUT_GPC)) { - $members = array(); - $abook->set_group($gid); - $abook->set_pagesize(1000); // TODO: limit number of group members by config - $result = $abook->list_records($RCMAIL->config->get('contactlist_fields')); - while ($result && ($sql_arr = $result->iterate())) { - foreach ((array)$sql_arr['email'] as $email) { - $members[] = format_email_recipient($email, rcube_addressbook::compose_list_name($sql_arr)); - break; // only expand one email per contact - } - } + $abook = $RCMAIL->get_address_book(rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC)); + if ($gid = rcube_utils::get_input_value('_gid', rcube_utils::INPUT_GPC)) { + $abook->set_group($gid); + $abook->set_pagesize(1000); // TODO: limit number of group members by config + + $separator = trim($RCMAIL->config->get('recipients_separator', ',')) . ' '; + $result = $abook->list_records($RCMAIL->config->get('contactlist_fields')); + $members = array(); + + while ($result && ($sql_arr = $result->iterate())) { + $emails = (array) $abook->get_col_values('email', $sql_arr, true); + if (!empty($emails) && ($email = array_shift($emails))) { + $members[] = format_email_recipient($email, rcube_addressbook::compose_list_name($sql_arr)); + } + } - $separator = trim($RCMAIL->config->get('recipients_separator', ',')) . ' '; - $OUTPUT->command('replace_group_recipients', $gid, join($separator, array_unique($members))); - } + $OUTPUT->command('replace_group_recipients', $gid, join($separator, array_unique($members))); + } - $OUTPUT->send(); + $OUTPUT->send(); } $MAXNUM = (int) $RCMAIL->config->get('autocomplete_max', 15); $mode = (int) $RCMAIL->config->get('addressbook_search_mode'); $single = (bool) $RCMAIL->config->get('autocomplete_single'); -$search = get_input_value('_search', RCUBE_INPUT_GPC, true); -$source = get_input_value('_source', RCUBE_INPUT_GPC); -$sid = get_input_value('_id', RCUBE_INPUT_GPC); +$search = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC, true); +$source = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); +$sid = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC); -if (strlen($source)) - $book_types = array($source); -else - $book_types = (array) $RCMAIL->config->get('autocomplete_addressbooks', 'sql'); +if (strlen($source)) { + $book_types = array($source); +} +else { + $book_types = (array) $RCMAIL->config->get('autocomplete_addressbooks', 'sql'); +} if (!empty($book_types) && strlen($search)) { - $contacts = array(); - $sort_keys = array(); - $books_num = count($book_types); - $search_lc = mb_strtolower($search); - - foreach ($book_types as $id) { - $abook = $RCMAIL->get_address_book($id); - $abook->set_pagesize($MAXNUM); - - if ($result = $abook->search($RCMAIL->config->get('contactlist_fields'), $search, $mode, true, true, 'email')) { - while ($sql_arr = $result->iterate()) { - // Contact can have more than one e-mail address - $email_arr = (array)$abook->get_col_values('email', $sql_arr, true); - $email_cnt = count($email_arr); - $idx = 0; - foreach ($email_arr as $email) { - if (empty($email)) { - continue; - } - - $sql_arr['name'] = rcube_addressbook::compose_list_name($sql_arr); - $contact = format_email_recipient($email, $sql_arr['name']); - - // skip entries that don't match - if ($email_cnt > 1 && strpos(mb_strtolower($contact), $search_lc) === false) { - continue; - } - - // skip duplicates - if (!in_array($contact, $contacts)) { - $contacts[] = $contact; - $sort_keys[] = sprintf('%s %03d', $sql_arr['name'] , $idx++); - - if (count($contacts) >= $MAXNUM) - break 2; - } - - // skip redundant entries (show only first email address) - if ($single) { - break; - } + $contacts = array(); + $sort_keys = array(); + $books_num = count($book_types); + $search_lc = mb_strtolower($search); + + foreach ($book_types as $id) { + $abook = $RCMAIL->get_address_book($id); + $abook->set_pagesize($MAXNUM); + + if ($result = $abook->search($RCMAIL->config->get('contactlist_fields'), $search, $mode, true, true, 'email')) { + while ($sql_arr = $result->iterate()) { + // Contact can have more than one e-mail address + $email_arr = (array)$abook->get_col_values('email', $sql_arr, true); + $email_cnt = count($email_arr); + $idx = 0; + + foreach ($email_arr as $email) { + if (empty($email)) { + continue; + } + + $name = rcube_addressbook::compose_list_name($sql_arr); + $contact = format_email_recipient($email, $name); + + // skip entries that don't match + if ($email_cnt > 1 && strpos(mb_strtolower($contact), $search_lc) === false) { + continue; + } + + // skip duplicates + if (!in_array($contact, $contacts)) { + $contacts[] = $contact; + $sort_keys[] = sprintf('%s %03d', $sql_arr['name'] , $idx++); + + if (count($contacts) >= $MAXNUM) { + break 2; + } + } + + // skip redundant entries (show only first email address) + if ($single) { + break; + } + } + } } - } - } - // also list matching contact groups - if ($abook->groups && count($contacts) < $MAXNUM) { - foreach ($abook->list_groups($search, $mode) as $group) { - $abook->reset(); - $abook->set_group($group['ID']); - $group_prop = $abook->get_group($group['ID']); - - // group (distribution list) with email address(es) - if ($group_prop['email']) { - $idx = 0; - foreach ((array)$group_prop['email'] as $email) { - $contacts[] = format_email_recipient($email, $group['name']); - $sort_keys[] = sprintf('%s %03d', $group['name'] , $idx++); - - if (count($contacts) >= $MAXNUM) - break 2; + // also list matching contact groups + if ($abook->groups && count($contacts) < $MAXNUM) { + foreach ($abook->list_groups($search, $mode) as $group) { + $abook->reset(); + $abook->set_group($group['ID']); + + $group_prop = $abook->get_group($group['ID']); + + // group (distribution list) with email address(es) + if ($group_prop['email']) { + $idx = 0; + foreach ((array)$group_prop['email'] as $email) { + $contacts[] = format_email_recipient($email, $group['name']); + $sort_keys[] = sprintf('%s %03d', $group['name'] , $idx++); + + if (count($contacts) >= $MAXNUM) { + break 2; + } + } + } + // show group with count + else if (($result = $abook->count()) && $result->count) { + $sort_keys[] = $group['name']; + $contacts[] = array( + 'name' => $group['name'] . ' (' . intval($result->count) . ')', + 'id' => $group['ID'], + 'source' => $id + ); + + if (count($contacts) >= $MAXNUM) { + break; + } + } } } - // show group with count - else if (($result = $abook->count()) && $result->count) { - $contacts[] = array('name' => $group['name'] . ' (' . intval($result->count) . ')', 'id' => $group['ID'], 'source' => $id); - $sort_keys[] = $group['name']; + } - if (count($contacts) >= $MAXNUM) - break; + if (count($contacts)) { + // sort contacts index + asort($sort_keys, SORT_LOCALE_STRING); + // re-sort contacts according to index + foreach ($sort_keys as $idx => $val) { + $sort_keys[$idx] = $contacts[$idx]; } - } - } - } - - if (count($contacts)) { - // sort contacts index - asort($sort_keys, SORT_LOCALE_STRING); - // re-sort contacts according to index - foreach ($sort_keys as $idx => $val) { - $sort_keys[$idx] = $contacts[$idx]; + $contacts = array_values($sort_keys); } - $contacts = array_values($sort_keys); - } } $OUTPUT->command('ksearch_query_results', $contacts, $search, $sid); diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc index 8c0b1ffc0..d2d27a2ca 100644 --- a/program/steps/mail/check_recent.inc +++ b/program/steps/mail/check_recent.inc @@ -25,6 +25,7 @@ if (empty($_REQUEST['_folderlist']) && empty($_REQUEST['_list'])) { return; } +$trash = $RCMAIL->config->get('trash_mbox'); $current = $RCMAIL->storage->get_folder(); $check_all = $RCMAIL->action != 'refresh' || (bool)$RCMAIL->config->get('check_all_folders'); @@ -65,7 +66,7 @@ foreach ($a_mailboxes as $mbox_name) { if ($status && $is_current) { // refresh saved search set - $search_request = get_input_value('_search', RCUBE_INPUT_GPC); + $search_request = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC); if ($search_request && isset($_SESSION['search']) && $_SESSION['search_request'] == $search_request ) { @@ -73,7 +74,7 @@ foreach ($a_mailboxes as $mbox_name) { } if (!empty($_GET['_quota'])) - $OUTPUT->command('set_quota', rcmail_quota_content()); + $OUTPUT->command('set_quota', $RCMAIL->quota_content()); $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS')); @@ -114,6 +115,29 @@ foreach ($a_mailboxes as $mbox_name) { $OUTPUT->command('update_selection'); } } + // handle flag updates + else if ($is_current && ($uids = rcube_utils::get_input_value('_uids', rcube_utils::INPUT_GPC))) { + $data = $RCMAIL->storage->folder_data($mbox_name); + + if (empty($_SESSION['list_mod_seq']) || $_SESSION['list_mod_seq'] != $data['HIGHESTMODSEQ']) { + $flags = $RCMAIL->storage->list_flags($mbox_name, explode(',', $uids), $_SESSION['list_mod_seq']); + foreach ($flags as $idx => $row) { + $flags[$idx] = array_change_key_case(array_map('intval', $row)); + } + + // remember last HIGHESTMODSEQ value (if supported) + if (!empty($data['HIGHESTMODSEQ'])) { + $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ']; + } + + $RCMAIL->output->set_env('recent_flags', $flags); + } + } + + // set trash folder state + if ($mbox_name === $trash) { + $OUTPUT->command('set_trash_count', $RCMAIL->storage->count($mbox_name, 'EXISTS')); + } } // trigger refresh hook diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index dc2452506..8504d026c 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -5,7 +5,7 @@ | program/steps/mail/compose.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | 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. | @@ -26,7 +26,7 @@ define('RCUBE_COMPOSE_DRAFT', 'draft'); define('RCUBE_COMPOSE_EDIT', 'edit'); $MESSAGE_FORM = null; -$COMPOSE_ID = get_input_value('_id', RCUBE_INPUT_GET); +$COMPOSE_ID = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GET); $COMPOSE = null; if ($COMPOSE_ID && $_SESSION['compose_data_'.$COMPOSE_ID]) @@ -35,73 +35,74 @@ if ($COMPOSE_ID && $_SESSION['compose_data_'.$COMPOSE_ID]) // give replicated session storage some time to synchronize $retries = 0; while ($COMPOSE_ID && !is_array($COMPOSE) && $RCMAIL->db->is_replicated() && $retries++ < 5) { - usleep(500000); - $RCMAIL->session->reload(); - if ($_SESSION['compose_data_'.$COMPOSE_ID]) - $COMPOSE =& $_SESSION['compose_data_'.$COMPOSE_ID]; + usleep(500000); + $RCMAIL->session->reload(); + if ($_SESSION['compose_data_'.$COMPOSE_ID]) { + $COMPOSE =& $_SESSION['compose_data_'.$COMPOSE_ID]; + } } // Nothing below is called during message composition, only at "new/forward/reply/draft" initialization or // if a compose-ID is given (i.e. when the compose step is opened in a new window/tab). -if (!is_array($COMPOSE)) -{ - // Infinite redirect prevention in case of broken session (#1487028) - if ($COMPOSE_ID) - raise_error(array('code' => 500, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Invalid compose ID"), true, true); - - $COMPOSE_ID = uniqid(mt_rand()); - $_SESSION['compose_data_'.$COMPOSE_ID] = array( - 'id' => $COMPOSE_ID, - 'param' => rcube_utils::request2param(RCUBE_INPUT_GET, 'task|action', true), - 'mailbox' => $RCMAIL->storage->get_folder(), - ); - $COMPOSE =& $_SESSION['compose_data_'.$COMPOSE_ID]; +if (!is_array($COMPOSE)) { + // Infinite redirect prevention in case of broken session (#1487028) + if ($COMPOSE_ID) { + rcube::raise_error(array('code' => 500, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Invalid compose ID"), true, true); + } - rcmail_process_compose_params($COMPOSE); - - // add attachments listed by message_compose hook - if (is_array($plugin['attachments'])) { - foreach ($plugin['attachments'] as $attach) { - // we have structured data - if (is_array($attach)) { - $attachment = $attach; - } - // only a file path is given - else { - $filename = basename($attach); - $attachment = array( - 'group' => $COMPOSE_ID, - 'name' => $filename, - 'mimetype' => rc_mime_content_type($attach, $filename), - 'path' => $attach, - ); - } - - // save attachment if valid - if (($attachment['data'] && $attachment['name']) || ($attachment['path'] && file_exists($attachment['path']))) { - $attachment = rcmail::get_instance()->plugins->exec_hook('attachment_save', $attachment); - } - - if ($attachment['status'] && !$attachment['abort']) { - unset($attachment['data'], $attachment['status'], $attachment['abort']); - $COMPOSE['attachments'][$attachment['id']] = $attachment; - } - } - } - - // check if folder for saving sent messages exists and is subscribed (#1486802) - if ($sent_folder = $COMPOSE['param']['sent_mbox']) { - rcmail_check_sent_folder($sent_folder, true); - } - - // redirect to a unique URL with all parameters stored in session - $OUTPUT->redirect(array( - '_action' => 'compose', - '_id' => $COMPOSE['id'], - '_search' => $_REQUEST['_search'], - )); + $COMPOSE_ID = uniqid(mt_rand()); + $_SESSION['compose_data_'.$COMPOSE_ID] = array( + 'id' => $COMPOSE_ID, + 'param' => rcube_utils::request2param(rcube_utils::INPUT_GET, 'task|action', true), + 'mailbox' => $RCMAIL->storage->get_folder(), + ); + $COMPOSE =& $_SESSION['compose_data_'.$COMPOSE_ID]; + + rcmail_process_compose_params($COMPOSE); + + // add attachments listed by message_compose hook + if (is_array($plugin['attachments'])) { + foreach ($plugin['attachments'] as $attach) { + // we have structured data + if (is_array($attach)) { + $attachment = $attach; + } + // only a file path is given + else { + $filename = basename($attach); + $attachment = array( + 'group' => $COMPOSE_ID, + 'name' => $filename, + 'mimetype' => rcube_mime::file_content_type($attach, $filename), + 'path' => $attach, + ); + } + + // save attachment if valid + if (($attachment['data'] && $attachment['name']) || ($attachment['path'] && file_exists($attachment['path']))) { + $attachment = rcmail::get_instance()->plugins->exec_hook('attachment_save', $attachment); + } + + if ($attachment['status'] && !$attachment['abort']) { + unset($attachment['data'], $attachment['status'], $attachment['abort']); + $COMPOSE['attachments'][$attachment['id']] = $attachment; + } + } + } + + // check if folder for saving sent messages exists and is subscribed (#1486802) + if ($sent_folder = $COMPOSE['param']['sent_mbox']) { + rcmail_check_sent_folder($sent_folder, true); + } + + // redirect to a unique URL with all parameters stored in session + $OUTPUT->redirect(array( + '_action' => 'compose', + '_id' => $COMPOSE['id'], + '_search' => $_REQUEST['_search'], + )); } @@ -109,149 +110,170 @@ if (!is_array($COMPOSE)) $OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'cancel', 'nobodywarning', 'notsentwarning', 'notuploadedwarning', 'savingmessage', 'sendingmessage', 'messagesaved', 'converting', 'editorwarning', 'searching', 'uploading', 'uploadingmany', - 'fileuploaderror', 'sendmessage'); + 'fileuploaderror', 'sendmessage', 'savenewresponse', 'responsename', 'responsetext', 'save', + 'savingresponse', 'restoresavedcomposedata', 'restoremessage', 'delete', 'restore', 'ignore'); -$OUTPUT->set_env('compose_id', $COMPOSE['id']); -$OUTPUT->set_pagetitle(rcube_label('compose')); +$OUTPUT->set_pagetitle($RCMAIL->gettext('compose')); -// add config parameters to client script -if (!empty($CONFIG['drafts_mbox'])) { - $OUTPUT->set_env('drafts_mailbox', $CONFIG['drafts_mbox']); - $OUTPUT->set_env('draft_autosave', $CONFIG['draft_autosave']); -} -// set current mailbox in client environment +$OUTPUT->set_env('compose_id', $COMPOSE['id']); +$OUTPUT->set_env('session_id', session_id()); $OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder()); $OUTPUT->set_env('top_posting', intval($RCMAIL->config->get('reply_mode')) > 0); $OUTPUT->set_env('recipients_separator', trim($RCMAIL->config->get('recipients_separator', ','))); +$drafts_mbox = $RCMAIL->config->get('drafts_mbox'); +$config_show_sig = $RCMAIL->config->get('show_sig', 1); + +// add config parameters to client script +if (strlen($drafts_mbox)) { + $OUTPUT->set_env('drafts_mailbox', $drafts_mbox); + $OUTPUT->set_env('draft_autosave', $RCMAIL->config->get('draft_autosave')); +} + // default font for HTML editor -$font = rcube_fontdefs($RCMAIL->config->get('default_font')); +$font = rcmail::font_defs($RCMAIL->config->get('default_font')); if ($font && !is_array($font)) { - $OUTPUT->set_env('default_font', $font); + $OUTPUT->set_env('default_font', $font); } // default font size for HTML editor if ($font_size = $RCMAIL->config->get('default_font_size')) { - $OUTPUT->set_env('default_font_size', $font_size); + $OUTPUT->set_env('default_font_size', $font_size); } // get reference message and set compose mode if ($msg_uid = $COMPOSE['param']['draft_uid']) { - $compose_mode = RCUBE_COMPOSE_DRAFT; - $OUTPUT->set_env('draft_id', $msg_uid); - $RCMAIL->storage->set_folder($CONFIG['drafts_mbox']); + $compose_mode = RCUBE_COMPOSE_DRAFT; + $OUTPUT->set_env('draft_id', $msg_uid); + $RCMAIL->storage->set_folder($drafts_mbox); } else if ($msg_uid = $COMPOSE['param']['reply_uid']) { - $compose_mode = RCUBE_COMPOSE_REPLY; + $compose_mode = RCUBE_COMPOSE_REPLY; } else if ($msg_uid = $COMPOSE['param']['forward_uid']) { - $compose_mode = RCUBE_COMPOSE_FORWARD; - $COMPOSE['forward_uid'] = $msg_uid; - $COMPOSE['as_attachment'] = !empty($COMPOSE['param']['attachment']); + $compose_mode = RCUBE_COMPOSE_FORWARD; + $COMPOSE['forward_uid'] = $msg_uid; + $COMPOSE['as_attachment'] = !empty($COMPOSE['param']['attachment']); } else if ($msg_uid = $COMPOSE['param']['uid']) { - $compose_mode = RCUBE_COMPOSE_EDIT; + $compose_mode = RCUBE_COMPOSE_EDIT; } $COMPOSE['mode'] = $compose_mode; $OUTPUT->set_env('compose_mode', $compose_mode); -$config_show_sig = $RCMAIL->config->get('show_sig', 1); if ($compose_mode == RCUBE_COMPOSE_EDIT || $compose_mode == RCUBE_COMPOSE_DRAFT) { - // don't add signature in draft/edit mode, we'll also not remove the old-one - // but only on page display, later we should be able to change identity/sig (#1489229) - if ($config_show_sig == 1 || $config_show_sig == 2) - $OUTPUT->set_env('show_sig_later', true); + // don't add signature in draft/edit mode, we'll also not remove the old-one + // but only on page display, later we should be able to change identity/sig (#1489229) + if ($config_show_sig == 1 || $config_show_sig == 2) { + $OUTPUT->set_env('show_sig_later', true); + } } else if ($config_show_sig == 1) - $OUTPUT->set_env('show_sig', true); + $OUTPUT->set_env('show_sig', true); else if ($config_show_sig == 2 && empty($compose_mode)) - $OUTPUT->set_env('show_sig', true); + $OUTPUT->set_env('show_sig', true); else if ($config_show_sig == 3 && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD)) - $OUTPUT->set_env('show_sig', true); + $OUTPUT->set_env('show_sig', true); // set line length for body wrapping $LINE_LENGTH = $RCMAIL->config->get('line_length', 72); -if (!empty($msg_uid) && empty($COMPOSE['as_attachment'])) -{ - $mbox_name = $RCMAIL->storage->get_folder(); - - // set format before rcube_message construction - // use the same format as for the message view - if (isset($_SESSION['msg_formats'][$mbox_name.':'.$msg_uid])) { - $RCMAIL->config->set('prefer_html', $_SESSION['msg_formats'][$mbox_name.':'.$msg_uid]); - } - else { - $prefer_html = $CONFIG['prefer_html'] || $CONFIG['htmleditor'] || $compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT; - $RCMAIL->config->set('prefer_html', $prefer_html); - } - - $MESSAGE = new rcube_message($msg_uid); - - // make sure message is marked as read - if ($MESSAGE->headers && empty($MESSAGE->headers->flags['SEEN'])) - $RCMAIL->storage->set_flag($msg_uid, 'SEEN'); - - if (!empty($MESSAGE->headers->charset)) - $RCMAIL->storage->set_charset($MESSAGE->headers->charset); - - if (!$MESSAGE->headers) { - // error - } - else if ($compose_mode == RCUBE_COMPOSE_REPLY) { - $COMPOSE['reply_uid'] = $msg_uid; - $COMPOSE['reply_msgid'] = $MESSAGE->headers->messageID; - $COMPOSE['references'] = trim($MESSAGE->headers->references . " " . $MESSAGE->headers->messageID); - - if (!empty($COMPOSE['param']['all'])) - $MESSAGE->reply_all = $COMPOSE['param']['all']; - - // Save the sent message in the same folder of the message being replied to - if ($RCMAIL->config->get('reply_same_folder') && ($sent_folder = $COMPOSE['mailbox']) - && rcmail_check_sent_folder($sent_folder, false) - ) { - $COMPOSE['param']['sent_mbox'] = $sent_folder; +if (!empty($msg_uid) && empty($COMPOSE['as_attachment'])) { + $mbox_name = $RCMAIL->storage->get_folder(); + + // set format before rcube_message construction + // use the same format as for the message view + if (isset($_SESSION['msg_formats'][$mbox_name.':'.$msg_uid])) { + $RCMAIL->config->set('prefer_html', $_SESSION['msg_formats'][$mbox_name.':'.$msg_uid]); } - } - else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { - if ($compose_mode == RCUBE_COMPOSE_DRAFT && ($draft_info = $MESSAGE->headers->get('x-draft-info'))) { - // get reply_uid/forward_uid to flag the original message when sending - $info = rcmail_draftinfo_decode($draft_info); + else { + $prefer_html = $RCMAIL->config->get('prefer_html') || $RCMAIL->config->get('htmleditor') + || $compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT; - if ($info['type'] == 'reply') - $COMPOSE['reply_uid'] = $info['uid']; - else if ($info['type'] == 'forward') - $COMPOSE['forward_uid'] = $info['uid']; + $RCMAIL->config->set('prefer_html', $prefer_html); + } - $COMPOSE['mailbox'] = $info['folder']; + $MESSAGE = new rcube_message($msg_uid); - // Save the sent message in the same folder of the message being replied to - if ($RCMAIL->config->get('reply_same_folder') && ($sent_folder = $info['folder']) - && rcmail_check_sent_folder($sent_folder, false) - ) { - $COMPOSE['param']['sent_mbox'] = $sent_folder; - } + // make sure message is marked as read + if ($MESSAGE->headers && empty($MESSAGE->headers->flags['SEEN'])) { + $RCMAIL->storage->set_flag($msg_uid, 'SEEN'); } - if ($in_reply_to = $MESSAGE->headers->get('in-reply-to')) - $COMPOSE['reply_msgid'] = '<' . $in_reply_to . '>'; + if (!empty($MESSAGE->headers->charset)) { + $RCMAIL->storage->set_charset($MESSAGE->headers->charset); + } - $COMPOSE['references'] = $MESSAGE->headers->references; - } + if (!$MESSAGE->headers) { + // error + } + else if ($compose_mode == RCUBE_COMPOSE_REPLY) { + $COMPOSE['reply_uid'] = $msg_uid; + $COMPOSE['reply_msgid'] = $MESSAGE->headers->messageID; + $COMPOSE['references'] = trim($MESSAGE->headers->references . " " . $MESSAGE->headers->messageID); + + if (!empty($COMPOSE['param']['all'])) { + $MESSAGE->reply_all = $COMPOSE['param']['all']; + } + + // Save the sent message in the same folder of the message being replied to + if ($RCMAIL->config->get('reply_same_folder') && ($sent_folder = $COMPOSE['mailbox']) + && rcmail_check_sent_folder($sent_folder, false) + ) { + $COMPOSE['param']['sent_mbox'] = $sent_folder; + } + } + else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { + if ($compose_mode == RCUBE_COMPOSE_DRAFT) { + if ($draft_info = $MESSAGE->headers->get('x-draft-info')) { + // get reply_uid/forward_uid to flag the original message when sending + $info = rcmail_draftinfo_decode($draft_info); + + if ($info['type'] == 'reply') + $COMPOSE['reply_uid'] = $info['uid']; + else if ($info['type'] == 'forward') + $COMPOSE['forward_uid'] = $info['uid']; + + $COMPOSE['mailbox'] = $info['folder']; + + // Save the sent message in the same folder of the message being replied to + if ($RCMAIL->config->get('reply_same_folder') && ($sent_folder = $info['folder']) + && rcmail_check_sent_folder($sent_folder, false) + ) { + $COMPOSE['param']['sent_mbox'] = $sent_folder; + } + } + + $COMPOSE['param']['message-id'] = $MESSAGE->headers->get('message-id'); + + // use message UID as draft_id + $OUTPUT->set_env('draft_id', $msg_uid); + } + + if ($in_reply_to = $MESSAGE->headers->get('in-reply-to')) { + $COMPOSE['reply_msgid'] = '<' . $in_reply_to . '>'; + } + + $COMPOSE['references'] = $MESSAGE->headers->references; + } } else { - $MESSAGE = new stdClass(); - - // apply mailto: URL parameters - if (!empty($COMPOSE['param']['in-reply-to'])) { - $COMPOSE['reply_msgid'] = '<' . $COMPOSE['param']['in-reply-to'] . '>'; - } - if (!empty($COMPOSE['param']['references'])) { - $COMPOSE['references'] = $COMPOSE['param']['references']; - } + $MESSAGE = new stdClass(); + + // apply mailto: URL parameters + if (!empty($COMPOSE['param']['in-reply-to'])) { + $COMPOSE['reply_msgid'] = '<' . $COMPOSE['param']['in-reply-to'] . '>'; + } + + if (!empty($COMPOSE['param']['references'])) { + $COMPOSE['references'] = $COMPOSE['param']['references']; + } } +if (!empty($COMPOSE['reply_msgid'])) + $OUTPUT->set_env('reply_msgid', $COMPOSE['reply_msgid']); + $MESSAGE->compose = array(); // get user's identities @@ -259,142 +281,141 @@ $MESSAGE->identities = $RCMAIL->user->list_identities(null, true); // Set From field value if (!empty($_POST['_from'])) { - $MESSAGE->compose['from'] = get_input_value('_from', RCUBE_INPUT_POST); + $MESSAGE->compose['from'] = rcube_utils::get_input_value('_from', rcube_utils::INPUT_POST); } else if (!empty($COMPOSE['param']['from'])) { - $MESSAGE->compose['from'] = $COMPOSE['param']['from']; + $MESSAGE->compose['from'] = $COMPOSE['param']['from']; } else if (count($MESSAGE->identities)) { - $ident = rcmail_identity_select($MESSAGE, $MESSAGE->identities, $compose_mode); + $ident = rcmail_identity_select($MESSAGE, $MESSAGE->identities, $compose_mode); - $MESSAGE->compose['from_email'] = $ident['email']; - $MESSAGE->compose['from'] = $ident['identity_id']; + $MESSAGE->compose['from_email'] = $ident['email']; + $MESSAGE->compose['from'] = $ident['identity_id']; } // Set other headers $a_recipients = array(); $parts = array('to', 'cc', 'bcc', 'replyto', 'followupto'); $separator = trim($RCMAIL->config->get('recipients_separator', ',')) . ' '; +$from_email = @mb_strtolower($MESSAGE->compose['from_email']); foreach ($parts as $header) { - $fvalue = ''; - $decode_header = true; - - // we have a set of recipients stored is session - if ($header == 'to' && ($mailto_id = $COMPOSE['param']['mailto']) - && $_SESSION['mailto'][$mailto_id] - ) { - $fvalue = urldecode($_SESSION['mailto'][$mailto_id]); - $decode_header = false; - - // make session to not grow up too much - unset($_SESSION['mailto'][$mailto_id]); - $COMPOSE['param']['to'] = $fvalue; - } - else if (!empty($_POST['_'.$header])) { - $fvalue = get_input_value('_'.$header, RCUBE_INPUT_POST, TRUE); - } - else if (!empty($COMPOSE['param'][$header])) { - $fvalue = $COMPOSE['param'][$header]; - } - else if ($compose_mode == RCUBE_COMPOSE_REPLY) { - // get recipent address(es) out of the message headers - if ($header == 'to') { - $mailfollowup = $MESSAGE->headers->others['mail-followup-to']; - $mailreplyto = $MESSAGE->headers->others['mail-reply-to']; - - // Reply to mailing list... - if ($MESSAGE->reply_all == 'list' && $mailfollowup) - $fvalue = $mailfollowup; - else if ($MESSAGE->reply_all == 'list' - && preg_match('/<mailto:([^>]+)>/i', $MESSAGE->headers->others['list-post'], $m)) - $fvalue = $m[1]; - // Reply to... - else if ($MESSAGE->reply_all && $mailfollowup) - $fvalue = $mailfollowup; - else if ($mailreplyto) - $fvalue = $mailreplyto; - else if (!empty($MESSAGE->headers->replyto)) - $fvalue = $MESSAGE->headers->replyto; - else if (!empty($MESSAGE->headers->from)) - $fvalue = $MESSAGE->headers->from; - - // Reply to message sent by yourself (#1487074, #1489230) - if (!empty($ident) && in_array($ident['ident'], array($fvalue, $MESSAGE->headers->from))) { - $fvalue = $MESSAGE->headers->to; - } - } - // add recipient of original message if reply to all - else if ($header == 'cc' && !empty($MESSAGE->reply_all) && $MESSAGE->reply_all != 'list') { - if ($v = $MESSAGE->headers->to) - $fvalue .= $v; - if ($v = $MESSAGE->headers->cc) - $fvalue .= (!empty($fvalue) ? $separator : '') . $v; - // Use Sender header (#1489011) - if (($v = $MESSAGE->headers->get('Sender', false)) && strpos($v, '-bounces@') === false) - $fvalue .= (!empty($fvalue) ? $separator : '') . $v; - - // When To: and Reply-To: are the same we add From: address to the list (#1489037) - if ($v = $MESSAGE->headers->from) { - $from = rcube_mime::decode_address_list($v, null, false, $MESSAGE->headers->charset, true); - $to = rcube_mime::decode_address_list($MESSAGE->headers->to, null, false, $MESSAGE->headers->charset, true); - $replyto = rcube_mime::decode_address_list($MESSAGE->headers->replyto, null, false, $MESSAGE->headers->charset, true); - - if (count($replyto) && !count(array_diff($to, $replyto)) && count(array_diff($from, $to))) { - $fvalue .= (!empty($fvalue) ? $separator : '') . $v; - } - } - } - } - else if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))) { - // get drafted headers - if ($header=='to' && !empty($MESSAGE->headers->to)) - $fvalue = $MESSAGE->get_header('to', true); - else if ($header=='cc' && !empty($MESSAGE->headers->cc)) - $fvalue = $MESSAGE->get_header('cc', true); - else if ($header=='bcc' && !empty($MESSAGE->headers->bcc)) - $fvalue = $MESSAGE->get_header('bcc', true); - else if ($header=='replyto' && !empty($MESSAGE->headers->others['mail-reply-to'])) - $fvalue = $MESSAGE->get_header('mail-reply-to'); - else if ($header=='replyto' && !empty($MESSAGE->headers->replyto)) - $fvalue = $MESSAGE->get_header('reply-to'); - else if ($header=='followupto' && !empty($MESSAGE->headers->others['mail-followup-to'])) - $fvalue = $MESSAGE->get_header('mail-followup-to'); - } - - // split recipients and put them back together in a unique way - if (!empty($fvalue) && in_array($header, array('to', 'cc', 'bcc'))) { - $to_addresses = rcube_mime::decode_address_list($fvalue, null, $decode_header, $MESSAGE->headers->charset); - $fvalue = array(); - - foreach ($to_addresses as $addr_part) { - if (empty($addr_part['mailto'])) - continue; - - $mailto = format_email(rcube_idn_to_utf8($addr_part['mailto'])); - - if (!in_array($mailto, $a_recipients) - && ( - $header == 'to' - || $compose_mode != RCUBE_COMPOSE_REPLY - || empty($MESSAGE->compose['from_email']) - || $mailto != $MESSAGE->compose['from_email'] - ) - ) { - if ($addr_part['name'] && $addr_part['mailto'] != $addr_part['name']) - $string = format_email_recipient($mailto, $addr_part['name']); - else - $string = $mailto; + $fvalue = ''; + $decode_header = true; + + // we have a set of recipients stored is session + if ($header == 'to' && ($mailto_id = $COMPOSE['param']['mailto']) + && $_SESSION['mailto'][$mailto_id] + ) { + $fvalue = urldecode($_SESSION['mailto'][$mailto_id]); + $decode_header = false; - $fvalue[] = $string; - $a_recipients[] = $addr_part['mailto']; - } + // make session to not grow up too much + unset($_SESSION['mailto'][$mailto_id]); + $COMPOSE['param']['to'] = $fvalue; + } + else if (!empty($_POST['_'.$header])) { + $fvalue = rcube_utils::get_input_value('_'.$header, rcube_utils::INPUT_POST, TRUE); + } + else if (!empty($COMPOSE['param'][$header])) { + $fvalue = $COMPOSE['param'][$header]; } + else if ($compose_mode == RCUBE_COMPOSE_REPLY) { + // get recipent address(es) out of the message headers + if ($header == 'to') { + $mailfollowup = $MESSAGE->headers->others['mail-followup-to']; + $mailreplyto = $MESSAGE->headers->others['mail-reply-to']; + + // Reply to mailing list... + if ($MESSAGE->reply_all == 'list' && $mailfollowup) + $fvalue = $mailfollowup; + else if ($MESSAGE->reply_all == 'list' + && preg_match('/<mailto:([^>]+)>/i', $MESSAGE->headers->others['list-post'], $m)) + $fvalue = $m[1]; + // Reply to... + else if ($MESSAGE->reply_all && $mailfollowup) + $fvalue = $mailfollowup; + else if ($mailreplyto) + $fvalue = $mailreplyto; + else if (!empty($MESSAGE->headers->replyto)) + $fvalue = $MESSAGE->headers->replyto; + else if (!empty($MESSAGE->headers->from)) + $fvalue = $MESSAGE->headers->from; + + // Reply to message sent by yourself (#1487074, #1489230) + if (!empty($ident) && in_array($ident['ident'], array($fvalue, $MESSAGE->headers->from))) { + $fvalue = $MESSAGE->headers->to; + } + } + // add recipient of original message if reply to all + else if ($header == 'cc' && !empty($MESSAGE->reply_all) && $MESSAGE->reply_all != 'list') { + if ($v = $MESSAGE->headers->to) + $fvalue .= $v; + if ($v = $MESSAGE->headers->cc) + $fvalue .= (!empty($fvalue) ? $separator : '') . $v; + // Use Sender header (#1489011) + if (($v = $MESSAGE->headers->get('Sender', false)) && strpos($v, '-bounces@') === false) + $fvalue .= (!empty($fvalue) ? $separator : '') . $v; + + // When To: and Reply-To: are the same we add From: address to the list (#1489037) + if ($v = $MESSAGE->headers->from) { + $from = rcube_mime::decode_address_list($v, null, false, $MESSAGE->headers->charset, true); + $to = rcube_mime::decode_address_list($MESSAGE->headers->to, null, false, $MESSAGE->headers->charset, true); + $replyto = rcube_mime::decode_address_list($MESSAGE->headers->replyto, null, false, $MESSAGE->headers->charset, true); + + if (count($replyto) && !count(array_diff($to, $replyto)) && count(array_diff($from, $to))) { + $fvalue .= (!empty($fvalue) ? $separator : '') . $v; + } + } + } + } + else if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))) { + // get drafted headers + if ($header=='to' && !empty($MESSAGE->headers->to)) + $fvalue = $MESSAGE->get_header('to', true); + else if ($header=='cc' && !empty($MESSAGE->headers->cc)) + $fvalue = $MESSAGE->get_header('cc', true); + else if ($header=='bcc' && !empty($MESSAGE->headers->bcc)) + $fvalue = $MESSAGE->get_header('bcc', true); + else if ($header=='replyto' && !empty($MESSAGE->headers->others['mail-reply-to'])) + $fvalue = $MESSAGE->get_header('mail-reply-to'); + else if ($header=='replyto' && !empty($MESSAGE->headers->replyto)) + $fvalue = $MESSAGE->get_header('reply-to'); + else if ($header=='followupto' && !empty($MESSAGE->headers->others['mail-followup-to'])) + $fvalue = $MESSAGE->get_header('mail-followup-to'); + } + + // split recipients and put them back together in a unique way + if (!empty($fvalue) && in_array($header, array('to', 'cc', 'bcc'))) { + $to_addresses = rcube_mime::decode_address_list($fvalue, null, $decode_header, $MESSAGE->headers->charset); + $fvalue = array(); - $fvalue = implode($separator, $fvalue); - } + foreach ($to_addresses as $addr_part) { + if (empty($addr_part['mailto'])) { + continue; + } - $MESSAGE->compose[$header] = $fvalue; + // According to RFC5321 local part of email address is case-sensitive + // however, here it is better to compare addresses in case-insensitive manner + $mailto = format_email(rcube_utils::idn_to_utf8($addr_part['mailto'])); + $mailto_lc = mb_strtolower($addr_part['mailto']); + + if (($header == 'to' || $compose_mode != RCUBE_COMPOSE_REPLY || $mailto_lc != $from_email) + && !in_array($mailto_lc, $a_recipients) + ) { + if ($addr_part['name'] && $mailto != $addr_part['name']) { + $mailto = format_email_recipient($mailto, $addr_part['name']); + } + + $fvalue[] = $mailto; + $a_recipients[] = $mailto_lc; + } + } + + $fvalue = implode($separator, $fvalue); + } + + $MESSAGE->compose[$header] = $fvalue; } unset($a_recipients); @@ -402,322 +423,354 @@ unset($a_recipients); $MESSAGE_BODY = rcmail_prepare_message_body(); +// register UI objects +$OUTPUT->add_handlers(array( + 'composeheaders' => 'rcmail_compose_headers', + 'composesubject' => 'rcmail_compose_subject', + 'composebody' => 'rcmail_compose_body', + 'composeattachmentlist' => 'rcmail_compose_attachment_list', + 'composeattachmentform' => 'rcmail_compose_attachment_form', + 'composeattachment' => 'rcmail_compose_attachment_field', + 'filedroparea' => 'compose_file_drop_area', + 'priorityselector' => 'rcmail_priority_selector', + 'editorselector' => 'rcmail_editor_selector', + 'receiptcheckbox' => 'rcmail_receipt_checkbox', + 'dsncheckbox' => 'rcmail_dsn_checkbox', + 'storetarget' => 'rcmail_store_target_selection', + 'addressbooks' => 'rcmail_addressbook_list', + 'addresslist' => 'rcmail_contacts_list', + 'responseslist' => 'rcmail_compose_responses_list', +)); + +$OUTPUT->send('compose'); + + /****** compose mode functions ********/ // process compose request parameters function rcmail_process_compose_params(&$COMPOSE) { - if ($COMPOSE['param']['to']) { - $mailto = explode('?', $COMPOSE['param']['to'], 2); + if ($COMPOSE['param']['to']) { + $mailto = explode('?', $COMPOSE['param']['to'], 2); - // #1486037: remove "mailto:" prefix - $COMPOSE['param']['to'] = preg_replace('/^mailto:/i', '', $mailto[0]); + // #1486037: remove "mailto:" prefix + $COMPOSE['param']['to'] = preg_replace('/^mailto:/i', '', $mailto[0]); - // Supported case-insensitive tokens in mailto URL - $url_tokens = array('to', 'cc', 'bcc', 'reply-to', 'in-reply-to', 'references', 'subject', 'body'); + // Supported case-insensitive tokens in mailto URL + $url_tokens = array('to', 'cc', 'bcc', 'reply-to', 'in-reply-to', 'references', 'subject', 'body'); - if (!empty($mailto[1])) { - parse_str($mailto[1], $query); - foreach ($query as $f => $val) { - if (($key = array_search(strtolower($f), $url_tokens)) !== false) { - $f = $url_tokens[$key]; - } + if (!empty($mailto[1])) { + parse_str($mailto[1], $query); + foreach ($query as $f => $val) { + if (($key = array_search(strtolower($f), $url_tokens)) !== false) { + $f = $url_tokens[$key]; + } - // merge mailto: addresses with addresses from 'to' parameter - if ($f == 'to' && !empty($COMPOSE['param']['to'])) { - $to_addresses = rcube_mime::decode_address_list($COMPOSE['param']['to'], null, true, null, true); - $add_addresses = rcube_mime::decode_address_list($val, null, true); - foreach ($add_addresses as $addr) { - if (!in_array($addr['mailto'], $to_addresses)) { - $to_addresses[] = $addr['mailto']; - $COMPOSE['param']['to'] = (!empty($to_addresses) ? ', ' : '') . $addr['string']; + // merge mailto: addresses with addresses from 'to' parameter + if ($f == 'to' && !empty($COMPOSE['param']['to'])) { + $to_addresses = rcube_mime::decode_address_list($COMPOSE['param']['to'], null, true, null, true); + $add_addresses = rcube_mime::decode_address_list($val, null, true); + + foreach ($add_addresses as $addr) { + if (!in_array($addr['mailto'], $to_addresses)) { + $to_addresses[] = $addr['mailto']; + $COMPOSE['param']['to'] = (!empty($to_addresses) ? ', ' : '') . $addr['string']; + } + } + } + else { + $COMPOSE['param'][$f] = $val; + } } - } - } - else { - $COMPOSE['param'][$f] = $val; } - } } - } - $RCMAIL = rcmail::get_instance(); + // clean HTML message body which can be submitted by URL + if (!empty($COMPOSE['param']['body'])) { + $COMPOSE['param']['body'] = rcmail_wash_html($COMPOSE['param']['body'], array('safe' => false, 'inline_html' => true), array()); + } + + $RCMAIL = rcmail::get_instance(); - // select folder where to save the sent message - $COMPOSE['param']['sent_mbox'] = $RCMAIL->config->get('sent_mbox'); + // select folder where to save the sent message + $COMPOSE['param']['sent_mbox'] = $RCMAIL->config->get('sent_mbox'); - // pipe compose parameters thru plugins - $plugin = $RCMAIL->plugins->exec_hook('message_compose', $COMPOSE); - $COMPOSE['param'] = array_merge($COMPOSE['param'], $plugin['param']); + // pipe compose parameters thru plugins + $plugin = $RCMAIL->plugins->exec_hook('message_compose', $COMPOSE); + $COMPOSE['param'] = array_merge($COMPOSE['param'], $plugin['param']); } function rcmail_compose_headers($attrib) { - global $MESSAGE; + global $RCMAIL, $MESSAGE; - list($form_start,) = get_form_tags($attrib); + list($form_start,) = get_form_tags($attrib); - $out = ''; - $part = strtolower($attrib['part']); + $out = ''; + $part = strtolower($attrib['part']); - switch ($part) - { + switch ($part) { case 'from': - return $form_start . rcmail_compose_header_from($attrib); + return $form_start . rcmail_compose_header_from($attrib); case 'to': case 'cc': case 'bcc': - $fname = '_' . $part; - $header = $param = $part; + $fname = '_' . $part; + $header = $param = $part; - $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'tabindex'); - $field_type = 'html_textarea'; - break; + $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'tabindex'); + $field_type = 'html_textarea'; + break; case 'replyto': case 'reply-to': - $fname = '_replyto'; - $param = 'replyto'; - $header = 'reply-to'; + $fname = '_replyto'; + $param = 'replyto'; + $header = 'reply-to'; case 'followupto': case 'followup-to': - if (!$fname) { - $fname = '_followupto'; - $param = 'followupto'; - $header = 'mail-followup-to'; - } - - $allow_attrib = array('id', 'class', 'style', 'size', 'tabindex'); - $field_type = 'html_inputfield'; - break; - } - - if ($fname && $field_type) - { - // pass the following attributes to the form class - $field_attrib = array('name' => $fname, 'spellcheck' => 'false'); - foreach ($attrib as $attr => $value) - if (in_array($attr, $allow_attrib)) - $field_attrib[$attr] = $value; + if (!$fname) { + $fname = '_followupto'; + $param = 'followupto'; + $header = 'mail-followup-to'; + } - // create teaxtarea object - $input = new $field_type($field_attrib); - $out = $input->show($MESSAGE->compose[$param]); - } + $allow_attrib = array('id', 'class', 'style', 'size', 'tabindex'); + $field_type = 'html_inputfield'; + break; + } - if ($form_start) - $out = $form_start.$out; + if ($fname && $field_type) { + // pass the following attributes to the form class + $field_attrib = array('name' => $fname, 'spellcheck' => 'false'); + foreach ($attrib as $attr => $value) { + if (in_array($attr, $allow_attrib)) { + $field_attrib[$attr] = $value; + } + } - // configure autocompletion - rcube_autocomplete_init(); + // create teaxtarea object + $input = new $field_type($field_attrib); + $out = $input->show($MESSAGE->compose[$param]); + } + + if ($form_start) { + $out = $form_start . $out; + } - return $out; + // configure autocompletion + $RCMAIL->autocomplete_init(); + + return $out; } function rcmail_compose_header_from($attrib) { - global $MESSAGE, $OUTPUT, $RCMAIL, $COMPOSE, $compose_mode; - - // pass the following attributes to the form class - $field_attrib = array('name' => '_from'); - foreach ($attrib as $attr => $value) - if (in_array($attr, array('id', 'class', 'style', 'size', 'tabindex'))) - $field_attrib[$attr] = $value; - - if (count($MESSAGE->identities)) - { - $a_signatures = array(); - $identities = array(); - $separator = intval($RCMAIL->config->get('reply_mode')) > 0 - && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD) ? '---' : '-- '; - - $field_attrib['onchange'] = JS_OBJECT_NAME.".change_identity(this)"; - $select_from = new html_select($field_attrib); - - // create SELECT element - foreach ($MESSAGE->identities as $sql_arr) - { - $identity_id = $sql_arr['identity_id']; - $select_from->add(format_email_recipient($sql_arr['email'], $sql_arr['name']), $identity_id); - - // add signature to array - if (!empty($sql_arr['signature']) && empty($COMPOSE['param']['nosig'])) - { - $text = $html = $sql_arr['signature']; - - if ($sql_arr['html_signature']) { - $h2t = new rcube_html2text($sql_arr['signature'], false, false); - $text = trim($h2t->get_text()); - } - else { - $html = htmlentities($html, ENT_NOQUOTES, RCMAIL_CHARSET); - } + global $MESSAGE, $OUTPUT, $RCMAIL, $COMPOSE, $compose_mode; - if (!preg_match('/^--[ -]\r?\n/m', $text)) { - $text = $separator . "\n" . $text; - $html = $separator . "<br>" . $html; + // pass the following attributes to the form class + $field_attrib = array('name' => '_from'); + foreach ($attrib as $attr => $value) { + if (in_array($attr, array('id', 'class', 'style', 'size', 'tabindex'))) { + $field_attrib[$attr] = $value; } + } + + if (count($MESSAGE->identities)) { + $a_signatures = array(); + $identities = array(); + $separator = intval($RCMAIL->config->get('reply_mode')) > 0 + && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD) ? '---' : '-- '; + + $field_attrib['onchange'] = rcmail_output::JS_OBJECT_NAME.".change_identity(this)"; + $select_from = new html_select($field_attrib); + + // create SELECT element + foreach ($MESSAGE->identities as $sql_arr) { + $identity_id = $sql_arr['identity_id']; + $select_from->add(format_email_recipient($sql_arr['email'], $sql_arr['name']), $identity_id); + + // add signature to array + if (!empty($sql_arr['signature']) && empty($COMPOSE['param']['nosig'])) { + $text = $html = $sql_arr['signature']; + + if ($sql_arr['html_signature']) { + $h2t = new rcube_html2text($sql_arr['signature'], false, false); + $text = trim($h2t->get_text()); + } + else { + $html = htmlentities($html, ENT_NOQUOTES, RCUBE_CHARSET); + } - if (!$sql_arr['html_signature']) { - $html = "<pre>" . $html . "</pre>"; + if (!preg_match('/^--[ -]\r?\n/m', $text)) { + $text = $separator . "\n" . $text; + $html = $separator . "<br>" . $html; + } + + if (!$sql_arr['html_signature']) { + $html = "<pre>" . $html . "</pre>"; + } + + $a_signatures[$identity_id]['text'] = $text; + $a_signatures[$identity_id]['html'] = $html; + } + + // add bcc and reply-to + if (!empty($sql_arr['reply-to'])) { + $identities[$identity_id]['replyto'] = $sql_arr['reply-to']; + } + if (!empty($sql_arr['bcc'])) { + $identities[$identity_id]['bcc'] = $sql_arr['bcc']; + } } - $a_signatures[$identity_id]['text'] = $text; - $a_signatures[$identity_id]['html'] = $html; - } - - // add bcc and reply-to - if (!empty($sql_arr['reply-to'])) { - $identities[$identity_id]['replyto'] = $sql_arr['reply-to']; - } - if (!empty($sql_arr['bcc'])) { - $identities[$identity_id]['bcc'] = $sql_arr['bcc']; - } - } - - $out = $select_from->show($MESSAGE->compose['from']); - - // add signatures to client - $OUTPUT->set_env('signatures', $a_signatures); - $OUTPUT->set_env('identities', $identities); - } - // no identities, display text input field - else { - $field_attrib['class'] = 'from_address'; - $input_from = new html_inputfield($field_attrib); - $out = $input_from->show($MESSAGE->compose['from']); - } - - return $out; + $out = $select_from->show($MESSAGE->compose['from']); + + // add signatures to client + $OUTPUT->set_env('signatures', $a_signatures); + $OUTPUT->set_env('identities', $identities); + } + // no identities, display text input field + else { + $field_attrib['class'] = 'from_address'; + $input_from = new html_inputfield($field_attrib); + $out = $input_from->show($MESSAGE->compose['from']); + } + + return $out; } function rcmail_compose_editor_mode() { - global $RCMAIL, $compose_mode; - static $useHtml; + global $RCMAIL, $compose_mode; + static $useHtml; - if ($useHtml !== null) - return $useHtml; + if ($useHtml !== null) { + return $useHtml; + } + + $html_editor = intval($RCMAIL->config->get('htmleditor')); + + if (isset($_POST['_is_html'])) { + $useHtml = !empty($_POST['_is_html']); + } + else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { + $useHtml = rcmail_message_is_html(); + } + else if ($compose_mode == RCUBE_COMPOSE_REPLY) { + $useHtml = ($html_editor == 1 || ($html_editor >= 2 && rcmail_message_is_html())); + } + else if ($compose_mode == RCUBE_COMPOSE_FORWARD) { + $useHtml = ($html_editor == 1 || ($html_editor == 3 && rcmail_message_is_html())); + } + else { + $useHtml = ($html_editor == 1); + } - $html_editor = intval($RCMAIL->config->get('htmleditor')); - - if (isset($_POST['_is_html'])) { - $useHtml = !empty($_POST['_is_html']); - } - else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { - $useHtml = rcmail_message_is_html(); - } - else if ($compose_mode == RCUBE_COMPOSE_REPLY) { - $useHtml = ($html_editor == 1 || ($html_editor >= 2 && rcmail_message_is_html())); - } - else if ($compose_mode == RCUBE_COMPOSE_FORWARD) { - $useHtml = ($html_editor == 1 || ($html_editor == 3 && rcmail_message_is_html())); - } - else { - $useHtml = ($html_editor == 1); - } - - return $useHtml; + return $useHtml; } function rcmail_message_is_html() { global $RCMAIL, $MESSAGE; + return $RCMAIL->config->get('prefer_html') && ($MESSAGE instanceof rcube_message) && $MESSAGE->has_html_part(true); } function rcmail_prepare_message_body() { - global $RCMAIL, $MESSAGE, $COMPOSE, $compose_mode, $HTML_MODE; - - // use posted message body - if (!empty($_POST['_message'])) { - $body = get_input_value('_message', RCUBE_INPUT_POST, true); - $isHtml = (bool) get_input_value('_is_html', RCUBE_INPUT_POST); - } - else if ($COMPOSE['param']['body']) { - $body = $COMPOSE['param']['body']; - $isHtml = false; - } - // forward as attachment - else if ($compose_mode == RCUBE_COMPOSE_FORWARD && $COMPOSE['as_attachment']) { - $isHtml = rcmail_compose_editor_mode(); - $body = ''; - rcmail_write_forward_attachments(); - } - // reply/edit/draft/forward - else if ($compose_mode && ($compose_mode != RCUBE_COMPOSE_REPLY || intval($RCMAIL->config->get('reply_mode')) != -1)) { - $isHtml = rcmail_compose_editor_mode(); - $messages = array(); + global $RCMAIL, $MESSAGE, $COMPOSE, $compose_mode, $HTML_MODE; - if (!empty($MESSAGE->parts)) { - // collect IDs of message/rfc822 parts - if ($compose_mode == RCUBE_COMPOSE_EDIT || $compose_mode == RCUBE_COMPOSE_DRAFT) { - foreach ($MESSAGE->attachments as $part) { - if ($part->mimetype == 'message/rfc822') { - $messages[] = $part->mime_id; - } - } - } + // use posted message body + if (!empty($_POST['_message'])) { + $body = rcube_utils::get_input_value('_message', rcube_utils::INPUT_POST, true); + $isHtml = (bool) rcube_utils::get_input_value('_is_html', rcube_utils::INPUT_POST); + } + else if ($COMPOSE['param']['body']) { + $body = $COMPOSE['param']['body']; + $isHtml = (bool) $COMPOSE['param']['html']; + } + // forward as attachment + else if ($compose_mode == RCUBE_COMPOSE_FORWARD && $COMPOSE['as_attachment']) { + $isHtml = rcmail_compose_editor_mode(); + $body = ''; - foreach ($MESSAGE->parts as $part) { - // skip no-content and attachment parts (#1488557) - if ($part->type != 'content' || !$part->size || $MESSAGE->is_attachment($part)) { - continue; - } + rcmail_write_forward_attachments(); + } + // reply/edit/draft/forward + else if ($compose_mode && ($compose_mode != RCUBE_COMPOSE_REPLY || intval($RCMAIL->config->get('reply_mode')) != -1)) { + $isHtml = rcmail_compose_editor_mode(); + $messages = array(); + + if (!empty($MESSAGE->parts)) { + // collect IDs of message/rfc822 parts + if ($compose_mode == RCUBE_COMPOSE_EDIT || $compose_mode == RCUBE_COMPOSE_DRAFT) { + foreach ($MESSAGE->attachments as $part) { + if ($part->mimetype == 'message/rfc822') { + $messages[] = $part->mime_id; + } + } + } + + foreach ($MESSAGE->parts as $part) { + // skip no-content and attachment parts (#1488557) + if ($part->type != 'content' || !$part->size || $MESSAGE->is_attachment($part)) { + continue; + } - // skip all content parts inside the message/rfc822 part in DRAFT/EDIT mode - foreach ($messages as $mimeid) { - if (strpos($part->mime_id, $mimeid . '.') === 0) { - continue 2; - } + // skip all content parts inside the message/rfc822 part in DRAFT/EDIT mode + foreach ($messages as $mimeid) { + if (strpos($part->mime_id, $mimeid . '.') === 0) { + continue 2; + } + } + + if ($part_body = rcmail_compose_part_body($part, $isHtml)) { + $body .= ($body ? ($isHtml ? '<br/>' : "\n") : '') . $part_body; + } + } + } + else { + $body = rcmail_compose_part_body($MESSAGE, $isHtml); } - if ($part_body = rcmail_compose_part_body($part, $isHtml)) { - $body .= ($body ? ($isHtml ? '<br/>' : "\n") : '') . $part_body; + // compose reply-body + if ($compose_mode == RCUBE_COMPOSE_REPLY) + $body = rcmail_create_reply_body($body, $isHtml); + // forward message body inline + else if ($compose_mode == RCUBE_COMPOSE_FORWARD) + $body = rcmail_create_forward_body($body, $isHtml); + // load draft message body + else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) + $body = rcmail_create_draft_body($body, $isHtml); + } + else { // new message + $isHtml = rcmail_compose_editor_mode(); + } + + $plugin = $RCMAIL->plugins->exec_hook('message_compose_body', + array('body' => $body, 'html' => $isHtml, 'mode' => $compose_mode)); + + $body = $plugin['body']; + unset($plugin); + + // add blocked.gif attachment (#1486516) + if ($isHtml && preg_match('#<img src="\./program/resources/blocked\.gif"#', $body)) { + if ($attachment = rcmail_save_image('program/resources/blocked.gif', 'image/gif')) { + $COMPOSE['attachments'][$attachment['id']] = $attachment; + $url = sprintf('%s&_id=%s&_action=display-attachment&_file=rcmfile%s', + $RCMAIL->comm_path, $COMPOSE['id'], $attachment['id']); + $body = preg_replace('#\./program/resources/blocked\.gif#', $url, $body); } - } } - else { - $body = rcmail_compose_part_body($MESSAGE, $isHtml); - } - - // compose reply-body - if ($compose_mode == RCUBE_COMPOSE_REPLY) - $body = rcmail_create_reply_body($body, $isHtml); - // forward message body inline - else if ($compose_mode == RCUBE_COMPOSE_FORWARD) - $body = rcmail_create_forward_body($body, $isHtml); - // load draft message body - else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) - $body = rcmail_create_draft_body($body, $isHtml); - } - else { // new message - $isHtml = rcmail_compose_editor_mode(); - } - - $plugin = $RCMAIL->plugins->exec_hook('message_compose_body', - array('body' => $body, 'html' => $isHtml, 'mode' => $compose_mode)); - $body = $plugin['body']; - unset($plugin); - - // add blocked.gif attachment (#1486516) - if ($isHtml && preg_match('#<img src="\./program/resources/blocked\.gif"#', $body)) { - if ($attachment = rcmail_save_image('program/resources/blocked.gif', 'image/gif')) { - $COMPOSE['attachments'][$attachment['id']] = $attachment; - $url = sprintf('%s&_id=%s&_action=display-attachment&_file=rcmfile%s', - $RCMAIL->comm_path, $COMPOSE['id'], $attachment['id']); - $body = preg_replace('#\./program/resources/blocked\.gif#', $url, $body); - } - } - - $HTML_MODE = $isHtml; - - return $body; + + $HTML_MODE = $isHtml; + + return $body; } function rcmail_compose_part_body($part, $isHtml = false) @@ -726,7 +779,7 @@ function rcmail_compose_part_body($part, $isHtml = false) // Check if we have enough memory to handle the message in it // #1487424: we need up to 10x more memory than the body - if (!rcmail_mem_check($part->size * 10)) { + if (!rcube_utils::mem_check($part->size * 10)) { return ''; } @@ -803,892 +856,906 @@ function rcmail_compose_part_body($part, $isHtml = false) function rcmail_compose_body($attrib) { - global $RCMAIL, $CONFIG, $OUTPUT, $MESSAGE, $compose_mode, $HTML_MODE, $MESSAGE_BODY; + global $RCMAIL, $OUTPUT, $HTML_MODE, $MESSAGE_BODY; - list($form_start, $form_end) = get_form_tags($attrib); - unset($attrib['form']); + list($form_start, $form_end) = get_form_tags($attrib); + unset($attrib['form']); - if (empty($attrib['id'])) - $attrib['id'] = 'rcmComposeBody'; + if (empty($attrib['id'])) + $attrib['id'] = 'rcmComposeBody'; - $attrib['name'] = '_message'; + $attrib['name'] = '_message'; - $isHtml = $HTML_MODE; + $isHtml = $HTML_MODE; - $out = $form_start ? "$form_start\n" : ''; + $out = $form_start ? "$form_start\n" : ''; - $saveid = new html_hiddenfield(array('name' => '_draft_saveid', 'value' => $compose_mode==RCUBE_COMPOSE_DRAFT ? str_replace(array('<','>'), "", $MESSAGE->headers->messageID) : '')); - $out .= $saveid->show(); + $saveid = new html_hiddenfield(array('name' => '_draft_saveid', 'value' => $RCMAIL->output->get_env('draft_id'))); + $out .= $saveid->show(); - $drafttoggle = new html_hiddenfield(array('name' => '_draft', 'value' => 'yes')); - $out .= $drafttoggle->show(); + $drafttoggle = new html_hiddenfield(array('name' => '_draft', 'value' => 'yes')); + $out .= $drafttoggle->show(); - $msgtype = new html_hiddenfield(array('name' => '_is_html', 'value' => ($isHtml?"1":"0"))); - $out .= $msgtype->show(); + $msgtype = new html_hiddenfield(array('name' => '_is_html', 'value' => ($isHtml ? "1" : "0"))); + $out .= $msgtype->show(); - // If desired, set this textarea to be editable by TinyMCE - if ($isHtml) { - $MESSAGE_BODY = htmlentities($MESSAGE_BODY, ENT_NOQUOTES, RCMAIL_CHARSET); - $attrib['class'] = 'mce_editor'; - $attrib['is_escaped'] = true; - $textarea = new html_textarea($attrib); - $out .= $textarea->show($MESSAGE_BODY); - } - else { - $textarea = new html_textarea($attrib); - $out .= $textarea->show(''); - // quote plain text, inject into textarea - $table = get_html_translation_table(HTML_SPECIALCHARS); - $MESSAGE_BODY = strtr($MESSAGE_BODY, $table); - $out = substr($out, 0, -11) . $MESSAGE_BODY . '</textarea>'; - } + $framed = new html_hiddenfield(array('name' => '_framed', 'value' => '1')); + $out .= $framed->show(); - $out .= $form_end ? "\n$form_end" : ''; + // If desired, set this textarea to be editable by TinyMCE + if ($isHtml) { + $MESSAGE_BODY = htmlentities($MESSAGE_BODY, ENT_NOQUOTES, RCUBE_CHARSET); + $attrib['class'] = 'mce_editor'; + $attrib['is_escaped'] = true; + $textarea = new html_textarea($attrib); + $out .= $textarea->show($MESSAGE_BODY); + } + else { + $textarea = new html_textarea($attrib); + $out .= $textarea->show(''); - $OUTPUT->set_env('composebody', $attrib['id']); + // quote plain text, inject into textarea + $table = get_html_translation_table(HTML_SPECIALCHARS); + $MESSAGE_BODY = strtr($MESSAGE_BODY, $table); + $out = substr($out, 0, -11) . $MESSAGE_BODY . '</textarea>'; + } + + $out .= $form_end ? "\n$form_end" : ''; + + $OUTPUT->set_env('composebody', $attrib['id']); - // include HTML editor - rcube_html_editor(); + // include HTML editor + $RCMAIL->html_editor(); - // Set language list - if (!empty($CONFIG['enable_spellcheck'])) { - $engine = $RCMAIL->config->get('spellcheck_engine','googie'); - $dictionary = (bool) $RCMAIL->config->get('spellcheck_dictionary'); - $spellcheck_langs = (array) $RCMAIL->config->get('spellcheck_languages', - array('da'=>'Dansk', 'de'=>'Deutsch', 'en' => 'English', 'es'=>'Español', - 'fr'=>'Français', 'it'=>'Italiano', 'nl'=>'Nederlands', 'pl'=>'Polski', - 'pt'=>'Português', 'ru'=>'РуÑÑкий', 'fi'=>'Suomi', 'sv'=>'Svenska')); + // Set language list + if ($RCMAIL->config->get('enable_spellcheck')) { + $engine = new rcube_spellchecker(); + $dictionary = (bool) $RCMAIL->config->get('spellcheck_dictionary'); + $spellcheck_langs = $engine->languages(); + $lang = $_SESSION['language']; - // googie works only with two-letter codes - if ($engine == 'googie') { - $lang = strtolower(substr($_SESSION['language'], 0, 2)); + // if not found in the list, try with two-letter code + if (!$spellcheck_langs[$lang]) { + $lang = strtolower(substr($lang, 0, 2)); + } + + if (!$spellcheck_langs[$lang]) { + $lang = 'en'; + } - $spellcheck_langs_googie = array(); - foreach ($spellcheck_langs as $key => $name) - $spellcheck_langs_googie[strtolower(substr($key,0,2))] = $name; - $spellcheck_langs = $spellcheck_langs_googie; + $OUTPUT->set_env('spell_langs', $spellcheck_langs); + $OUTPUT->set_env('spell_lang', $lang); + + $editor_lang_set = array(); + foreach ($spellcheck_langs as $key => $name) { + $editor_lang_set[] = ($key == $lang ? '+' : '') . rcube::JQ($name).'='.rcube::JQ($key); + } + + // include GoogieSpell + $OUTPUT->include_script('googiespell.js'); + $OUTPUT->add_script(sprintf( + "var googie = new GoogieSpell('%s/images/googiespell/','%s&lang=', %s);\n". + "googie.lang_chck_spell = \"%s\";\n". + "googie.lang_rsm_edt = \"%s\";\n". + "googie.lang_close = \"%s\";\n". + "googie.lang_revert = \"%s\";\n". + "googie.lang_no_error_found = \"%s\";\n". + "googie.lang_learn_word = \"%s\";\n". + "googie.setLanguages(%s);\n". + "googie.setCurrentLanguage('%s');\n". + "googie.setDecoration(false);\n". + "googie.decorateTextarea('%s');\n". + "%s.set_env('spellcheck', googie);", + $RCMAIL->output->get_skin_path(), + $RCMAIL->url(array('_task' => 'utils', '_action' => 'spell', '_remote' => 1)), + !empty($dictionary) ? 'true' : 'false', + rcube::JQ(rcube::Q($RCMAIL->gettext('checkspelling'))), + rcube::JQ(rcube::Q($RCMAIL->gettext('resumeediting'))), + rcube::JQ(rcube::Q($RCMAIL->gettext('close'))), + rcube::JQ(rcube::Q($RCMAIL->gettext('revertto'))), + rcube::JQ(rcube::Q($RCMAIL->gettext('nospellerrors'))), + rcube::JQ(rcube::Q($RCMAIL->gettext('addtodict'))), + rcube_output::json_serialize($spellcheck_langs), + $lang, + $attrib['id'], + rcmail_output::JS_OBJECT_NAME), 'foot'); + + $OUTPUT->add_label('checking'); + $OUTPUT->set_env('spellcheck_langs', join(',', $editor_lang_set)); } - else { - $lang = $_SESSION['language']; - - // if not found in the list, try with two-letter code - if (!$spellcheck_langs[$lang]) - $lang = strtolower(substr($lang, 0, 2)); - } - - if (!$spellcheck_langs[$lang]) - $lang = 'en'; - - $OUTPUT->set_env('spell_langs', $spellcheck_langs); - $OUTPUT->set_env('spell_lang', $lang); - - $editor_lang_set = array(); - foreach ($spellcheck_langs as $key => $name) { - $editor_lang_set[] = ($key == $lang ? '+' : '') . JQ($name).'='.JQ($key); - } - - // include GoogieSpell - $OUTPUT->include_script('googiespell.js'); - $OUTPUT->add_script(sprintf( - "var googie = new GoogieSpell('%s/images/googiespell/','%s&lang=', %s);\n". - "googie.lang_chck_spell = \"%s\";\n". - "googie.lang_rsm_edt = \"%s\";\n". - "googie.lang_close = \"%s\";\n". - "googie.lang_revert = \"%s\";\n". - "googie.lang_no_error_found = \"%s\";\n". - "googie.lang_learn_word = \"%s\";\n". - "googie.setLanguages(%s);\n". - "googie.setCurrentLanguage('%s');\n". - "googie.setDecoration(false);\n". - "googie.decorateTextarea('%s');\n". - "%s.set_env('spellcheck', googie);", - $RCMAIL->output->get_skin_path(), - $RCMAIL->url(array('_task' => 'utils', '_action' => 'spell', '_remote' => 1)), - !empty($dictionary) ? 'true' : 'false', - JQ(Q(rcube_label('checkspelling'))), - JQ(Q(rcube_label('resumeediting'))), - JQ(Q(rcube_label('close'))), - JQ(Q(rcube_label('revertto'))), - JQ(Q(rcube_label('nospellerrors'))), - JQ(Q(rcube_label('addtodict'))), - json_serialize($spellcheck_langs), - $lang, - $attrib['id'], - JS_OBJECT_NAME), 'foot'); - - $OUTPUT->add_label('checking'); - $OUTPUT->set_env('spellcheck_langs', join(',', $editor_lang_set)); - } - - $out .= "\n".'<iframe name="savetarget" src="program/resources/blank.gif" style="width:0;height:0;border:none;visibility:hidden;"></iframe>'; - - return $out; + + $out .= "\n".'<iframe name="savetarget" src="program/resources/blank.gif" style="width:0;height:0;border:none;visibility:hidden;"></iframe>'; + + return $out; } function rcmail_create_reply_body($body, $bodyIsHtml) { - global $RCMAIL, $MESSAGE, $LINE_LENGTH; - - // build reply prefix - $from = array_pop(rcube_mime::decode_address_list($MESSAGE->get_header('from'), 1, false, $MESSAGE->headers->charset)); - $prefix = rcube_label(array( - 'name' => 'mailreplyintro', - 'vars' => array( - 'date' => format_date($MESSAGE->headers->date, $RCMAIL->config->get('date_long')), - 'sender' => $from['name'] ? $from['name'] : rcube_idn_to_utf8($from['mailto']), - ) - )); - - if (!$bodyIsHtml) { - $body = preg_replace('/\r?\n/', "\n", $body); - $body = trim($body, "\n"); - - // soft-wrap and quote message text - $body = rcmail_wrap_and_quote($body, $LINE_LENGTH); - - $prefix .= "\n"; - $suffix = ''; - - if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting - $prefix = "\n\n\n" . $prefix; - } - } - else { - // save inline images to files - $cid_map = rcmail_write_inline_attachments($MESSAGE); - // set is_safe flag (we need this for html body washing) - rcmail_check_safe($MESSAGE); - // clean up html tags - $body = rcmail_wash_html($body, array('safe' => $MESSAGE->is_safe), $cid_map); - - // build reply (quote content) - $prefix = '<p>' . Q($prefix) . "</p>\n"; - $prefix .= '<blockquote>'; - - if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting - $prefix = '<br>' . $prefix; - $suffix = '</blockquote>'; + global $RCMAIL, $MESSAGE, $LINE_LENGTH; + + // build reply prefix + $from = array_pop(rcube_mime::decode_address_list($MESSAGE->get_header('from'), 1, false, $MESSAGE->headers->charset)); + $prefix = $RCMAIL->gettext(array( + 'name' => 'mailreplyintro', + 'vars' => array( + 'date' => $RCMAIL->format_date($MESSAGE->headers->date, $RCMAIL->config->get('date_long')), + 'sender' => $from['name'] ? $from['name'] : rcube_utils::idn_to_utf8($from['mailto']), + ) + )); + + if (!$bodyIsHtml) { + $body = preg_replace('/\r?\n/', "\n", $body); + $body = trim($body, "\n"); + + // soft-wrap and quote message text + $body = rcmail_wrap_and_quote($body, $LINE_LENGTH); + + $prefix .= "\n"; + $suffix = ''; + + if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting + $prefix = "\n\n\n" . $prefix; + } } else { - $suffix = '</blockquote><p></p>'; + // save inline images to files + $cid_map = rcmail_write_inline_attachments($MESSAGE); + // set is_safe flag (we need this for html body washing) + rcmail_check_safe($MESSAGE); + // clean up html tags + $body = rcmail_wash_html($body, array('safe' => $MESSAGE->is_safe), $cid_map); + + // build reply (quote content) + $prefix = '<p>' . rcube::Q($prefix) . "</p>\n"; + $prefix .= '<blockquote>'; + + if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting + $prefix = '<br>' . $prefix; + $suffix = '</blockquote>'; + } + else { + $suffix = '</blockquote><p></p>'; + } } - } - return $prefix.$body.$suffix; + return $prefix . $body . $suffix; } function rcmail_create_forward_body($body, $bodyIsHtml) { - global $RCMAIL, $MESSAGE, $COMPOSE; - - // add attachments - if (!isset($COMPOSE['forward_attachments']) && is_array($MESSAGE->mime_parts)) - $cid_map = rcmail_write_compose_attachments($MESSAGE, $bodyIsHtml); - - $date = format_date($MESSAGE->headers->date, $RCMAIL->config->get('date_long')); - - if (!$bodyIsHtml) { - $prefix = "\n\n\n-------- " . rcube_label('originalmessage') . " --------\n"; - $prefix .= rcube_label('subject') . ': ' . $MESSAGE->subject . "\n"; - $prefix .= rcube_label('date') . ': ' . $date . "\n"; - $prefix .= rcube_label('from') . ': ' . $MESSAGE->get_header('from') . "\n"; - $prefix .= rcube_label('to') . ': ' . $MESSAGE->get_header('to') . "\n"; - - if ($cc = $MESSAGE->headers->get('cc')) - $prefix .= rcube_label('cc') . ': ' . $cc . "\n"; - if (($replyto = $MESSAGE->headers->get('reply-to')) && $replyto != $MESSAGE->get_header('from')) - $prefix .= rcube_label('replyto') . ': ' . $replyto . "\n"; - - $prefix .= "\n"; - $body = trim($body, "\r\n"); - } - else { - // set is_safe flag (we need this for html body washing) - rcmail_check_safe($MESSAGE); - // clean up html tags - $body = rcmail_wash_html($body, array('safe' => $MESSAGE->is_safe), $cid_map); - - $prefix = sprintf( - "<br /><p>-------- " . rcube_label('originalmessage') . " --------</p>" . - "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tbody>" . - "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>" . - "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>" . - "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>" . - "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>", - rcube_label('subject'), Q($MESSAGE->subject), - rcube_label('date'), Q($date), - rcube_label('from'), Q($MESSAGE->get_header('from'), 'replace'), - rcube_label('to'), Q($MESSAGE->get_header('to'), 'replace')); - - if ($cc = $MESSAGE->headers->get('cc')) - $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>", - rcube_label('cc'), Q($cc, 'replace')); - - if (($replyto = $MESSAGE->headers->get('reply-to')) && $replyto != $MESSAGE->get_header('from')) - $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>", - rcube_label('replyto'), Q($replyto, 'replace')); - - $prefix .= "</tbody></table><br>"; - } - - return $prefix.$body; + global $RCMAIL, $MESSAGE, $COMPOSE; + + // add attachments + if (!isset($COMPOSE['forward_attachments']) && is_array($MESSAGE->mime_parts)) { + $cid_map = rcmail_write_compose_attachments($MESSAGE, $bodyIsHtml); + } + + $date = $RCMAIL->format_date($MESSAGE->headers->date, $RCMAIL->config->get('date_long')); + + if (!$bodyIsHtml) { + $prefix = "\n\n\n-------- " . $RCMAIL->gettext('originalmessage') . " --------\n"; + $prefix .= $RCMAIL->gettext('subject') . ': ' . $MESSAGE->subject . "\n"; + $prefix .= $RCMAIL->gettext('date') . ': ' . $date . "\n"; + $prefix .= $RCMAIL->gettext('from') . ': ' . $MESSAGE->get_header('from') . "\n"; + $prefix .= $RCMAIL->gettext('to') . ': ' . $MESSAGE->get_header('to') . "\n"; + + if ($cc = $MESSAGE->headers->get('cc')) { + $prefix .= $RCMAIL->gettext('cc') . ': ' . $cc . "\n"; + } + if (($replyto = $MESSAGE->headers->get('reply-to')) && $replyto != $MESSAGE->get_header('from')) { + $prefix .= $RCMAIL->gettext('replyto') . ': ' . $replyto . "\n"; + } + + $prefix .= "\n"; + $body = trim($body, "\r\n"); + } + else { + // set is_safe flag (we need this for html body washing) + rcmail_check_safe($MESSAGE); + + // clean up html tags + $body = rcmail_wash_html($body, array('safe' => $MESSAGE->is_safe), $cid_map); + + $prefix = sprintf( + "<br /><p>-------- " . $RCMAIL->gettext('originalmessage') . " --------</p>" . + "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tbody>" . + "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>" . + "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>" . + "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>" . + "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>", + $RCMAIL->gettext('subject'), rcube::Q($MESSAGE->subject), + $RCMAIL->gettext('date'), rcube::Q($date), + $RCMAIL->gettext('from'), rcube::Q($MESSAGE->get_header('from'), 'replace'), + $RCMAIL->gettext('to'), rcube::Q($MESSAGE->get_header('to'), 'replace')); + + if ($cc = $MESSAGE->headers->get('cc')) + $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>", + $RCMAIL->gettext('cc'), rcube::Q($cc, 'replace')); + + if (($replyto = $MESSAGE->headers->get('reply-to')) && $replyto != $MESSAGE->get_header('from')) + $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>", + $RCMAIL->gettext('replyto'), rcube::Q($replyto, 'replace')); + + $prefix .= "</tbody></table><br>"; + } + + return $prefix . $body; } function rcmail_create_draft_body($body, $bodyIsHtml) { - global $MESSAGE, $COMPOSE; + global $MESSAGE, $COMPOSE; - /** - * add attachments - * sizeof($MESSAGE->mime_parts can be 1 - e.g. attachment, but no text! - */ - if (empty($COMPOSE['forward_attachments']) - && is_array($MESSAGE->mime_parts) - && count($MESSAGE->mime_parts) > 0) - { - $cid_map = rcmail_write_compose_attachments($MESSAGE, $bodyIsHtml); - } + // add attachments + // sizeof($MESSAGE->mime_parts can be 1 - e.g. attachment, but no text! + if (empty($COMPOSE['forward_attachments']) + && is_array($MESSAGE->mime_parts) + && count($MESSAGE->mime_parts) > 0 + ) { + $cid_map = rcmail_write_compose_attachments($MESSAGE, $bodyIsHtml); + } - // clean up HTML tags - XSS prevention (#1489251) - if ($bodyIsHtml) { - $body = rcmail_wash_html($body, array('safe' => 1), $cid_map); + // clean up HTML tags - XSS prevention (#1489251) + if ($bodyIsHtml) { + $body = rcmail_wash_html($body, array('safe' => 1), $cid_map); - // remove comments (produced by washtml) - $body = preg_replace('/<!--[^>]+-->/', '', $body); + // remove comments (produced by washtml) + $body = preg_replace('/<!--[^>]+-->/', '', $body); - // replace cid with href in inline images links - if (!empty($cid_map)) { - $body = str_replace(array_keys($cid_map), array_values($cid_map), $body); + // replace cid with href in inline images links + if (!empty($cid_map)) { + $body = str_replace(array_keys($cid_map), array_values($cid_map), $body); + } } - } - return $body; + return $body; } function rcmail_remove_signature($body) { - global $RCMAIL; + global $RCMAIL; - $body = str_replace("\r\n", "\n", $body); - $len = strlen($body); - $sig_max_lines = $RCMAIL->config->get('sig_max_lines', 15); + $body = str_replace("\r\n", "\n", $body); + $len = strlen($body); + $sig_max_lines = $RCMAIL->config->get('sig_max_lines', 15); - while (($sp = strrpos($body, "-- \n", $sp ? -$len+$sp-1 : 0)) !== false) { - if ($sp == 0 || $body[$sp-1] == "\n") { - // do not touch blocks with more that X lines - if (substr_count($body, "\n", $sp) < $sig_max_lines) { - $body = substr($body, 0, max(0, $sp-1)); - } - break; + while (($sp = strrpos($body, "-- \n", $sp ? -$len+$sp-1 : 0)) !== false) { + if ($sp == 0 || $body[$sp-1] == "\n") { + // do not touch blocks with more that X lines + if (substr_count($body, "\n", $sp) < $sig_max_lines) { + $body = substr($body, 0, max(0, $sp-1)); + } + break; + } } - } - return $body; + return $body; } function rcmail_write_compose_attachments(&$message, $bodyIsHtml) { - global $RCMAIL, $COMPOSE, $compose_mode; - - $loaded_attachments = array(); - foreach ((array)$COMPOSE['attachments'] as $attachment) { - $loaded_attachments[$attachment['name'] . $attachment['mimetype']] = $attachment; - } - - $cid_map = array(); - $messages = array(); - - foreach ((array)$message->mime_parts as $pid => $part) - { - if ($part->disposition == 'attachment' || ($part->disposition == 'inline' && $bodyIsHtml) || $part->filename) { - // skip parts that aren't valid attachments - if ($part->ctype_primary == 'multipart' || $part->mimetype == 'application/ms-tnef') { - continue; - } - // skip message attachments in reply mode - if ($part->ctype_primary == 'message' && $compose_mode == RCUBE_COMPOSE_REPLY) { - continue; - } - // skip inline images when forwarding in text mode - if ($part->content_id && $part->disposition == 'inline' && !$bodyIsHtml && $compose_mode == RCUBE_COMPOSE_FORWARD) { - continue; - } - - // skip message/rfc822 attachments on forwards (#1489214) - // Thunderbird when forwarding in inline mode displays such attachments - // and skips any attachments from inside of such part, this however - // skipped e.g. images used in HTML body or other attachments. So, - // better to skip .eml attachments but not their content (included files). - if ($part->mimetype == 'message/rfc822') { - if ($compose_mode == RCUBE_COMPOSE_FORWARD) { - continue; - } - $messages[] = $part->mime_id; - } - else if ($compose_mode != RCUBE_COMPOSE_FORWARD) { - // skip attachments included in message/rfc822 attachment (#1486487) - foreach ($messages as $mimeid) - if (strpos($part->mime_id, $mimeid . '.') === 0) { - continue 2; - } - } - - if (($attachment = $loaded_attachments[rcmail_attachment_name($part) . $part->mimetype]) - || ($attachment = rcmail_save_attachment($message, $pid))) { - $COMPOSE['attachments'][$attachment['id']] = $attachment; - if ($bodyIsHtml && ($part->content_id || $part->content_location)) { - $url = sprintf('%s&_id=%s&_action=display-attachment&_file=rcmfile%s', - $RCMAIL->comm_path, $COMPOSE['id'], $attachment['id']); - if ($part->content_id) - $cid_map['cid:'.$part->content_id] = $url; - else - $cid_map[$part->content_location] = $url; + global $RCMAIL, $COMPOSE, $compose_mode; + + $loaded_attachments = array(); + foreach ((array)$COMPOSE['attachments'] as $attachment) { + $loaded_attachments[$attachment['name'] . $attachment['mimetype']] = $attachment; + } + + $cid_map = array(); + $messages = array(); + + foreach ((array)$message->mime_parts as $pid => $part) { + if ($part->disposition == 'attachment' || ($part->disposition == 'inline' && $bodyIsHtml) || $part->filename) { + // skip parts that aren't valid attachments + if ($part->ctype_primary == 'multipart' || $part->mimetype == 'application/ms-tnef') { + continue; + } + + // skip message attachments in reply mode + if ($part->ctype_primary == 'message' && $compose_mode == RCUBE_COMPOSE_REPLY) { + continue; + } + + // skip inline images when forwarding in text mode + if ($part->content_id && $part->disposition == 'inline' && !$bodyIsHtml && $compose_mode == RCUBE_COMPOSE_FORWARD) { + continue; + } + + // skip message/rfc822 attachments on forwards (#1489214) + // Thunderbird when forwarding in inline mode displays such attachments + // and skips any attachments from inside of such part, this however + // skipped e.g. images used in HTML body or other attachments. So, + // better to skip .eml attachments but not their content (included files). + if ($part->mimetype == 'message/rfc822') { + if ($compose_mode == RCUBE_COMPOSE_FORWARD) { + continue; + } + $messages[] = $part->mime_id; + } + else if ($compose_mode != RCUBE_COMPOSE_FORWARD) { + // skip attachments included in message/rfc822 attachment (#1486487) + foreach ($messages as $mimeid) { + if (strpos($part->mime_id, $mimeid . '.') === 0) { + continue 2; + } + } + } + + if (($attachment = $loaded_attachments[rcmail_attachment_name($part) . $part->mimetype]) + || ($attachment = rcmail_save_attachment($message, $pid)) + ) { + $COMPOSE['attachments'][$attachment['id']] = $attachment; + + if ($bodyIsHtml && ($part->content_id || $part->content_location)) { + $url = sprintf('%s&_id=%s&_action=display-attachment&_file=rcmfile%s', + $RCMAIL->comm_path, $COMPOSE['id'], $attachment['id']); + + if ($part->content_id) + $cid_map['cid:'.$part->content_id] = $url; + else + $cid_map[$part->content_location] = $url; + } + } } - } } - } - $COMPOSE['forward_attachments'] = true; + $COMPOSE['forward_attachments'] = true; - return $cid_map; + return $cid_map; } function rcmail_write_inline_attachments(&$message) { - global $RCMAIL, $COMPOSE; - - $cid_map = array(); - foreach ((array)$message->mime_parts as $pid => $part) { - if (($part->content_id || $part->content_location) && $part->filename) { - if ($attachment = rcmail_save_attachment($message, $pid)) { - $COMPOSE['attachments'][$attachment['id']] = $attachment; - $url = sprintf('%s&_id=%s&_action=display-attachment&_file=rcmfile%s', - $RCMAIL->comm_path, $COMPOSE['id'], $attachment['id']); - if ($part->content_id) - $cid_map['cid:'.$part->content_id] = $url; - else - $cid_map[$part->content_location] = $url; - } + global $RCMAIL, $COMPOSE; + + $cid_map = array(); + foreach ((array)$message->mime_parts as $pid => $part) { + if (($part->content_id || $part->content_location) && $part->filename) { + if ($attachment = rcmail_save_attachment($message, $pid)) { + $COMPOSE['attachments'][$attachment['id']] = $attachment; + $url = sprintf('%s&_id=%s&_action=display-attachment&_file=rcmfile%s', + $RCMAIL->comm_path, $COMPOSE['id'], $attachment['id']); + + if ($part->content_id) + $cid_map['cid:'.$part->content_id] = $url; + else + $cid_map[$part->content_location] = $url; + } + } } - } - return $cid_map; + return $cid_map; } // Creates attachment(s) from the forwarded message(s) function rcmail_write_forward_attachments() { - global $RCMAIL, $COMPOSE, $MESSAGE; + global $RCMAIL, $COMPOSE, $MESSAGE; - $storage = $RCMAIL->get_storage(); - $mem_limit = parse_bytes(ini_get('memory_limit')); - $curr_mem = function_exists('memory_get_usage') ? memory_get_usage() : 16*1024*1024; // safe value: 16MB - $names = array(); + $storage = $RCMAIL->get_storage(); + $names = array(); - $loaded_attachments = array(); - foreach ((array)$COMPOSE['attachments'] as $attachment) { - $loaded_attachments[$attachment['name'] . $attachment['mimetype']] = $attachment; - } + $loaded_attachments = array(); + foreach ((array)$COMPOSE['attachments'] as $attachment) { + $loaded_attachments[$attachment['name'] . $attachment['mimetype']] = $attachment; + } - if ($COMPOSE['forward_uid'] == '*') { - $index = $storage->index(null, rcmail_sort_column(), rcmail_sort_order()); - $COMPOSE['forward_uid'] = $index->get(); - } - else { - $COMPOSE['forward_uid'] = explode(',', $COMPOSE['forward_uid']); - } + if ($COMPOSE['forward_uid'] == '*') { + $index = $storage->index(null, rcmail_sort_column(), rcmail_sort_order()); + $COMPOSE['forward_uid'] = $index->get(); + } + else if (strpos($COMPOSE['forward_uid'], ':')) { + $COMPOSE['forward_uid'] = rcube_imap_generic::uncompressMessageSet($COMPOSE['forward_uid']); + } + else { + $COMPOSE['forward_uid'] = explode(',', $COMPOSE['forward_uid']); + } - foreach ((array)$COMPOSE['forward_uid'] as $uid) { - $message = new rcube_message($uid); + foreach ((array)$COMPOSE['forward_uid'] as $uid) { + $message = new rcube_message($uid); - if (empty($message->headers)) { - continue; - } + if (empty($message->headers)) { + continue; + } - if (!empty($message->headers->charset)) { - $storage->set_charset($message->headers->charset); - } + if (!empty($message->headers->charset)) { + $storage->set_charset($message->headers->charset); + } - if (empty($MESSAGE->subject)) { - $MESSAGE->subject = $message->subject; - } + if (empty($MESSAGE->subject)) { + $MESSAGE->subject = $message->subject; + } - // generate (unique) attachment name - $name = strlen($message->subject) ? mb_substr($message->subject, 0, 64) : 'message_rfc822'; - if (!empty($names[$name])) { - $names[$name]++; - $name .= '_' . $names[$name]; - } - $names[$name] = 1; - $name .= '.eml'; + // generate (unique) attachment name + $name = strlen($message->subject) ? mb_substr($message->subject, 0, 64) : 'message_rfc822'; + if (!empty($names[$name])) { + $names[$name]++; + $name .= '_' . $names[$name]; + } + $names[$name] = 1; + $name .= '.eml'; + + $data = $path = null; + + if (!empty($loaded_attachments[$name . 'message/rfc822'])) { + continue; + } + + // don't load too big attachments into memory + if (!rcube_utils::mem_check($message->size)) { + $temp_dir = unslashify($RCMAIL->config->get('temp_dir')); + $path = tempnam($temp_dir, 'rcmAttmnt'); + if ($fp = fopen($path, 'w')) { + $storage->get_raw_body($message->uid, $fp); + fclose($fp); + } + else { + return false; + } + } + else { + $data = $storage->get_raw_body($message->uid); + $curr_mem += $message->size; + } - $data = $path = null; + $attachment = array( + 'group' => $COMPOSE['id'], + 'name' => $name, + 'mimetype' => 'message/rfc822', + 'data' => $data, + 'path' => $path, + 'size' => $path ? filesize($path) : strlen($data), + ); + + $attachment = $RCMAIL->plugins->exec_hook('attachment_save', $attachment); - if (!empty($loaded_attachments[$name . 'message/rfc822'])) { - continue; + if ($attachment['status']) { + unset($attachment['data'], $attachment['status'], $attachment['content_id'], $attachment['abort']); + $COMPOSE['attachments'][$attachment['id']] = $attachment; + } + else if ($path) { + @unlink($path); + } } +} + + +function rcmail_save_attachment(&$message, $pid) +{ + global $COMPOSE; + + $rcmail = rcmail::get_instance(); + $part = $message->mime_parts[$pid]; + $data = $path = null; // don't load too big attachments into memory - if ($mem_limit > 0 && $message->size > $mem_limit - $curr_mem) { - $temp_dir = unslashify($RCMAIL->config->get('temp_dir')); - $path = tempnam($temp_dir, 'rcmAttmnt'); - if ($fp = fopen($path, 'w')) { - $storage->get_raw_body($message->uid, $fp); - fclose($fp); - } - else { - return false; - } + if (!rcube_utils::mem_check($part->size)) { + $temp_dir = unslashify($rcmail->config->get('temp_dir')); + $path = tempnam($temp_dir, 'rcmAttmnt'); + + if ($fp = fopen($path, 'w')) { + $message->get_part_content($pid, $fp, true, 0, false); + fclose($fp); + } + else { + return false; + } } else { - $data = $storage->get_raw_body($message->uid); - $curr_mem += $message->size; + $data = $message->get_part_content($pid, null, true, 0, false); } + $mimetype = $part->ctype_primary . '/' . $part->ctype_secondary; + $filename = rcmail_attachment_name($part); + $attachment = array( - 'group' => $COMPOSE['id'], - 'name' => $name, - 'mimetype' => 'message/rfc822', - 'data' => $data, - 'path' => $path, - 'size' => $path ? filesize($path) : strlen($data), + 'group' => $COMPOSE['id'], + 'name' => $filename, + 'mimetype' => $mimetype, + 'content_id' => $part->content_id, + 'data' => $data, + 'path' => $path, + 'size' => $path ? filesize($path) : strlen($data), ); - $attachment = $RCMAIL->plugins->exec_hook('attachment_save', $attachment); + $attachment = $rcmail->plugins->exec_hook('attachment_save', $attachment); if ($attachment['status']) { - unset($attachment['data'], $attachment['status'], $attachment['content_id'], $attachment['abort']); - $COMPOSE['attachments'][$attachment['id']] = $attachment; + unset($attachment['data'], $attachment['status'], $attachment['content_id'], $attachment['abort']); + return $attachment; } else if ($path) { - @unlink($path); + @unlink($path); } - } -} - -function rcmail_save_attachment(&$message, $pid) -{ - global $COMPOSE; - - $rcmail = rcmail::get_instance(); - $part = $message->mime_parts[$pid]; - $mem_limit = parse_bytes(ini_get('memory_limit')); - $curr_mem = function_exists('memory_get_usage') ? memory_get_usage() : 16*1024*1024; // safe value: 16MB - $data = $path = null; - - // don't load too big attachments into memory - if ($mem_limit > 0 && $part->size > $mem_limit - $curr_mem) { - $temp_dir = unslashify($rcmail->config->get('temp_dir')); - $path = tempnam($temp_dir, 'rcmAttmnt'); - if ($fp = fopen($path, 'w')) { - $message->get_part_content($pid, $fp); - fclose($fp); - } else - return false; - } else { - $data = $message->get_part_content($pid); - } - - $mimetype = $part->ctype_primary . '/' . $part->ctype_secondary; - $filename = rcmail_attachment_name($part); - - $attachment = array( - 'group' => $COMPOSE['id'], - 'name' => $filename, - 'mimetype' => $mimetype, - 'content_id' => $part->content_id, - 'data' => $data, - 'path' => $path, - 'size' => $path ? filesize($path) : strlen($data), - ); - - $attachment = $rcmail->plugins->exec_hook('attachment_save', $attachment); - - if ($attachment['status']) { - unset($attachment['data'], $attachment['status'], $attachment['content_id'], $attachment['abort']); - return $attachment; - } else if ($path) { - @unlink($path); - } - - return false; + return false; } function rcmail_save_image($path, $mimetype='') { - global $COMPOSE; + global $COMPOSE; - // handle attachments in memory - $data = file_get_contents($path); - $name = rcmail_basename($path); + // handle attachments in memory + $data = file_get_contents($path); + $name = rcmail_basename($path); - $attachment = array( - 'group' => $COMPOSE['id'], - 'name' => $name, - 'mimetype' => $mimetype ? $mimetype : rc_mime_content_type($path, $name), - 'data' => $data, - 'size' => strlen($data), - ); + $attachment = array( + 'group' => $COMPOSE['id'], + 'name' => $name, + 'mimetype' => $mimetype ? $mimetype : rcube_mime::file_content_type($path, $name), + 'data' => $data, + 'size' => strlen($data), + ); - $attachment = rcmail::get_instance()->plugins->exec_hook('attachment_save', $attachment); + $attachment = rcmail::get_instance()->plugins->exec_hook('attachment_save', $attachment); - if ($attachment['status']) { - unset($attachment['data'], $attachment['status'], $attachment['content_id'], $attachment['abort']); - return $attachment; - } + if ($attachment['status']) { + unset($attachment['data'], $attachment['status'], $attachment['content_id'], $attachment['abort']); + return $attachment; + } - return false; + return false; } function rcmail_basename($filename) { - // basename() is not unicode safe and locale dependent - if (stristr(PHP_OS, 'win') || stristr(PHP_OS, 'netware')) { - return preg_replace('/^.*[\\\\\\/]/', '', $filename); - } else { - return preg_replace('/^.*[\/]/', '', $filename); - } + // basename() is not unicode safe and locale dependent + if (stristr(PHP_OS, 'win') || stristr(PHP_OS, 'netware')) { + return preg_replace('/^.*[\\\\\\/]/', '', $filename); + } + else { + return preg_replace('/^.*[\/]/', '', $filename); + } } function rcmail_compose_subject($attrib) { - global $MESSAGE, $COMPOSE, $compose_mode; + global $MESSAGE, $COMPOSE, $compose_mode; - list($form_start, $form_end) = get_form_tags($attrib); - unset($attrib['form']); + list($form_start, $form_end) = get_form_tags($attrib); + unset($attrib['form']); - $attrib['name'] = '_subject'; - $attrib['spellcheck'] = 'true'; - $textfield = new html_inputfield($attrib); + $attrib['name'] = '_subject'; + $attrib['spellcheck'] = 'true'; - $subject = ''; + $textfield = new html_inputfield($attrib); + $subject = ''; - // use subject from post - if (isset($_POST['_subject'])) { - $subject = get_input_value('_subject', RCUBE_INPUT_POST, TRUE); - } - // create a reply-subject - else if ($compose_mode == RCUBE_COMPOSE_REPLY) { - if (preg_match('/^re:/i', $MESSAGE->subject)) - $subject = $MESSAGE->subject; - else - $subject = 'Re: '.$MESSAGE->subject; - } - // create a forward-subject - else if ($compose_mode == RCUBE_COMPOSE_FORWARD) { - if (preg_match('/^fwd:/i', $MESSAGE->subject)) - $subject = $MESSAGE->subject; - else - $subject = 'Fwd: '.$MESSAGE->subject; - } - // creeate a draft-subject - else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { - $subject = $MESSAGE->subject; - } - else if (!empty($COMPOSE['param']['subject'])) { - $subject = $COMPOSE['param']['subject']; - } - - $out = $form_start ? "$form_start\n" : ''; - $out .= $textfield->show($subject); - $out .= $form_end ? "\n$form_end" : ''; - - return $out; + // use subject from post + if (isset($_POST['_subject'])) { + $subject = rcube_utils::get_input_value('_subject', rcube_utils::INPUT_POST, TRUE); + } + // create a reply-subject + else if ($compose_mode == RCUBE_COMPOSE_REPLY) { + if (preg_match('/^re:/i', $MESSAGE->subject)) + $subject = $MESSAGE->subject; + else + $subject = 'Re: '.$MESSAGE->subject; + } + // create a forward-subject + else if ($compose_mode == RCUBE_COMPOSE_FORWARD) { + if (preg_match('/^fwd:/i', $MESSAGE->subject)) + $subject = $MESSAGE->subject; + else + $subject = 'Fwd: '.$MESSAGE->subject; + } + // creeate a draft-subject + else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { + $subject = $MESSAGE->subject; + } + else if (!empty($COMPOSE['param']['subject'])) { + $subject = $COMPOSE['param']['subject']; + } + + $out = $form_start ? "$form_start\n" : ''; + $out .= $textfield->show($subject); + $out .= $form_end ? "\n$form_end" : ''; + + return $out; } function rcmail_compose_attachment_list($attrib) { - global $OUTPUT, $CONFIG, $COMPOSE; - - // add ID if not given - if (!$attrib['id']) - $attrib['id'] = 'rcmAttachmentList'; - - $out = "\n"; - $jslist = array(); - $button = ''; - - if (is_array($COMPOSE['attachments'])) { - if ($attrib['deleteicon']) { - $button = html::img(array( - 'src' => $CONFIG['skin_path'] . $attrib['deleteicon'], - 'alt' => rcube_label('delete') - )); - } - else if (rcube_utils::get_boolean($attrib['textbuttons'])) { - $button = Q(rcube_label('delete')); - } - - foreach ($COMPOSE['attachments'] as $id => $a_prop) { - if (empty($a_prop)) - continue; - - $out .= html::tag('li', - array( - 'id' => 'rcmfile'.$id, - 'class' => rcmail_filetype2classname($a_prop['mimetype'], $a_prop['name']), - 'onmouseover' => "rcube_webmail.long_subject_title_ex(this, 0)", - ), - html::a(array( - 'href' => "#delete", - 'title' => rcube_label('delete'), - 'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", JS_OBJECT_NAME, $id), - 'class' => 'delete' - ), - $button - ) . Q($a_prop['name']) - ); - - $jslist['rcmfile'.$id] = array('name' => $a_prop['name'], 'complete' => true, 'mimetype' => $a_prop['mimetype']); - } - } - - if ($attrib['deleteicon']) - $COMPOSE['deleteicon'] = $CONFIG['skin_path'] . $attrib['deleteicon']; - else if (rcube_utils::get_boolean($attrib['textbuttons'])) - $COMPOSE['textbuttons'] = true; - if ($attrib['cancelicon']) - $OUTPUT->set_env('cancelicon', $CONFIG['skin_path'] . $attrib['cancelicon']); - if ($attrib['loadingicon']) - $OUTPUT->set_env('loadingicon', $CONFIG['skin_path'] . $attrib['loadingicon']); - - $OUTPUT->set_env('attachments', $jslist); - $OUTPUT->add_gui_object('attachmentlist', $attrib['id']); - - return html::tag('ul', $attrib, $out, html::$common_attrib); + global $RCMAIL, $OUTPUT, $COMPOSE; + + // add ID if not given + if (!$attrib['id']) + $attrib['id'] = 'rcmAttachmentList'; + + $out = "\n"; + $jslist = array(); + $button = ''; + $skin_path = $RCMAIL->config->get('skin_path'); + + if (is_array($COMPOSE['attachments'])) { + if ($attrib['deleteicon']) { + $button = html::img(array( + 'src' => $skin_path . $attrib['deleteicon'], + 'alt' => $RCMAIL->gettext('delete') + )); + } + else if (rcube_utils::get_boolean($attrib['textbuttons'])) { + $button = rcube::Q($RCMAIL->gettext('delete')); + } + + foreach ($COMPOSE['attachments'] as $id => $a_prop) { + if (empty($a_prop)) { + continue; + } + + $out .= html::tag('li', array( + 'id' => 'rcmfile'.$id, + 'class' => rcube_utils::file2class($a_prop['mimetype'], $a_prop['name']), + 'onmouseover' => "rcube_webmail.long_subject_title_ex(this, 0)", + ), + html::a(array( + 'href' => "#delete", + 'title' => $RCMAIL->gettext('delete'), + 'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", rcmail_output::JS_OBJECT_NAME, $id), + 'class' => 'delete' + ), + $button + ) . rcube::Q($a_prop['name']) + ); + + $jslist['rcmfile'.$id] = array( + 'name' => $a_prop['name'], + 'complete' => true, + 'mimetype' => $a_prop['mimetype'] + ); + } + } + + if ($attrib['deleteicon']) + $COMPOSE['deleteicon'] = $skin_path . $attrib['deleteicon']; + else if (rcube_utils::get_boolean($attrib['textbuttons'])) + $COMPOSE['textbuttons'] = true; + if ($attrib['cancelicon']) + $OUTPUT->set_env('cancelicon', $skin_path . $attrib['cancelicon']); + if ($attrib['loadingicon']) + $OUTPUT->set_env('loadingicon', $skin_path . $attrib['loadingicon']); + + $OUTPUT->set_env('attachments', $jslist); + $OUTPUT->add_gui_object('attachmentlist', $attrib['id']); + + return html::tag('ul', $attrib, $out, html::$common_attrib); } function rcmail_compose_attachment_form($attrib) { - global $OUTPUT; + global $OUTPUT, $RCMAIL; - // set defaults - $attrib += array('id' => 'rcmUploadbox', 'buttons' => 'yes'); + // set defaults + $attrib += array('id' => 'rcmUploadbox', 'buttons' => 'yes'); - // Get filesize, enable upload progress bar - $max_filesize = rcube_upload_init(); + // Get filesize, enable upload progress bar + $max_filesize = $RCMAIL->upload_init(); - $button = new html_inputfield(array('type' => 'button')); + $button = new html_inputfield(array('type' => 'button')); + $content = html::div(null, rcmail_compose_attachment_field()) + . html::div('hint', $RCMAIL->gettext(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))); - $out = html::div($attrib, - $OUTPUT->form_tag(array('id' => $attrib['id'].'Frm', 'name' => 'uploadform', 'method' => 'post', 'enctype' => 'multipart/form-data'), - html::div(null, rcmail_compose_attachment_field()) . - html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) . - (get_boolean($attrib['buttons']) ? html::div('buttons', - $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) . ' ' . - $button->show(rcube_label('upload'), array('class' => 'button mainaction', 'onclick' => JS_OBJECT_NAME . ".command('send-attachment', this.form)")) - ) : '') - ) - ); + if (rcube_utils::get_boolean($attrib['buttons'])) { + $content .= html::div('buttons', + $button->show($RCMAIL->gettext('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) . ' ' . + $button->show($RCMAIL->gettext('upload'), array('class' => 'button mainaction', 'onclick' => rcmail_output::JS_OBJECT_NAME . ".command('send-attachment', this.form)")) + ); + } + + $out = html::div($attrib, $OUTPUT->form_tag(array( + 'id' => $attrib['id'] . 'Frm', + 'name' => 'uploadform', + 'method' => 'post', + 'enctype' => 'multipart/form-data' + ), $content + )); - $OUTPUT->add_gui_object('uploadform', $attrib['id'].'Frm'); - return $out; + $OUTPUT->add_gui_object('uploadform', $attrib['id'] . 'Frm'); + + return $out; } function rcmail_compose_attachment_field($attrib = array()) { - $attrib['type'] = 'file'; - $attrib['name'] = '_attachments[]'; - $attrib['multiple'] = 'multiple'; + $attrib['type'] = 'file'; + $attrib['name'] = '_attachments[]'; + $attrib['multiple'] = 'multiple'; + + $field = new html_inputfield($attrib); - $field = new html_inputfield($attrib); - return $field->show(); + return $field->show(); } function rcmail_priority_selector($attrib) { - global $MESSAGE; + global $RCMAIL, $MESSAGE; - list($form_start, $form_end) = get_form_tags($attrib); - unset($attrib['form']); + list($form_start, $form_end) = get_form_tags($attrib); + unset($attrib['form']); - $attrib['name'] = '_priority'; - $selector = new html_select($attrib); + $attrib['name'] = '_priority'; + $prio_list = array( + $RCMAIL->gettext('lowest') => 5, + $RCMAIL->gettext('low') => 4, + $RCMAIL->gettext('normal') => 0, + $RCMAIL->gettext('high') => 2, + $RCMAIL->gettext('highest') => 1, + ); - $selector->add(array(rcube_label('lowest'), - rcube_label('low'), - rcube_label('normal'), - rcube_label('high'), - rcube_label('highest')), - array('5', '4', '0', '2', '1')); + $selector = new html_select($attrib); + $selector->add(array_keys($prio_list), array_values($prio_list)); - if (isset($_POST['_priority'])) - $sel = $_POST['_priority']; - else if (isset($MESSAGE->headers->priority) && intval($MESSAGE->headers->priority) != 3) - $sel = $MESSAGE->headers->priority; - else - $sel = 0; + if (isset($_POST['_priority'])) + $sel = $_POST['_priority']; + else if (isset($MESSAGE->headers->priority) && intval($MESSAGE->headers->priority) != 3) + $sel = $MESSAGE->headers->priority; + else + $sel = 0; - $out = $form_start ? "$form_start\n" : ''; - $out .= $selector->show(strval($sel)); - $out .= $form_end ? "\n$form_end" : ''; + $out = $form_start ? "$form_start\n" : ''; + $out .= $selector->show((int) $sel); + $out .= $form_end ? "\n$form_end" : ''; - return $out; + return $out; } function rcmail_receipt_checkbox($attrib) { - global $RCMAIL, $MESSAGE, $compose_mode; + global $RCMAIL, $MESSAGE, $compose_mode; - list($form_start, $form_end) = get_form_tags($attrib); - unset($attrib['form']); + list($form_start, $form_end) = get_form_tags($attrib); + unset($attrib['form']); - if (!isset($attrib['id'])) - $attrib['id'] = 'receipt'; + if (!isset($attrib['id'])) + $attrib['id'] = 'receipt'; - $attrib['name'] = '_receipt'; - $attrib['value'] = '1'; - $checkbox = new html_checkbox($attrib); + $attrib['name'] = '_receipt'; + $attrib['value'] = '1'; - if (isset($_POST['_receipt'])) - $mdn_default = $_POST['_receipt']; - else if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))) - $mdn_default = (bool) $MESSAGE->headers->mdn_to; - else - $mdn_default = $RCMAIL->config->get('mdn_default'); + $checkbox = new html_checkbox($attrib); - $out = $form_start ? "$form_start\n" : ''; - $out .= $checkbox->show($mdn_default); - $out .= $form_end ? "\n$form_end" : ''; + if (isset($_POST['_receipt'])) + $mdn_default = $_POST['_receipt']; + else if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))) + $mdn_default = (bool) $MESSAGE->headers->mdn_to; + else + $mdn_default = $RCMAIL->config->get('mdn_default'); + + $out = $form_start ? "$form_start\n" : ''; + $out .= $checkbox->show($mdn_default); + $out .= $form_end ? "\n$form_end" : ''; - return $out; + return $out; } function rcmail_dsn_checkbox($attrib) { - global $RCMAIL; + global $RCMAIL; - list($form_start, $form_end) = get_form_tags($attrib); - unset($attrib['form']); + list($form_start, $form_end) = get_form_tags($attrib); + unset($attrib['form']); - if (!isset($attrib['id'])) - $attrib['id'] = 'dsn'; + if (!isset($attrib['id'])) + $attrib['id'] = 'dsn'; - $attrib['name'] = '_dsn'; - $attrib['value'] = '1'; - $checkbox = new html_checkbox($attrib); + $attrib['name'] = '_dsn'; + $attrib['value'] = '1'; - if (isset($_POST['_dsn'])) - $dsn_value = $_POST['_dsn']; - else - $dsn_value = $RCMAIL->config->get('dsn_default'); + $checkbox = new html_checkbox($attrib); - $out = $form_start ? "$form_start\n" : ''; - $out .= $checkbox->show($dsn_value); - $out .= $form_end ? "\n$form_end" : ''; + if (isset($_POST['_dsn'])) + $dsn_value = (int) $_POST['_dsn']; + else + $dsn_value = $RCMAIL->config->get('dsn_default'); - return $out; + $out = $form_start ? "$form_start\n" : ''; + $out .= $checkbox->show($dsn_value); + $out .= $form_end ? "\n$form_end" : ''; + + return $out; } function rcmail_editor_selector($attrib) { - // determine whether HTML or plain text should be checked - $useHtml = rcmail_compose_editor_mode(); + global $RCMAIL; - if (empty($attrib['editorid'])) - $attrib['editorid'] = 'rcmComposeBody'; + // determine whether HTML or plain text should be checked + $useHtml = rcmail_compose_editor_mode(); - if (empty($attrib['name'])) - $attrib['name'] = 'editorSelect'; + if (empty($attrib['editorid'])) + $attrib['editorid'] = 'rcmComposeBody'; - $attrib['onchange'] = "return rcmail_toggle_editor(this, '".$attrib['editorid']."', '_is_html')"; + if (empty($attrib['name'])) + $attrib['name'] = 'editorSelect'; - $select = new html_select($attrib); + $attrib['onchange'] = "return rcmail_toggle_editor(this, '".$attrib['editorid']."', '_is_html')"; - $select->add(Q(rcube_label('htmltoggle')), 'html'); - $select->add(Q(rcube_label('plaintoggle')), 'plain'); + $select = new html_select($attrib); - return $select->show($useHtml ? 'html' : 'plain'); -/* - foreach ($choices as $value => $text) { - $attrib['id'] = '_' . $value; - $attrib['value'] = $value; - $selector .= $radio->show($chosenvalue, $attrib) . html::label($attrib['id'], Q(rcube_label($text))); - } + $select->add(rcube::Q($RCMAIL->gettext('htmltoggle')), 'html'); + $select->add(rcube::Q($RCMAIL->gettext('plaintoggle')), 'plain'); - return $selector; -*/ + return $select->show($useHtml ? 'html' : 'plain'); } function rcmail_store_target_selection($attrib) { - global $COMPOSE; - - $attrib['name'] = '_store_target'; - $select = rcmail_mailbox_select(array_merge($attrib, array( - 'noselection' => '- '.rcube_label('dontsave').' -', - 'folder_filter' => 'mail', - 'folder_rights' => 'w', - ))); - return $select->show(isset($_POST['_store_target']) ? $_POST['_store_target'] : $COMPOSE['param']['sent_mbox'], $attrib); + global $COMPOSE, $RCMAIL; + + $attrib['name'] = '_store_target'; + $select = $RCMAIL->folder_selector(array_merge($attrib, array( + 'noselection' => '- ' . $RCMAIL->gettext('dontsave') . ' -', + 'folder_filter' => 'mail', + 'folder_rights' => 'w', + ))); + + return $select->show(isset($_POST['_store_target']) ? $_POST['_store_target'] : $COMPOSE['param']['sent_mbox'], $attrib); } function rcmail_check_sent_folder($folder, $create=false) { - global $RCMAIL; + global $RCMAIL; - // we'll not save the message, so it doesn't matter - if ($RCMAIL->config->get('no_save_sent_messages')) { - return true; - } + // we'll not save the message, so it doesn't matter + if ($RCMAIL->config->get('no_save_sent_messages')) { + return true; + } - if ($RCMAIL->storage->folder_exists($folder, true)) { - return true; - } + if ($RCMAIL->storage->folder_exists($folder, true)) { + return true; + } - // folder may exist but isn't subscribed (#1485241) - if ($create) { - if (!$RCMAIL->storage->folder_exists($folder)) - return $RCMAIL->storage->create_folder($folder, true); - else - return $RCMAIL->storage->subscribe($folder); - } + // folder may exist but isn't subscribed (#1485241) + if ($create) { + if (!$RCMAIL->storage->folder_exists($folder)) + return $RCMAIL->storage->create_folder($folder, true); + else + return $RCMAIL->storage->subscribe($folder); + } - return false; + return false; } function get_form_tags($attrib) { - global $RCMAIL, $MESSAGE_FORM, $COMPOSE; + global $RCMAIL, $MESSAGE_FORM, $COMPOSE; - $form_start = ''; - if (!$MESSAGE_FORM) - { - $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $RCMAIL->task)); - $hiddenfields->add(array('name' => '_action', 'value' => 'send')); - $hiddenfields->add(array('name' => '_id', 'value' => $COMPOSE['id'])); - $hiddenfields->add(array('name' => '_attachments')); + $form_start = ''; + if (!$MESSAGE_FORM) { + $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $RCMAIL->task)); + $hiddenfields->add(array('name' => '_action', 'value' => 'send')); + $hiddenfields->add(array('name' => '_id', 'value' => $COMPOSE['id'])); + $hiddenfields->add(array('name' => '_attachments')); - $form_start = empty($attrib['form']) ? $RCMAIL->output->form_tag(array('name' => "form", 'method' => "post")) : ''; - $form_start .= $hiddenfields->show(); - } + $form_start = empty($attrib['form']) ? $RCMAIL->output->form_tag(array('name' => "form", 'method' => "post")) : ''; + $form_start .= $hiddenfields->show(); + } - $form_end = ($MESSAGE_FORM && !strlen($attrib['form'])) ? '</form>' : ''; - $form_name = !empty($attrib['form']) ? $attrib['form'] : 'form'; + $form_end = ($MESSAGE_FORM && !strlen($attrib['form'])) ? '</form>' : ''; + $form_name = !empty($attrib['form']) ? $attrib['form'] : 'form'; - if (!$MESSAGE_FORM) - $RCMAIL->output->add_gui_object('messageform', $form_name); + if (!$MESSAGE_FORM) + $RCMAIL->output->add_gui_object('messageform', $form_name); - $MESSAGE_FORM = $form_name; + $MESSAGE_FORM = $form_name; - return array($form_start, $form_end); + return array($form_start, $form_end); } @@ -1703,11 +1770,11 @@ function rcmail_addressbook_list($attrib = array()) 'id' => 'rcmli%s', 'class' => '%s'), html::a(array('href' => '#list', 'rel' => '%s', - 'onclick' => "return ".JS_OBJECT_NAME.".command('list-adresses','%s',this)"), '%s')); + 'onclick' => "return ".rcmail_output::JS_OBJECT_NAME.".command('list-adresses','%s',this)"), '%s')); foreach ($RCMAIL->get_address_sources(false, true) as $j => $source) { $id = strval(strlen($source['id']) ? $source['id'] : $j); - $js_id = JQ($id); + $js_id = rcube::JQ($id); // set class name(s) $class_name = 'addressbook'; @@ -1715,7 +1782,7 @@ function rcmail_addressbook_list($attrib = array()) $class_name .= ' ' . $source['class_name']; $out .= sprintf($line_templ, - html_identifier($id,true), + rcube_utils::html_identifier($id,true), $class_name, $source['id'], $js_id, (!empty($source['name']) ? $source['name'] : $id)); @@ -1729,7 +1796,7 @@ function rcmail_addressbook_list($attrib = array()) // return the contacts list as HTML table function rcmail_contacts_list($attrib = array()) { - global $OUTPUT; + global $RCMAIL, $OUTPUT; $attrib += array('id' => 'rcmAddressList'); @@ -1739,7 +1806,7 @@ function rcmail_contacts_list($attrib = array()) $OUTPUT->set_env('current_page', 0); $OUTPUT->include_script('list.js'); - return rcube_table_output($attrib, array(), array('name'), 'ID'); + return $RCMAIL->table_output($attrib, array(), array('name'), 'ID'); } @@ -1757,22 +1824,33 @@ function compose_file_drop_area($attrib) } -// register UI objects -$OUTPUT->add_handlers(array( - 'composeheaders' => 'rcmail_compose_headers', - 'composesubject' => 'rcmail_compose_subject', - 'composebody' => 'rcmail_compose_body', - 'composeattachmentlist' => 'rcmail_compose_attachment_list', - 'composeattachmentform' => 'rcmail_compose_attachment_form', - 'composeattachment' => 'rcmail_compose_attachment_field', - 'filedroparea' => 'compose_file_drop_area', - 'priorityselector' => 'rcmail_priority_selector', - 'editorselector' => 'rcmail_editor_selector', - 'receiptcheckbox' => 'rcmail_receipt_checkbox', - 'dsncheckbox' => 'rcmail_dsn_checkbox', - 'storetarget' => 'rcmail_store_target_selection', - 'addressbooks' => 'rcmail_addressbook_list', - 'addresslist' => 'rcmail_contacts_list', -)); +/** + * + */ +function rcmail_compose_responses_list($attrib) +{ + global $RCMAIL, $OUTPUT; -$OUTPUT->send('compose'); + $attrib += array('id' => 'rcmresponseslist', 'tagname' => 'ul', 'cols' => 1); + + $jsenv = array(); + $list = new html_table($attrib); + foreach ($RCMAIL->get_compose_responses(true) as $response) { + $key = $response['key']; + $item = html::a(array( + 'href '=> '#'.urlencode($response['name']), + 'class' => rtrim('insertresponse ' . $attrib['itemclass']), + 'unselectable' => 'on', + 'rel' => $key, + ), rcube::Q($response['name'])); + + $jsenv[$key] = $response; + $list->add(array(), $item); + } + + // set client env + $OUTPUT->set_env('textresponses', $jsenv); + $OUTPUT->add_gui_object('responseslist', $attrib['id']); + + return $list->show(); +} diff --git a/program/steps/mail/copy.inc b/program/steps/mail/copy.inc index 876657485..a392f309f 100644 --- a/program/steps/mail/copy.inc +++ b/program/steps/mail/copy.inc @@ -5,7 +5,7 @@ | program/steps/mail/copy.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2010, The Roundcube Dev Team | + | 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. | @@ -20,20 +20,21 @@ */ // only process ajax requests -if (!$OUTPUT->ajax_call) - return; +if (!$OUTPUT->ajax_call) { + return; +} // move messages if (!empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) { - $uids = get_input_value('_uid', RCUBE_INPUT_POST); - $target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true); - $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); + $uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST); + $target = rcube_utils::get_input_value('_target_mbox', rcube_utils::INPUT_POST, true); + $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true); $copied = $RCMAIL->storage->copy_message($uids, $target, $mbox); if (!$copied) { // send error message - rcmail_display_server_error('errorcopying'); + $RCMAIL->display_server_error('errorcopying'); $OUTPUT->send(); exit; } @@ -43,7 +44,7 @@ if (!empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) { rcmail_send_unread_count($target, true); - $OUTPUT->command('set_quota', rcmail_quota_content()); + $OUTPUT->command('set_quota', $RCMAIL->quota_content()); } // unknown action or missing query param else { diff --git a/program/steps/mail/folders.inc b/program/steps/mail/folders.inc index 574d6e975..519a41fdd 100644 --- a/program/steps/mail/folders.inc +++ b/program/steps/mail/folders.inc @@ -5,7 +5,7 @@ | program/steps/mail/folders.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -20,14 +20,14 @@ */ // only process ajax requests -if (!$OUTPUT->ajax_call) +if (!$OUTPUT->ajax_call) { return; +} -$mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); +$mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true); // send EXPUNGE command if ($RCMAIL->action == 'expunge') { - $success = $RCMAIL->storage->expunge_folder($mbox); // reload message list if current mailbox @@ -35,26 +35,26 @@ if ($RCMAIL->action == 'expunge') { $OUTPUT->show_message('folderexpunged', 'confirmation'); if (!empty($_REQUEST['_reload'])) { - $OUTPUT->command('set_quota', rcmail_quota_content()); + $OUTPUT->command('set_quota', $RCMAIL->quota_content()); $OUTPUT->command('message_list.clear'); $RCMAIL->action = 'list'; return; } } else { - rcmail_display_server_error(); + $RCMAIL->display_server_error(); } } - // clear mailbox -else if ($RCMAIL->action == 'purge') -{ - $delimiter = $RCMAIL->storage->get_hierarchy_delimiter(); - $trash_regexp = '/^' . preg_quote($CONFIG['trash_mbox'] . $delimiter, '/') . '/'; - $junk_regexp = '/^' . preg_quote($CONFIG['junk_mbox'] . $delimiter, '/') . '/'; +else if ($RCMAIL->action == 'purge') { + $delimiter = $RCMAIL->storage->get_hierarchy_delimiter(); + $trash_mbox = $RCMAIL->config->get('trash_mbox'); + $junk_mbox = $RCMAIL->config->get('junk_mbox'); + $trash_regexp = '/^' . preg_quote($trash_mbox . $delimiter, '/') . '/'; + $junk_regexp = '/^' . preg_quote($junk_mbox . $delimiter, '/') . '/'; // we should only be purging trash and junk (or their subfolders) - if ($mbox == $CONFIG['trash_mbox'] || $mbox == $CONFIG['junk_mbox'] + if ($mbox == $trash_mbox || $mbox == $junk_mbox || preg_match($trash_regexp, $mbox) || preg_match($junk_regexp, $mbox) ) { $success = $RCMAIL->storage->clear_folder($mbox); @@ -69,12 +69,17 @@ else if ($RCMAIL->action == 'purge') $OUTPUT->command('message_list.clear'); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text(), $mbox); $OUTPUT->command('set_unread_count', $mbox, 0); - $OUTPUT->command('set_quota', rcmail_quota_content()); + $OUTPUT->command('set_quota', $RCMAIL->quota_content()); rcmail_set_unseen_count($mbox, 0); + + // set trash folder state + if ($mbox === $trash_mbox) { + $OUTPUT->command('set_trash_count', 0); + } } } else { - rcmail_display_server_error(); + $RCMAIL->display_server_error(); } } } diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 48afecb60..9d7aa30cf 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -5,7 +5,7 @@ | program/steps/mail/func.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | Copyright (C) 2005-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -16,44 +16,45 @@ | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli <roundcube@gmail.com> | + | Author: Aleksander Machniak <alec@alec.pl> | +-----------------------------------------------------------------------+ */ -// setup some global vars used by mail steps -$SENT_MBOX = $RCMAIL->config->get('sent_mbox'); -$DRAFTS_MBOX = $RCMAIL->config->get('drafts_mbox'); -$SEARCH_MODS_DEFAULT = array( - '*' => array('subject'=>1, 'from'=>1), - $SENT_MBOX => array('subject'=>1, 'to'=>1), - $DRAFTS_MBOX => array('subject'=>1, 'to'=>1) -); - // always instantiate storage object (but not connect to server yet) $RCMAIL->storage_init(); // set imap properties and session vars -if (strlen(trim($mbox = get_input_value('_mbox', RCUBE_INPUT_GPC, true)))) - $RCMAIL->storage->set_folder(($_SESSION['mbox'] = $mbox)); -else if ($RCMAIL->storage) - $_SESSION['mbox'] = $RCMAIL->storage->get_folder(); +if (strlen(trim($mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true)))) { + $RCMAIL->storage->set_folder(($_SESSION['mbox'] = $mbox)); +} +else if ($RCMAIL->storage) { + $_SESSION['mbox'] = $RCMAIL->storage->get_folder(); +} -if (!empty($_GET['_page'])) - $RCMAIL->storage->set_page(($_SESSION['page'] = intval($_GET['_page']))); +if (!empty($_GET['_page'])) { + $RCMAIL->storage->set_page(($_SESSION['page'] = intval($_GET['_page']))); +} + +$a_threading = $RCMAIL->config->get('message_threading', array()); +$message_sort_col = $RCMAIL->config->get('message_sort_col'); +$message_sort_order = $RCMAIL->config->get('message_sort_col'); // set default sort col/order to session -if (!isset($_SESSION['sort_col'])) - $_SESSION['sort_col'] = !empty($CONFIG['message_sort_col']) ? $CONFIG['message_sort_col'] : ''; -if (!isset($_SESSION['sort_order'])) - $_SESSION['sort_order'] = strtoupper($CONFIG['message_sort_order']) == 'ASC' ? 'ASC' : 'DESC'; +if (!isset($_SESSION['sort_col'])) { + $_SESSION['sort_col'] = $message_sort_col ? $message_sort_col : ''; +} +if (!isset($_SESSION['sort_order'])) { + $_SESSION['sort_order'] = strtoupper($message_sort_order) == 'ASC' ? 'ASC' : 'DESC'; +} // set threads mode -$a_threading = $RCMAIL->config->get('message_threading', array()); if (isset($_GET['_threads'])) { - if ($_GET['_threads']) - $a_threading[$_SESSION['mbox']] = true; - else - unset($a_threading[$_SESSION['mbox']]); - $RCMAIL->user->save_prefs(array('message_threading' => $a_threading)); + if ($_GET['_threads']) + $a_threading[$_SESSION['mbox']] = true; + else + unset($a_threading[$_SESSION['mbox']]); + + $RCMAIL->user->save_prefs(array('message_threading' => $a_threading)); } $RCMAIL->storage->set_threading($a_threading[$_SESSION['mbox']]); @@ -61,87 +62,91 @@ $RCMAIL->storage->set_threading($a_threading[$_SESSION['mbox']]); if (!empty($_REQUEST['_search']) && isset($_SESSION['search']) && $_SESSION['search_request'] == $_REQUEST['_search'] ) { - $RCMAIL->storage->set_search_set($_SESSION['search']); - $OUTPUT->set_env('search_request', $_REQUEST['_search']); - $OUTPUT->set_env('search_text', $_SESSION['last_text_search']); + $RCMAIL->storage->set_search_set($_SESSION['search']); + + $OUTPUT->set_env('search_request', $_REQUEST['_search']); + $OUTPUT->set_env('search_text', $_SESSION['last_text_search']); } // set main env variables, labels and page title if (empty($RCMAIL->action) || $RCMAIL->action == 'list') { - // connect to storage server and trigger error on failure - $RCMAIL->storage_connect(); - - $mbox_name = $RCMAIL->storage->get_folder(); - - if (empty($RCMAIL->action)) { - // initialize searching result if search_filter is used - if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') { - $search_request = md5($mbox_name.$_SESSION['search_filter']); - - $RCMAIL->storage->search($mbox_name, $_SESSION['search_filter'], RCMAIL_CHARSET, rcmail_sort_column()); - $_SESSION['search'] = $RCMAIL->storage->get_search_set(); - $_SESSION['search_request'] = $search_request; - $OUTPUT->set_env('search_request', $search_request); - } - - $search_mods = $RCMAIL->config->get('search_mods', $SEARCH_MODS_DEFAULT); - $OUTPUT->set_env('search_mods', $search_mods); - } - - $threading = (bool) $RCMAIL->storage->get_threading(); - $delimiter = $RCMAIL->storage->get_hierarchy_delimiter(); - - // set current mailbox and some other vars in client environment - $OUTPUT->set_env('mailbox', $mbox_name); - $OUTPUT->set_env('pagesize', $RCMAIL->storage->get_pagesize()); - $OUTPUT->set_env('delimiter', $delimiter); - $OUTPUT->set_env('threading', $threading); - $OUTPUT->set_env('threads', $threading || $RCMAIL->storage->get_capability('THREAD')); - $OUTPUT->set_env('preview_pane_mark_read', $RCMAIL->config->get('preview_pane_mark_read', 0)); - if ($RCMAIL->storage->get_capability('QUOTA')) { - $OUTPUT->set_env('quota', true); - } - - foreach (array('delete_junk','flag_for_deletion','read_when_deleted','skip_deleted','display_next','message_extwin','compose_extwin','forward_attachment') as $prop) { - if ($CONFIG[$prop]) - $OUTPUT->set_env($prop, true); - } - - if ($CONFIG['trash_mbox']) - $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']); - if ($CONFIG['drafts_mbox']) - $OUTPUT->set_env('drafts_mailbox', $CONFIG['drafts_mbox']); - if ($CONFIG['junk_mbox']) - $OUTPUT->set_env('junk_mailbox', $CONFIG['junk_mbox']); - - if (!empty($_SESSION['browser_caps'])) - $OUTPUT->set_env('browser_capabilities', $_SESSION['browser_caps']); - - if (!$OUTPUT->ajax_call) - $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', - 'movingmessage', 'copyingmessage', 'deletingmessage', 'markingmessage', - 'copy', 'move', 'quota', 'replyall', 'replylist', 'importwait'); - - $pagetitle = $RCMAIL->localize_foldername($RCMAIL->storage->mod_folder($mbox_name), true); - $pagetitle = str_replace($delimiter, " \xC2\xBB ", $pagetitle); - - $OUTPUT->set_pagetitle($pagetitle); + // connect to storage server and trigger error on failure + $RCMAIL->storage_connect(); + + $mbox_name = $RCMAIL->storage->get_folder(); + + if (empty($RCMAIL->action)) { + // initialize searching result if search_filter is used + if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') { + $RCMAIL->storage->search($mbox_name, $_SESSION['search_filter'], RCUBE_CHARSET, rcmail_sort_column()); + + $search_request = md5($mbox_name.$_SESSION['search_filter']); + $_SESSION['search'] = $RCMAIL->storage->get_search_set(); + $_SESSION['search_request'] = $search_request; + + $OUTPUT->set_env('search_request', $search_request); + } + + $OUTPUT->set_env('search_mods', rcmail_search_mods()); + } + + $threading = (bool) $RCMAIL->storage->get_threading(); + $delimiter = $RCMAIL->storage->get_hierarchy_delimiter(); + + // set current mailbox and some other vars in client environment + $OUTPUT->set_env('mailbox', $mbox_name); + $OUTPUT->set_env('pagesize', $RCMAIL->storage->get_pagesize()); + $OUTPUT->set_env('delimiter', $delimiter); + $OUTPUT->set_env('threading', $threading); + $OUTPUT->set_env('threads', $threading || $RCMAIL->storage->get_capability('THREAD')); + $OUTPUT->set_env('reply_all_mode', (int) $RCMAIL->config->get('reply_all_mode')); + $OUTPUT->set_env('preview_pane_mark_read', $RCMAIL->config->get('preview_pane_mark_read', 0)); + + if ($RCMAIL->storage->get_capability('QUOTA')) { + $OUTPUT->set_env('quota', true); + } + + // set special folders + foreach (array('drafts', 'trash', 'junk') as $mbox) { + if ($folder = $RCMAIL->config->get($mbox . '_mbox')) { + $OUTPUT->set_env($mbox . '_mailbox', $folder); + } + } + + // set configuration + $RCMAIL->set_env_config(array('delete_junk', 'flag_for_deletion', 'read_when_deleted', + 'skip_deleted', 'display_next', 'message_extwin', 'compose_extwin', 'forward_attachment')); + + if (!empty($_SESSION['browser_caps'])) { + $OUTPUT->set_env('browser_capabilities', $_SESSION['browser_caps']); + } + + if (!$OUTPUT->ajax_call) { + $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', + 'movingmessage', 'copyingmessage', 'deletingmessage', 'markingmessage', + 'copy', 'move', 'quota', 'replyall', 'replylist', 'importwait'); + } + + $pagetitle = $RCMAIL->localize_foldername($RCMAIL->storage->mod_folder($mbox_name), true); + $pagetitle = str_replace($delimiter, " \xC2\xBB ", $pagetitle); + + $OUTPUT->set_pagetitle($pagetitle); } // register UI objects $OUTPUT->add_handlers(array( - 'mailboxlist' => 'rcmail_mailbox_list', - 'messages' => 'rcmail_message_list', - 'messagecountdisplay' => 'rcmail_messagecount_display', - 'quotadisplay' => 'rcmail_quota_display', - 'mailboxname' => 'rcmail_mailbox_name_display', - 'messageheaders' => 'rcmail_message_headers', - 'messagefullheaders' => 'rcmail_message_full_headers', - 'messagebody' => 'rcmail_message_body', - 'messagecontentframe' => 'rcmail_messagecontent_frame', - 'messageimportform' => 'rcmail_message_import_form', - 'searchfilter' => 'rcmail_search_filter', - 'searchform' => array($OUTPUT, 'search_form'), + 'mailboxlist' => array($RCMAIL, 'folder_list'), + 'quotadisplay' => array($RCMAIL, 'quota_display'), + 'messages' => 'rcmail_message_list', + 'messagecountdisplay' => 'rcmail_messagecount_display', + 'mailboxname' => 'rcmail_mailbox_name_display', + 'messageheaders' => 'rcmail_message_headers', + 'messagefullheaders' => 'rcmail_message_full_headers', + 'messagebody' => 'rcmail_message_body', + 'messagecontentframe' => 'rcmail_messagecontent_frame', + 'messageimportform' => 'rcmail_message_import_form', + 'searchfilter' => 'rcmail_search_filter', + 'searchform' => array($OUTPUT, 'search_form'), )); // register action aliases @@ -163,6 +168,28 @@ $RCMAIL->register_action_map(array( /** + * Returns default search mods + */ +function rcmail_search_mods() +{ + global $RCMAIL; + + $mods = $RCMAIL->config->get('search_mods'); + + if (empty($mods)) { + $mods = array('*' => array('subject' => 1, 'from' => 1)); + + foreach (array('sent', 'drafts') as $mbox) { + if ($mbox = $RCMAIL->config->get($mbox . '_mbox')) { + $mods[$mbox] = array('subject' => 1, 'to' => 1); + } + } + } + + return $mods; +} + +/** * Returns 'to' if current folder is configured Sent or Drafts * or their subfolders, otherwise returns 'from'. * @@ -170,20 +197,20 @@ $RCMAIL->register_action_map(array( */ function rcmail_message_list_smart_column_name() { - global $RCMAIL; + global $RCMAIL; - $delim = $RCMAIL->storage->get_hierarchy_delimiter(); - $mbox = $RCMAIL->storage->get_folder(); - $sent_mbox = $RCMAIL->config->get('sent_mbox'); - $drafts_mbox = $RCMAIL->config->get('drafts_mbox'); + $delim = $RCMAIL->storage->get_hierarchy_delimiter(); + $mbox = $RCMAIL->storage->get_folder(); + $sent_mbox = $RCMAIL->config->get('sent_mbox'); + $drafts_mbox = $RCMAIL->config->get('drafts_mbox'); - if ((strpos($mbox.$delim, $sent_mbox.$delim) === 0 || strpos($mbox.$delim, $drafts_mbox.$delim) === 0) - && strtoupper($mbox) != 'INBOX' - ) { - return 'to'; - } + if ((strpos($mbox.$delim, $sent_mbox.$delim) === 0 || strpos($mbox.$delim, $drafts_mbox.$delim) === 0) + && strtoupper($mbox) != 'INBOX' + ) { + return 'to'; + } - return 'from'; + return 'from'; } /** @@ -195,21 +222,21 @@ function rcmail_message_list_smart_column_name() */ function rcmail_sort_column() { - global $RCMAIL; + global $RCMAIL; - if (isset($_SESSION['sort_col'])) { - $column = $_SESSION['sort_col']; - } - else { - $column = $RCMAIL->config->get('message_sort_col'); - } + if (isset($_SESSION['sort_col'])) { + $column = $_SESSION['sort_col']; + } + else { + $column = $RCMAIL->config->get('message_sort_col'); + } - // get name of smart From/To column in folder context - if ($column == 'fromto') { - $column = rcmail_message_list_smart_column_name(); - } + // get name of smart From/To column in folder context + if ($column == 'fromto') { + $column = rcmail_message_list_smart_column_name(); + } - return $column; + return $column; } /** @@ -219,13 +246,13 @@ function rcmail_sort_column() */ function rcmail_sort_order() { - global $RCMAIL; + global $RCMAIL; - if (isset($_SESSION['sort_order'])) { - return $_SESSION['sort_order']; - } + if (isset($_SESSION['sort_order'])) { + return $_SESSION['sort_order']; + } - return $RCMAIL->config->get('message_sort_order'); + return $RCMAIL->config->get('message_sort_order'); } /** @@ -233,390 +260,396 @@ function rcmail_sort_order() */ function rcmail_message_list($attrib) { - global $CONFIG, $OUTPUT; - - // add some labels to client - $OUTPUT->add_label('from', 'to'); - - // add id to message list table if not specified - if (!strlen($attrib['id'])) - $attrib['id'] = 'rcubemessagelist'; - - // define list of cols to be displayed based on parameter or config - if (empty($attrib['columns'])) { - $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); - $OUTPUT->set_env('col_movable', !in_array('list_cols', (array)$CONFIG['dont_override'])); - } - else { - $a_show_cols = preg_split('/[\s,;]+/', strip_quotes($attrib['columns'])); - $attrib['columns'] = $a_show_cols; - } - - // save some variables for use in ajax list - $_SESSION['list_attrib'] = $attrib; - // make sure 'threads' and 'subject' columns are present - if (!in_array('subject', $a_show_cols)) - array_unshift($a_show_cols, 'subject'); - if (!in_array('threads', $a_show_cols)) - array_unshift($a_show_cols, 'threads'); - - $_SESSION['skin_path'] = $CONFIG['skin_path']; - - // set client env - $OUTPUT->add_gui_object('messagelist', $attrib['id']); - $OUTPUT->set_env('autoexpand_threads', intval($CONFIG['autoexpand_threads'])); - $OUTPUT->set_env('sort_col', $_SESSION['sort_col']); - $OUTPUT->set_env('sort_order', $_SESSION['sort_order']); - $OUTPUT->set_env('messages', array()); - $OUTPUT->set_env('coltypes', $a_show_cols); - - $OUTPUT->include_script('list.js'); - - $table = new html_table($attrib); - if (!$attrib['noheader']) { - foreach (rcmail_message_list_head($attrib, $a_show_cols) as $cell) - $table->add_header(array('class' => $cell['className'], 'id' => $cell['id']), $cell['html']); - } - - return $table->show(); -} + global $RCMAIL, $OUTPUT; + // add some labels to client + $OUTPUT->add_label('from', 'to'); + + // add id to message list table if not specified + if (!strlen($attrib['id'])) + $attrib['id'] = 'rcubemessagelist'; + + // define list of cols to be displayed based on parameter or config + if (empty($attrib['columns'])) { + $list_cols = $RCMAIL->config->get('list_cols'); + $a_show_cols = !empty($list_cols) && is_array($list_cols) ? $list_cols : array('subject'); + + $OUTPUT->set_env('col_movable', !in_array('list_cols', (array)$RCMAIL->config->get('dont_override'))); + } + else { + $a_show_cols = preg_split('/[\s,;]+/', str_replace(array("'", '"'), '', $attrib['columns'])); + $attrib['columns'] = $a_show_cols; + } + + // save some variables for use in ajax list + $_SESSION['list_attrib'] = $attrib; + + // make sure 'threads' and 'subject' columns are present + if (!in_array('subject', $a_show_cols)) + array_unshift($a_show_cols, 'subject'); + if (!in_array('threads', $a_show_cols)) + array_unshift($a_show_cols, 'threads'); + + $_SESSION['skin_path'] = $RCMAIL->config->get('skin_path'); + + // set client env + $OUTPUT->add_gui_object('messagelist', $attrib['id']); + $OUTPUT->set_env('autoexpand_threads', intval($RCMAIL->config->get('autoexpand_threads'))); + $OUTPUT->set_env('sort_col', $_SESSION['sort_col']); + $OUTPUT->set_env('sort_order', $_SESSION['sort_order']); + $OUTPUT->set_env('messages', array()); + $OUTPUT->set_env('coltypes', $a_show_cols); + + $OUTPUT->include_script('list.js'); + + $table = new html_table($attrib); + + if (!$attrib['noheader']) { + foreach (rcmail_message_list_head($attrib, $a_show_cols) as $cell) + $table->add_header(array('class' => $cell['className'], 'id' => $cell['id']), $cell['html']); + } + + return $table->show(); +} /** * return javascript commands to add rows to the message list */ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null) { - global $CONFIG, $RCMAIL, $OUTPUT; + global $RCMAIL, $OUTPUT; - if (empty($a_show_cols)) { - if (!empty($_SESSION['list_attrib']['columns'])) - $a_show_cols = $_SESSION['list_attrib']['columns']; - else - $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); - } - else { - if (!is_array($a_show_cols)) - $a_show_cols = preg_split('/[\s,;]+/', strip_quotes($a_show_cols)); - $head_replace = true; - } + if (empty($a_show_cols)) { + if (!empty($_SESSION['list_attrib']['columns'])) + $a_show_cols = $_SESSION['list_attrib']['columns']; + else { + $list_cols = $RCMAIL->config->get('list_cols'); + $a_show_cols = !empty($list_cols) && is_array($list_cols) ? $list_cols : array('subject'); + } + } + else { + if (!is_array($a_show_cols)) { + $a_show_cols = preg_split('/[\s,;]+/', str_replace(array("'", '"'), '', $a_show_cols)); + } + $head_replace = true; + } - $mbox = $RCMAIL->storage->get_folder(); + $mbox = $RCMAIL->storage->get_folder(); - // make sure 'threads' and 'subject' columns are present - if (!in_array('subject', $a_show_cols)) - array_unshift($a_show_cols, 'subject'); - if (!in_array('threads', $a_show_cols)) - array_unshift($a_show_cols, 'threads'); + // make sure 'threads' and 'subject' columns are present + if (!in_array('subject', $a_show_cols)) + array_unshift($a_show_cols, 'subject'); + if (!in_array('threads', $a_show_cols)) + array_unshift($a_show_cols, 'threads'); - $_SESSION['list_attrib']['columns'] = $a_show_cols; + $_SESSION['list_attrib']['columns'] = $a_show_cols; - // Make sure there are no duplicated columns (#1486999) - $a_show_cols = array_unique($a_show_cols); + // Make sure there are no duplicated columns (#1486999) + $a_show_cols = array_unique($a_show_cols); - // Plugins may set header's list_cols/list_flags and other rcube_message_header variables - // and list columns - $plugin = $RCMAIL->plugins->exec_hook('messages_list', - array('messages' => $a_headers, 'cols' => $a_show_cols)); + // Plugins may set header's list_cols/list_flags and other rcube_message_header variables + // and list columns + $plugin = $RCMAIL->plugins->exec_hook('messages_list', + array('messages' => $a_headers, 'cols' => $a_show_cols)); - $a_show_cols = $plugin['cols']; - $a_headers = $plugin['messages']; + $a_show_cols = $plugin['cols']; + $a_headers = $plugin['messages']; - $thead = $head_replace ? rcmail_message_list_head($_SESSION['list_attrib'], $a_show_cols) : NULL; + $thead = $head_replace ? rcmail_message_list_head($_SESSION['list_attrib'], $a_show_cols) : NULL; - // get name of smart From/To column in folder context - if (array_search('fromto', $a_show_cols) !== false) { - $smart_col = rcmail_message_list_smart_column_name(); - } + // get name of smart From/To column in folder context + if (array_search('fromto', $a_show_cols) !== false) { + $smart_col = rcmail_message_list_smart_column_name(); + } - $OUTPUT->command('set_message_coltypes', $a_show_cols, $thead, $smart_col); + $OUTPUT->command('set_message_coltypes', $a_show_cols, $thead, $smart_col); - if (empty($a_headers)) - return; + if (empty($a_headers)) { + return; + } - // remove 'threads', 'attachment', 'flag', 'status' columns, we don't need them here - foreach (array('threads', 'attachment', 'flag', 'status', 'priority') as $col) { - if (($key = array_search($col, $a_show_cols)) !== FALSE) - unset($a_show_cols[$key]); - } + // remove 'threads', 'attachment', 'flag', 'status' columns, we don't need them here + foreach (array('threads', 'attachment', 'flag', 'status', 'priority') as $col) { + if (($key = array_search($col, $a_show_cols)) !== FALSE) { + unset($a_show_cols[$key]); + } + } - // loop through message headers - foreach ($a_headers as $header) { - if (empty($header)) - continue; + // loop through message headers + foreach ($a_headers as $header) { + if (empty($header)) + continue; - $a_msg_cols = array(); - $a_msg_flags = array(); + $a_msg_cols = array(); + $a_msg_flags = array(); - // format each col; similar as in rcmail_message_list() - foreach ($a_show_cols as $col) { - $col_name = $col == 'fromto' ? $smart_col : $col; - - if (in_array($col_name, array('from', 'to', 'cc', 'replyto'))) - $cont = rcmail_address_string($header->$col_name, 3, false, null, $header->charset); - else if ($col == 'subject') { - $cont = trim(rcube_mime::decode_header($header->$col, $header->charset)); - if (!$cont) $cont = rcube_label('nosubject'); - $cont = Q($cont); - } - else if ($col == 'size') - $cont = show_bytes($header->$col); - else if ($col == 'date') - $cont = format_date($header->date); - else - $cont = Q($header->$col); - - $a_msg_cols[$col] = $cont; - } - - $a_msg_flags = array_change_key_case(array_map('intval', (array) $header->flags)); - if ($header->depth) - $a_msg_flags['depth'] = $header->depth; - else if ($header->has_children) - $roots[] = $header->uid; - if ($header->parent_uid) - $a_msg_flags['parent_uid'] = $header->parent_uid; - if ($header->has_children) - $a_msg_flags['has_children'] = $header->has_children; - if ($header->unread_children) - $a_msg_flags['unread_children'] = $header->unread_children; - if ($header->others['list-post']) - $a_msg_flags['ml'] = 1; - if ($header->priority) - $a_msg_flags['prio'] = (int) $header->priority; - - $a_msg_flags['ctype'] = Q($header->ctype); - $a_msg_flags['mbox'] = $mbox; - - // merge with plugin result (Deprecated, use $header->flags) - if (!empty($header->list_flags) && is_array($header->list_flags)) - $a_msg_flags = array_merge($a_msg_flags, $header->list_flags); - if (!empty($header->list_cols) && is_array($header->list_cols)) - $a_msg_cols = array_merge($a_msg_cols, $header->list_cols); - - $OUTPUT->command('add_message_row', - $header->uid, - $a_msg_cols, - $a_msg_flags, - $insert_top); - } - - if ($RCMAIL->storage->get_threading()) { - $OUTPUT->command('init_threads', (array) $roots, $mbox); - } -} + // format each col; similar as in rcmail_message_list() + foreach ($a_show_cols as $col) { + $col_name = $col == 'fromto' ? $smart_col : $col; + if (in_array($col_name, array('from', 'to', 'cc', 'replyto'))) + $cont = rcmail_address_string($header->$col_name, 3, false, null, $header->charset); + else if ($col == 'subject') { + $cont = trim(rcube_mime::decode_header($header->$col, $header->charset)); + if (!$cont) $cont = $RCMAIL->gettext('nosubject'); + $cont = rcube::Q($cont); + } + else if ($col == 'size') + $cont = show_bytes($header->$col); + else if ($col == 'date') + $cont = $RCMAIL->format_date($header->date); + else + $cont = rcube::Q($header->$col); + + $a_msg_cols[$col] = $cont; + } + + $a_msg_flags = array_change_key_case(array_map('intval', (array) $header->flags)); + if ($header->depth) + $a_msg_flags['depth'] = $header->depth; + else if ($header->has_children) + $roots[] = $header->uid; + if ($header->parent_uid) + $a_msg_flags['parent_uid'] = $header->parent_uid; + if ($header->has_children) + $a_msg_flags['has_children'] = $header->has_children; + if ($header->unread_children) + $a_msg_flags['unread_children'] = $header->unread_children; + if ($header->others['list-post']) + $a_msg_flags['ml'] = 1; + if ($header->priority) + $a_msg_flags['prio'] = (int) $header->priority; + + $a_msg_flags['ctype'] = rcube::Q($header->ctype); + $a_msg_flags['mbox'] = $mbox; + + // merge with plugin result (Deprecated, use $header->flags) + if (!empty($header->list_flags) && is_array($header->list_flags)) + $a_msg_flags = array_merge($a_msg_flags, $header->list_flags); + if (!empty($header->list_cols) && is_array($header->list_cols)) + $a_msg_cols = array_merge($a_msg_cols, $header->list_cols); + + $OUTPUT->command('add_message_row', + $header->uid, + $a_msg_cols, + $a_msg_flags, + $insert_top); + } + + if ($RCMAIL->storage->get_threading()) { + $OUTPUT->command('init_threads', (array) $roots, $mbox); + } +} /* * Creates <THEAD> for message list table */ function rcmail_message_list_head($attrib, $a_show_cols) { - global $RCMAIL; - - $skin_path = $_SESSION['skin_path']; + global $RCMAIL; - // check to see if we have some settings for sorting - $sort_col = $_SESSION['sort_col']; - $sort_order = $_SESSION['sort_order']; + $skin_path = $_SESSION['skin_path']; - $dont_override = (array)$RCMAIL->config->get('dont_override'); - $disabled_sort = in_array('message_sort_col', $dont_override); - $disabled_order = in_array('message_sort_order', $dont_override); + // check to see if we have some settings for sorting + $sort_col = $_SESSION['sort_col']; + $sort_order = $_SESSION['sort_order']; - $RCMAIL->output->set_env('disabled_sort_col', $disabled_sort); - $RCMAIL->output->set_env('disabled_sort_order', $disabled_order); + $dont_override = (array) $RCMAIL->config->get('dont_override'); + $disabled_sort = in_array('message_sort_col', $dont_override); + $disabled_order = in_array('message_sort_order', $dont_override); - // define sortable columns - if ($disabled_sort) - $a_sort_cols = $sort_col && !$disabled_order ? array($sort_col) : array(); - else - $a_sort_cols = array('subject', 'date', 'from', 'to', 'fromto', 'size', 'cc'); + $RCMAIL->output->set_env('disabled_sort_col', $disabled_sort); + $RCMAIL->output->set_env('disabled_sort_order', $disabled_order); - if (!empty($attrib['optionsmenuicon'])) { - $onclick = 'return ' . JS_OBJECT_NAME . ".command('menu-open', 'messagelistmenu')"; - if ($attrib['optionsmenuicon'] === true || $attrib['optionsmenuicon'] == 'true') - $list_menu = html::div(array('onclick' => $onclick, 'class' => 'listmenu', - 'id' => 'listmenulink', 'title' => rcube_label('listoptions'))); + // define sortable columns + if ($disabled_sort) + $a_sort_cols = $sort_col && !$disabled_order ? array($sort_col) : array(); else - $list_menu = html::a(array('href' => '#', 'onclick' => $onclick), - html::img(array('src' => $skin_path . $attrib['optionsmenuicon'], - 'id' => 'listmenulink', 'title' => rcube_label('listoptions'))) - ); - } - else - $list_menu = ''; - - $cells = array(); - - // get name of smart From/To column in folder context - if (array_search('fromto', $a_show_cols) !== false) { - $smart_col = rcmail_message_list_smart_column_name(); - } - - foreach ($a_show_cols as $col) { - // get column name - switch ($col) { - case 'flag': - $col_name = '<span class="flagged"> </span>'; - break; - case 'attachment': - case 'priority': - case 'status': - $col_name = '<span class="' . $col .'"> </span>'; - break; - case 'threads': - $col_name = $list_menu; - break; - case 'fromto': - $col_name = Q(rcube_label($smart_col)); - break; - default: - $col_name = Q(rcube_label($col)); + $a_sort_cols = array('subject', 'date', 'from', 'to', 'fromto', 'size', 'cc'); + + if (!empty($attrib['optionsmenuicon'])) { + $onclick = 'return ' . rcmail_output::JS_OBJECT_NAME . ".command('menu-open', 'messagelistmenu')"; + if ($attrib['optionsmenuicon'] === true || $attrib['optionsmenuicon'] == 'true') + $list_menu = html::div(array('onclick' => $onclick, 'class' => 'listmenu', + 'id' => 'listmenulink', 'title' => $RCMAIL->gettext('listoptions'))); + else + $list_menu = html::a(array('href' => '#', 'onclick' => $onclick), + html::img(array('src' => $skin_path . $attrib['optionsmenuicon'], + 'id' => 'listmenulink', 'title' => $RCMAIL->gettext('listoptions')))); + } + else { + $list_menu = ''; } - // make sort links - if (in_array($col, $a_sort_cols)) - $col_name = html::a(array('href'=>"./#sort", 'onclick' => 'return '.JS_OBJECT_NAME.".command('sort','".$col."',this)", 'title' => rcube_label('sortby')), $col_name); - else if ($col_name[0] != '<') - $col_name = '<span class="' . $col .'">' . $col_name . '</span>'; + $cells = array(); - $sort_class = $col == $sort_col && !$disabled_order ? " sorted$sort_order" : ''; - $class_name = $col.$sort_class; + // get name of smart From/To column in folder context + if (array_search('fromto', $a_show_cols) !== false) { + $smart_col = rcmail_message_list_smart_column_name(); + } - // put it all together - $cells[] = array('className' => $class_name, 'id' => "rcm$col", 'html' => $col_name); - } + foreach ($a_show_cols as $col) { + // get column name + switch ($col) { + case 'flag': + $col_name = '<span class="flagged"> </span>'; + break; + case 'attachment': + case 'priority': + case 'status': + $col_name = '<span class="' . $col .'"> </span>'; + break; + case 'threads': + $col_name = $list_menu; + break; + case 'fromto': + $col_name = rcube::Q($RCMAIL->gettext($smart_col)); + break; + default: + $col_name = rcube::Q($RCMAIL->gettext($col)); + } - return $cells; -} + // make sort links + if (in_array($col, $a_sort_cols)) { + $col_name = html::a(array( + 'href' => "./#sort", + 'onclick' => 'return '.rcmail_output::JS_OBJECT_NAME.".command('sort','".$col."',this)", + 'title' => $RCMAIL->gettext('sortby') + ), $col_name); + } + else if ($col_name[0] != '<') { + $col_name = '<span class="' . $col .'">' . $col_name . '</span>'; + } + $sort_class = $col == $sort_col && !$disabled_order ? " sorted$sort_order" : ''; + $class_name = $col.$sort_class; + + // put it all together + $cells[] = array('className' => $class_name, 'id' => "rcm$col", 'html' => $col_name); + } + + return $cells; +} /** * return an HTML iframe for loading mail content */ function rcmail_messagecontent_frame($attrib) { - global $OUTPUT, $RCMAIL; + global $OUTPUT, $RCMAIL; - if (empty($attrib['id'])) - $attrib['id'] = 'rcmailcontentwindow'; + if (empty($attrib['id'])) + $attrib['id'] = 'rcmailcontentwindow'; - $attrib['name'] = $attrib['id']; + $attrib['name'] = $attrib['id']; - if ($RCMAIL->config->get('preview_pane')) - $OUTPUT->set_env('contentframe', $attrib['id']); - $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif'); + if ($RCMAIL->config->get('preview_pane')) { + $OUTPUT->set_env('contentframe', $attrib['id']); + } - return $OUTPUT->frame($attrib, true); -} + $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif'); + return $OUTPUT->frame($attrib, true); +} function rcmail_messagecount_display($attrib) { - global $RCMAIL; + global $RCMAIL; - if (!$attrib['id']) - $attrib['id'] = 'rcmcountdisplay'; + if (!$attrib['id']) + $attrib['id'] = 'rcmcountdisplay'; - $RCMAIL->output->add_gui_object('countdisplay', $attrib['id']); + $RCMAIL->output->add_gui_object('countdisplay', $attrib['id']); - $content = $RCMAIL->action != 'show' ? rcmail_get_messagecount_text() : rcube_label('loading'); + $content = $RCMAIL->action != 'show' ? rcmail_get_messagecount_text() : $RCMAIL->gettext('loading'); - return html::span($attrib, $content); + return html::span($attrib, $content); } - -function rcmail_get_messagecount_text($count=NULL, $page=NULL) +function rcmail_get_messagecount_text($count = null, $page = null) { - global $RCMAIL; + global $RCMAIL; - if ($page === NULL) { - $page = $RCMAIL->storage->get_page(); - } + if ($page === null) { + $page = $RCMAIL->storage->get_page(); + } - $page_size = $RCMAIL->storage->get_pagesize(); - $start_msg = ($page-1) * $page_size + 1; + $page_size = $RCMAIL->storage->get_pagesize(); + $start_msg = ($page-1) * $page_size + 1; - if ($count!==NULL) - $max = $count; - else if ($RCMAIL->action) - $max = $RCMAIL->storage->count(NULL, $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL'); + if ($count !== null) + $max = $count; + else if ($RCMAIL->action) + $max = $RCMAIL->storage->count(NULL, $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL'); - if ($max==0) - $out = rcube_label('mailboxempty'); - else - $out = rcube_label(array('name' => $RCMAIL->storage->get_threading() ? 'threadsfromto' : 'messagesfromto', + if ($max == 0) + $out = $RCMAIL->storage->get_search_set() ? $RCMAIL->gettext('nomessages') : $RCMAIL->gettext('mailboxempty'); + else + $out = $RCMAIL->gettext(array('name' => $RCMAIL->storage->get_threading() ? 'threadsfromto' : 'messagesfromto', 'vars' => array('from' => $start_msg, 'to' => min($max, $start_msg + $page_size - 1), 'count' => $max))); - return Q($out); + return rcube::Q($out); } - function rcmail_mailbox_name_display($attrib) { - global $RCMAIL; + global $RCMAIL; - if (!$attrib['id']) - $attrib['id'] = 'rcmmailboxname'; + if (!$attrib['id']) + $attrib['id'] = 'rcmmailboxname'; - $RCMAIL->output->add_gui_object('mailboxname', $attrib['id']); + $RCMAIL->output->add_gui_object('mailboxname', $attrib['id']); - return html::span($attrib, rcmail_get_mailbox_name_text()); + return html::span($attrib, rcmail_get_mailbox_name_text()); } - function rcmail_get_mailbox_name_text() { - global $RCMAIL; - return rcmail_localize_foldername($RCMAIL->storage->get_folder()); + global $RCMAIL; + return $RCMAIL->localize_foldername($RCMAIL->storage->get_folder()); } - function rcmail_send_unread_count($mbox_name, $force=false, $count=null, $mark='') { - global $RCMAIL; + global $RCMAIL; - $old_unseen = rcmail_get_unseen_count($mbox_name); + $old_unseen = rcmail_get_unseen_count($mbox_name); - if ($count === null) - $unseen = $RCMAIL->storage->count($mbox_name, 'UNSEEN', $force); - else - $unseen = $count; + if ($count === null) + $unseen = $RCMAIL->storage->count($mbox_name, 'UNSEEN', $force); + else + $unseen = $count; - if ($unseen != $old_unseen || ($mbox_name == 'INBOX')) - $RCMAIL->output->command('set_unread_count', $mbox_name, $unseen, - ($mbox_name == 'INBOX'), $unseen && $mark ? $mark : ''); + if ($unseen != $old_unseen || ($mbox_name == 'INBOX')) + $RCMAIL->output->command('set_unread_count', $mbox_name, $unseen, + ($mbox_name == 'INBOX'), $unseen && $mark ? $mark : ''); - rcmail_set_unseen_count($mbox_name, $unseen); + rcmail_set_unseen_count($mbox_name, $unseen); - return $unseen; + return $unseen; } - function rcmail_set_unseen_count($mbox_name, $count) { - // @TODO: this data is doubled (session and cache tables) if caching is enabled + // @TODO: this data is doubled (session and cache tables) if caching is enabled - // Make sure we have an array here (#1487066) - if (!is_array($_SESSION['unseen_count'])) - $_SESSION['unseen_count'] = array(); + // Make sure we have an array here (#1487066) + if (!is_array($_SESSION['unseen_count'])) { + $_SESSION['unseen_count'] = array(); + } - $_SESSION['unseen_count'][$mbox_name] = $count; + $_SESSION['unseen_count'][$mbox_name] = $count; } - function rcmail_get_unseen_count($mbox_name) { - if (is_array($_SESSION['unseen_count']) && array_key_exists($mbox_name, $_SESSION['unseen_count'])) - return $_SESSION['unseen_count'][$mbox_name]; - else - return null; + if (is_array($_SESSION['unseen_count']) && array_key_exists($mbox_name, $_SESSION['unseen_count'])) { + return $_SESSION['unseen_count'][$mbox_name]; + } } - /** * Sets message is_safe flag according to 'show_images' option value * @@ -624,35 +657,34 @@ function rcmail_get_unseen_count($mbox_name) */ function rcmail_check_safe(&$message) { - global $RCMAIL; - - if (!$message->is_safe - && ($show_images = $RCMAIL->config->get('show_images')) - && $message->has_html_part() - ) { - switch ($show_images) { - case 1: // known senders only - // get default addressbook, like in addcontact.inc - $CONTACTS = $RCMAIL->get_address_book(-1, true); - - if ($CONTACTS) { - $result = $CONTACTS->search('email', $message->sender['mailto'], 1, false); - if ($result->count) { - $message->set_safe(true); - } - } + global $RCMAIL; + + if (!$message->is_safe + && ($show_images = $RCMAIL->config->get('show_images')) + && $message->has_html_part() + ) { + switch ($show_images) { + case 1: // known senders only + // get default addressbook, like in addcontact.inc + $CONTACTS = $RCMAIL->get_address_book(-1, true); + + if ($CONTACTS) { + $result = $CONTACTS->search('email', $message->sender['mailto'], 1, false); + if ($result->count) { + $message->set_safe(true); + } + } - $RCMAIL->plugins->exec_hook('message_check_safe', array('message' => $message)); - break; + $RCMAIL->plugins->exec_hook('message_check_safe', array('message' => $message)); + break; - case 2: // always - $message->set_safe(true); - break; + case 2: // always + $message->set_safe(true); + break; + } } - } } - /** * Cleans up the given message HTML Body (for displaying) * @@ -663,66 +695,67 @@ function rcmail_check_safe(&$message) */ function rcmail_wash_html($html, $p, $cid_replaces) { - global $REMOTE_OBJECTS; - - $p += array('safe' => false, 'inline_html' => true); - - // charset was converted to UTF-8 in rcube_storage::get_message_part(), - // change/add charset specification in HTML accordingly, - // washtml cannot work without that - $meta = '<meta http-equiv="Content-Type" content="text/html; charset='.RCMAIL_CHARSET.'" />'; - - // remove old meta tag and add the new one, making sure - // that it is placed in the head (#1488093) - $html = preg_replace('/<meta[^>]+charset=[a-z0-9-_]+[^>]*>/Ui', '', $html); - $html = preg_replace('/(<head[^>]*>)/Ui', '\\1'.$meta, $html, -1, $rcount); - if (!$rcount) { - $html = '<head>' . $meta . '</head>' . $html; - } - - // clean HTML with washhtml by Frederic Motte - $wash_opts = array( - 'show_washed' => false, - 'allow_remote' => $p['safe'], - 'blocked_src' => "./program/resources/blocked.gif", - 'charset' => RCMAIL_CHARSET, - 'cid_map' => $cid_replaces, - 'html_elements' => array('body'), - ); - - if (!$p['inline_html']) { - $wash_opts['html_elements'] = array('html','head','title','body'); - } - if ($p['safe']) { - $wash_opts['html_elements'][] = 'link'; - $wash_opts['html_attribs'] = array('rel','type'); - } - - // overwrite washer options with options from plugins - if (isset($p['html_elements'])) - $wash_opts['html_elements'] = $p['html_elements']; - if (isset($p['html_attribs'])) - $wash_opts['html_attribs'] = $p['html_attribs']; - - // initialize HTML washer - $washer = new rcube_washtml($wash_opts); - - if (!$p['skip_washer_form_callback']) - $washer->add_callback('form', 'rcmail_washtml_callback'); - - // allow CSS styles, will be sanitized by rcmail_washtml_callback() - if (!$p['skip_washer_style_callback']) - $washer->add_callback('style', 'rcmail_washtml_callback'); - - // Remove non-UTF8 characters (#1487813) - $html = rc_utf8_clean($html); - - $html = $washer->wash($html); - $REMOTE_OBJECTS = $washer->extlinks; - - return $html; -} + global $REMOTE_OBJECTS; + + $p += array('safe' => false, 'inline_html' => true); + + // charset was converted to UTF-8 in rcube_storage::get_message_part(), + // change/add charset specification in HTML accordingly, + // washtml cannot work without that + $meta = '<meta http-equiv="Content-Type" content="text/html; charset='.RCUBE_CHARSET.'" />'; + + // remove old meta tag and add the new one, making sure + // that it is placed in the head (#1488093) + $html = preg_replace('/<meta[^>]+charset=[a-z0-9-_]+[^>]*>/Ui', '', $html); + $html = preg_replace('/(<head[^>]*>)/Ui', '\\1'.$meta, $html, -1, $rcount); + if (!$rcount) { + $html = '<head>' . $meta . '</head>' . $html; + } + + // clean HTML with washhtml by Frederic Motte + $wash_opts = array( + 'show_washed' => false, + 'allow_remote' => $p['safe'], + 'blocked_src' => "./program/resources/blocked.gif", + 'charset' => RCUBE_CHARSET, + 'cid_map' => $cid_replaces, + 'html_elements' => array('body'), + ); + + if (!$p['inline_html']) { + $wash_opts['html_elements'] = array('html','head','title','body'); + } + if ($p['safe']) { + $wash_opts['html_elements'][] = 'link'; + $wash_opts['html_attribs'] = array('rel','type'); + } + + // overwrite washer options with options from plugins + if (isset($p['html_elements'])) + $wash_opts['html_elements'] = $p['html_elements']; + if (isset($p['html_attribs'])) + $wash_opts['html_attribs'] = $p['html_attribs']; + // initialize HTML washer + $washer = new rcube_washtml($wash_opts); + + if (!$p['skip_washer_form_callback']) { + $washer->add_callback('form', 'rcmail_washtml_callback'); + } + + // allow CSS styles, will be sanitized by rcmail_washtml_callback() + if (!$p['skip_washer_style_callback']) { + $washer->add_callback('style', 'rcmail_washtml_callback'); + } + + // Remove non-UTF8 characters (#1487813) + $html = rcube_charset::clean($html); + + $html = $washer->wash($html); + $REMOTE_OBJECTS = $washer->extlinks; + + return $html; +} /** * Convert the given message part to proper HTML @@ -734,58 +767,58 @@ function rcmail_wash_html($html, $p, $cid_replaces) */ function rcmail_print_body($part, $p = array()) { - global $RCMAIL; - - // trigger plugin hook - $data = $RCMAIL->plugins->exec_hook('message_part_before', - array('type' => $part->ctype_secondary, 'body' => $part->body, 'id' => $part->mime_id) - + $p + array('safe' => false, 'plain' => false, 'inline_html' => true)); - - // convert html to text/plain - if ($data['plain'] && ($data['type'] == 'html' || $data['type'] == 'enriched')) { - if ($data['type'] == 'enriched') { - $data['body'] = rcube_enriched::to_html($data['body']); - } - $txt = new rcube_html2text($data['body'], false, true); - $body = $txt->get_text(); - $part->ctype_secondary = 'plain'; - } - // text/html - else if ($data['type'] == 'html') { - $body = rcmail_wash_html($data['body'], $data, $part->replaces); - $part->ctype_secondary = $data['type']; - } - // text/enriched - else if ($data['type'] == 'enriched') { - $body = rcube_enriched::to_html($data['body']); - $body = rcmail_wash_html($body, $data, $part->replaces); - $part->ctype_secondary = 'html'; - } - else { - // assert plaintext - $body = $part->body; - $part->ctype_secondary = $data['type'] = 'plain'; - } - - // free some memory (hopefully) - unset($data['body']); - - // plaintext postprocessing - if ($part->ctype_secondary == 'plain') { - if ($part->ctype_secondary == 'plain' && $part->ctype_parameters['format'] == 'flowed') { - $body = rcube_mime::unfold_flowed($body); - } - - $body = rcmail_plain_body($body); - } - - // allow post-processing of the message body - $data = $RCMAIL->plugins->exec_hook('message_part_after', - array('type' => $part->ctype_secondary, 'body' => $body, 'id' => $part->mime_id) + $data); - - return $data['type'] == 'html' ? $data['body'] : html::tag('pre', array(), $data['body']); -} + global $RCMAIL; + + // trigger plugin hook + $data = $RCMAIL->plugins->exec_hook('message_part_before', + array('type' => $part->ctype_secondary, 'body' => $part->body, 'id' => $part->mime_id) + + $p + array('safe' => false, 'plain' => false, 'inline_html' => true)); + + // convert html to text/plain + if ($data['plain'] && ($data['type'] == 'html' || $data['type'] == 'enriched')) { + if ($data['type'] == 'enriched') { + $data['body'] = rcube_enriched::to_html($data['body']); + } + + $txt = new rcube_html2text($data['body'], false, true); + $body = $txt->get_text(); + $part->ctype_secondary = 'plain'; + } + // text/html + else if ($data['type'] == 'html') { + $body = rcmail_wash_html($data['body'], $data, $part->replaces); + $part->ctype_secondary = $data['type']; + } + // text/enriched + else if ($data['type'] == 'enriched') { + $body = rcube_enriched::to_html($data['body']); + $body = rcmail_wash_html($body, $data, $part->replaces); + $part->ctype_secondary = 'html'; + } + else { + // assert plaintext + $body = $part->body; + $part->ctype_secondary = $data['type'] = 'plain'; + } + + // free some memory (hopefully) + unset($data['body']); + + // plaintext postprocessing + if ($part->ctype_secondary == 'plain') { + if ($part->ctype_secondary == 'plain' && $part->ctype_parameters['format'] == 'flowed') { + $body = rcube_mime::unfold_flowed($body); + } + + $body = rcmail_plain_body($body); + } + // allow post-processing of the message body + $data = $RCMAIL->plugins->exec_hook('message_part_after', + array('type' => $part->ctype_secondary, 'body' => $body, 'id' => $part->mime_id) + $data); + + return $data['type'] == 'html' ? $data['body'] : html::tag('pre', array(), $data['body']); +} /** * Handle links and citation marks in plain text message @@ -796,232 +829,245 @@ function rcmail_print_body($part, $p = array()) */ function rcmail_plain_body($body) { - global $RCMAIL; - - // make links and email-addresses clickable - $attribs = array('link_attribs' => array('rel' => 'noreferrer', 'target' => '_blank')); - $replacer = new rcmail_string_replacer($attribs); - - // search for patterns like links and e-mail addresses and replace with tokens - $body = $replacer->replace($body); - - // split body into single lines - $body = preg_split('/\r?\n/', $body); - $quote_level = 0; - $last = -1; - - // find/mark quoted lines... - for ($n=0, $cnt=count($body); $n < $cnt; $n++) { - if ($body[$n][0] == '>' && preg_match('/^(>+ {0,1})+/', $body[$n], $regs)) { - $q = substr_count($regs[0], '>'); - $body[$n] = substr($body[$n], strlen($regs[0])); - - if ($q > $quote_level) { - $body[$n] = $replacer->get_replacement($replacer->add( - str_repeat('<blockquote>', $q - $quote_level))) . $body[$n]; - $last = $n; - } - else if ($q < $quote_level) { - $body[$n] = $replacer->get_replacement($replacer->add( - str_repeat('</blockquote>', $quote_level - $q))) . $body[$n]; - $last = $n; - } - } - else { - $q = 0; - if ($quote_level > 0) - $body[$n] = $replacer->get_replacement($replacer->add( - str_repeat('</blockquote>', $quote_level))) . $body[$n]; + global $RCMAIL; + + // make links and email-addresses clickable + $attribs = array('link_attribs' => array('rel' => 'noreferrer', 'target' => '_blank')); + $replacer = new rcmail_string_replacer($attribs); + + // search for patterns like links and e-mail addresses and replace with tokens + $body = $replacer->replace($body); + + // split body into single lines + $body = preg_split('/\r?\n/', $body); + $quote_level = 0; + $last = -1; + + // find/mark quoted lines... + for ($n=0, $cnt=count($body); $n < $cnt; $n++) { + if ($body[$n][0] == '>' && preg_match('/^(>+ {0,1})+/', $body[$n], $regs)) { + $q = substr_count($regs[0], '>'); + $body[$n] = substr($body[$n], strlen($regs[0])); + + if ($q > $quote_level) { + $body[$n] = $replacer->get_replacement($replacer->add( + str_repeat('<blockquote>', $q - $quote_level))) . $body[$n]; + $last = $n; + } + else if ($q < $quote_level) { + $body[$n] = $replacer->get_replacement($replacer->add( + str_repeat('</blockquote>', $quote_level - $q))) . $body[$n]; + $last = $n; + } + } + else { + $q = 0; + if ($quote_level > 0) + $body[$n] = $replacer->get_replacement($replacer->add( + str_repeat('</blockquote>', $quote_level))) . $body[$n]; + } + + $quote_level = $q; } - $quote_level = $q; - } + $body = join("\n", $body); - $body = join("\n", $body); + // quote plain text (don't use rcube::Q() here, to display entities "as is") + $table = get_html_translation_table(HTML_SPECIALCHARS); + unset($table['?']); + $body = strtr($body, $table); - // quote plain text (don't use Q() here, to display entities "as is") - $table = get_html_translation_table(HTML_SPECIALCHARS); - unset($table['?']); - $body = strtr($body, $table); + // colorize signature (up to <sig_max_lines> lines) + $len = strlen($body); + $sig_max_lines = $RCMAIL->config->get('sig_max_lines', 15); - // colorize signature (up to <sig_max_lines> lines) - $len = strlen($body); - $sig_max_lines = $RCMAIL->config->get('sig_max_lines', 15); - while (($sp = strrpos($body, "-- \n", $sp ? -$len+$sp-1 : 0)) !== false) { - if ($sp == 0 || $body[$sp-1] == "\n") { - // do not touch blocks with more that X lines - if (substr_count($body, "\n", $sp) < $sig_max_lines) - $body = substr($body, 0, max(0, $sp)) - .'<span class="sig">'.substr($body, $sp).'</span>'; - break; + while (($sp = strrpos($body, "-- \n", $sp ? -$len+$sp-1 : 0)) !== false) { + if ($sp == 0 || $body[$sp-1] == "\n") { + // do not touch blocks with more that X lines + if (substr_count($body, "\n", $sp) < $sig_max_lines) { + $body = substr($body, 0, max(0, $sp)) + . '<span class="sig">'.substr($body, $sp).'</span>'; + } + + break; + } } - } - // insert url/mailto links and citation tags - $body = $replacer->resolve($body); + // insert url/mailto links and citation tags + $body = $replacer->resolve($body); - return $body; + return $body; } - /** * Callback function for washtml cleaning class */ function rcmail_washtml_callback($tagname, $attrib, $content, $washtml) { - switch ($tagname) { + switch ($tagname) { case 'form': - $out = html::div('form', $content); - break; + $out = html::div('form', $content); + break; case 'style': - // decode all escaped entities and reduce to ascii strings - $stripped = preg_replace('/[^a-zA-Z\(:;]/', '', rcmail_xss_entity_decode($content)); - - // now check for evil strings like expression, behavior or url() - if (!preg_match('/expression|behavior|javascript:|import[^a]/i', $stripped)) { - if (!$washtml->get_config('allow_remote') && stripos($stripped, 'url(')) - $washtml->extlinks = true; - else - $out = html::tag('style', array('type' => 'text/css'), $content); - break; - } + // decode all escaped entities and reduce to ascii strings + $stripped = preg_replace('/[^a-zA-Z\(:;]/', '', rcube_utils::xss_entity_decode($content)); + + // now check for evil strings like expression, behavior or url() + if (!preg_match('/expression|behavior|javascript:|import[^a]/i', $stripped)) { + if (!$washtml->get_config('allow_remote') && stripos($stripped, 'url(')) + $washtml->extlinks = true; + else + $out = html::tag('style', array('type' => 'text/css'), $content); + break; + } default: - $out = ''; - } + $out = ''; + } - return $out; + return $out; } - /** * return table with message headers */ function rcmail_message_headers($attrib, $headers=null) { - global $MESSAGE, $PRINT_MODE, $RCMAIL; - static $sa_attrib; - - // keep header table attrib - if (is_array($attrib) && !$sa_attrib && !$attrib['valueof']) - $sa_attrib = $attrib; - else if (!is_array($attrib) && is_array($sa_attrib)) - $attrib = $sa_attrib; - - if (!isset($MESSAGE)) - return FALSE; - - // get associative array of headers object - if (!$headers) { - $headers_obj = $MESSAGE->headers; - $headers = get_object_vars($MESSAGE->headers); - } - else if (is_object($headers)) { - $headers_obj = $headers; - $headers = get_object_vars($headers_obj); - } - else { - $headers_obj = rcube_message_header::from_array($headers); - } - - // show these headers - $standard_headers = array('subject', 'from', 'sender', 'to', 'cc', 'bcc', 'replyto', - 'mail-reply-to', 'mail-followup-to', 'date', 'priority'); - $exclude_headers = $attrib['exclude'] ? explode(',', $attrib['exclude']) : array(); - $output_headers = array(); - - foreach ($standard_headers as $hkey) { - $ishtml = false; - - if ($headers[$hkey]) - $value = $headers[$hkey]; - else if ($headers['others'][$hkey]) - $value = $headers['others'][$hkey]; - else if (!$attrib['valueof']) - continue; - - if (in_array($hkey, $exclude_headers)) - continue; - - $header_title = rcube_label(preg_replace('/(^mail-|-)/', '', $hkey)); - - if ($hkey == 'date') { - if ($PRINT_MODE) - $header_value = format_date($value, $RCMAIL->config->get('date_long', 'x')); - else - $header_value = format_date($value); - } - else if ($hkey == 'priority') { - if ($value) { - $header_value = html::span('prio' . $value, rcmail_localized_priority($value)); - } - else - continue; - } - else if ($hkey == 'replyto') { - if ($headers['replyto'] != $headers['from']) { - $header_value = rcmail_address_string($value, $attrib['max'], true, $attrib['addicon'], $headers['charset'], $header_title); - $ishtml = true; - } - else - continue; - } - else if ($hkey == 'mail-reply-to') { - if ($headers['mail-replyto'] != $headers['reply-to'] - && $headers['reply-to'] != $headers['from'] - ) { - $header_value = rcmail_address_string($value, $attrib['max'], true, $attrib['addicon'], $headers['charset'], $header_title); - $ishtml = true; - } - else - continue; - } - else if ($hkey == 'sender') { - if ($headers['sender'] != $headers['from']) { - $header_value = rcmail_address_string($value, $attrib['max'], true, $attrib['addicon'], $headers['charset'], $header_title); - $ishtml = true; - } - else - continue; - } - else if ($hkey == 'mail-followup-to') { - $header_value = rcmail_address_string($value, $attrib['max'], true, $attrib['addicon'], $headers['charset'], $header_title); - $ishtml = true; - } - else if (in_array($hkey, array('from', 'to', 'cc', 'bcc'))) { - $header_value = rcmail_address_string($value, $attrib['max'], true, $attrib['addicon'], $headers['charset'], $header_title); - $ishtml = true; - } - else if ($hkey == 'subject' && empty($value)) - $header_value = rcube_label('nosubject'); - else - $header_value = trim(rcube_mime::decode_header($value, $headers['charset'])); + global $MESSAGE, $PRINT_MODE, $RCMAIL; + static $sa_attrib; - $output_headers[$hkey] = array( - 'title' => $header_title, - 'value' => $header_value, - 'raw' => $value, - 'html' => $ishtml, - ); - } + // keep header table attrib + if (is_array($attrib) && !$sa_attrib && !$attrib['valueof']) + $sa_attrib = $attrib; + else if (!is_array($attrib) && is_array($sa_attrib)) + $attrib = $sa_attrib; + + if (!isset($MESSAGE)) { + return false; + } + + // get associative array of headers object + if (!$headers) { + $headers_obj = $MESSAGE->headers; + $headers = get_object_vars($MESSAGE->headers); + } + else if (is_object($headers)) { + $headers_obj = $headers; + $headers = get_object_vars($headers_obj); + } + else { + $headers_obj = rcube_message_header::from_array($headers); + } + + // show these headers + $standard_headers = array('subject', 'from', 'sender', 'to', 'cc', 'bcc', 'replyto', + 'mail-reply-to', 'mail-followup-to', 'date', 'priority'); + $exclude_headers = $attrib['exclude'] ? explode(',', $attrib['exclude']) : array(); + $output_headers = array(); + + foreach ($standard_headers as $hkey) { + $ishtml = false; + + if ($headers[$hkey]) + $value = $headers[$hkey]; + else if ($headers['others'][$hkey]) + $value = $headers['others'][$hkey]; + else if (!$attrib['valueof']) + continue; + + if (in_array($hkey, $exclude_headers)) + continue; + + $header_title = $RCMAIL->gettext(preg_replace('/(^mail-|-)/', '', $hkey)); + + if ($hkey == 'date') { + if ($PRINT_MODE) + $header_value = $RCMAIL->format_date($value, $RCMAIL->config->get('date_long', 'x')); + else + $header_value = $RCMAIL->format_date($value); + } + else if ($hkey == 'priority') { + if ($value) { + $header_value = html::span('prio' . $value, rcmail_localized_priority($value)); + } + else + continue; + } + else if ($hkey == 'replyto') { + if ($headers['replyto'] != $headers['from']) { + $header_value = rcmail_address_string($value, $attrib['max'], true, + $attrib['addicon'], $headers['charset'], $header_title); + $ishtml = true; + } + else + continue; + } + else if ($hkey == 'mail-reply-to') { + if ($headers['mail-replyto'] != $headers['reply-to'] + && $headers['reply-to'] != $headers['from'] + ) { + $header_value = rcmail_address_string($value, $attrib['max'], true, + $attrib['addicon'], $headers['charset'], $header_title); + $ishtml = true; + } + else + continue; + } + else if ($hkey == 'sender') { + if ($headers['sender'] != $headers['from']) { + $header_value = rcmail_address_string($value, $attrib['max'], true, + $attrib['addicon'], $headers['charset'], $header_title); + $ishtml = true; + } + else + continue; + } + else if ($hkey == 'mail-followup-to') { + $header_value = rcmail_address_string($value, $attrib['max'], true, + $attrib['addicon'], $headers['charset'], $header_title); + $ishtml = true; + } + else if (in_array($hkey, array('from', 'to', 'cc', 'bcc'))) { + $header_value = rcmail_address_string($value, $attrib['max'], true, + $attrib['addicon'], $headers['charset'], $header_title); + $ishtml = true; + } + else if ($hkey == 'subject' && empty($value)) + $header_value = $RCMAIL->gettext('nosubject'); + else + $header_value = trim(rcube_mime::decode_header($value, $headers['charset'])); - $plugin = $RCMAIL->plugins->exec_hook('message_headers_output', - array('output' => $output_headers, 'headers' => $headers_obj, 'exclude' => $exclude_headers)); + $output_headers[$hkey] = array( + 'title' => $header_title, + 'value' => $header_value, + 'raw' => $value, + 'html' => $ishtml, + ); + } - // single header value is requested - if (!empty($attrib['valueof'])) - return Q($plugin['output'][$attrib['valueof']]['value'], ($attrib['valueof'] == 'subject' ? 'strict' : 'show')); + $plugin = $RCMAIL->plugins->exec_hook('message_headers_output', array( + 'output' => $output_headers, + 'headers' => $headers_obj, + 'exclude' => $exclude_headers + )); + + // single header value is requested + if (!empty($attrib['valueof'])) { + return rcube::Q($plugin['output'][$attrib['valueof']]['value'], ($attrib['valueof'] == 'subject' ? 'strict' : 'show')); + } - // compose html table - $table = new html_table(array('cols' => 2)); + // compose html table + $table = new html_table(array('cols' => 2)); - foreach ($plugin['output'] as $hkey => $row) { - $table->add(array('class' => 'header-title'), Q($row['title'])); - $table->add(array('class' => 'header '.$hkey), $row['html'] ? $row['value'] : Q($row['value'], ($hkey == 'subject' ? 'strict' : 'show'))); - } + foreach ($plugin['output'] as $hkey => $row) { + $val = $row['html'] ? $row['value'] : rcube::Q($row['value'], ($hkey == 'subject' ? 'strict' : 'show')); - return $table->show($attrib); + $table->add(array('class' => 'header-title'), rcube::Q($row['title'])); + $table->add(array('class' => 'header '.$hkey), $val); + } + + return $table->show($attrib); } /** @@ -1029,18 +1075,21 @@ function rcmail_message_headers($attrib, $headers=null) */ function rcmail_localized_priority($value) { - $labels_map = array( - '1' => 'highest', - '2' => 'high', - '3' => 'normal', - '4' => 'low', - '5' => 'lowest', - ); - - if ($value && $labels_map[$value]) - return rcube_label($labels_map[$value]); - - return ''; + global $RCMAIL; + + $labels_map = array( + '1' => 'highest', + '2' => 'high', + '3' => 'normal', + '4' => 'low', + '5' => 'lowest', + ); + + if ($value && $labels_map[$value]) { + return $RCMAIL->gettext($labels_map[$value]); + } + + return ''; } /** @@ -1048,18 +1097,21 @@ function rcmail_localized_priority($value) */ function rcmail_message_full_headers($attrib, $headers=NULL) { - global $OUTPUT; + global $OUTPUT, $RCMAIL; - $html = html::div(array('id' => "all-headers", 'class' => "all", 'style' => 'display:none'), html::div(array('id' => 'headers-source'), '')); - $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)", 'title' => rcube_label('togglefullheaders')), ''); + $html = html::div(array('id' => "all-headers", 'class' => "all", 'style' => 'display:none'), html::div(array('id' => 'headers-source'), '')); + $html .= html::div(array( + 'class' => "more-headers show-headers", + 'onclick' => "return ".rcmail_output::JS_OBJECT_NAME.".command('show-headers','',this)", + 'title' => $RCMAIL->gettext('togglefullheaders') + ), ''); - $OUTPUT->add_gui_object('all_headers_row', 'all-headers'); - $OUTPUT->add_gui_object('all_headers_box', 'headers-source'); + $OUTPUT->add_gui_object('all_headers_row', 'all-headers'); + $OUTPUT->add_gui_object('all_headers_box', 'headers-source'); - return html::div($attrib, $html); + return html::div($attrib, $html); } - /** * Handler for the 'messagebody' GUI object * @@ -1068,518 +1120,530 @@ function rcmail_message_full_headers($attrib, $headers=NULL) */ function rcmail_message_body($attrib) { - global $CONFIG, $OUTPUT, $MESSAGE, $RCMAIL, $REMOTE_OBJECTS; + global $OUTPUT, $MESSAGE, $RCMAIL, $REMOTE_OBJECTS; - if (!is_array($MESSAGE->parts) && empty($MESSAGE->body)) - return ''; + if (!is_array($MESSAGE->parts) && empty($MESSAGE->body)) { + return ''; + } - if (!$attrib['id']) - $attrib['id'] = 'rcmailMsgBody'; - - $safe_mode = $MESSAGE->is_safe || intval($_GET['_safe']); - $out = ''; - - $header_attrib = array(); - foreach ($attrib as $attr => $value) - if (preg_match('/^headertable([a-z]+)$/i', $attr, $regs)) - $header_attrib[$regs[1]] = $value; - - if (!empty($MESSAGE->parts)) { - foreach ($MESSAGE->parts as $part) { - if ($part->type == 'headers') { - $out .= html::div('message-partheaders', rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : null, $part->headers)); - } - else if ($part->type == 'content') { - // unsupported (e.g. encrypted) - if ($part->realtype) { - if ($part->realtype == 'multipart/encrypted' || $part->realtype == 'application/pkcs7-mime') { - $out .= html::span('part-notice', rcube_label('encryptedmessage')); - } - continue; - } - else if (!$part->size) { - continue; - } - // Check if we have enough memory to handle the message in it - // #1487424: we need up to 10x more memory than the body - else if (!rcmail_mem_check($part->size * 10)) { - $out .= html::span('part-notice', rcube_label('messagetoobig'). ' ' - . html::a('?_task=mail&_action=get&_download=1&_uid='.$MESSAGE->uid.'&_part='.$part->mime_id - .'&_mbox='. urlencode($RCMAIL->storage->get_folder()), rcube_label('download'))); - continue; + if (!$attrib['id']) + $attrib['id'] = 'rcmailMsgBody'; + + $safe_mode = $MESSAGE->is_safe || intval($_GET['_safe']); + $out = ''; + + $header_attrib = array(); + foreach ($attrib as $attr => $value) { + if (preg_match('/^headertable([a-z]+)$/i', $attr, $regs)) { + $header_attrib[$regs[1]] = $value; } + } - if (empty($part->ctype_parameters) || empty($part->ctype_parameters['charset'])) - $part->ctype_parameters['charset'] = $MESSAGE->headers->charset; + if (!empty($MESSAGE->parts)) { + foreach ($MESSAGE->parts as $part) { + if ($part->type == 'headers') { + $out .= html::div('message-partheaders', rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : null, $part->headers)); + } + else if ($part->type == 'content') { + // unsupported (e.g. encrypted) + if ($part->realtype) { + if ($part->realtype == 'multipart/encrypted' || $part->realtype == 'application/pkcs7-mime') { + $out .= html::span('part-notice', $RCMAIL->gettext('encryptedmessage')); + } + continue; + } + else if (!$part->size) { + continue; + } - // fetch part if not available - if (!isset($part->body)) - $part->body = $MESSAGE->get_part_content($part->mime_id); + // Check if we have enough memory to handle the message in it + // #1487424: we need up to 10x more memory than the body + else if (!rcube_utils::mem_check($part->size * 10)) { + $out .= html::span('part-notice', $RCMAIL->gettext('messagetoobig'). ' ' + . html::a('?_task=mail&_action=get&_download=1&_uid='.$MESSAGE->uid.'&_part='.$part->mime_id + .'&_mbox='. urlencode($RCMAIL->storage->get_folder()), $RCMAIL->gettext('download'))); + continue; + } - // extract headers from message/rfc822 parts - if ($part->mimetype == 'message/rfc822') { - $msgpart = rcube_mime::parse_message($part->body); - if (!empty($msgpart->headers)) { - $part = $msgpart; - $out .= html::div('message-partheaders', rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : null, $part->headers)); - } - } + if (empty($part->ctype_parameters) || empty($part->ctype_parameters['charset'])) { + $part->ctype_parameters['charset'] = $MESSAGE->headers->charset; + } - // message is cached but not exists (#1485443), or other error - if ($part->body === false) { - rcmail_message_error($MESSAGE->uid); - } + // fetch part if not available + if (!isset($part->body)) { + $part->body = $MESSAGE->get_part_content($part->mime_id); + } - $plugin = $RCMAIL->plugins->exec_hook('message_body_prefix', array( - 'part' => $part, 'prefix' => '')); + // extract headers from message/rfc822 parts + if ($part->mimetype == 'message/rfc822') { + $msgpart = rcube_mime::parse_message($part->body); + if (!empty($msgpart->headers)) { + $part = $msgpart; + $out .= html::div('message-partheaders', rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : null, $part->headers)); + } + } - $body = rcmail_print_body($part, array('safe' => $safe_mode, 'plain' => !$CONFIG['prefer_html'])); + // message is cached but not exists (#1485443), or other error + if ($part->body === false) { + rcmail_message_error($MESSAGE->uid); + } - if ($part->ctype_secondary == 'html') { - $body = rcmail_html4inline($body, $attrib['id'], 'rcmBody', $attrs, $safe_mode); - $div_attr = array('class' => 'message-htmlpart'); - $style = array(); + $plugin = $RCMAIL->plugins->exec_hook('message_body_prefix', + array('part' => $part, 'prefix' => '')); - if (!empty($attrs)) { - foreach ($attrs as $a_idx => $a_val) - $style[] = $a_idx . ': ' . $a_val; - if (!empty($style)) - $div_attr['style'] = implode('; ', $style); - } + $body = rcmail_print_body($part, array('safe' => $safe_mode, 'plain' => !$RCMAIL->config->get('prefer_html'))); - $out .= html::div($div_attr, $plugin['prefix'] . $body); + if ($part->ctype_secondary == 'html') { + $body = rcmail_html4inline($body, $attrib['id'], 'rcmBody', $attrs, $safe_mode); + $div_attr = array('class' => 'message-htmlpart'); + $style = array(); + + if (!empty($attrs)) { + foreach ($attrs as $a_idx => $a_val) + $style[] = $a_idx . ': ' . $a_val; + if (!empty($style)) + $div_attr['style'] = implode('; ', $style); + } + + $out .= html::div($div_attr, $plugin['prefix'] . $body); + } + else + $out .= html::div('message-part', $plugin['prefix'] . $body); + } } - else - $out .= html::div('message-part', $plugin['prefix'] . $body); - } - } - } - else { - // Check if we have enough memory to handle the message in it - // #1487424: we need up to 10x more memory than the body - if (!rcmail_mem_check(strlen($MESSAGE->body) * 10)) { - $out .= html::span('part-notice', rcube_label('messagetoobig'). ' ' - . html::a('?_task=mail&_action=get&_download=1&_uid='.$MESSAGE->uid.'&_part=0' - .'&_mbox='. urlencode($RCMAIL->storage->get_folder()), rcube_label('download'))); } else { - $plugin = $RCMAIL->plugins->exec_hook('message_body_prefix', array( - 'part' => $MESSAGE, 'prefix' => '')); - - $out .= html::div('message-part', $plugin['prefix'] . html::tag('pre', array(), - rcmail_plain_body(Q($MESSAGE->body, 'strict', false)))); - } - } - - // list images after mail body - if ($RCMAIL->config->get('inline_images', true) && !empty($MESSAGE->attachments)) { - $thumbnail_size = $RCMAIL->config->get('image_thumbnail_size', 240); - $client_mimetypes = (array)$RCMAIL->config->get('client_mimetypes'); - - foreach ($MESSAGE->attachments as $attach_prop) { - // skip inline images - if ($attach_prop->content_id && $attach_prop->disposition == 'inline') { - continue; - } - - // Content-Type: image/*... - if ($mimetype = rcmail_part_image_type($attach_prop)) { - // display thumbnails - if ($thumbnail_size) { - $show_link = array( - 'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), - 'onclick' => sprintf( - 'return %s.command(\'load-attachment\',\'%s\',this)', - JS_OBJECT_NAME, - $attach_prop->mime_id) - ); - $out .= html::p('image-attachment', - html::a($show_link + array('class' => 'image-link', 'style' => sprintf('width:%dpx', $thumbnail_size)), - html::img(array( - 'class' => 'image-thumbnail', - 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, 'image') . '&_thumb=1', - 'title' => $attach_prop->filename, - 'alt' => $attach_prop->filename, - 'style' => sprintf('max-width:%dpx; max-height:%dpx', $thumbnail_size, $thumbnail_size), - )) - ) . - html::span('image-filename', Q($attach_prop->filename)) . - html::span('image-filesize', Q($RCMAIL->message_part_size($attach_prop))) . - html::span('attachment-links', - (in_array($mimetype, $client_mimetypes) ? html::a($show_link, rcube_label('showattachment')) . ' ' : '') . - html::a($show_link['href'] . '&_download=1', rcube_label('download')) - ) . - html::br(array('style' => 'clear:both')) - ); + // Check if we have enough memory to handle the message in it + // #1487424: we need up to 10x more memory than the body + if (!rcube_utils::mem_check(strlen($MESSAGE->body) * 10)) { + $out .= html::span('part-notice', $RCMAIL->gettext('messagetoobig'). ' ' + . html::a('?_task=mail&_action=get&_download=1&_uid='.$MESSAGE->uid.'&_part=0' + .'&_mbox='. urlencode($RCMAIL->storage->get_folder()), $RCMAIL->gettext('download'))); } else { - $out .= html::tag('fieldset', 'image-attachment', - html::tag('legend', 'image-filename', Q($attach_prop->filename)) . - html::p(array('align' => "center"), - html::img(array( - 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, 'image'), - 'title' => $attach_prop->filename, - 'alt' => $attach_prop->filename, - ))) - ); + $plugin = $RCMAIL->plugins->exec_hook('message_body_prefix', + array('part' => $MESSAGE, 'prefix' => '')); + + $out .= html::div('message-part', $plugin['prefix'] . html::tag('pre', array(), + rcmail_plain_body(rcube::Q($MESSAGE->body, 'strict', false)))); } - } } - } - // tell client that there are blocked remote objects - if ($REMOTE_OBJECTS && !$safe_mode) - $OUTPUT->set_env('blockedobjects', true); + // list images after mail body + if ($RCMAIL->config->get('inline_images', true) && !empty($MESSAGE->attachments)) { + $thumbnail_size = $RCMAIL->config->get('image_thumbnail_size', 240); + $client_mimetypes = (array)$RCMAIL->config->get('client_mimetypes'); + + foreach ($MESSAGE->attachments as $attach_prop) { + // skip inline images + if ($attach_prop->content_id && $attach_prop->disposition == 'inline') { + continue; + } + + // Content-Type: image/*... + if ($mimetype = rcmail_part_image_type($attach_prop)) { + // display thumbnails + if ($thumbnail_size) { + $show_link = array( + 'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), + 'onclick' => sprintf( + 'return %s.command(\'load-attachment\',\'%s\',this)', + rcmail_output::JS_OBJECT_NAME, + $attach_prop->mime_id) + ); + $out .= html::p('image-attachment', + html::a($show_link + array('class' => 'image-link', 'style' => sprintf('width:%dpx', $thumbnail_size)), + html::img(array( + 'class' => 'image-thumbnail', + 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, 'image') . '&_thumb=1', + 'title' => $attach_prop->filename, + 'alt' => $attach_prop->filename, + 'style' => sprintf('max-width:%dpx; max-height:%dpx', $thumbnail_size, $thumbnail_size), + )) + ) . + html::span('image-filename', rcube::Q($attach_prop->filename)) . + html::span('image-filesize', rcube::Q($RCMAIL->message_part_size($attach_prop))) . + html::span('attachment-links', + (in_array($mimetype, $client_mimetypes) ? html::a($show_link, $RCMAIL->gettext('showattachment')) . ' ' : '') . + html::a($show_link['href'] . '&_download=1', $RCMAIL->gettext('download')) + ) . + html::br(array('style' => 'clear:both')) + ); + } + else { + $out .= html::tag('fieldset', 'image-attachment', + html::tag('legend', 'image-filename', rcube::Q($attach_prop->filename)) . + html::p(array('align' => 'center'), + html::img(array( + 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, 'image'), + 'title' => $attach_prop->filename, + 'alt' => $attach_prop->filename, + ))) + ); + } + } + } + } - return html::div($attrib, $out); + // tell client that there are blocked remote objects + if ($REMOTE_OBJECTS && !$safe_mode) { + $OUTPUT->set_env('blockedobjects', true); + } + + return html::div($attrib, $out); } function rcmail_part_image_type($part) { - $rcmail = rcmail::get_instance(); - - // Skip TIFF images if browser doesn't support this format... - $tiff_support = !empty($_SESSION['browser_caps']) && !empty($_SESSION['browser_caps']['tif']); - // until we can convert them to JPEG - $tiff_support = $tiff_support || $rcmail->config->get('im_convert_path'); - - // Content-type regexp - $mime_regex = $tiff_support ? '/^image\//i' : '/^image\/(?!tif)/i'; - - // Content-Type: image/*... - if (preg_match($mime_regex, $part->mimetype)) { - return rcmail_fix_mimetype($part->mimetype); - } - - // Many clients use application/octet-stream, we'll detect mimetype - // by checking filename extension - - // Supported image filename extensions to image type map - $types = array( - 'jpg' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'png' => 'image/png', - 'gif' => 'image/gif', - 'bmp' => 'image/bmp', - ); - if ($tiff_support) { - $types['tif'] = 'image/tiff'; - $types['tiff'] = 'image/tiff'; - } - - if ($part->filename - && preg_match('/^application\/octet-stream$/i', $part->mimetype) - && preg_match('/\.([^.]+)$/i', $part->filename, $m) - && ($extension = strtolower($m[1])) - && isset($types[$extension]) - ) { - return $types[$extension]; - } -} + $rcmail = rcmail::get_instance(); + + // Skip TIFF images if browser doesn't support this format... + $tiff_support = !empty($_SESSION['browser_caps']) && !empty($_SESSION['browser_caps']['tif']); + // until we can convert them to JPEG + $tiff_support = $tiff_support || $rcmail->config->get('im_convert_path'); + + // Content-type regexp + $mime_regex = $tiff_support ? '/^image\//i' : '/^image\/(?!tif)/i'; + + // Content-Type: image/*... + if (preg_match($mime_regex, $part->mimetype)) { + return rcmail_fix_mimetype($part->mimetype); + } + // Many clients use application/octet-stream, we'll detect mimetype + // by checking filename extension + + // Supported image filename extensions to image type map + $types = array( + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/gif', + 'bmp' => 'image/bmp', + ); + if ($tiff_support) { + $types['tif'] = 'image/tiff'; + $types['tiff'] = 'image/tiff'; + } + + if ($part->filename + && preg_match('/^application\/octet-stream$/i', $part->mimetype) + && preg_match('/\.([^.]+)$/i', $part->filename, $m) + && ($extension = strtolower($m[1])) + && isset($types[$extension]) + ) { + return $types[$extension]; + } +} /** * modify a HTML message that it can be displayed inside a HTML page */ function rcmail_html4inline($body, $container_id, $body_id='', &$attributes=null, $allow_remote=false) { - $last_style_pos = 0; - $cont_id = $container_id.($body_id ? ' div.'.$body_id : ''); - - // find STYLE tags - while (($pos = stripos($body, '<style', $last_style_pos)) && ($pos2 = stripos($body, '</style>', $pos))) - { - $pos = strpos($body, '>', $pos) + 1; - $len = $pos2 - $pos; - - // replace all css definitions with #container [def] - $styles = substr($body, $pos, $len); - $styles = rcmail_mod_css_styles($styles, $cont_id, $allow_remote); - - $body = substr_replace($body, $styles, $pos, $len); - $last_style_pos = $pos2 + strlen($styles) - $len; - } - - // modify HTML links to open a new window if clicked - $GLOBALS['rcmail_html_container_id'] = $container_id; - $body = preg_replace_callback('/<(a|link|area)\s+([^>]+)>/Ui', 'rcmail_alter_html_link', $body); - unset($GLOBALS['rcmail_html_container_id']); - - $body = preg_replace(array( - // add comments arround html and other tags - '/(<!DOCTYPE[^>]*>)/i', - '/(<\?xml[^>]*>)/i', - '/(<\/?html[^>]*>)/i', - '/(<\/?head[^>]*>)/i', - '/(<title[^>]*>.*<\/title>)/Ui', - '/(<\/?meta[^>]*>)/i', - // quote <? of php and xml files that are specified as text/html - '/<\?/', - '/\?>/', - // replace <body> with <div> - '/<body([^>]*)>/i', - '/<\/body>/i', - ), - array( - '<!--\\1-->', - '<!--\\1-->', - '<!--\\1-->', - '<!--\\1-->', - '<!--\\1-->', - '<!--\\1-->', - '<?', - '?>', - '<div class="'.$body_id.'"\\1>', - '</div>', - ), - $body); - - $attributes = array(); - - // Handle body attributes that doesn't play nicely with div elements - $regexp = '/<div class="' . preg_quote($body_id, '/') . '"([^>]*)/'; - if (preg_match($regexp, $body, $m)) { - $attrs = $m[0]; - // Get bgcolor, we'll set it as background-color of the message container - if ($m[1] && preg_match('/bgcolor=["\']*([a-z0-9#]+)["\']*/', $attrs, $mb)) { - $attributes['background-color'] = $mb[1]; - $attrs = preg_replace('/bgcolor=["\']*([a-z0-9#]+)["\']*/', '', $attrs); - } - // Get background, we'll set it as background-image of the message container - if ($m[1] && preg_match('/background=["\']*([^"\'>\s]+)["\']*/', $attrs, $mb)) { - $attributes['background-image'] = 'url('.$mb[1].')'; - $attrs = preg_replace('/background=["\']*([^"\'>\s]+)["\']*/', '', $attrs); - } - if (!empty($attributes)) { - $body = preg_replace($regexp, rtrim($attrs), $body, 1); - } - - // handle body styles related to background image - if ($attributes['background-image']) { - // get body style - if (preg_match('/#'.preg_quote($cont_id, '/').'\s+\{([^}]+)}/i', $body, $m)) { - // get background related style - if (preg_match_all('/(background-position|background-repeat)\s*:\s*([^;]+);/i', $m[1], $ma, PREG_SET_ORDER)) { - foreach ($ma as $style) - $attributes[$style[1]] = $style[2]; + $last_style_pos = 0; + $cont_id = $container_id.($body_id ? ' div.'.$body_id : ''); + + // find STYLE tags + while (($pos = stripos($body, '<style', $last_style_pos)) && ($pos2 = stripos($body, '</style>', $pos))) { + $pos = strpos($body, '>', $pos) + 1; + $len = $pos2 - $pos; + + // replace all css definitions with #container [def] + $styles = substr($body, $pos, $len); + $styles = rcube_utils::mod_css_styles($styles, $cont_id, $allow_remote); + + $body = substr_replace($body, $styles, $pos, $len); + $last_style_pos = $pos2 + strlen($styles) - $len; + } + + // modify HTML links to open a new window if clicked + $GLOBALS['rcmail_html_container_id'] = $container_id; + $body = preg_replace_callback('/<(a|link|area)\s+([^>]+)>/Ui', 'rcmail_alter_html_link', $body); + unset($GLOBALS['rcmail_html_container_id']); + + $body = preg_replace(array( + // add comments arround html and other tags + '/(<!DOCTYPE[^>]*>)/i', + '/(<\?xml[^>]*>)/i', + '/(<\/?html[^>]*>)/i', + '/(<\/?head[^>]*>)/i', + '/(<title[^>]*>.*<\/title>)/Ui', + '/(<\/?meta[^>]*>)/i', + // quote <? of php and xml files that are specified as text/html + '/<\?/', + '/\?>/', + // replace <body> with <div> + '/<body([^>]*)>/i', + '/<\/body>/i', + ), + array( + '<!--\\1-->', + '<!--\\1-->', + '<!--\\1-->', + '<!--\\1-->', + '<!--\\1-->', + '<!--\\1-->', + '<?', + '?>', + '<div class="'.$body_id.'"\\1>', + '</div>', + ), + $body); + + $attributes = array(); + + // Handle body attributes that doesn't play nicely with div elements + $regexp = '/<div class="' . preg_quote($body_id, '/') . '"([^>]*)/'; + if (preg_match($regexp, $body, $m)) { + $attrs = $m[0]; + + // Get bgcolor, we'll set it as background-color of the message container + if ($m[1] && preg_match('/bgcolor=["\']*([a-z0-9#]+)["\']*/i', $attrs, $mb)) { + $attributes['background-color'] = $mb[1]; + $attrs = preg_replace('/bgcolor=["\']*[a-z0-9#]+["\']*/i', '', $attrs); + } + + // Get background, we'll set it as background-image of the message container + if ($m[1] && preg_match('/background=["\']*([^"\'>\s]+)["\']*/', $attrs, $mb)) { + $attributes['background-image'] = 'url('.$mb[1].')'; + $attrs = preg_replace('/background=["\']*([^"\'>\s]+)["\']*/', '', $attrs); + } + + if (!empty($attributes)) { + $body = preg_replace($regexp, rtrim($attrs), $body, 1); + } + + // handle body styles related to background image + if ($attributes['background-image']) { + // get body style + if (preg_match('/#'.preg_quote($cont_id, '/').'\s+\{([^}]+)}/i', $body, $m)) { + // get background related style + $regexp = '/(background-position|background-repeat)\s*:\s*([^;]+);/i'; + if (preg_match_all($regexp, $m[1], $ma, PREG_SET_ORDER)) { + foreach ($ma as $style) { + $attributes[$style[1]] = $style[2]; + } + } + } } - } } - } - // make sure there's 'rcmBody' div, we need it for proper css modification - // its name is hardcoded in rcmail_message_body() also - else { - $body = '<div class="' . $body_id . '">' . $body . '</div>'; - } + // make sure there's 'rcmBody' div, we need it for proper css modification + // its name is hardcoded in rcmail_message_body() also + else { + $body = '<div class="' . $body_id . '">' . $body . '</div>'; + } - return $body; + return $body; } - /** * parse link (a, link, area) attributes and set correct target */ function rcmail_alter_html_link($matches) { - global $RCMAIL; - - $tag = strtolower($matches[1]); - $attrib = parse_attrib_string($matches[2]); - $end = '>'; - - // Remove non-printable characters in URL (#1487805) - if ($attrib['href']) - $attrib['href'] = preg_replace('/[\x00-\x1F]/', '', $attrib['href']); - - if ($tag == 'link' && preg_match('/^https?:\/\//i', $attrib['href'])) { - $tempurl = 'tmp-' . md5($attrib['href']) . '.css'; - $_SESSION['modcssurls'][$tempurl] = $attrib['href']; - $attrib['href'] = $RCMAIL->url(array('task' => 'utils', 'action' => 'modcss', 'u' => $tempurl, 'c' => $GLOBALS['rcmail_html_container_id'])); - $end = ' />'; - } - else if (preg_match('/^mailto:(.+)/i', $attrib['href'], $mailto)) { - list($mailto, $url) = explode('?', html_entity_decode($mailto[1], ENT_QUOTES, 'UTF-8'), 2); - - $url = urldecode($url); - $mailto = urldecode($mailto); - $addresses = rcube_mime::decode_address_list($mailto, null, true); - $mailto = array(); - - // do sanity checks on recipients - foreach ($addresses as $idx => $addr) { - if (rcube_utils::check_email($addr['mailto'], false)) { - $addresses[$idx] = $addr['mailto']; - $mailto[] = $addr['string']; - } - else { - unset($addresses[$idx]); - } - } - - if (!empty($addresses)) { - $attrib['href'] = 'mailto:' . implode(',', $addresses); - $attrib['onclick'] = sprintf( - "return %s.command('compose','%s',this)", - JS_OBJECT_NAME, - JQ(implode(',', $mailto) . ($url ? "?$url" : ''))); + global $RCMAIL; + + $tag = strtolower($matches[1]); + $attrib = html::parse_attrib_string($matches[2]); + $end = '>'; + + // Remove non-printable characters in URL (#1487805) + if ($attrib['href']) + $attrib['href'] = preg_replace('/[\x00-\x1F]/', '', $attrib['href']); + + if ($tag == 'link' && preg_match('/^https?:\/\//i', $attrib['href'])) { + $tempurl = 'tmp-' . md5($attrib['href']) . '.css'; + $_SESSION['modcssurls'][$tempurl] = $attrib['href']; + $attrib['href'] = $RCMAIL->url(array('task' => 'utils', 'action' => 'modcss', 'u' => $tempurl, 'c' => $GLOBALS['rcmail_html_container_id'])); + $end = ' />'; } - else { - $attrib['href'] = '#NOP'; - $attrib['onclick'] = ''; - } - } - else if (empty($attrib['href']) && !$attrib['name']) { - $attrib['href'] = './#NOP'; - $attrib['onclick'] = 'return false'; - } - else if (!empty($attrib['href']) && $attrib['href'][0] != '#') { - $attrib['target'] = '_blank'; - } - - // Better security by adding rel="noreferrer" (#1484686) - if (($tag == 'a' || $tag == 'area') && $attrib['href'] && $attrib['href'][0] != '#') { - $attrib['rel'] = 'noreferrer'; - } - - // allowed attributes for a|link|area tags - $allow = array('href','name','target','onclick','id','class','style','title', - 'rel','type','media','alt','coords','nohref','hreflang','shape'); - - return "<$tag" . html::attrib_string($attrib, $allow) . $end; -} + else if (preg_match('/^mailto:(.+)/i', $attrib['href'], $mailto)) { + list($mailto, $url) = explode('?', html_entity_decode($mailto[1], ENT_QUOTES, 'UTF-8'), 2); + + $url = urldecode($url); + $mailto = urldecode($mailto); + $addresses = rcube_mime::decode_address_list($mailto, null, true); + $mailto = array(); + + // do sanity checks on recipients + foreach ($addresses as $idx => $addr) { + if (rcube_utils::check_email($addr['mailto'], false)) { + $addresses[$idx] = $addr['mailto']; + $mailto[] = $addr['string']; + } + else { + unset($addresses[$idx]); + } + } + if (!empty($addresses)) { + $attrib['href'] = 'mailto:' . implode(',', $addresses); + $attrib['onclick'] = sprintf( + "return %s.command('compose','%s',this)", + rcmail_output::JS_OBJECT_NAME, + rcube::JQ(implode(',', $mailto) . ($url ? "?$url" : ''))); + } + else { + $attrib['href'] = '#NOP'; + $attrib['onclick'] = ''; + } + } + else if (empty($attrib['href']) && !$attrib['name']) { + $attrib['href'] = './#NOP'; + $attrib['onclick'] = 'return false'; + } + else if (!empty($attrib['href']) && $attrib['href'][0] != '#') { + $attrib['target'] = '_blank'; + } + + // Better security by adding rel="noreferrer" (#1484686) + if (($tag == 'a' || $tag == 'area') && $attrib['href'] && $attrib['href'][0] != '#') { + $attrib['rel'] = 'noreferrer'; + } + + // allowed attributes for a|link|area tags + $allow = array('href','name','target','onclick','id','class','style','title', + 'rel','type','media','alt','coords','nohref','hreflang','shape'); + + return "<$tag" . html::attrib_string($attrib, $allow) . $end; +} /** * decode address string and re-format it as HTML links */ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null, $default_charset=null, $title=null) { - global $RCMAIL, $PRINT_MODE, $CONFIG; - - $a_parts = rcube_mime::decode_address_list($input, null, true, $default_charset); - - if (!sizeof($a_parts)) - return $input; - - $c = count($a_parts); - $j = 0; - $out = ''; - $allvalues = array(); - $show_email = $RCMAIL->config->get('message_show_email'); - - if ($addicon && !isset($_SESSION['writeable_abook'])) { - $_SESSION['writeable_abook'] = $RCMAIL->get_address_sources(true) ? true : false; - } - - foreach ($a_parts as $part) { - $j++; - $name = $part['name']; - $mailto = $part['mailto']; - $string = $part['string']; - $valid = check_email($mailto, false); - - // phishing email prevention (#1488981), e.g. "valid@email.addr <phishing@email.addr>" - if (!$show_email && $valid && $name && $name != $mailto && strpos($name, '@')) { - $name = ''; - } - - // IDNA ASCII to Unicode - if ($name == $mailto) - $name = rcube_idn_to_utf8($name); - if ($string == $mailto) - $string = rcube_idn_to_utf8($string); - $mailto = rcube_idn_to_utf8($mailto); - - if ($PRINT_MODE) { - $address = sprintf('%s <%s>', Q($name), Q($mailto)); - } - else if ($valid) { - if ($linked) { - $attrs = array( - 'href' => 'mailto:' . $mailto, - 'onclick' => sprintf("return %s.command('compose','%s',this)", JS_OBJECT_NAME, JQ(format_email_recipient($mailto, $name))), - 'class' => "rcmContactAddress", - ); + global $RCMAIL, $PRINT_MODE; - if ($show_email && $name && $mailto) { - $content = Q($name ? sprintf('%s <%s>', $name, $mailto) : $mailto); - } - else { - $content = Q($name ? $name : $mailto); - $attrs['title'] = $mailto; - } + $a_parts = rcube_mime::decode_address_list($input, null, true, $default_charset); - $address = html::a($attrs, $content); - } - else { - $address = html::span(array('title' => $mailto, 'class' => "rcmContactAddress"), - Q($name ? $name : $mailto)); - } - - if ($addicon && $_SESSION['writeable_abook']) { - $address .= html::a(array( - 'href' => "#add", - 'onclick' => sprintf("return %s.command('add-contact','%s',this)", JS_OBJECT_NAME, JQ($string)), - 'title' => rcube_label('addtoaddressbook'), - 'class' => 'rcmaddcontact', - ), - html::img(array( - 'src' => $CONFIG['skin_path'] . $addicon, - 'alt' => "Add contact", - ))); - } + if (!sizeof($a_parts)) { + return $input; } - else { - $address = ''; - if ($name) - $address .= Q($name); - if ($mailto) - $address = trim($address . ' ' . Q($name ? sprintf('<%s>', $mailto) : $mailto)); + + $c = count($a_parts); + $j = 0; + $out = ''; + $allvalues = array(); + $show_email = $RCMAIL->config->get('message_show_email'); + + if ($addicon && !isset($_SESSION['writeable_abook'])) { + $_SESSION['writeable_abook'] = $RCMAIL->get_address_sources(true) ? true : false; } - $address = html::span('adr', $address); - $allvalues[] = $address; + foreach ($a_parts as $part) { + $j++; - if (!$moreadrs) - $out .= ($out ? ', ' : '') . $address; + $name = $part['name']; + $mailto = $part['mailto']; + $string = $part['string']; + $valid = rcube_utils::check_email($mailto, false); - if ($max && $j == $max && $c > $j) { - if ($linked) { - $moreadrs = $c - $j; - } - else { - $out .= '...'; - break; - } - } - } + // phishing email prevention (#1488981), e.g. "valid@email.addr <phishing@email.addr>" + if (!$show_email && $valid && $name && $name != $mailto && strpos($name, '@')) { + $name = ''; + } + + // IDNA ASCII to Unicode + if ($name == $mailto) + $name = rcube_utils::idn_to_utf8($name); + if ($string == $mailto) + $string = rcube_utils::idn_to_utf8($string); + $mailto = rcube_utils::idn_to_utf8($mailto); - if ($moreadrs) { - if ($PRINT_MODE) { - $out .= ' ' . html::a(array( - 'href' => '#more', - 'class' => 'morelink', - 'onclick' => '$(this).hide().next().show()', - ), Q(rcube_label(array('name' => 'andnmore', 'vars' => array('nr' => $moreadrs))))) . - html::span(array('style' => 'display:none'), join(', ', $allvalues)); + if ($PRINT_MODE) { + $address = sprintf('%s <%s>', rcube::Q($name), rcube::Q($mailto)); + } + else if ($valid) { + if ($linked) { + $attrs = array( + 'href' => 'mailto:' . $mailto, + 'class' => 'rcmContactAddress', + 'onclick' => sprintf("return %s.command('compose','%s',this)", + rcmail_output::JS_OBJECT_NAME, rcube::JQ(format_email_recipient($mailto, $name))), + ); + + if ($show_email && $name && $mailto) { + $content = rcube::Q($name ? sprintf('%s <%s>', $name, $mailto) : $mailto); + } + else { + $content = rcube::Q($name ? $name : $mailto); + $attrs['title'] = $mailto; + } + + $address = html::a($attrs, $content); + } + else { + $address = html::span(array('title' => $mailto, 'class' => "rcmContactAddress"), + rcube::Q($name ? $name : $mailto)); + } + + if ($addicon && $_SESSION['writeable_abook']) { + $address .= html::a(array( + 'href' => "#add", + 'title' => $RCMAIL->gettext('addtoaddressbook'), + 'class' => 'rcmaddcontact', + 'onclick' => sprintf("return %s.command('add-contact','%s',this)", + rcmail_output::JS_OBJECT_NAME, rcube::JQ($string)), + ), + html::img(array( + 'src' => $RCMAIL->config->get('skin_path') . $addicon, + 'alt' => "Add contact", + ))); + } + } + else { + $address = ''; + if ($name) + $address .= rcube::Q($name); + if ($mailto) + $address = trim($address . ' ' . rcube::Q($name ? sprintf('<%s>', $mailto) : $mailto)); + } + + $address = html::span('adr', $address); + $allvalues[] = $address; + + if (!$moreadrs) + $out .= ($out ? ', ' : '') . $address; + + if ($max && $j == $max && $c > $j) { + if ($linked) { + $moreadrs = $c - $j; + } + else { + $out .= '...'; + break; + } + } } - else { - $out .= ' ' . html::a(array( - 'href' => '#more', - 'class' => 'morelink', - 'onclick' => sprintf("return %s.show_popup_dialog('%s','%s')", - JS_OBJECT_NAME, - JQ(join(', ', $allvalues)), - JQ($title)) - ), - Q(rcube_label(array('name' => 'andnmore', 'vars' => array('nr' => $moreadrs))))); + + if ($moreadrs) { + if ($PRINT_MODE) { + $out .= ' ' . html::a(array( + 'href' => '#more', + 'class' => 'morelink', + 'onclick' => '$(this).hide().next().show()', + ), + rcube::Q($RCMAIL->gettext(array('name' => 'andnmore', 'vars' => array('nr' => $moreadrs))))) + . html::span(array('style' => 'display:none'), join(', ', $allvalues)); + } + else { + $out .= ' ' . html::a(array( + 'href' => '#more', + 'class' => 'morelink', + 'onclick' => sprintf("return %s.show_popup_dialog('%s','%s')", + rcmail_output::JS_OBJECT_NAME, + rcube::JQ(join(', ', $allvalues)), + rcube::JQ($title)) + ), + rcube::Q($RCMAIL->gettext(array('name' => 'andnmore', 'vars' => array('nr' => $moreadrs))))); + } } - } - return $out; + return $out; } - /** * Wrap text to a given number of characters per line * but respect the mail quotation of replies messages (>). @@ -1592,74 +1656,79 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null, */ function rcmail_wrap_and_quote($text, $length = 72) { - // Rebuild the message body with a maximum of $max chars, while keeping quoted message. - $max = max(75, $length + 8); - $lines = preg_split('/\r?\n/', trim($text)); - $out = ''; - - foreach ($lines as $line) { - // don't wrap already quoted lines - if ($line[0] == '>') - $line = '>' . rtrim($line); - else if (mb_strlen($line) > $max) { - $newline = ''; - foreach (explode("\n", rc_wordwrap($line, $length - 2)) as $l) { - if (strlen($l)) - $newline .= '> ' . $l . "\n"; - else - $newline .= ">\n"; - } - $line = rtrim($newline); - } - else - $line = '> ' . $line; + // Rebuild the message body with a maximum of $max chars, while keeping quoted message. + $max = max(75, $length + 8); + $lines = preg_split('/\r?\n/', trim($text)); + $out = ''; + + foreach ($lines as $line) { + // don't wrap already quoted lines + if ($line[0] == '>') { + $line = '>' . rtrim($line); + } + else if (mb_strlen($line) > $max) { + $newline = ''; + + foreach (explode("\n", rcube_mime::wordwrap($line, $length - 2)) as $l) { + if (strlen($l)) + $newline .= '> ' . $l . "\n"; + else + $newline .= ">\n"; + } - // Append the line - $out .= $line . "\n"; - } + $line = rtrim($newline); + } + else { + $line = '> ' . $line; + } - return rtrim($out, "\n"); -} + // Append the line + $out .= $line . "\n"; + } + return rtrim($out, "\n"); +} function rcmail_draftinfo_encode($p) { - $parts = array(); - foreach ($p as $key => $val) - $parts[] = $key . '=' . ($key == 'folder' ? base64_encode($val) : $val); + $parts = array(); + foreach ($p as $key => $val) { + $parts[] = $key . '=' . ($key == 'folder' ? base64_encode($val) : $val); + } - return join('; ', $parts); + return join('; ', $parts); } - function rcmail_draftinfo_decode($str) { - $info = array(); - foreach (preg_split('/;\s+/', $str) as $part) { - list($key, $val) = explode('=', $part, 2); - if ($key == 'folder') - $val = base64_decode($val); - $info[$key] = $val; - } - - return $info; -} + $info = array(); + + foreach (preg_split('/;\s+/', $str) as $part) { + list($key, $val) = explode('=', $part, 2); + if ($key == 'folder') { + $val = base64_decode($val); + } + + $info[$key] = $val; + } + return $info; +} /** * clear message composing settings */ function rcmail_compose_cleanup($id) { - if (!isset($_SESSION['compose_data_'.$id])) - return; + if (!isset($_SESSION['compose_data_'.$id])) { + return; + } - $rcmail = rcmail::get_instance(); - $rcmail->plugins->exec_hook('attachments_cleanup', array('group' => $id)); - $rcmail->session->remove('compose_data_'.$id); + $rcmail = rcmail::get_instance(); + $rcmail->plugins->exec_hook('attachments_cleanup', array('group' => $id)); + $rcmail->session->remove('compose_data_'.$id); } - /** * Send the MDN response * @@ -1670,76 +1739,78 @@ function rcmail_compose_cleanup($id) */ function rcmail_send_mdn($message, &$smtp_error) { - global $RCMAIL; - - if (!is_object($message) || !is_a($message, 'rcube_message')) - $message = new rcube_message($message); - - if ($message->headers->mdn_to && empty($message->headers->flags['MDNSENT']) && - ($RCMAIL->storage->check_permflag('MDNSENT') || $RCMAIL->storage->check_permflag('*'))) - { - $identity = rcmail_identity_select($message); - $sender = format_email_recipient($identity['email'], $identity['name']); - $recipient = array_shift(rcube_mime::decode_address_list( - $message->headers->mdn_to, 1, true, $message->headers->charset)); - $mailto = $recipient['mailto']; - - $compose = new Mail_mime("\r\n"); - - $compose->setParam('text_encoding', 'quoted-printable'); - $compose->setParam('html_encoding', 'quoted-printable'); - $compose->setParam('head_encoding', 'quoted-printable'); - $compose->setParam('head_charset', RCMAIL_CHARSET); - $compose->setParam('html_charset', RCMAIL_CHARSET); - $compose->setParam('text_charset', RCMAIL_CHARSET); - - // compose headers array - $headers = array( - 'Date' => rcmail_user_date(), - 'From' => $sender, - 'To' => $message->headers->mdn_to, - 'Subject' => rcube_label('receiptread') . ': ' . $message->subject, - 'Message-ID' => rcmail_gen_message_id(), - 'X-Sender' => $identity['email'], - 'References' => trim($message->headers->references . ' ' . $message->headers->messageID), - ); + global $RCMAIL; + + if (!is_object($message) || !is_a($message, 'rcube_message')) { + $message = new rcube_message($message); + } - if ($agent = $RCMAIL->config->get('useragent')) - $headers['User-Agent'] = $agent; + if ($message->headers->mdn_to && empty($message->headers->flags['MDNSENT']) && + ($RCMAIL->storage->check_permflag('MDNSENT') || $RCMAIL->storage->check_permflag('*')) + ) { + $identity = rcmail_identity_select($message); + $sender = format_email_recipient($identity['email'], $identity['name']); + $recipient = array_shift(rcube_mime::decode_address_list( + $message->headers->mdn_to, 1, true, $message->headers->charset)); + $mailto = $recipient['mailto']; + + $compose = new Mail_mime("\r\n"); + + $compose->setParam('text_encoding', 'quoted-printable'); + $compose->setParam('html_encoding', 'quoted-printable'); + $compose->setParam('head_encoding', 'quoted-printable'); + $compose->setParam('head_charset', RCUBE_CHARSET); + $compose->setParam('html_charset', RCUBE_CHARSET); + $compose->setParam('text_charset', RCUBE_CHARSET); + + // compose headers array + $headers = array( + 'Date' => $RCMAIL->user_date(), + 'From' => $sender, + 'To' => $message->headers->mdn_to, + 'Subject' => $RCMAIL->gettext('receiptread') . ': ' . $message->subject, + 'Message-ID' => $RCMAIL->gen_message_id(), + 'X-Sender' => $identity['email'], + 'References' => trim($message->headers->references . ' ' . $message->headers->messageID), + ); - if ($RCMAIL->config->get('mdn_use_from')) - $options['mdn_use_from'] = true; + $report = "Final-Recipient: rfc822; {$identity['email']}\r\n" + . "Original-Message-ID: {$message->headers->messageID}\r\n" + . "Disposition: manual-action/MDN-sent-manually; displayed\r\n"; - $body = rcube_label("yourmessage") . "\r\n\r\n" . - "\t" . rcube_label("to") . ': ' . rcube_mime::decode_mime_string($message->headers->to, $message->headers->charset) . "\r\n" . - "\t" . rcube_label("subject") . ': ' . $message->subject . "\r\n" . - "\t" . rcube_label("sent") . ': ' . format_date($message->headers->date, $RCMAIL->config->get('date_long')) . "\r\n" . - "\r\n" . rcube_label("receiptnote") . "\r\n"; + if ($message->headers->to) { + $report .= "Original-Recipient: {$message->headers->to}\r\n"; + } - $ua = $RCMAIL->config->get('useragent', "Roundcube Webmail (Version ".RCMAIL_VERSION.")"); - $report = "Reporting-UA: $ua\r\n"; + if ($agent = $RCMAIL->config->get('useragent')) { + $headers['User-Agent'] = $agent; + $report .= "Reporting-UA: $agent\r\n"; + } - if ($message->headers->to) - $report .= "Original-Recipient: {$message->headers->to}\r\n"; + $body = $RCMAIL->gettext("yourmessage") . "\r\n\r\n" . + "\t" . $RCMAIL->gettext("to") . ': ' . rcube_mime::decode_mime_string($message->headers->to, $message->headers->charset) . "\r\n" . + "\t" . $RCMAIL->gettext("subject") . ': ' . $message->subject . "\r\n" . + "\t" . $RCMAIL->gettext("sent") . ': ' . $RCMAIL->format_date($message->headers->date, $RCMAIL->config->get('date_long')) . "\r\n" . + "\r\n" . $RCMAIL->gettext("receiptnote"); - $report .= "Final-Recipient: rfc822; {$identity['email']}\r\n" . - "Original-Message-ID: {$message->headers->messageID}\r\n" . - "Disposition: manual-action/MDN-sent-manually; displayed\r\n"; + $compose->headers($headers); + $compose->setContentType('multipart/report', array('report-type'=> 'disposition-notification')); + $compose->setTXTBody(rcube_mime::wordwrap($body, 75, "\r\n")); + $compose->addAttachment($report, 'message/disposition-notification', 'MDNPart2.txt', false, '7bit', 'inline'); - $compose->headers($headers); - $compose->setContentType('multipart/report', array('report-type'=> 'disposition-notification')); - $compose->setTXTBody(rc_wordwrap($body, 75, "\r\n")); - $compose->addAttachment($report, 'message/disposition-notification', 'MDNPart2.txt', false, '7bit', 'inline'); + if ($RCMAIL->config->get('mdn_use_from')) { + $options['mdn_use_from'] = true; + } - $sent = rcmail_deliver_message($compose, $identity['email'], $mailto, $smtp_error, $body_file, $options); + $sent = $RCMAIL->deliver_message($compose, $identity['email'], $mailto, $smtp_error, $body_file, $options); - if ($sent) { - $RCMAIL->storage->set_flag($message->uid, 'MDNSENT'); - return true; + if ($sent) { + $RCMAIL->storage->set_flag($message->uid, 'MDNSENT'); + return true; + } } - } - return false; + return false; } /** @@ -1775,28 +1846,34 @@ function rcmail_identity_select($MESSAGE, $identities = null, $compose_mode = 'r } } - $from_idx = null; - $found_idx = null; - $default_identity = 0; // default identity is always first on the list + // decode From: address + $from = rcube_mime::decode_address_list($MESSAGE->headers->from, null, true, $MESSAGE->headers->charset); + $from = array_shift($from); + $from['mailto'] = strtolower($from['mailto']); + + $from_idx = null; + $found_idx = array('to' => null, 'from' => null); + $check_from = in_array($compose_mode, array('draft', 'edit', 'reply')); // Select identity foreach ($identities as $idx => $ident) { - // use From header - if (in_array($compose_mode, array('draft', 'edit'))) { - if ($MESSAGE->headers->from == $ident['ident']) { + // use From: header when in edit/draft or reply-to-self + if ($check_from && $from['mailto'] == strtolower($ident['email_ascii'])) { + // remember first matching identity address + if ($found_idx['from'] === null) { + $found_idx['from'] = $idx; + } + // match identity name + if ($from['name'] && $ident['name'] && $from['name'] == $ident['name']) { $from_idx = $idx; break; } } - // reply to yourself - else if ($compose_mode == 'reply' && $MESSAGE->headers->from == $ident['ident']) { - $from_idx = $idx; - break; - } - // use replied message recipients + // use replied/forwarded message recipients else if (($found = array_search(strtolower($ident['email_ascii']), $a_recipients)) !== false) { - if ($found_idx === null) { - $found_idx = $idx; + // remember first matching identity address + if ($found_idx['to'] === null) { + $found_idx['to'] = $idx; } // match identity name if ($a_names[$found] && $ident['name'] && $a_names[$found] == $ident['name']) { @@ -1806,22 +1883,27 @@ function rcmail_identity_select($MESSAGE, $identities = null, $compose_mode = 'r } } - // If matching by name+address doesn't found any matches, get first found address (identity) + // If matching by name+address didn't find any matches, + // get first found identity (address) if any if ($from_idx === null) { - $from_idx = $found_idx; + $from_idx = $found_idx['from'] !== null ? $found_idx['from'] : $found_idx['to']; } // Try Return-Path if ($from_idx === null && ($return_path = $MESSAGE->headers->others['return-path'])) { + $return_path = array_map('strtolower', (array) $return_path); + foreach ($identities as $idx => $ident) { // Return-Path header contains an email address, but on some mailing list // it can be e.g. <pear-dev-return-55250-local=domain.tld@lists.php.net> // where local@domain.tld is the address we're looking for (#1489241) - $ident1 = $ident['email_ascii']; + $ident1 = strtolower($ident['email_ascii']); $ident2 = str_replace('@', '=', $ident1); + $ident1 = '<' . $ident1 . '>'; + $ident2 = '-' . $ident2 . '@'; - foreach ((array)$return_path as $path) { - if (stripos($path, $ident1) !== false || stripos($path, $ident2)) { + foreach ($return_path as $path) { + if ($path == $ident1 || stripos($path, $ident2)) { $from_idx = $idx; break 2; } @@ -1835,36 +1917,41 @@ function rcmail_identity_select($MESSAGE, $identities = null, $compose_mode = 'r $selected = $plugin['selected']; - return $identities[$selected !== null ? $selected : $default_identity]; + // default identity is always first on the list + return $identities[$selected !== null ? $selected : 0]; } // Fixes some content-type names function rcmail_fix_mimetype($name) { - // Some versions of Outlook create garbage Content-Type: - // application/pdf.A520491B_3BF7_494D_8855_7FAC2C6C0608 - if (preg_match('/^application\/pdf.+/', $name)) - $name = 'application/pdf'; - // treat image/pjpeg (image/pjpg, image/jpg) as image/jpeg (#1489097) - else if (preg_match('/^image\/p?jpe?g$/', $name)) - $name = 'image/jpeg'; - - return $name; + // Some versions of Outlook create garbage Content-Type: + // application/pdf.A520491B_3BF7_494D_8855_7FAC2C6C0608 + if (preg_match('/^application\/pdf.+/', $name)) { + $name = 'application/pdf'; + } + // treat image/pjpeg (image/pjpg, image/jpg) as image/jpeg (#1489097) + else if (preg_match('/^image\/p?jpe?g$/', $name)) { + $name = 'image/jpeg'; + } + + return $name; } // return attachment filename, handle empty filename case function rcmail_attachment_name($attachment, $display = false) { + global $RCMAIL; + $filename = $attachment->filename; if ($filename === null || $filename === '') { if ($attachment->mimetype == 'text/html') { - $filename = rcube_label('htmlmessage'); + $filename = $RCMAIL->gettext('htmlmessage'); } else { $ext = (array) rcube_mime::get_mime_extensions($attachment->mimetype); $ext = array_shift($ext); - $filename = rcube_label('messagepart') . ' ' . $attachment->mime_id; + $filename = $RCMAIL->gettext('messagepart') . ' ' . $attachment->mime_id; if ($ext) { $filename .= '.' . $ext; } @@ -1876,7 +1963,7 @@ function rcmail_attachment_name($attachment, $display = false) // Display smart names for some known mimetypes if ($display) { if (preg_match('/application\/(pgp|pkcs7)-signature/i', $attachment->mimetype)) { - $filename = rcube_label('digitalsig'); + $filename = $RCMAIL->gettext('digitalsig'); } } @@ -1885,92 +1972,155 @@ function rcmail_attachment_name($attachment, $display = false) function rcmail_search_filter($attrib) { - global $OUTPUT, $CONFIG; - - if (!strlen($attrib['id'])) - $attrib['id'] = 'rcmlistfilter'; - - $attrib['onchange'] = JS_OBJECT_NAME.'.filter_mailbox(this.value)'; - - // Content-Type values of messages with attachments - // the same as in app.js:add_message_row() - $ctypes = array('application/', 'multipart/m', 'multipart/signed', 'multipart/report'); - - // Build search string of "with attachment" filter - $attachment = str_repeat(' OR', count($ctypes)-1); - foreach ($ctypes as $type) { - $attachment .= ' HEADER Content-Type ' . rcube_imap_generic::escape($type); - } - - $select_filter = new html_select($attrib); - $select_filter->add(rcube_label('all'), 'ALL'); - $select_filter->add(rcube_label('unread'), 'UNSEEN'); - $select_filter->add(rcube_label('flagged'), 'FLAGGED'); - $select_filter->add(rcube_label('unanswered'), 'UNANSWERED'); - if (!$CONFIG['skip_deleted']) { - $select_filter->add(rcube_label('deleted'), 'DELETED'); - $select_filter->add(rcube_label('undeleted'), 'UNDELETED'); - } - $select_filter->add(rcube_label('withattachment'), $attachment); - $select_filter->add(rcube_label('priority').': '.rcube_label('highest'), 'HEADER X-PRIORITY 1'); - $select_filter->add(rcube_label('priority').': '.rcube_label('high'), 'HEADER X-PRIORITY 2'); - $select_filter->add(rcube_label('priority').': '.rcube_label('normal'), 'NOT HEADER X-PRIORITY 1 NOT HEADER X-PRIORITY 2 NOT HEADER X-PRIORITY 4 NOT HEADER X-PRIORITY 5'); - $select_filter->add(rcube_label('priority').': '.rcube_label('low'), 'HEADER X-PRIORITY 4'); - $select_filter->add(rcube_label('priority').': '.rcube_label('lowest'), 'HEADER X-PRIORITY 5'); - - $out = $select_filter->show($_SESSION['search_filter']); - - $OUTPUT->add_gui_object('search_filter', $attrib['id']); - - return $out; + global $RCMAIL; + + if (!strlen($attrib['id'])) + $attrib['id'] = 'rcmlistfilter'; + + $attrib['onchange'] = rcmail_output::JS_OBJECT_NAME.'.filter_mailbox(this.value)'; + + // Content-Type values of messages with attachments + // the same as in app.js:add_message_row() + $ctypes = array('application/', 'multipart/m', 'multipart/signed', 'multipart/report'); + + // Build search string of "with attachment" filter + $attachment = str_repeat(' OR', count($ctypes)-1); + foreach ($ctypes as $type) { + $attachment .= ' HEADER Content-Type ' . rcube_imap_generic::escape($type); + } + + $select_filter = new html_select($attrib); + $select_filter->add($RCMAIL->gettext('all'), 'ALL'); + $select_filter->add($RCMAIL->gettext('unread'), 'UNSEEN'); + $select_filter->add($RCMAIL->gettext('flagged'), 'FLAGGED'); + $select_filter->add($RCMAIL->gettext('unanswered'), 'UNANSWERED'); + if (!$RCMAIL->config->get('skip_deleted')) { + $select_filter->add($RCMAIL->gettext('deleted'), 'DELETED'); + $select_filter->add($RCMAIL->gettext('undeleted'), 'UNDELETED'); + } + $select_filter->add($RCMAIL->gettext('withattachment'), $attachment); + $select_filter->add($RCMAIL->gettext('priority').': '.$RCMAIL->gettext('highest'), 'HEADER X-PRIORITY 1'); + $select_filter->add($RCMAIL->gettext('priority').': '.$RCMAIL->gettext('high'), 'HEADER X-PRIORITY 2'); + $select_filter->add($RCMAIL->gettext('priority').': '.$RCMAIL->gettext('normal'), 'NOT HEADER X-PRIORITY 1 NOT HEADER X-PRIORITY 2 NOT HEADER X-PRIORITY 4 NOT HEADER X-PRIORITY 5'); + $select_filter->add($RCMAIL->gettext('priority').': '.$RCMAIL->gettext('low'), 'HEADER X-PRIORITY 4'); + $select_filter->add($RCMAIL->gettext('priority').': '.$RCMAIL->gettext('lowest'), 'HEADER X-PRIORITY 5'); + + $out = $select_filter->show($_SESSION['search_filter']); + + $RCMAIL->output->add_gui_object('search_filter', $attrib['id']); + + return $out; } function rcmail_message_error($uid=null) { - global $RCMAIL; + global $RCMAIL; - // Set env variables for messageerror.html template - if ($RCMAIL->action == 'show') { - $mbox_name = $RCMAIL->storage->get_folder(); - $RCMAIL->output->set_env('mailbox', $mbox_name); - $RCMAIL->output->set_env('uid', null); - } - // display error message - $RCMAIL->output->show_message('messageopenerror', 'error'); - // ... display message error page - $RCMAIL->output->send('messageerror'); + // Set env variables for messageerror.html template + if ($RCMAIL->action == 'show') { + $mbox_name = $RCMAIL->storage->get_folder(); + + $RCMAIL->output->set_env('mailbox', $mbox_name); + $RCMAIL->output->set_env('uid', null); + } + + // display error message + $RCMAIL->output->show_message('messageopenerror', 'error'); + // ... display message error page + $RCMAIL->output->send('messageerror'); } function rcmail_message_import_form($attrib = array()) { - global $OUTPUT; - - // set defaults - $attrib += array('id' => 'rcmImportform', 'buttons' => 'yes'); - - // Get filesize, enable upload progress bar - $max_filesize = rcube_upload_init(); - - $button = new html_inputfield(array('type' => 'button')); - $fileinput = new html_inputfield(array( - 'type' => 'file', - 'name' => '_file[]', - 'multiple' => 'multiple', - 'accept' => ".eml, .mbox, message/rfc822, text/*", - )); - - $out = html::div($attrib, - $OUTPUT->form_tag(array('id' => $attrib['id'].'Frm', 'method' => 'post', 'enctype' => 'multipart/form-data'), - html::tag('input', array('type' => 'hidden', 'name' => '_unlock', 'value' => '')) . - html::div(null, $fileinput->show()) . - html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) . - (get_boolean($attrib['buttons']) ? html::div('buttons', - $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) . ' ' . - $button->show(rcube_label('upload'), array('class' => 'button mainaction', 'onclick' => JS_OBJECT_NAME . ".command('import-messages', this.form)")) - ) : '') - ) - ); - - $OUTPUT->add_gui_object('importform', $attrib['id'].'Frm'); - return $out; + global $RCMAIL; + + // set defaults + $attrib += array('id' => 'rcmImportform', 'buttons' => 'yes'); + + // Get filesize, enable upload progress bar + $max_filesize = $RCMAIL->upload_init(); + + $button = new html_inputfield(array('type' => 'button')); + $fileinput = new html_inputfield(array( + 'type' => 'file', + 'name' => '_file[]', + 'multiple' => 'multiple', + 'accept' => ".eml, .mbox, message/rfc822, text/*", + )); + + $content = html::tag('input', array('type' => 'hidden', 'name' => '_unlock', 'value' => '')) + . html::div(null, $fileinput->show()) + . html::div('hint', $RCMAIL->gettext(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))); + + if (rcube_utils::get_boolean($attrib['buttons'])) { + $content .= html::div('buttons', + $button->show($RCMAIL->gettext('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) + . ' ' . + $button->show($RCMAIL->gettext('upload'), array( + 'class' => 'button mainaction', + 'onclick' => rcmail_output::JS_OBJECT_NAME . ".command('import-messages', this.form)" + ))); + } + + $out = $RCMAIL->output->form_tag(array( + 'id' => $attrib['id'].'Frm', + 'method' => 'post', + 'enctype' => 'multipart/form-data' + ), + $content); + + $RCMAIL->output->add_gui_object('importform', $attrib['id'].'Frm'); + + return html::div($attrib, $out); +} + +/** + * Add groups from the given address source to the address book widget + */ +function rcmail_compose_contact_groups($abook, $source_id, $search = null, $search_mode = 0) +{ + global $RCMAIL, $OUTPUT; + + $jsresult = array(); + foreach ($abook->list_groups($search, $search_mode) as $group) { + $abook->reset(); + $abook->set_group($group['ID']); + $group_prop = $abook->get_group($group['ID']); + + // group (distribution list) with email address(es) + if ($group_prop['email']) { + foreach ((array)$group_prop['email'] as $email) { + $row_id = 'G'.$group['ID']; + $jsresult[$row_id] = format_email_recipient($email, $group['name']); + $OUTPUT->command('add_contact_row', $row_id, array( + 'contactgroup' => html::span(array('title' => $email), rcube::Q($group['name']))), 'group'); + } + } + // make virtual groups clickable to list their members + else if ($group_prop['virtual']) { + $row_id = 'G'.$group['ID']; + $OUTPUT->command('add_contact_row', $row_id, array( + 'contactgroup' => html::a(array( + 'href' => '#list', + 'rel' => $group['ID'], + 'title' => $RCMAIL->gettext('listgroup'), + 'onclick' => sprintf("return %s.command('pushgroup',{'source':'%s','id':'%s'},this,event)", + rcmail_output::JS_OBJECT_NAME, $source_id, $group['ID']), + ), rcube::Q($group['name']) . ' ' . html::span('action', '»'))), + 'group', + array('ID' => $group['ID'], 'name' => $group['name'], 'virtual' => true)); + } + // show group with count + else if (($result = $abook->count()) && $result->count) { + $row_id = 'E'.$group['ID']; + $jsresult[$row_id] = $group['name']; + $OUTPUT->command('add_contact_row', $row_id, array( + 'contactgroup' => rcube::Q($group['name'] . ' (' . intval($result->count) . ')')), 'group'); + } + } + + $abook->reset(); + $abook->set_group(0); + + return $jsresult; } diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index e0c4e2911..8f869c67c 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -5,7 +5,7 @@ | program/steps/mail/get.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | 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. | @@ -22,15 +22,15 @@ // show loading page if (!empty($_GET['_preload'])) { - $url = preg_replace('/([&?]+)_preload=/', '\\1_mimewarning=1&_embed=', $_SERVER['REQUEST_URI']); - $message = rcube_label('loadingdata'); + $url = preg_replace('/([&?]+)_preload=/', '\\1_mimewarning=1&_embed=', $_SERVER['REQUEST_URI']); + $message = $RCMAIL->gettext('loadingdata'); - header('Content-Type: text/html; charset=' . RCMAIL_CHARSET); - print "<html>\n<head>\n" - . '<meta http-equiv="refresh" content="0; url='.Q($url).'">' . "\n" - . '<meta http-equiv="content-type" content="text/html; charset='.RCMAIL_CHARSET.'">' . "\n" + header('Content-Type: text/html; charset=' . RCUBE_CHARSET); + print "<html>\n<head>\n" + . '<meta http-equiv="refresh" content="0; url='.rcube::Q($url).'">' . "\n" + . '<meta http-equiv="content-type" content="text/html; charset='.RCUBE_CHARSET.'">' . "\n" . "</head>\n<body>\n$message\n</body>\n</html>"; - exit; + exit; } ob_end_clean(); @@ -38,353 +38,361 @@ ob_end_clean(); // similar code as in program/steps/mail/show.inc if (!empty($_GET['_uid'])) { - $uid = get_input_value('_uid', RCUBE_INPUT_GET); - $RCMAIL->config->set('prefer_html', true); - $MESSAGE = new rcube_message($uid); + $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET); + $RCMAIL->config->set('prefer_html', true); + $MESSAGE = new rcube_message($uid); } // check connection status check_storage_status(); -$part_id = get_input_value('_part', RCUBE_INPUT_GPC); +$part_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_GPC); // show part page if (!empty($_GET['_frame'])) { - if ($part_id && ($part = $MESSAGE->mime_parts[$part_id])) { - $filename = rcmail_attachment_name($part); - $OUTPUT->set_pagetitle($filename); - } - - // register UI objects - $OUTPUT->add_handlers(array( - 'messagepartframe' => 'rcmail_message_part_frame', - 'messagepartcontrols' => 'rcmail_message_part_controls', - )); - - $OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder()); - $OUTPUT->set_env('uid', $uid); - $OUTPUT->set_env('part', $part_id); - $OUTPUT->set_env('filename', $filename); - - $OUTPUT->send('messagepart'); - exit; + if ($part_id && ($part = $MESSAGE->mime_parts[$part_id])) { + $filename = rcmail_attachment_name($part); + $OUTPUT->set_pagetitle($filename); + } + + // register UI objects + $OUTPUT->add_handlers(array( + 'messagepartframe' => 'rcmail_message_part_frame', + 'messagepartcontrols' => 'rcmail_message_part_controls', + )); + + $OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder()); + $OUTPUT->set_env('uid', $uid); + $OUTPUT->set_env('part', $part_id); + $OUTPUT->set_env('filename', $filename); + + $OUTPUT->send('messagepart'); + exit; } // render thumbnail of an image attachment else if ($_GET['_thumb']) { - $pid = get_input_value('_part', RCUBE_INPUT_GET); - if ($part = $MESSAGE->mime_parts[$pid]) { - $thumbnail_size = $RCMAIL->config->get('image_thumbnail_size', 240); - $temp_dir = $RCMAIL->config->get('temp_dir'); - list(,$ext) = explode('/', $part->mimetype); - $mimetype = $part->mimetype; - $file_ident = $MESSAGE->headers->messageID . ':' . $part->mime_id . ':' . $part->size . ':' . $part->mimetype; - $cache_basename = $temp_dir . '/' . md5($file_ident . ':' . $RCMAIL->user->ID . ':' . $thumbnail_size); - $cache_file = $cache_basename . '.' . $ext; - - // render thumbnail image if not done yet - if (!is_file($cache_file)) { - $fp = fopen(($orig_name = $cache_basename . '.orig.' . $ext), 'w'); - $MESSAGE->get_part_content($part->mime_id, $fp); - fclose($fp); - - $image = new rcube_image($orig_name); - if ($imgtype = $image->resize($thumbnail_size, $cache_file, true)) { - $mimetype = 'image/' . $imgtype; - unlink($orig_name); - } - else { - rename($orig_name, $cache_file); - } - } + $pid = rcube_utils::get_input_value('_part', rcube_utils::INPUT_GET); + if ($part = $MESSAGE->mime_parts[$pid]) { + $thumbnail_size = $RCMAIL->config->get('image_thumbnail_size', 240); + $temp_dir = $RCMAIL->config->get('temp_dir'); + list(,$ext) = explode('/', $part->mimetype); + $mimetype = $part->mimetype; + $file_ident = $MESSAGE->headers->messageID . ':' . $part->mime_id . ':' . $part->size . ':' . $part->mimetype; + $cache_basename = $temp_dir . '/' . md5($file_ident . ':' . $RCMAIL->user->ID . ':' . $thumbnail_size); + $cache_file = $cache_basename . '.' . $ext; + + // render thumbnail image if not done yet + if (!is_file($cache_file)) { + if ($fp = fopen(($orig_name = $cache_basename . '.orig.' . $ext), 'w')) { + $MESSAGE->get_part_content($part->mime_id, $fp); + fclose($fp); + + $image = new rcube_image($orig_name); + if ($imgtype = $image->resize($thumbnail_size, $cache_file, true)) { + $mimetype = 'image/' . $imgtype; + unlink($orig_name); + } + else { + rename($orig_name, $cache_file); + } + } + } - if (is_file($cache_file)) { - header('Content-Type: ' . $mimetype); - readfile($cache_file); + if (is_file($cache_file)) { + header('Content-Type: ' . $mimetype); + readfile($cache_file); + } } - } - exit; + exit; } else if (strlen($part_id)) { - if ($part = $MESSAGE->mime_parts[$part_id]) { - $mimetype = rcmail_fix_mimetype($part->mimetype); - - // allow post-processing of the message body - $plugin = $RCMAIL->plugins->exec_hook('message_part_get', - array('uid' => $MESSAGE->uid, 'id' => $part->mime_id, 'mimetype' => $mimetype, 'part' => $part, 'download' => !empty($_GET['_download']))); - - if ($plugin['abort']) - exit; - - // overwrite modified vars from plugin - $mimetype = $plugin['mimetype']; - $extensions = rcube_mime::get_mime_extensions($mimetype); - - if ($plugin['body']) - $part->body = $plugin['body']; - - - // compare file mimetype with the stated content-type headers and file extension to avoid malicious operations - if (!empty($_REQUEST['_embed']) && empty($_REQUEST['_nocheck'])) { - $file_extension = strtolower(pathinfo($part->filename, PATHINFO_EXTENSION)); - - // 1. compare filename suffix with expected suffix derived from mimetype - $valid = $file_extension && in_array($file_extension, (array)$extensions) || !empty($_REQUEST['_mimeclass']); - - // 2. detect the real mimetype of the attachment part and compare it with the stated mimetype and filename extension - if ($valid || !$file_extension || $mimetype == 'application/octet-stream' || stripos($mimetype, 'text/') === 0) { - if ($part->body) // part body is already loaded - $body = $part->body; - else if ($part->size && $part->size < 1024*1024) // load the entire part if it's small enough - $body = $part->body = $MESSAGE->get_part_content($part->mime_id); - else // fetch the first 2K of the message part - $body = $MESSAGE->get_part_content($part->mime_id, null, true, 2048); - - // detect message part mimetype - $real_mimetype = rcube_mime::file_content_type($body, $part->filename, $mimetype, true, true); - list($real_ctype_primary, $real_ctype_secondary) = explode('/', $real_mimetype); - - // accept text/plain with any extension - if ($real_mimetype == 'text/plain' && $real_mimetype == $mimetype) - $file_extension = 'txt'; - - // ignore differences in text/* mimetypes. Filetype detection isn't very reliable here - if ($real_ctype_primary == 'text' && strpos($mimetype, $real_ctype_primary) === 0) - $real_mimetype = $mimetype; - - // get valid file extensions - $extensions = rcube_mime::get_mime_extensions($real_mimetype); - $valid_extension = (!$file_extension || in_array($file_extension, (array)$extensions)); - - // ignore filename extension if mimeclass matches (#1489029) - if (!empty($_REQUEST['_mimeclass']) && $real_ctype_primary == $_REQUEST['_mimeclass']) - $valid_extension = true; - - // fix mimetype for images wrongly declared as octet-stream - if ($mimetype == 'application/octet-stream' && strpos($real_mimetype, 'image/') === 0 && $valid_extension) - $mimetype = $real_mimetype; - - $valid = ($real_mimetype == $mimetype && $valid_extension); - } - else { - $real_mimetype = $mimetype; - } - - // show warning if validity checks failed - if (!$valid) { - // send blocked.gif for expected images - if (empty($_REQUEST['_mimewarning']) && strpos($mimetype, 'image/') === 0) { - // Do not cache. Failure might be the result of a misconfiguration, thus real content should be returned once fixed. - $OUTPUT->nocacheing_headers(); - header("Content-Type: image/gif"); - header("Content-Transfer-Encoding: binary"); - readfile(INSTALL_PATH . 'program/resources/blocked.gif'); - } - else { // html warning with a button to load the file anyway - $OUTPUT = new rcmail_html_page(); - $OUTPUT->write(html::tag('html', null, html::tag('body', 'embed', - html::div(array('class' => 'rcmail-inline-message rcmail-inline-warning'), - rcube_label(array( - 'name' => 'attachmentvalidationerror', - 'vars' => array( - 'expected' => $mimetype . ($file_extension ? " (.$file_extension)" : ''), - 'detected' => $real_mimetype . ($extensions[0] ? " (.$extensions[0])" : ''), - ) - )) . - html::p(array('class' => 'rcmail-inline-buttons'), - html::tag('button', - array('onclick' => "location.href='" . $RCMAIL->url(array_merge($_GET, array('_nocheck' => 1))) . "'"), - rcube_label('showanyway'))) - ) - ))); + if ($part = $MESSAGE->mime_parts[$part_id]) { + $mimetype = rcmail_fix_mimetype($part->mimetype); + + // allow post-processing of the message body + $plugin = $RCMAIL->plugins->exec_hook('message_part_get', array( + 'uid' => $MESSAGE->uid, + 'id' => $part->mime_id, + 'mimetype' => $mimetype, + 'part' => $part, + 'download' => !empty($_GET['_download']) + )); + + if ($plugin['abort']) { + exit; } - exit; - } - } + // overwrite modified vars from plugin + $mimetype = $plugin['mimetype']; + $extensions = rcube_mime::get_mime_extensions($mimetype); - // TIFF to JPEG conversion, if needed - $tiff_support = !empty($_SESSION['browser_caps']) && !empty($_SESSION['browser_caps']['tif']); - if (!empty($_REQUEST['_embed']) && !$tiff_support - && $RCMAIL->config->get('im_convert_path') - && rcmail_part_image_type($part) == 'image/tiff' - ) { - $tiff2jpeg = true; - $mimetype = 'image/jpeg'; - } - + if ($plugin['body']) { + $part->body = $plugin['body']; + } - $browser = $RCMAIL->output->browser; - list($ctype_primary, $ctype_secondary) = explode('/', $mimetype); + // compare file mimetype with the stated content-type headers and file extension to avoid malicious operations + if (!empty($_REQUEST['_embed']) && empty($_REQUEST['_nocheck'])) { + $file_extension = strtolower(pathinfo($part->filename, PATHINFO_EXTENSION)); + + // 1. compare filename suffix with expected suffix derived from mimetype + $valid = $file_extension && in_array($file_extension, (array)$extensions) || !empty($_REQUEST['_mimeclass']); + + // 2. detect the real mimetype of the attachment part and compare it with the stated mimetype and filename extension + if ($valid || !$file_extension || $mimetype == 'application/octet-stream' || stripos($mimetype, 'text/') === 0) { + if ($part->body) // part body is already loaded + $body = $part->body; + else if ($part->size && $part->size < 1024*1024) // load the entire part if it's small enough + $body = $part->body = $MESSAGE->get_part_content($part->mime_id); + else // fetch the first 2K of the message part + $body = $MESSAGE->get_part_content($part->mime_id, null, true, 2048); + + // detect message part mimetype + $real_mimetype = rcube_mime::file_content_type($body, $part->filename, $mimetype, true, true); + list($real_ctype_primary, $real_ctype_secondary) = explode('/', $real_mimetype); + + // accept text/plain with any extension + if ($real_mimetype == 'text/plain' && $real_mimetype == $mimetype) { + $file_extension = 'txt'; + } + + // ignore differences in text/* mimetypes. Filetype detection isn't very reliable here + if ($real_ctype_primary == 'text' && strpos($mimetype, $real_ctype_primary) === 0) { + $real_mimetype = $mimetype; + } + + // get valid file extensions + $extensions = rcube_mime::get_mime_extensions($real_mimetype); + $valid_extension = (!$file_extension || in_array($file_extension, (array)$extensions)); + + // ignore filename extension if mimeclass matches (#1489029) + if (!empty($_REQUEST['_mimeclass']) && $real_ctype_primary == $_REQUEST['_mimeclass']) { + $valid_extension = true; + } + + // fix mimetype for images wrongly declared as octet-stream + if ($mimetype == 'application/octet-stream' && strpos($real_mimetype, 'image/') === 0 && $valid_extension) { + $mimetype = $real_mimetype; + } + + $valid = ($real_mimetype == $mimetype && $valid_extension); + } + else { + $real_mimetype = $mimetype; + } + + // show warning if validity checks failed + if (!$valid) { + // send blocked.gif for expected images + if (empty($_REQUEST['_mimewarning']) && strpos($mimetype, 'image/') === 0) { + // Do not cache. Failure might be the result of a misconfiguration, thus real content should be returned once fixed. + $OUTPUT->nocacheing_headers(); + header("Content-Type: image/gif"); + header("Content-Transfer-Encoding: binary"); + readfile(INSTALL_PATH . 'program/resources/blocked.gif'); + } + else { // html warning with a button to load the file anyway + $OUTPUT = new rcmail_html_page(); + $OUTPUT->write(html::tag('html', null, html::tag('body', 'embed', + html::div(array('class' => 'rcmail-inline-message rcmail-inline-warning'), + $RCMAIL->gettext(array( + 'name' => 'attachmentvalidationerror', + 'vars' => array( + 'expected' => $mimetype . ($file_extension ? " (.$file_extension)" : ''), + 'detected' => $real_mimetype . ($extensions[0] ? " (.$extensions[0])" : ''), + ) + )) + . html::p(array('class' => 'rcmail-inline-buttons'), + html::tag('button', array( + 'onclick' => "location.href='" . $RCMAIL->url(array_merge($_GET, array('_nocheck' => 1))) . "'" + ), + $RCMAIL->gettext('showanyway')) + ) + )))); + } + + exit; + } + } - // send download headers - if ($plugin['download']) { - header("Content-Type: application/octet-stream"); - if ($browser->ie) - header("Content-Type: application/force-download"); - } - else if ($ctype_primary == 'text') { - header("Content-Type: text/$ctype_secondary; charset=" . ($part->charset ? $part->charset : RCMAIL_CHARSET)); - } - else { - header("Content-Type: $mimetype"); - header("Content-Transfer-Encoding: binary"); - } - // deliver part content - if ($ctype_primary == 'text' && $ctype_secondary == 'html' && empty($plugin['download'])) { - // Check if we have enough memory to handle the message in it - // #1487424: we need up to 10x more memory than the body - if (!rcmail_mem_check($part->size * 10)) { - $out = '<body>' . rcube_label('messagetoobig'). ' ' - . html::a('?_task=mail&_action=get&_download=1&_uid='.$MESSAGE->uid.'&_part='.$part->mime_id - .'&_mbox='. urlencode($RCMAIL->storage->get_folder()), rcube_label('download')) . '</body></html>'; - } - else { - // get part body if not available - if (!$part->body) - $part->body = $MESSAGE->get_part_content($part->mime_id); - - // show images? - rcmail_check_safe($MESSAGE); - - // render HTML body - $out = rcmail_print_body($part, array('safe' => $MESSAGE->is_safe, 'inline_html' => false)); - - // insert remote objects warning into HTML body - if ($REMOTE_OBJECTS) { - $body_start = 0; - if ($body_pos = strpos($out, '<body')) { - $body_start = strpos($out, '>', $body_pos) + 1; - } - $out = substr($out, 0, $body_start) . - html::div(array('class' => 'rcmail-inline-message rcmail-inline-warning'), - Q(rcube_label('blockedimages')) . ' ' . - html::tag('button', - array('onclick' => "location.href='" . $RCMAIL->url(array_merge($_GET, array('_safe' => 1))) . "'"), - Q(rcube_label('showimages'))) - ) . - substr($out, $body_start); + // TIFF to JPEG conversion, if needed + $tiff_support = !empty($_SESSION['browser_caps']) && !empty($_SESSION['browser_caps']['tif']); + if (!empty($_REQUEST['_embed']) && !$tiff_support + && $RCMAIL->config->get('im_convert_path') + && rcmail_part_image_type($part) == 'image/tiff' + ) { + $tiff2jpeg = true; + $mimetype = 'image/jpeg'; } - } - // check connection status - if ($part->size && empty($part->body)) { - check_storage_status(); - } - $OUTPUT = new rcube_html_page(); - $OUTPUT->write($out); - } - else { - // don't kill the connection if download takes more than 30 sec. - @set_time_limit(0); - - $filename = rcmail_attachment_name($part); - - if ($browser->ie && $browser->ver < 7) - $filename = rawurlencode(abbreviate_string($filename, 55)); - else if ($browser->ie) - $filename = rawurlencode($filename); - else - $filename = addcslashes($filename, '"'); - - $disposition = !empty($plugin['download']) ? 'attachment' : 'inline'; - - // Workaround for nasty IE bug (#1488844) - // If Content-Disposition header contains string "attachment" e.g. in filename - // IE handles data as attachment not inline - if ($disposition == 'inline' && $browser->ie && $browser->ver < 9) { - $filename = str_ireplace('attachment', 'attach', $filename); - } - - // add filename extension if missing - if (!pathinfo($filename, PATHINFO_EXTENSION) && ($extensions = rcube_mime::get_mime_extensions($mimetype))) { - $filename .= '.' . $extensions[0]; - } - - header("Content-Disposition: $disposition; filename=\"$filename\""); - - // handle tiff to jpeg conversion - if (!empty($tiff2jpeg)) { - $temp_dir = unslashify($RCMAIL->config->get('temp_dir')); - $file_path = tempnam($temp_dir, 'rcmAttmnt'); - - // write content to temp file - if ($part->body) { - $saved = file_put_contents($file_path, $part->body); - } - else if ($part->size) { - $fd = fopen($file_path, 'w'); - $saved = $RCMAIL->storage->get_message_part($MESSAGE->uid, $part->mime_id, $part, false, $fd); - fclose($fd); - } + $browser = $RCMAIL->output->browser; + list($ctype_primary, $ctype_secondary) = explode('/', $mimetype); - // convert image to jpeg and send it to the browser - if ($saved) { - $image = new rcube_image($file_path); - if ($image->convert(rcube_image::TYPE_JPG, $file_path)) { - header("Content-Length: " . filesize($file_path)); - readfile($file_path); - } - unlink($file_path); - } - } - // do content filtering to avoid XSS through fake images - else if (!empty($_REQUEST['_embed']) && $browser->ie && $browser->ver <= 8) { - if ($part->body) { - echo preg_match('/<(script|iframe|object)/i', $part->body) ? '' : $part->body; - $sent = true; - } - else if ($part->size) { - $stdout = fopen('php://output', 'w'); - stream_filter_register('rcube_content', 'rcube_content_filter') or die('Failed to register content filter'); - stream_filter_append($stdout, 'rcube_content'); - $sent = $RCMAIL->storage->get_message_part($MESSAGE->uid, $part->mime_id, $part, false, $stdout); + if (!$plugin['download'] && $ctype_primary == 'text') { + header("Content-Type: text/$ctype_secondary; charset=" . ($part->charset ? $part->charset : RCUBE_CHARSET)); } - } - // send part as-it-is - else { - if ($part->body) { - header("Content-Length: " . strlen($part->body)); - echo $part->body; - $sent = true; + else { + header("Content-Type: $mimetype"); + header("Content-Transfer-Encoding: binary"); } - else if ($part->size) { - if ($size = (int)$part->d_parameters['size']) { - header("Content-Length: $size"); - } - // 8th argument disables re-formatting of text/* parts (#1489267) - $sent = $RCMAIL->storage->get_message_part($MESSAGE->uid, $part->mime_id, $part, true, null, false, 0, false); + // deliver part content + if ($ctype_primary == 'text' && $ctype_secondary == 'html' && empty($plugin['download'])) { + // Check if we have enough memory to handle the message in it + // #1487424: we need up to 10x more memory than the body + if (!rcube_utils::mem_check($part->size * 10)) { + $out = '<body>' . $RCMAIL->gettext('messagetoobig'). ' ' + . html::a('?_task=mail&_action=get&_download=1&_uid='.$MESSAGE->uid.'&_part='.$part->mime_id + .'&_mbox='. urlencode($RCMAIL->storage->get_folder()), $RCMAIL->gettext('download')) . '</body></html>'; + } + else { + // get part body if not available + if (!$part->body) { + $part->body = $MESSAGE->get_part_content($part->mime_id); + } + + // show images? + rcmail_check_safe($MESSAGE); + + // render HTML body + $out = rcmail_print_body($part, array('safe' => $MESSAGE->is_safe, 'inline_html' => false)); + + // insert remote objects warning into HTML body + if ($REMOTE_OBJECTS) { + $body_start = 0; + if ($body_pos = strpos($out, '<body')) { + $body_start = strpos($out, '>', $body_pos) + 1; + } + + $out = substr($out, 0, $body_start) + . html::div(array('class' => 'rcmail-inline-message rcmail-inline-warning'), + rcube::Q($RCMAIL->gettext('blockedimages')) . ' ' . + html::tag('button', + array('onclick' => "location.href='" . $RCMAIL->url(array_merge($_GET, array('_safe' => 1))) . "'"), + rcube::Q($RCMAIL->gettext('showimages'))) + ) + . substr($out, $body_start); + } + } + + // check connection status + if ($part->size && empty($part->body)) { + check_storage_status(); + } + + $OUTPUT = new rcmail_html_page(); + $OUTPUT->write($out); + } + else { + // don't kill the connection if download takes more than 30 sec. + @set_time_limit(0); + + $filename = rcmail_attachment_name($part); + + if ($browser->ie && $browser->ver < 7) + $filename = rawurlencode(abbreviate_string($filename, 55)); + else if ($browser->ie) + $filename = rawurlencode($filename); + else + $filename = addcslashes($filename, '"'); + + $disposition = !empty($plugin['download']) ? 'attachment' : 'inline'; + + // Workaround for nasty IE bug (#1488844) + // If Content-Disposition header contains string "attachment" e.g. in filename + // IE handles data as attachment not inline + if ($disposition == 'inline' && $browser->ie && $browser->ver < 9) { + $filename = str_ireplace('attachment', 'attach', $filename); + } + + // add filename extension if missing + if (!pathinfo($filename, PATHINFO_EXTENSION) && ($extensions = rcube_mime::get_mime_extensions($mimetype))) { + $filename .= '.' . $extensions[0]; + } + + header("Content-Disposition: $disposition; filename=\"$filename\""); + + // handle tiff to jpeg conversion + if (!empty($tiff2jpeg)) { + $temp_dir = unslashify($RCMAIL->config->get('temp_dir')); + $file_path = tempnam($temp_dir, 'rcmAttmnt'); + + // write content to temp file + if ($part->body) { + $saved = file_put_contents($file_path, $part->body); + } + else if ($part->size) { + $fd = fopen($file_path, 'w'); + $saved = $RCMAIL->storage->get_message_part($MESSAGE->uid, $part->mime_id, $part, false, $fd); + fclose($fd); + } + + // convert image to jpeg and send it to the browser + if ($saved) { + $image = new rcube_image($file_path); + if ($image->convert(rcube_image::TYPE_JPG, $file_path)) { + header("Content-Length: " . filesize($file_path)); + readfile($file_path); + } + unlink($file_path); + } + } + // do content filtering to avoid XSS through fake images + else if (!empty($_REQUEST['_embed']) && $browser->ie && $browser->ver <= 8) { + if ($part->body) { + echo preg_match('/<(script|iframe|object)/i', $part->body) ? '' : $part->body; + $sent = true; + } + else if ($part->size) { + $stdout = fopen('php://output', 'w'); + stream_filter_register('rcube_content', 'rcube_content_filter') or die('Failed to register content filter'); + stream_filter_append($stdout, 'rcube_content'); + $sent = $RCMAIL->storage->get_message_part($MESSAGE->uid, $part->mime_id, $part, false, $stdout); + } + } + // send part as-it-is + else { + if ($part->body) { + header("Content-Length: " . strlen($part->body)); + echo $part->body; + $sent = true; + } + else if ($part->size) { + if ($size = (int)$part->d_parameters['size']) { + header("Content-Length: $size"); + } + + // 8th argument disables re-formatting of text/* parts (#1489267) + $sent = $RCMAIL->storage->get_message_part($MESSAGE->uid, $part->mime_id, $part, true, null, false, 0, false); + } + } + + // check connection status + if ($part->size && !$sent) { + check_storage_status(); + } } - } - // check connection status - if ($part->size && !$sent) { - check_storage_status(); - } + exit; } - - exit; - } } - // print message else { - // send correct headers for content type - header("Content-Type: text/html"); + // send correct headers for content type + header("Content-Type: text/html"); - $cont = "<html>\n<head><title></title>\n</head>\n<body>"; - $cont .= rcmail_message_body(array()); - $cont .= "\n</body>\n</html>"; + $cont = "<html>\n<head><title></title>\n</head>\n<body>"; + $cont .= rcmail_message_body(array()); + $cont .= "\n</body>\n</html>"; - $OUTPUT = new rcube_html_page(); - $OUTPUT->write($cont); + $OUTPUT = new rcmail_html_page(); + $OUTPUT->write($cont); - exit; + exit; } @@ -415,7 +423,7 @@ function check_storage_status() header('Location: ' . $_SERVER['REQUEST_URI'] . '&_redirected=1'); } else { - raise_error(array( + rcube::raise_error(array( 'code' => 500, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => 'Unable to get/display message part. IMAP connection error'), @@ -434,7 +442,7 @@ function rcmail_message_part_controls($attrib) { global $MESSAGE, $RCMAIL; - $part = asciiwords(get_input_value('_part', RCUBE_INPUT_GPC)); + $part = asciiwords(rcube_utils::get_input_value('_part', rcube_utils::INPUT_GPC)); if (!is_object($MESSAGE) || !is_array($MESSAGE->parts) || !($_GET['_uid'] && $_GET['_part']) || !$MESSAGE->mime_parts[$part] ) { @@ -444,14 +452,14 @@ function rcmail_message_part_controls($attrib) $part = $MESSAGE->mime_parts[$part]; $table = new html_table(array('cols' => 2)); - $table->add('title', Q(rcube_label('namex')).':'); - $table->add('header', Q(rcmail_attachment_name($part))); + $table->add('title', rcube::Q($RCMAIL->gettext('namex')).':'); + $table->add('header', rcube::Q(rcmail_attachment_name($part))); - $table->add('title', Q(rcube_label('type')).':'); - $table->add('header', Q($part->mimetype)); + $table->add('title', rcube::Q($RCMAIL->gettext('type')).':'); + $table->add('header', rcube::Q($part->mimetype)); - $table->add('title', Q(rcube_label('size')).':'); - $table->add('header', Q($RCMAIL->message_part_size($part))); + $table->add('title', rcube::Q($RCMAIL->gettext('size')).':'); + $table->add('header', rcube::Q($RCMAIL->message_part_size($part))); return $table->show($attrib); } @@ -463,7 +471,7 @@ function rcmail_message_part_frame($attrib) { global $MESSAGE, $RCMAIL; - $part = $MESSAGE->mime_parts[asciiwords(get_input_value('_part', RCUBE_INPUT_GPC))]; + $part = $MESSAGE->mime_parts[asciiwords(rcube_utils::get_input_value('_part', rcube_utils::INPUT_GPC))]; $ctype_primary = strtolower($part->ctype_primary); $attrib['src'] = './?' . str_replace('_frame=', ($ctype_primary=='text' ? '_embed=' : '_preload='), $_SERVER['QUERY_STRING']); diff --git a/program/steps/mail/getunread.inc b/program/steps/mail/getunread.inc index fb7e802fb..f708c8aef 100644 --- a/program/steps/mail/getunread.inc +++ b/program/steps/mail/getunread.inc @@ -5,7 +5,7 @@ | program/steps/mail/getunread.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -21,28 +21,36 @@ $a_folders = $RCMAIL->storage->list_folders_subscribed('', '*', 'mail'); -if (!empty($a_folders)) -{ - $current = $RCMAIL->storage->get_folder(); - $inbox = ($current == 'INBOX'); - $check_all = (bool)$RCMAIL->config->get('check_all_folders'); - - foreach ($a_folders as $mbox_row) { - $unseen_old = rcmail_get_unseen_count($mbox_row); - - if (!$check_all && $unseen_old !== null && $mbox_row != $current) - $unseen = $unseen_old; - else - $unseen = $RCMAIL->storage->count($mbox_row, 'UNSEEN', $unseen_old === null); - - if ($unseen || $unseen_old === null) { - $OUTPUT->command('set_unread_count', $mbox_row, $unseen, $inbox && $mbox_row == 'INBOX'); +if (!empty($a_folders)) { + $current = $RCMAIL->storage->get_folder(); + $inbox = ($current == 'INBOX'); + $trash = $RCMAIL->config->get('trash_mbox'); + $check_all = (bool)$RCMAIL->config->get('check_all_folders'); + + foreach ($a_folders as $mbox) { + $unseen_old = rcmail_get_unseen_count($mbox); + + if (!$check_all && $unseen_old !== null && $mbox != $current) { + $unseen = $unseen_old; + } + else { + $unseen = $RCMAIL->storage->count($mbox, 'UNSEEN', $unseen_old === null); + } + + // call it always for current folder, so it can update counter + // after possible message status change when opening a message + // not in preview frame + if ($unseen || $unseen_old === null || $mbox == $current) { + $OUTPUT->command('set_unread_count', $mbox, $unseen, $inbox && $mbox_row == 'INBOX'); + } + + rcmail_set_unseen_count($mbox, $unseen); + + // set trash folder state + if ($mbox === $trash) { + $OUTPUT->command('set_trash_count', $RCMAIL->storage->count($mbox, 'EXISTS')); + } } - - rcmail_set_unseen_count($mbox_row, $unseen); - } } $OUTPUT->send(); - - diff --git a/program/steps/mail/headers.inc b/program/steps/mail/headers.inc index cad113f68..9d3e6d348 100644 --- a/program/steps/mail/headers.inc +++ b/program/steps/mail/headers.inc @@ -19,8 +19,7 @@ +-----------------------------------------------------------------------+ */ -if ($uid = get_input_value('_uid', RCUBE_INPUT_POST)) -{ +if ($uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)) { $source = $RCMAIL->storage->get_raw_headers($uid); if ($source !== false) { @@ -48,5 +47,3 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_POST)) } exit; - - diff --git a/program/steps/mail/import.inc b/program/steps/mail/import.inc index f7e7a3eb8..4f822e0e4 100644 --- a/program/steps/mail/import.inc +++ b/program/steps/mail/import.inc @@ -31,7 +31,8 @@ if (is_array($_FILES['_file'])) { if (!$err) { // check file content type first - list($mtype_primary,) = explode('/', rc_mime_content_type($filepath, $_FILES['_file']['name'][$i], $_FILES['_file']['type'][$i])); + list($mtype_primary,) = explode('/', rcube_mime::file_content_type($filepath, $_FILES['_file']['name'][$i], $_FILES['_file']['type'][$i])); + if (!in_array($mtype_primary, array('text','message'))) { $OUTPUT->show_message('importmessageerror', 'error'); continue; @@ -39,7 +40,9 @@ if (is_array($_FILES['_file'])) { // read the first few lines to detect header-like structure $fp = fopen($filepath, 'r'); - do { $line = fgets($fp); } + do { + $line = fgets($fp); + } while ($line !== false && trim($line) == ''); if (!preg_match('/^From\s+-/', $line) && !preg_match('/^[a-z-_]+:\s+.+/i', $line)) { @@ -74,7 +77,8 @@ if (is_array($_FILES['_file'])) { } if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { - $msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize')))))); + $size = $RCMAIL->show_bytes(parse_bytes(ini_get('upload_max_filesize'))); + $msg = $RCMAIL->gettext(array('name' => 'filesizeerror', 'vars' => array('size' => $size))); } else if ($err) { $OUTPUT->show_message('fileuploaderror', 'error'); @@ -82,7 +86,7 @@ if (is_array($_FILES['_file'])) { } // end foreach if ($imported) { - $OUTPUT->show_message(rcube_label(array('name' => 'importmessagesuccess', 'nr' => $imported, 'vars' => array('nr' => $imported))), 'confirmation'); + $OUTPUT->show_message($RCMAIL->gettext(array('name' => 'importmessagesuccess', 'nr' => $imported, 'vars' => array('nr' => $imported))), 'confirmation'); $OUTPUT->command('command', 'list'); } else { @@ -93,13 +97,12 @@ else if ($_SERVER['REQUEST_METHOD'] == 'POST') { // if filesize exceeds post_max_size then $_FILES array is empty, // show filesizeerror instead of fileuploaderror if ($maxsize = ini_get('post_max_size')) - $msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes($maxsize))))); + $msg = $RCMAIL->gettext(array('name' => 'filesizeerror', 'vars' => array('size' => $RCMAIL->show_bytes(parse_bytes($maxsize))))); else - $msg = rcube_label('fileuploaderror'); + $msg = $RCMAIL->gettext('fileuploaderror'); $OUTPUT->command('display_message', $msg, 'error'); } // send html page with JS calls as response $OUTPUT->send('iframe'); - diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc index a2380131a..277564c38 100644 --- a/program/steps/mail/list.inc +++ b/program/steps/mail/list.inc @@ -23,11 +23,11 @@ if (!$OUTPUT->ajax_call) { return; } -$save_arr = array(); -$dont_override = (array) $RCMAIL->config->get('dont_override'); +$save_arr = array(); +$dont_override = (array) $RCMAIL->config->get('dont_override'); // is there a sort type for this request? -if ($sort = get_input_value('_sort', RCUBE_INPUT_GET)) { +if ($sort = rcube_utils::get_input_value('_sort', rcube_utils::INPUT_GET)) { // yes, so set the sort vars list($sort_col, $sort_order) = explode('_', $sort); @@ -41,7 +41,7 @@ if ($sort = get_input_value('_sort', RCUBE_INPUT_GET)) { } // is there a set of columns for this request? -if ($cols = get_input_value('_cols', RCUBE_INPUT_GET)) { +if ($cols = rcube_utils::get_input_value('_cols', rcube_utils::INPUT_GET)) { if (!in_array('list_cols', $dont_override)) { $save_arr['list_cols'] = explode(',', $cols); } @@ -60,7 +60,7 @@ $RCMAIL->storage->folder_sync($mbox_name); // initialize searching result if search_filter is used if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') { $search_request = md5($mbox_name.$_SESSION['search_filter']); - $RCMAIL->storage->search($mbox_name, $_SESSION['search_filter'], RCMAIL_CHARSET, rcmail_sort_column()); + $RCMAIL->storage->search($mbox_name, $_SESSION['search_filter'], RCUBE_CHARSET, rcmail_sort_column()); $_SESSION['search'] = $RCMAIL->storage->get_search_set(); $_SESSION['search_request'] = $search_request; $OUTPUT->set_env('search_request', $search_request); @@ -90,12 +90,14 @@ if (empty($search_request) && empty($a_headers)) { rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']), $unseen); // update message count display -$pages = ceil($count/$RCMAIL->storage->get_pagesize()); +$pages = ceil($count/$RCMAIL->storage->get_pagesize()); +$exists = $RCMAIL->storage->count($mbox_name, 'EXISTS'); + $OUTPUT->set_env('messagecount', $count); $OUTPUT->set_env('pagecount', $pages); $OUTPUT->set_env('threading', $threading); $OUTPUT->set_env('current_page', $count ? $RCMAIL->storage->get_page() : 1); -$OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS')); +$OUTPUT->set_env('exists', $exists); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count), $mbox_name); // add message rows @@ -104,11 +106,18 @@ if (isset($a_headers) && count($a_headers)) { if ($search_request) { $OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $count)); } + + // remember last HIGHESTMODSEQ value (if supported) + // we need it for flag updates in check-recent + $data = $RCMAIL->storage->folder_data($mbox_name); + if (!empty($data['HIGHESTMODSEQ'])) { + $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ']; + } } else { // handle IMAP errors (e.g. #1486905) if ($err_code = $RCMAIL->storage->get_error_code()) { - rcmail_display_server_error(); + $RCMAIL->display_server_error(); } else if ($search_request) $OUTPUT->show_message('searchnomatch', 'notice'); @@ -116,5 +125,10 @@ else { $OUTPUT->show_message('nomessagesfound', 'notice'); } +// set trash folder state +if ($mbox_name === $RCMAIL->config->get('trash_mbox')) { + $OUTPUT->command('set_trash_count', $exists); +} + // send response $OUTPUT->send(); diff --git a/program/steps/mail/list_contacts.inc b/program/steps/mail/list_contacts.inc index dab146431..0ee81135b 100644 --- a/program/steps/mail/list_contacts.inc +++ b/program/steps/mail/list_contacts.inc @@ -5,7 +5,7 @@ | program/steps/mail/list_contacts.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2012-2013, The Roundcube Dev Team | + | Copyright (C) 2012-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -23,15 +23,22 @@ $afields = $RCMAIL->config->get('contactlist_fields'); $addr_sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name'); $page_size = $RCMAIL->config->get('addressbook_pagesize', $RCMAIL->config->get('pagesize', 50)); $list_page = max(1, intval($_GET['_page'])); +$jsresult = array(); // Use search result if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']])) { $search = (array)$_SESSION['search'][$_REQUEST['_search']]; + $sparam = $_SESSION['search_params']['id'] == $_REQUEST['_search'] ? $_SESSION['search_params']['data'] : array(); // get records from all sources foreach ($search as $s => $set) { $CONTACTS = $RCMAIL->get_address_book($s); + // list matching groups of this source (on page one) + if ($sparam[1] && $CONTACTS->groups && $list_page == 1) { + $jsresult += rcmail_compose_contact_groups($CONTACTS, $s, $sparam[1], (int)$RCMAIL->config->get('addressbook_search_mode')); + } + // reset page $CONTACTS->set_page(1); $CONTACTS->set_pagesize(9999); @@ -65,7 +72,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search } // list contacts from selected source else { - $source = get_input_value('_source', RCUBE_INPUT_GPC); + $source = rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); $CONTACTS = $RCMAIL->get_address_book($source); if ($CONTACTS && $CONTACTS->ready) { @@ -73,49 +80,12 @@ else { $CONTACTS->set_pagesize($page_size); $CONTACTS->set_page($list_page); - if ($group_id = get_input_value('_gid', RCUBE_INPUT_GPC)) { + if ($group_id = rcube_utils::get_input_value('_gid', rcube_utils::INPUT_GPC)) { $CONTACTS->set_group($group_id); } // list groups of this source (on page one) else if ($CONTACTS->groups && $CONTACTS->list_page == 1) { - foreach ($CONTACTS->list_groups() as $group) { - $CONTACTS->reset(); - $CONTACTS->set_group($group['ID']); - $group_prop = $CONTACTS->get_group($group['ID']); - - // group (distribution list) with email address(es) - if ($group_prop['email']) { - foreach ((array)$group_prop['email'] as $email) { - $row_id = 'G'.$group['ID']; - $jsresult[$row_id] = format_email_recipient($email, $group['name']); - $OUTPUT->command('add_contact_row', $row_id, array( - 'contactgroup' => html::span(array('title' => $email), Q($group['name']))), 'group'); - } - } - // make virtual groups clickable to list their members - else if ($group_prop['virtual']) { - $row_id = 'G'.$group['ID']; - $OUTPUT->command('add_contact_row', $row_id, array( - 'contactgroup' => html::a(array( - 'href' => '#list', - 'rel' => $row['ID'], - 'title' => rcube_label('listgroup'), - 'onclick' => sprintf("return %s.command('pushgroup',{'source':'%s','id':'%s'},this,event)", JS_OBJECT_NAME, $source, $group['ID']), - ), Q($group['name']) . ' ' . html::span('action', '»'))), - 'group', - array('ID' => $group['ID'], 'name' => $group['name'], 'virtual' => true)); - } - // show group with count - else if (($result = $CONTACTS->count()) && $result->count) { - $row_id = 'E'.$group['ID']; - $jsresult[$row_id] = $group['name']; - $OUTPUT->command('add_contact_row', $row_id, array( - 'contactgroup' => Q($group['name'] . ' (' . intval($result->count) . ')')), 'group'); - } - } - - $CONTACTS->reset(); - $CONTACTS->set_group(0); + $jsresult = rcmail_compose_contact_groups($CONTACTS, $source); } // get contacts for this user @@ -134,14 +104,14 @@ else if (!empty($result) && $result->count > 0) { // add record for every email address of the contact $emails = $CONTACTS->get_col_values('email', $row, true); foreach ($emails as $i => $email) { - $row_id = $row['ID'].$i; + $row_id = $row['ID'].'-'.$i; $jsresult[$row_id] = format_email_recipient($email, $name); $classname = $row['_type'] == 'group' ? 'group' : 'person'; $keyname = $row['_type'] == 'group' ? 'contactgroup' : 'contact'; $OUTPUT->command('add_contact_row', $row_id, array( - $keyname => html::span(array('title' => $email), Q($name ? $name : $email) . - ($name && count($emails) > 1 ? ' ' . html::span('email', Q($email)) : '') + $keyname => html::span(array('title' => $email), rcube::Q($name ? $name : $email) . + ($name && count($emails) > 1 ? ' ' . html::span('email', rcube::Q($email)) : '') )), $classname); } } diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc index dfc892ea1..daa8c7e54 100644 --- a/program/steps/mail/mark.inc +++ b/program/steps/mail/mark.inc @@ -4,7 +4,7 @@ | program/steps/mail/mark.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -19,112 +19,123 @@ */ // only process ajax requests -if (!$OUTPUT->ajax_call) - return; - -$a_flags_map = array( - 'undelete' => 'UNDELETED', - 'delete' => 'DELETED', - 'read' => 'SEEN', - 'unread' => 'UNSEEN', - 'flagged' => 'FLAGGED', - 'unflagged' => 'UNFLAGGED'); - -$threading = (bool) $RCMAIL->storage->get_threading(); - -if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_value('_flag', RCUBE_INPUT_POST))) -{ - $flag = $a_flags_map[$flag] ? $a_flags_map[$flag] : strtoupper($flag); - - if ($flag == 'DELETED' && $CONFIG['skip_deleted'] && $_POST['_from'] != 'show') { - // count messages before changing anything - $old_count = $RCMAIL->storage->count(NULL, $threading ? 'THREADS' : 'ALL'); - $old_pages = ceil($old_count / $RCMAIL->storage->get_pagesize()); - $count = sizeof(explode(',', $uids)); - } - - $marked = $RCMAIL->storage->set_flag($uids, $flag); - - if (!$marked) { - // send error message - if ($_POST['_from'] != 'show') - $OUTPUT->command('list_mailbox'); - rcmail_display_server_error('errormarking'); - $OUTPUT->send(); - exit; - } - else if (empty($_POST['_quiet'])) { - $OUTPUT->show_message('messagemarked', 'confirmation'); - } - - if ($flag == 'DELETED' && $CONFIG['read_when_deleted'] && !empty($_POST['_ruid'])) { - $ruids = get_input_value('_ruid', RCUBE_INPUT_POST); - $read = $RCMAIL->storage->set_flag($ruids, 'SEEN'); - - if ($read && !$CONFIG['skip_deleted']) - $OUTPUT->command('flag_deleted_as_read', $ruids); - } - - if ($flag == 'SEEN' || $flag == 'UNSEEN' || ($flag == 'DELETED' && !$CONFIG['skip_deleted'])) { - rcmail_send_unread_count($RCMAIL->storage->get_folder()); - } - else if ($flag == 'DELETED' && $CONFIG['skip_deleted']) { - if ($_POST['_from'] == 'show') { - if ($next = get_input_value('_next_uid', RCUBE_INPUT_GPC)) - $OUTPUT->command('show_message', $next); - else - $OUTPUT->command('command', 'list'); - } else { - $search_request = get_input_value('_search', RCUBE_INPUT_GPC); - // refresh saved search set after moving some messages - if ($search_request && $RCMAIL->storage->get_search_set()) { - $_SESSION['search'] = $RCMAIL->storage->refresh_search(); - } - - $msg_count = $RCMAIL->storage->count(NULL, $threading ? 'THREADS' : 'ALL'); - $page_size = $RCMAIL->storage->get_pagesize(); - $page = $RCMAIL->storage->get_page(); - $pages = ceil($msg_count / $page_size); - $nextpage_count = $old_count - $page_size * $page; - $remaining = $msg_count - $page_size * ($page - 1); - - // jump back one page (user removed the whole last page) - if ($page > 1 && $remaining == 0) { - $page -= 1; - $RCMAIL->storage->set_page($page); - $_SESSION['page'] = $page; - $jump_back = true; - } - - // update message count display - $OUTPUT->set_env('messagecount', $msg_count); - $OUTPUT->set_env('current_page', $page); - $OUTPUT->set_env('pagecount', $pages); - - // update mailboxlist - $mbox = $RCMAIL->storage->get_folder(); - $unseen_count = $msg_count ? $RCMAIL->storage->count($mbox, 'UNSEEN') : 0; - $old_unseen = rcmail_get_unseen_count($mbox); - - if ($old_unseen != $unseen_count) { - $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX')); - rcmail_set_unseen_count($mbox, $unseen_count); - } - $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count), $mbox); - - if ($threading) { - $count = get_input_value('_count', RCUBE_INPUT_POST); - } - - // add new rows from next page (if any) - if ($count && $uids != '*' && ($jump_back || $nextpage_count > 0)) { - $a_headers = $RCMAIL->storage->list_messages($mbox, NULL, - rcmail_sort_column(), rcmail_sort_order(), $jump_back ? NULL : $count); - - rcmail_js_message_list($a_headers, false); - } +if (!$OUTPUT->ajax_call) { + return; +} + +$threading = (bool) $RCMAIL->storage->get_threading(); +$skip_deleted = (bool) $RCMAIL->config->get('skip_deleted'); +$read_deleted = (bool) $RCMAIL->config->get('read_when_deleted'); + +$a_flags_map = array( + 'undelete' => 'UNDELETED', + 'delete' => 'DELETED', + 'read' => 'SEEN', + 'unread' => 'UNSEEN', + 'flagged' => 'FLAGGED', + 'unflagged' => 'UNFLAGGED', +); + +if (($uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)) + && ($flag = rcube_utils::get_input_value('_flag', rcube_utils::INPUT_POST)) +) { + $flag = $a_flags_map[$flag] ? $a_flags_map[$flag] : strtoupper($flag); + + if ($flag == 'DELETED' && $skip_deleted && $_POST['_from'] != 'show') { + // count messages before changing anything + $old_count = $RCMAIL->storage->count(NULL, $threading ? 'THREADS' : 'ALL'); + $old_pages = ceil($old_count / $RCMAIL->storage->get_pagesize()); + $count = sizeof(explode(',', $uids)); + } + + $marked = $RCMAIL->storage->set_flag($uids, $flag); + + if (!$marked) { + // send error message + if ($_POST['_from'] != 'show') { + $OUTPUT->command('list_mailbox'); + } + + $RCMAIL->display_server_error('errormarking'); + $OUTPUT->send(); + exit; + } + else if (empty($_POST['_quiet'])) { + $OUTPUT->show_message('messagemarked', 'confirmation'); + } + + if ($flag == 'DELETED' && $read_deleted && !empty($_POST['_ruid'])) { + $ruids = rcube_utils::get_input_value('_ruid', rcube_utils::INPUT_POST); + $read = $RCMAIL->storage->set_flag($ruids, 'SEEN'); + + if ($read && !$skip_deleted) { + $OUTPUT->command('flag_deleted_as_read', $ruids); + } + } + + if ($flag == 'SEEN' || $flag == 'UNSEEN' || ($flag == 'DELETED' && !$skip_deleted)) { + rcmail_send_unread_count($RCMAIL->storage->get_folder()); + } + else if ($flag == 'DELETED' && $skip_deleted) { + if ($_POST['_from'] == 'show') { + if ($next = rcube_utils::get_input_value('_next_uid', rcube_utils::INPUT_GPC)) + $OUTPUT->command('show_message', $next); + else + $OUTPUT->command('command', 'list'); + } + else { + $search_request = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC); + + // refresh saved search set after moving some messages + if ($search_request && $RCMAIL->storage->get_search_set()) { + $_SESSION['search'] = $RCMAIL->storage->refresh_search(); + } + + $msg_count = $RCMAIL->storage->count(NULL, $threading ? 'THREADS' : 'ALL'); + $page_size = $RCMAIL->storage->get_pagesize(); + $page = $RCMAIL->storage->get_page(); + $pages = ceil($msg_count / $page_size); + $nextpage_count = $old_count - $page_size * $page; + $remaining = $msg_count - $page_size * ($page - 1); + + // jump back one page (user removed the whole last page) + if ($page > 1 && $remaining == 0) { + $page -= 1; + $RCMAIL->storage->set_page($page); + $_SESSION['page'] = $page; + $jump_back = true; + } + + // update message count display + $OUTPUT->set_env('messagecount', $msg_count); + $OUTPUT->set_env('current_page', $page); + $OUTPUT->set_env('pagecount', $pages); + + // update mailboxlist + $mbox = $RCMAIL->storage->get_folder(); + $unseen_count = $msg_count ? $RCMAIL->storage->count($mbox, 'UNSEEN') : 0; + $old_unseen = rcmail_get_unseen_count($mbox); + + if ($old_unseen != $unseen_count) { + $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX')); + rcmail_set_unseen_count($mbox, $unseen_count); + } + + $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count), $mbox); + + if ($threading) { + $count = rcube_utils::get_input_value('_count', rcube_utils::INPUT_POST); + } + + // add new rows from next page (if any) + if ($count && $uids != '*' && ($jump_back || $nextpage_count > 0)) { + $a_headers = $RCMAIL->storage->list_messages($mbox, NULL, + rcmail_sort_column(), rcmail_sort_order(), $jump_back ? NULL : $count); + + rcmail_js_message_list($a_headers, false); + } + } } - } } else { $OUTPUT->show_message('internalerror', 'error'); diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc index f15cd2460..7564bb89d 100644 --- a/program/steps/mail/move_del.inc +++ b/program/steps/mail/move_del.inc @@ -28,12 +28,13 @@ $threading = (bool) $RCMAIL->storage->get_threading(); $old_count = $RCMAIL->storage->count(NULL, $threading ? 'THREADS' : 'ALL'); $old_pages = ceil($old_count / $RCMAIL->storage->get_pagesize()); +$trash = $RCMAIL->config->get('trash_mbox'); + // move messages if ($RCMAIL->action == 'move' && !empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) { - $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); - $target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true); - $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); - $trash = $RCMAIL->config->get('trash_mbox'); + $count = sizeof(explode(',', ($uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)))); + $target = rcube_utils::get_input_value('_target_mbox', rcube_utils::INPUT_POST, true); + $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true); $moved = $RCMAIL->storage->move_message($uids, $target, $mbox); @@ -41,7 +42,7 @@ if ($RCMAIL->action == 'move' && !empty($_POST['_uid']) && strlen($_POST['_targe // send error message if ($_POST['_from'] != 'show') $OUTPUT->command('list_mailbox'); - rcmail_display_server_error('errormoving', null, $target == $trash ? 'delete' : ''); + $RCMAIL->display_server_error('errormoving', null, $target == $trash ? 'delete' : ''); $OUTPUT->send(); exit; } @@ -53,8 +54,8 @@ if ($RCMAIL->action == 'move' && !empty($_POST['_uid']) && strlen($_POST['_targe } // delete messages else if ($RCMAIL->action=='delete' && !empty($_POST['_uid'])) { - $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); - $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); + $count = sizeof(explode(',', ($uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)))); + $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true); $del = $RCMAIL->storage->delete_message($uids, $mbox); @@ -62,7 +63,7 @@ else if ($RCMAIL->action=='delete' && !empty($_POST['_uid'])) { // send error message if ($_POST['_from'] != 'show') $OUTPUT->command('list_mailbox'); - rcmail_display_server_error('errordeleting'); + $RCMAIL->display_server_error('errordeleting'); $OUTPUT->send(); exit; } @@ -79,23 +80,22 @@ else { exit; } -$search_request = get_input_value('_search', RCUBE_INPUT_GPC); +$search_request = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC); // refresh saved search set after moving some messages if ($search_request && $RCMAIL->storage->get_search_set()) { $_SESSION['search'] = $RCMAIL->storage->refresh_search(); } -if ($_POST['_from'] == 'show') -{ - if ($next = get_input_value('_next_uid', RCUBE_INPUT_GPC)) +if ($_POST['_from'] == 'show') { + if ($next = rcube_utils::get_input_value('_next_uid', rcube_utils::INPUT_GPC)) $OUTPUT->command('show_message', $next); else $OUTPUT->command('command', 'list'); } -else -{ +else { $msg_count = $RCMAIL->storage->count(NULL, $threading ? 'THREADS' : 'ALL'); + $exists = $RCMAIL->storage->count($mbox, 'EXISTS', true); $page_size = $RCMAIL->storage->get_pagesize(); $page = $RCMAIL->storage->get_page(); $pages = ceil($msg_count / $page_size); @@ -114,7 +114,7 @@ else $OUTPUT->set_env('messagecount', $msg_count); $OUTPUT->set_env('current_page', $page); $OUTPUT->set_env('pagecount', $pages); - $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox, 'EXISTS', true)); + $OUTPUT->set_env('exists', $exists); // update mailboxlist $mbox = $RCMAIL->storage->get_folder(); @@ -130,11 +130,11 @@ else rcmail_send_unread_count($target, true); } - $OUTPUT->command('set_quota', rcmail_quota_content()); + $OUTPUT->command('set_quota', $RCMAIL->quota_content()); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count), $mbox); if ($threading) { - $count = get_input_value('_count', RCUBE_INPUT_POST); + $count = rcube_utils::get_input_value('_count', rcube_utils::INPUT_POST); } // add new rows from next page (if any) @@ -144,6 +144,14 @@ else rcmail_js_message_list($a_headers, false); } + + // set trash folder state + if ($mbox === $trash) { + $OUTPUT->command('set_trash_count', $exists); + } + else if ($target !== null && $target === $trash) { + $OUTPUT->command('set_trash_count', $RCMAIL->storage->count($trash, 'EXISTS')); + } } // send response diff --git a/program/steps/mail/pagenav.inc b/program/steps/mail/pagenav.inc index e4b70ad60..74cca88f2 100644 --- a/program/steps/mail/pagenav.inc +++ b/program/steps/mail/pagenav.inc @@ -19,7 +19,7 @@ +-----------------------------------------------------------------------+ */ -$uid = get_input_value('_uid', RCUBE_INPUT_GET); +$uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET); $index = $RCMAIL->storage->index(null, rcmail_sort_column(), rcmail_sort_order()); $cnt = $index->count_messages(); @@ -35,23 +35,27 @@ if ($prev) { $OUTPUT->set_env('prev_uid', $prev); $OUTPUT->command('enable_command', 'previousmessage', 'firstmessage', true); } + if ($next) { $OUTPUT->set_env('next_uid', $next); $OUTPUT->command('enable_command', 'nextmessage', 'lastmessage', true); } -if ($first) + +if ($first) { $OUTPUT->set_env('first_uid', $first); -if ($last) +} + +if ($last) { $OUTPUT->set_env('last_uid', $last); +} // Don't need a real messages count value $OUTPUT->set_env('messagecount', 1); // Set rowcount text -$OUTPUT->command('set_rowcount', rcube_label(array( +$OUTPUT->command('set_rowcount', $RCMAIL->gettext(array( 'name' => 'messagenrof', 'vars' => array('nr' => $pos+1, 'count' => $cnt) ))); $OUTPUT->send(); - diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc index fb1b48797..a80887254 100644 --- a/program/steps/mail/search.inc +++ b/program/steps/mail/search.inc @@ -1,14 +1,18 @@ <?php + /* +-----------------------------------------------------------------------+ | steps/mail/search.inc | | | - | Search functions for rc webmail | + | This file is part 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. | | | + | PURPOSE: | + | Mail messages search action | +-----------------------------------------------------------------------+ | Author: Benjamin Smith <defitro@gmail.com> | | Thomas Bruederli <roundcube@gmail.com> | @@ -24,13 +28,13 @@ $_SESSION['page'] = 1; // using encodeURI with javascript "should" give us // a correctly encoded query string -$imap_charset = RCMAIL_CHARSET; +$imap_charset = RCUBE_CHARSET; // get search string -$str = get_input_value('_q', RCUBE_INPUT_GET, true); -$mbox = get_input_value('_mbox', RCUBE_INPUT_GET, true); -$filter = get_input_value('_filter', RCUBE_INPUT_GET); -$headers = get_input_value('_headers', RCUBE_INPUT_GET); +$str = rcube_utils::get_input_value('_q', rcube_utils::INPUT_GET, true); +$mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GET, true); +$filter = rcube_utils::get_input_value('_filter', rcube_utils::INPUT_GET); +$headers = rcube_utils::get_input_value('_headers', rcube_utils::INPUT_GET); $subject = array(); $search_request = md5($mbox.$filter.$str); @@ -41,103 +45,108 @@ $search_str = $filter && $filter != 'ALL' ? $filter : ''; $_SESSION['search_filter'] = $filter; // Check the search string for type of search -if (preg_match("/^from:.*/i", $str)) -{ - list(,$srch) = explode(":", $str); - $subject['from'] = "HEADER FROM"; +if (preg_match("/^from:.*/i", $str)) { + list(,$srch) = explode(":", $str); + $subject['from'] = "HEADER FROM"; } -else if (preg_match("/^to:.*/i", $str)) -{ - list(,$srch) = explode(":", $str); - $subject['to'] = "HEADER TO"; +else if (preg_match("/^to:.*/i", $str)) { + list(,$srch) = explode(":", $str); + $subject['to'] = "HEADER TO"; } -else if (preg_match("/^cc:.*/i", $str)) -{ - list(,$srch) = explode(":", $str); - $subject['cc'] = "HEADER CC"; +else if (preg_match("/^cc:.*/i", $str)) { + list(,$srch) = explode(":", $str); + $subject['cc'] = "HEADER CC"; } -else if (preg_match("/^bcc:.*/i", $str)) -{ - list(,$srch) = explode(":", $str); - $subject['bcc'] = "HEADER BCC"; +else if (preg_match("/^bcc:.*/i", $str)) { + list(,$srch) = explode(":", $str); + $subject['bcc'] = "HEADER BCC"; } -else if (preg_match("/^subject:.*/i", $str)) -{ - list(,$srch) = explode(":", $str); - $subject['subject'] = "HEADER SUBJECT"; +else if (preg_match("/^subject:.*/i", $str)) { + list(,$srch) = explode(":", $str); + $subject['subject'] = "HEADER SUBJECT"; } -else if (preg_match("/^body:.*/i", $str)) -{ - list(,$srch) = explode(":", $str); - $subject['body'] = "BODY"; +else if (preg_match("/^body:.*/i", $str)) { + list(,$srch) = explode(":", $str); + $subject['body'] = "BODY"; } -else if (strlen(trim($str))) -{ - if ($headers) { - foreach (explode(',', $headers) as $header) { - if ($header == 'text') { - // #1488208: get rid of other headers when searching by "TEXT" - $subject = array('text' => 'TEXT'); - break; - } - else { - $subject[$header] = ($header != 'body' ? 'HEADER ' : '') . strtoupper($header); - } +else if (strlen(trim($str))) { + if ($headers) { + foreach (explode(',', $headers) as $header) { + if ($header == 'text') { + // #1488208: get rid of other headers when searching by "TEXT" + $subject = array('text' => 'TEXT'); + break; + } + else { + $subject[$header] = ($header != 'body' ? 'HEADER ' : '') . strtoupper($header); + } + } + + // save search modifiers for the current folder to user prefs + $search_mods = rcmail_search_mods(); + $search_mods[$mbox] = array_fill_keys(array_keys($subject), 1); + + $RCMAIL->user->save_prefs(array('search_mods' => $search_mods)); + } + else { + // search in subject by default + $subject['subject'] = 'HEADER SUBJECT'; } - - // save search modifiers for the current folder to user prefs - $search_mods = $RCMAIL->config->get('search_mods', $SEARCH_MODS_DEFAULT); - $search_mods[$mbox] = array_fill_keys(array_keys($subject), 1); - $RCMAIL->user->save_prefs(array('search_mods' => $search_mods)); - } - else { - // search in subject by default - $subject['subject'] = 'HEADER SUBJECT'; - } } $search = isset($srch) ? trim($srch) : trim($str); if (!empty($subject)) { - $search_str .= str_repeat(' OR', count($subject)-1); - foreach ($subject as $sub) - $search_str .= ' ' . $sub . ' ' . rcube_imap_generic::escape($search); + $search_str .= str_repeat(' OR', count($subject)-1); + foreach ($subject as $sub) { + $search_str .= ' ' . $sub . ' ' . rcube_imap_generic::escape($search); + } } $search_str = trim($search_str); $sort_column = rcmail_sort_column(); // execute IMAP search -if ($search_str) - $RCMAIL->storage->search($mbox, $search_str, $imap_charset, $sort_column); +if ($search_str) { + $RCMAIL->storage->search($mbox, $search_str, $imap_charset, $sort_column); +} // save search results in session -if (!is_array($_SESSION['search'])) - $_SESSION['search'] = array(); +if (!is_array($_SESSION['search'])) { + $_SESSION['search'] = array(); +} if ($search_str) { - $_SESSION['search'] = $RCMAIL->storage->get_search_set(); - $_SESSION['last_text_search'] = $str; + $_SESSION['search'] = $RCMAIL->storage->get_search_set(); + $_SESSION['last_text_search'] = $str; } $_SESSION['search_request'] = $search_request; // Get the headers $result_h = $RCMAIL->storage->list_messages($mbox, 1, $sort_column, rcmail_sort_order()); -$count = $RCMAIL->storage->count($mbox, $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL'); +$count = $RCMAIL->storage->count($mbox, $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL'); // Make sure we got the headers if (!empty($result_h)) { - rcmail_js_message_list($result_h); - if ($search_str) - $OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $RCMAIL->storage->count(NULL, 'ALL'))); + rcmail_js_message_list($result_h); + if ($search_str) { + $OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $RCMAIL->storage->count(NULL, 'ALL'))); + } + + // remember last HIGHESTMODSEQ value (if supported) + // we need it for flag updates in check-recent + $data = $RCMAIL->storage->folder_data($mbox_name); + if (!empty($data['HIGHESTMODSEQ'])) { + $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ']; + } } // handle IMAP errors (e.g. #1486905) else if ($err_code = $RCMAIL->storage->get_error_code()) { - rcmail_display_server_error(); + $RCMAIL->display_server_error(); } else { - $OUTPUT->show_message('searchnomatch', 'notice'); + $OUTPUT->show_message('searchnomatch', 'notice'); } // update message count display diff --git a/program/steps/mail/search_contacts.inc b/program/steps/mail/search_contacts.inc index 6a30ad1f5..d56581695 100644 --- a/program/steps/mail/search_contacts.inc +++ b/program/steps/mail/search_contacts.inc @@ -5,7 +5,7 @@ | program/steps/mail/search_contacts.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2013, The Roundcube Dev Team | + | Copyright (C) 2013-2014, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -19,7 +19,7 @@ +-----------------------------------------------------------------------+ */ -$search = get_input_value('_q', RCUBE_INPUT_GPC, true); +$search = rcube_utils::get_input_value('_q', rcube_utils::INPUT_GPC, true); $sources = $RCMAIL->get_address_sources(); $search_mode = (int) $RCMAIL->config->get('addressbook_search_mode'); $addr_sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name'); @@ -27,12 +27,18 @@ $afields = $RCMAIL->config->get('contactlist_fields'); $page_size = $RCMAIL->config->get('addressbook_pagesize', $RCMAIL->config->get('pagesize', 50)); $records = array(); $search_set = array(); +$jsresult = array(); foreach ($sources as $s) { $source = $RCMAIL->get_address_book($s['id']); $source->set_page(1); $source->set_pagesize(9999); + // list matching groups of this source + if ($source->groups) { + $jsresult += rcmail_compose_contact_groups($source, $s['id'], $search, $search_mode); + } + // get contacts count $result = $source->search($afields, $search, $search_mode, true, true, 'email'); @@ -53,6 +59,8 @@ foreach ($sources as $s) { unset($result); } +$group_count = count($jsresult); + // sort the records ksort($records, SORT_LOCALE_STRING); @@ -76,11 +84,11 @@ if (!empty($result) && $result->count > 0) { // (same as in list_contacts.inc) $emails = $source->get_col_values('email', $row, true); foreach ($emails as $i => $email) { - $row_id = $row['ID'].$i; + $row_id = $row['ID'].'-'.$i; $jsresult[$row_id] = format_email_recipient($email, $name); $OUTPUT->command('add_contact_row', $row_id, array( - 'contact' => html::span(array('title' => $email), Q($name ? $name : $email) . - ($name && count($emails) > 1 ? ' ' . html::span('email', Q($email)) : '') + 'contact' => html::span(array('title' => $email), rcube::Q($name ? $name : $email) . + ($name && count($emails) > 1 ? ' ' . html::span('email', rcube::Q($email)) : '') )), 'person'); } } @@ -98,7 +106,7 @@ if (!empty($result) && $result->count > 0) { $OUTPUT->command('set_env', 'source', ''); $OUTPUT->command('unselect_directory'); } -else { +else if (!$group_count) { $OUTPUT->show_message('nocontactsfound', 'notice'); } diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index ccb8978be..2cd897e46 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -5,7 +5,7 @@ | program/steps/mail/sendmail.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | 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. | @@ -24,434 +24,224 @@ $OUTPUT->reset(); $OUTPUT->framed = TRUE; -$savedraft = !empty($_POST['_draft']) ? true : false; +$savedraft = !empty($_POST['_draft']) ? true : false; +$sendmail_delay = (int) $RCMAIL->config->get('sendmail_delay'); +$drafts_mbox = $RCMAIL->config->get('drafts_mbox'); -$COMPOSE_ID = get_input_value('_id', RCUBE_INPUT_GPC); +$COMPOSE_ID = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC); $COMPOSE =& $_SESSION['compose_data_'.$COMPOSE_ID]; /****** checks ********/ if (!isset($COMPOSE['id'])) { - raise_error(array('code' => 500, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Invalid compose ID"), true, false); - - $OUTPUT->show_message('internalerror', 'error'); - $OUTPUT->send('iframe'); -} + rcube::raise_error(array('code' => 500, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Invalid compose ID"), true, false); -if (!$savedraft) { - if (empty($_POST['_to']) && empty($_POST['_cc']) && empty($_POST['_bcc']) - && empty($_POST['_subject']) && $_POST['_message']) { - $OUTPUT->show_message('sendingfailed', 'error'); + $OUTPUT->show_message('internalerror', 'error'); $OUTPUT->send('iframe'); - } - - if(!empty($CONFIG['sendmail_delay'])) { - $wait_sec = time() - intval($CONFIG['sendmail_delay']) - intval($CONFIG['last_message_time']); - if ($wait_sec < 0) { - $OUTPUT->show_message('senttooquickly', 'error', array('sec' => $wait_sec * -1)); - $OUTPUT->send('iframe'); - } - } -} - - -/****** message sending functions ********/ - -// encrypt parts of the header -function rcmail_encrypt_header($what) -{ - global $CONFIG, $RCMAIL; - if (!$CONFIG['http_received_header_encrypt']) { - return $what; - } - return $RCMAIL->encrypt($what); } -// get identity record -function rcmail_get_identity($id) -{ - global $RCMAIL, $message_charset; - global $RCMAIL; - - if ($sql_arr = $RCMAIL->user->get_identity($id)) { - $out = $sql_arr; - - if ($message_charset != RCMAIL_CHARSET) { - foreach ($out as $k => $v) - $out[$k] = rcube_charset_convert($v, RCMAIL_CHARSET, $message_charset); +if (!$savedraft) { + if (empty($_POST['_to']) && empty($_POST['_cc']) && empty($_POST['_bcc']) + && empty($_POST['_subject']) && $_POST['_message'] + ) { + $OUTPUT->show_message('sendingfailed', 'error'); + $OUTPUT->send('iframe'); } - $out['mailto'] = $sql_arr['email']; - $out['string'] = format_email_recipient($sql_arr['email'], $sql_arr['name']); - - return $out; - } - - return FALSE; -} - -/** - * go from this: - * <img src="http[s]://.../tiny_mce/plugins/emotions/images/smiley-cool.gif" border="0" alt="Cool" title="Cool" /> - * - * to this: - * - * <img src="/path/on/server/.../tiny_mce/plugins/emotions/images/smiley-cool.gif" border="0" alt="Cool" title="Cool" /> - */ -function rcmail_fix_emoticon_paths($mime_message) -{ - global $RCMAIL; - - $body = $mime_message->getHTMLBody(); - - // remove any null-byte characters before parsing - $body = preg_replace('/\x00/', '', $body); - - $searchstr = 'program/js/tiny_mce/plugins/emotions/img/'; - $offset = 0; - - // keep track of added images, so they're only added once - $included_images = array(); - - if (preg_match_all('# src=[\'"]([^\'"]+)#', $body, $matches, PREG_OFFSET_CAPTURE)) { - foreach ($matches[1] as $m) { - // find emoticon image tags - if (preg_match('#'.$searchstr.'(.*)$#', $m[0], $imatches)) { - $image_name = $imatches[1]; - - // sanitize image name so resulting attachment doesn't leave images dir - $image_name = preg_replace('/[^a-zA-Z0-9_\.\-]/i', '', $image_name); - $img_file = INSTALL_PATH . '/' . $searchstr . $image_name; - - if (! in_array($image_name, $included_images)) { - // add the image to the MIME message - if (!$mime_message->addHTMLImage($img_file, 'image/gif', '', true, $image_name)) { - $RCMAIL->output->show_message("emoticonerror", 'error'); - } - array_push($included_images, $image_name); + if ($sendmail_delay) { + $wait_sec = time() - $sendmail_delay - intval($RCMAIL->config->get('last_message_time')); + if ($wait_sec < 0) { + $OUTPUT->show_message('senttooquickly', 'error', array('sec' => $wait_sec * -1)); + $OUTPUT->send('iframe'); } - - $body = substr_replace($body, $img_file, $m[1] + $offset, strlen($m[0])); - $offset += strlen($img_file) - strlen($m[0]); - } } - } - - $mime_message->setHTMLBody($body); -} - -/** - * Extract image attachments from HTML content (data URIs) - */ -function rcmail_extract_inline_images($mime_message, $from) -{ - $body = $mime_message->getHTMLBody(); - $offset = 0; - $list = array(); - $regexp = '# src=[\'"](data:(image/[a-z]+);base64,([a-z0-9+/=\r\n]+))([\'"])#i'; - - // get domain for the Content-ID, must be the same as in Mail_Mime::get() - if (preg_match('#@([0-9a-zA-Z\-\.]+)#', $from, $matches)) { - $domain = $matches[1]; - } else { - $domain = 'localhost'; - } - - if (preg_match_all($regexp, $body, $matches, PREG_OFFSET_CAPTURE)) { - foreach ($matches[1] as $idx => $m) { - $data = preg_replace('/\r\n/', '', $matches[3][$idx][0]); - $data = base64_decode($data); - - if (empty($data)) { - continue; - } - - $hash = md5($data) . '@' . $domain; - $mime_type = $matches[2][$idx][0]; - $name = $list[$hash]; - - // add the image to the MIME message - if (!$name) { - $ext = preg_replace('#^[^/]+/#', '', $mime_type); - $name = substr($hash, 0, 8) . '.' . $ext; - $list[$hash] = $name; - - $mime_message->addHTMLImage($data, $mime_type, $name, false, $hash); - } - - $body = substr_replace($body, $name, $m[1] + $offset, strlen($m[0])); - $offset += strlen($name) - strlen($m[0]); - } - } - - $mime_message->setHTMLBody($body); -} - -/** - * Parse and cleanup email address input (and count addresses) - * - * @param string Address input - * @param boolean Do count recipients (saved in global $RECIPIENT_COUNT) - * @param boolean Validate addresses (errors saved in global $EMAIL_FORMAT_ERROR) - * @return string Canonical recipients string separated by comma - */ -function rcmail_email_input_format($mailto, $count=false, $check=true) -{ - global $RCMAIL, $EMAIL_FORMAT_ERROR, $RECIPIENT_COUNT; - - // simplified email regexp, supporting quoted local part - $email_regexp = '(\S+|("[^"]+"))@\S+'; - - $delim = trim($RCMAIL->config->get('recipients_separator', ',')); - $regexp = array("/[,;$delim]\s*[\r\n]+/", '/[\r\n]+/', "/[,;$delim]\s*\$/m", '/;/', '/(\S{1})(<'.$email_regexp.'>)/U'); - $replace = array($delim.' ', ', ', '', $delim, '\\1 \\2'); - - // replace new lines and strip ending ', ', make address input more valid - $mailto = trim(preg_replace($regexp, $replace, $mailto)); - - $result = array(); - $items = rcube_explode_quoted_string($delim, $mailto); - - foreach($items as $item) { - $item = trim($item); - // address in brackets without name (do nothing) - if (preg_match('/^<'.$email_regexp.'>$/', $item)) { - $item = rcube_idn_to_ascii(trim($item, '<>')); - $result[] = $item; - // address without brackets and without name (add brackets) - } else if (preg_match('/^'.$email_regexp.'$/', $item)) { - $item = rcube_idn_to_ascii($item); - $result[] = $item; - // address with name (handle name) - } else if (preg_match('/<*'.$email_regexp.'>*$/', $item, $matches)) { - $address = $matches[0]; - $name = trim(str_replace($address, '', $item)); - if ($name[0] == '"' && $name[count($name)-1] == '"') { - $name = substr($name, 1, -1); - } - $name = stripcslashes($name); - $address = rcube_idn_to_ascii(trim($address, '<>')); - $result[] = format_email_recipient($address, $name); - $item = $address; - } else if (trim($item)) { - continue; - } - - // check address format - $item = trim($item, '<>'); - if ($item && $check && !check_email($item)) { - $EMAIL_FORMAT_ERROR = $item; - return; - } - } - - if ($count) { - $RECIPIENT_COUNT += count($result); - } - - return implode(', ', $result); -} - - -function rcmail_generic_message_footer($isHtml) -{ - global $CONFIG; - - if ($isHtml && !empty($CONFIG['generic_message_footer_html'])) { - $file = $CONFIG['generic_message_footer_html']; - $html_footer = true; - } - else { - $file = $CONFIG['generic_message_footer']; - $html_footer = false; - } - - if ($file && realpath($file)) { - // sanity check - if (!preg_match('/\.(php|ini|conf)$/', $file) && strpos($file, '/etc/') === false) { - $footer = file_get_contents($file); - if ($isHtml && !$html_footer) - $footer = '<pre>' . $footer . '</pre>'; - return $footer; - } - } - - return false; } /****** compose message ********/ -if (strlen($_POST['_draft_saveid']) > 3) - $olddraftmessageid = get_input_value('_draft_saveid', RCUBE_INPUT_POST); - -$message_id = rcmail_gen_message_id(); +if (empty($COMPOSE['param']['message-id'])) { + $COMPOSE['param']['message-id'] = $RCMAIL->gen_message_id(); +} +$message_id = $COMPOSE['param']['message-id']; // set default charset $message_charset = isset($_POST['_charset']) ? $_POST['_charset'] : $OUTPUT->get_charset(); $EMAIL_FORMAT_ERROR = NULL; -$RECIPIENT_COUNT = 0; +$RECIPIENT_COUNT = 0; -$mailto = rcmail_email_input_format(get_input_value('_to', RCUBE_INPUT_POST, TRUE, $message_charset), true); -$mailcc = rcmail_email_input_format(get_input_value('_cc', RCUBE_INPUT_POST, TRUE, $message_charset), true); -$mailbcc = rcmail_email_input_format(get_input_value('_bcc', RCUBE_INPUT_POST, TRUE, $message_charset), true); +$mailto = rcmail_email_input_format(rcube_utils::get_input_value('_to', rcube_utils::INPUT_POST, TRUE, $message_charset), true); +$mailcc = rcmail_email_input_format(rcube_utils::get_input_value('_cc', rcube_utils::INPUT_POST, TRUE, $message_charset), true); +$mailbcc = rcmail_email_input_format(rcube_utils::get_input_value('_bcc', rcube_utils::INPUT_POST, TRUE, $message_charset), true); if ($EMAIL_FORMAT_ERROR) { - $OUTPUT->show_message('emailformaterror', 'error', array('email' => $EMAIL_FORMAT_ERROR)); - $OUTPUT->send('iframe'); + $OUTPUT->show_message('emailformaterror', 'error', array('email' => $EMAIL_FORMAT_ERROR)); + $OUTPUT->send('iframe'); } if (empty($mailto) && !empty($mailcc)) { - $mailto = $mailcc; - $mailcc = null; + $mailto = $mailcc; + $mailcc = null; +} +else if (empty($mailto)) { + $mailto = 'undisclosed-recipients:;'; } -else if (empty($mailto)) - $mailto = 'undisclosed-recipients:;'; // Get sender name and address... -$from = get_input_value('_from', RCUBE_INPUT_POST, true, $message_charset); +$from = rcube_utils::get_input_value('_from', rcube_utils::INPUT_POST, true, $message_charset); // ... from identity... if (is_numeric($from)) { - if (is_array($identity_arr = rcmail_get_identity($from))) { - if ($identity_arr['mailto']) - $from = $identity_arr['mailto']; - if ($identity_arr['string']) - $from_string = $identity_arr['string']; - } - else { - $from = null; - } + if (is_array($identity_arr = rcmail_get_identity($from))) { + if ($identity_arr['mailto']) + $from = $identity_arr['mailto']; + if ($identity_arr['string']) + $from_string = $identity_arr['string']; + } + else { + $from = null; + } } // ... if there is no identity record, this might be a custom from else if ($from_string = rcmail_email_input_format($from)) { - if (preg_match('/(\S+@\S+)/', $from_string, $m)) - $from = trim($m[1], '<>'); - else - $from = null; + if (preg_match('/(\S+@\S+)/', $from_string, $m)) + $from = trim($m[1], '<>'); + else + $from = null; } -if (!$from_string && $from) - $from_string = $from; +if (!$from_string && $from) { + $from_string = $from; +} // compose headers array $headers = array(); // if configured, the Received headers goes to top, for good measure -if ($CONFIG['http_received_header']) -{ - $nldlm = "\r\n\t"; - // FROM/VIA - $http_header = 'from '; - if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { - $host = $_SERVER['HTTP_X_FORWARDED_FOR']; +if ($RCMAIL->config->get('http_received_header')) { + $nldlm = "\r\n\t"; + $encrypt = $RCMAIL->config->get('http_received_header_encrypt'); + + // FROM/VIA + $http_header = 'from '; + + if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $hosts = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'], 2); + $hostname = gethostbyaddr($hosts[0]); + + if ($encrypt) { + $http_header .= rcmail_encrypt_header($hostname); + if ($host != $hostname) + $http_header .= ' ('. rcmail_encrypt_header($host) . ')'; + } + else { + $http_header .= (($host != $hostname) ? $hostname : '[' . $host . ']'); + if ($host != $hostname) + $http_header .= ' (['. $host .'])'; + } + $http_header .= $nldlm . ' via '; + } + + $host = $_SERVER['REMOTE_ADDR']; $hostname = gethostbyaddr($host); - if ($CONFIG['http_received_header_encrypt']) { - $http_header .= rcmail_encrypt_header($hostname); - if ($host != $hostname) - $http_header .= ' ('. rcmail_encrypt_header($host) . ')'; - } else { - $http_header .= (($host != $hostname) ? $hostname : '[' . $host . ']'); - if ($host != $hostname) - $http_header .= ' (['. $host .'])'; - } - $http_header .= $nldlm . ' via '; - } - $host = $_SERVER['REMOTE_ADDR']; - $hostname = gethostbyaddr($host); - if ($CONFIG['http_received_header_encrypt']) { - $http_header .= rcmail_encrypt_header($hostname); - if ($host != $hostname) - $http_header .= ' ('. rcmail_encrypt_header($host) . ')'; - } else { - $http_header .= (($host != $hostname) ? $hostname : '[' . $host . ']'); - if ($host != $hostname) - $http_header .= ' (['. $host .'])'; - } - // BY - $http_header .= $nldlm . 'by ' . $_SERVER['HTTP_HOST']; - // WITH - $http_header .= $nldlm . 'with HTTP (' . $_SERVER['SERVER_PROTOCOL'] . + + if ($encrypt) { + $http_header .= rcmail_encrypt_header($hostname); + if ($host != $hostname) + $http_header .= ' ('. rcmail_encrypt_header($host) . ')'; + } + else { + $http_header .= (($host != $hostname) ? $hostname : '[' . $host . ']'); + if ($host != $hostname) + $http_header .= ' (['. $host .'])'; + } + + // BY + $http_header .= $nldlm . 'by ' . $_SERVER['HTTP_HOST']; + + // WITH + $http_header .= $nldlm . 'with HTTP (' . $_SERVER['SERVER_PROTOCOL'] . ' '.$_SERVER['REQUEST_METHOD'] . '); ' . date('r'); - $http_header = wordwrap($http_header, 69, $nldlm); + $http_header = wordwrap($http_header, 69, $nldlm); - $headers['Received'] = $http_header; + $headers['Received'] = $http_header; } -$headers['Date'] = rcmail_user_date(); -$headers['From'] = rcube_charset_convert($from_string, RCMAIL_CHARSET, $message_charset); +$headers['Date'] = $RCMAIL->user_date(); +$headers['From'] = rcube_charset::convert($from_string, RCUBE_CHARSET, $message_charset); $headers['To'] = $mailto; // additional recipients if (!empty($mailcc)) { - $headers['Cc'] = $mailcc; + $headers['Cc'] = $mailcc; } if (!empty($mailbcc)) { - $headers['Bcc'] = $mailbcc; + $headers['Bcc'] = $mailbcc; } if (($max_recipients = (int) $RCMAIL->config->get('max_recipients')) > 0) { - if ($RECIPIENT_COUNT > $max_recipients) { - $OUTPUT->show_message('toomanyrecipients', 'error', array('max' => $max_recipients)); - $OUTPUT->send('iframe'); - } + if ($RECIPIENT_COUNT > $max_recipients) { + $OUTPUT->show_message('toomanyrecipients', 'error', array('max' => $max_recipients)); + $OUTPUT->send('iframe'); + } } // add subject -$headers['Subject'] = trim(get_input_value('_subject', RCUBE_INPUT_POST, TRUE, $message_charset)); +$headers['Subject'] = trim(rcube_utils::get_input_value('_subject', rcube_utils::INPUT_POST, TRUE, $message_charset)); if (!empty($identity_arr['organization'])) { - $headers['Organization'] = $identity_arr['organization']; + $headers['Organization'] = $identity_arr['organization']; } -if (!empty($_POST['_replyto'])) { - $headers['Reply-To'] = rcmail_email_input_format(get_input_value('_replyto', RCUBE_INPUT_POST, TRUE, $message_charset)); +if ($hdr = rcube_utils::get_input_value('_replyto', rcube_utils::INPUT_POST, TRUE, $message_charset)) { + $headers['Reply-To'] = rcmail_email_input_format($hdr); } if (!empty($headers['Reply-To'])) { - $headers['Mail-Reply-To'] = $headers['Reply-To']; + $headers['Mail-Reply-To'] = $headers['Reply-To']; } -if (!empty($_POST['_followupto'])) { - $headers['Mail-Followup-To'] = rcmail_email_input_format(get_input_value('_followupto', RCUBE_INPUT_POST, TRUE, $message_charset)); +if ($hdr = rcube_utils::get_input_value('_followupto', rcube_utils::INPUT_POST, TRUE, $message_charset)) { + $headers['Mail-Followup-To'] = rcmail_email_input_format(); } // remember reply/forward UIDs in special headers if (!empty($COMPOSE['reply_uid']) && $savedraft) { - $headers['X-Draft-Info'] = array('type' => 'reply', 'uid' => $COMPOSE['reply_uid']); + $headers['X-Draft-Info'] = array('type' => 'reply', 'uid' => $COMPOSE['reply_uid']); } else if (!empty($COMPOSE['forward_uid']) && $savedraft) { - $headers['X-Draft-Info'] = array('type' => 'forward', 'uid' => $COMPOSE['forward_uid']); + $headers['X-Draft-Info'] = array('type' => 'forward', 'uid' => rcube_imap_generic::compressMessageSet($COMPOSE['forward_uid'])); } if (!empty($COMPOSE['reply_msgid'])) { - $headers['In-Reply-To'] = $COMPOSE['reply_msgid']; + $headers['In-Reply-To'] = $COMPOSE['reply_msgid']; } if (!empty($COMPOSE['references'])) { - $headers['References'] = $COMPOSE['references']; + $headers['References'] = $COMPOSE['references']; } if (!empty($_POST['_priority'])) { - $priority = intval($_POST['_priority']); - $a_priorities = array(1=>'highest', 2=>'high', 4=>'low', 5=>'lowest'); - if ($str_priority = $a_priorities[$priority]) { - $headers['X-Priority'] = sprintf("%d (%s)", $priority, ucfirst($str_priority)); - } + $priority = intval($_POST['_priority']); + $a_priorities = array(1 => 'highest', 2 => 'high', 4 => 'low', 5 => 'lowest'); + + if ($str_priority = $a_priorities[$priority]) { + $headers['X-Priority'] = sprintf("%d (%s)", $priority, ucfirst($str_priority)); + } } if (!empty($_POST['_receipt'])) { - $headers['Return-Receipt-To'] = $from_string; - $headers['Disposition-Notification-To'] = $from_string; + $headers['Return-Receipt-To'] = $from_string; + $headers['Disposition-Notification-To'] = $from_string; } // additional headers $headers['Message-ID'] = $message_id; -$headers['X-Sender'] = $from; +$headers['X-Sender'] = $from; if (is_array($headers['X-Draft-Info'])) { - $headers['X-Draft-Info'] = rcmail_draftinfo_encode($headers['X-Draft-Info'] + array('folder' => $COMPOSE['mailbox'])); + $headers['X-Draft-Info'] = rcmail_draftinfo_encode($headers['X-Draft-Info'] + array('folder' => $COMPOSE['mailbox'])); } -if (!empty($CONFIG['useragent'])) { - $headers['User-Agent'] = $CONFIG['useragent']; +if ($hdr = $RCMAIL->config->get('useragent')) { + $headers['User-Agent'] = $hdr; } // exec hook for header checking and manipulation @@ -460,85 +250,85 @@ $data = $RCMAIL->plugins->exec_hook('message_outgoing_headers', array('headers' // sending aborted by plugin if ($data['abort'] && !$savedraft) { - $OUTPUT->show_message($data['message'] ? $data['message'] : 'sendingfailed'); - $OUTPUT->send('iframe'); + $OUTPUT->show_message($data['message'] ? $data['message'] : 'sendingfailed'); + $OUTPUT->send('iframe'); +} +else { + $headers = $data['headers']; } -else - $headers = $data['headers']; - -$isHtml = (bool) get_input_value('_is_html', RCUBE_INPUT_POST); +$isHtml = (bool) rcube_utils::get_input_value('_is_html', rcube_utils::INPUT_POST); // fetch message body -$message_body = get_input_value('_message', RCUBE_INPUT_POST, TRUE, $message_charset); +$message_body = rcube_utils::get_input_value('_message', rcube_utils::INPUT_POST, TRUE, $message_charset); if ($isHtml) { - $bstyle = array(); + $bstyle = array(); - if ($font_size = $RCMAIL->config->get('default_font_size')) { - $bstyle[] = 'font-size: ' . $font_size; - } - if ($font_family = $RCMAIL->config->get('default_font')) { - $bstyle[] = 'font-family: ' . rcmail::font_defs($font_family); - } + if ($font_size = $RCMAIL->config->get('default_font_size')) { + $bstyle[] = 'font-size: ' . $font_size; + } + if ($font_family = $RCMAIL->config->get('default_font')) { + $bstyle[] = 'font-family: ' . rcmail::font_defs($font_family); + } - // append doctype and html/body wrappers - $message_body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">' - . "\r\n<html><body" . (!empty($bstyle) ? " style='" . implode($bstyle, '; ') . "'" : '') . ">\r\n" - . $message_body; + // append doctype and html/body wrappers + $message_body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">' + . "\r\n<html><body" . (!empty($bstyle) ? " style='" . implode($bstyle, '; ') . "'" : '') . ">\r\n" + . $message_body; } if (!$savedraft) { - if ($isHtml) { - // remove signature's div ID - $message_body = preg_replace('/\s*id="_rc_sig"/', '', $message_body); + if ($isHtml) { + // remove signature's div ID + $message_body = preg_replace('/\s*id="_rc_sig"/', '', $message_body); + + // add inline css for blockquotes + $bstyle = 'padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px'; + $message_body = preg_replace('/<blockquote>/', + '<blockquote type="cite" style="'.$bstyle.'">', $message_body); + } - // add inline css for blockquotes - $bstyle = 'padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px'; - $message_body = preg_replace('/<blockquote>/', - '<blockquote type="cite" style="'.$bstyle.'">', $message_body); - } + // Check spelling before send + if ($RCMAIL->config->get('spellcheck_before_send') && $RCMAIL->config->get('enable_spellcheck') + && empty($COMPOSE['spell_checked']) && !empty($message_body) + ) { + $message_body = str_replace("\r\n", "\n", $message_body); + $spellchecker = new rcube_spellchecker(rcube_utils::get_input_value('_lang', rcube_utils::INPUT_GPC)); + $spell_result = $spellchecker->check($message_body, $isHtml); - // Check spelling before send - if ($CONFIG['spellcheck_before_send'] && $CONFIG['enable_spellcheck'] - && empty($COMPOSE['spell_checked']) && !empty($message_body) - ) { - $message_body = str_replace("\r\n", "\n", $message_body); - $spellchecker = new rcube_spellchecker(get_input_value('_lang', RCUBE_INPUT_GPC)); - $spell_result = $spellchecker->check($message_body, $isHtml); + $COMPOSE['spell_checked'] = true; - $COMPOSE['spell_checked'] = true; + if (!$spell_result) { + $result = $isHtml ? $spellchecker->get_words() : $spellchecker->get_xml(); - if (!$spell_result) { - $result = $isHtml ? $spellchecker->get_words() : $spellchecker->get_xml(); - $OUTPUT->show_message('mispellingsfound', 'error'); - $OUTPUT->command('spellcheck_resume', $isHtml, $result); - $OUTPUT->send('iframe'); + $OUTPUT->show_message('mispellingsfound', 'error'); + $OUTPUT->command('spellcheck_resume', $isHtml, $result); + $OUTPUT->send('iframe'); + } } - } - // generic footer for all messages - if ($footer = rcmail_generic_message_footer($isHtml)) { - $footer = rcube_charset_convert($footer, RCMAIL_CHARSET, $message_charset); - $message_body .= "\r\n" . $footer; - } + // generic footer for all messages + if ($footer = rcmail_generic_message_footer($isHtml)) { + $footer = rcube_charset::convert($footer, RCUBE_CHARSET, $message_charset); + $message_body .= "\r\n" . $footer; + } } if ($isHtml) { - $message_body .= "\r\n</body></html>\r\n"; + $message_body .= "\r\n</body></html>\r\n"; } // sort attachments to make sure the order is the same as in the UI (#1488423) -$files = get_input_value('_attachments', RCUBE_INPUT_POST); -if ($files) { - $files = explode(',', $files); - $files = array_flip($files); - foreach ($files as $idx => $val) { - $files[$idx] = $COMPOSE['attachments'][$idx]; - unset($COMPOSE['attachments'][$idx]); - } +if ($files = rcube_utils::get_input_value('_attachments', rcube_utils::INPUT_POST)) { + $files = explode(',', $files); + $files = array_flip($files); + foreach ($files as $idx => $val) { + $files[$idx] = $COMPOSE['attachments'][$idx]; + unset($COMPOSE['attachments'][$idx]); + } - $COMPOSE['attachments'] = array_merge(array_filter($files), $COMPOSE['attachments']); + $COMPOSE['attachments'] = array_merge(array_filter($files), $COMPOSE['attachments']); } // set line length for body wrapping @@ -552,110 +342,142 @@ $MAIL_MIME = new Mail_mime("\r\n"); // Check if we have enough memory to handle the message in it // It's faster than using files, so we'll do this if we only can -if (is_array($COMPOSE['attachments']) && $CONFIG['smtp_server'] - && ($mem_limit = parse_bytes(ini_get('memory_limit')))) -{ - $memory = function_exists('memory_get_usage') ? memory_get_usage() : 16*1024*1024; // safe value: 16MB - - foreach ($COMPOSE['attachments'] as $id => $attachment) - $memory += $attachment['size']; +if (is_array($COMPOSE['attachments']) && $RCMAIL->config->get('smtp_server') + && ($mem_limit = parse_bytes(ini_get('memory_limit'))) +) { + $memory = 0; + foreach ($COMPOSE['attachments'] as $id => $attachment) { + $memory += $attachment['size']; + } - // Yeah, Net_SMTP needs up to 12x more memory, 1.33 is for base64 - if ($memory * 1.33 * 12 > $mem_limit) - $MAIL_MIME->setParam('delay_file_io', true); + // Yeah, Net_SMTP needs up to 12x more memory, 1.33 is for base64 + if (!rcube_utils::mem_check($memory * 1.33 * 12)) { + $MAIL_MIME->setParam('delay_file_io', true); + } } // For HTML-formatted messages, construct the MIME message with both // the HTML part and the plain-text part - if ($isHtml) { - $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', - array('body' => $message_body, 'type' => 'html', 'message' => $MAIL_MIME)); + $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', + array('body' => $message_body, 'type' => 'html', 'message' => $MAIL_MIME)); - $MAIL_MIME->setHTMLBody($plugin['body']); + $MAIL_MIME->setHTMLBody($plugin['body']); - // replace emoticons - $plugin['body'] = rcmail_replace_emoticons($plugin['body']); + // replace emoticons + $plugin['body'] = $RCMAIL->replace_emoticons($plugin['body']); - // add a plain text version of the e-mail as an alternative part. - $h2t = new rcube_html2text($plugin['body'], false, true, 0, $message_charset); - $plainTextPart = rc_wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n", false, $message_charset); - $plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true); + // add a plain text version of the e-mail as an alternative part. + $h2t = new rcube_html2text($plugin['body'], false, true, 0, $message_charset); + $plainTextPart = rcube_mime::wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n", false, $message_charset); + $plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true); - // make sure all line endings are CRLF (#1486712) - $plainTextPart = preg_replace('/\r?\n/', "\r\n", $plainTextPart); + // make sure all line endings are CRLF (#1486712) + $plainTextPart = preg_replace('/\r?\n/', "\r\n", $plainTextPart); - $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', - array('body' => $plainTextPart, 'type' => 'alternative', 'message' => $MAIL_MIME)); + $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', + array('body' => $plainTextPart, 'type' => 'alternative', 'message' => $MAIL_MIME)); - $MAIL_MIME->setTXTBody($plugin['body']); + $MAIL_MIME->setTXTBody($plugin['body']); - // look for "emoticon" images from TinyMCE and change their src paths to - // be file paths on the server instead of URL paths. - rcmail_fix_emoticon_paths($MAIL_MIME); + // look for "emoticon" images from TinyMCE and change their src paths to + // be file paths on the server instead of URL paths. + rcmail_fix_emoticon_paths($MAIL_MIME); - // Extract image Data URIs into message attachments (#1488502) - rcmail_extract_inline_images($MAIL_MIME, $from); + // Extract image Data URIs into message attachments (#1488502) + rcmail_extract_inline_images($MAIL_MIME, $from); } else { - $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', - array('body' => $message_body, 'type' => 'plain', 'message' => $MAIL_MIME)); + $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', + array('body' => $message_body, 'type' => 'plain', 'message' => $MAIL_MIME)); - $message_body = $plugin['body']; + $message_body = $plugin['body']; - // compose format=flowed content if enabled - if ($flowed = ($savedraft || $RCMAIL->config->get('send_format_flowed', true))) - $message_body = rcube_mime::format_flowed($message_body, min($LINE_LENGTH+2, 79), $message_charset); - else - $message_body = rc_wordwrap($message_body, $LINE_LENGTH, "\r\n", false, $message_charset); + // compose format=flowed content if enabled + if ($flowed = ($savedraft || $RCMAIL->config->get('send_format_flowed', true))) + $message_body = rcube_mime::format_flowed($message_body, min($LINE_LENGTH+2, 79), $message_charset); + else + $message_body = rcube_mime::wordwrap($message_body, $LINE_LENGTH, "\r\n", false, $message_charset); - $message_body = wordwrap($message_body, 998, "\r\n", true); + $message_body = wordwrap($message_body, 998, "\r\n", true); - $MAIL_MIME->setTXTBody($message_body, false, true); + $MAIL_MIME->setTXTBody($message_body, false, true); } // add stored attachments, if any -if (is_array($COMPOSE['attachments'])) -{ - foreach ($COMPOSE['attachments'] as $id => $attachment) { - // This hook retrieves the attachment contents from the file storage backend - $attachment = $RCMAIL->plugins->exec_hook('attachment_get', $attachment); +if (is_array($COMPOSE['attachments'])) { + foreach ($COMPOSE['attachments'] as $id => $attachment) { + // This hook retrieves the attachment contents from the file storage backend + $attachment = $RCMAIL->plugins->exec_hook('attachment_get', $attachment); + + if ($isHtml) { + $dispurl = '/\ssrc\s*=\s*[\'"]*\S+display-attachment\S+file=rcmfile' + . preg_quote($attachment['id']) . '[\s\'"]*/'; + $message_body = $MAIL_MIME->getHTMLBody(); + $is_inline = preg_match($dispurl, $message_body); + } + else { + $is_inline = false; + } - $dispurl = '/\ssrc\s*=\s*[\'"]*\S+display-attachment\S+file=rcmfile' . preg_quote($attachment['id']) . '[\s\'"]*/'; - $message_body = $MAIL_MIME->getHTMLBody(); - if ($isHtml && (preg_match($dispurl, $message_body) > 0)) { - $message_body = preg_replace($dispurl, ' src="'.$attachment['name'].'" ', $message_body); - $MAIL_MIME->setHTMLBody($message_body); + // inline image + if ($is_inline) { + // Mail_Mime does not support many inline attachments with the same name (#1489406) + // we'll generate cid: urls here to workaround this + $cid = preg_replace('/[^0-9a-zA-Z]/', '', uniqid(time(), true)); + if (preg_match('#(@[0-9a-zA-Z\-\.]+)#', $from, $matches)) { + $cid .= $matches[1]; + } + else { + $cid .= '@localhost'; + } - if ($attachment['data']) - $MAIL_MIME->addHTMLImage($attachment['data'], $attachment['mimetype'], $attachment['name'], false); - else - $MAIL_MIME->addHTMLImage($attachment['path'], $attachment['mimetype'], $attachment['name'], true); - } - else { - $ctype = str_replace('image/pjpeg', 'image/jpeg', $attachment['mimetype']); // #1484914 - $file = $attachment['data'] ? $attachment['data'] : $attachment['path']; + $message_body = preg_replace($dispurl, ' src="cid:' . $cid . '" ', $message_body); + + $MAIL_MIME->setHTMLBody($message_body); - $MAIL_MIME->addAttachment($file, - $ctype, - $attachment['name'], - ($attachment['data'] ? false : true), - ($ctype == 'message/rfc822' ? '8bit' : 'base64'), - 'attachment', - '', '', '', - $CONFIG['mime_param_folding'] ? 'quoted-printable' : NULL, - $CONFIG['mime_param_folding'] == 2 ? 'quoted-printable' : NULL, - '', RCMAIL_CHARSET - ); + if ($attachment['data']) + $MAIL_MIME->addHTMLImage($attachment['data'], $attachment['mimetype'], $attachment['name'], false, $cid); + else + $MAIL_MIME->addHTMLImage($attachment['path'], $attachment['mimetype'], $attachment['name'], true, $cid); + } + else { + $ctype = str_replace('image/pjpeg', 'image/jpeg', $attachment['mimetype']); // #1484914 + $file = $attachment['data'] ? $attachment['data'] : $attachment['path']; + $folding = (int) $RCMAIL->config->get('mime_param_folding'); + + $MAIL_MIME->addAttachment($file, + $ctype, + $attachment['name'], + $attachment['data'] ? false : true, + $ctype == 'message/rfc822' ? '8bit' : 'base64', + 'attachment', + '', '', '', + $folding ? 'quoted-printable' : NULL, + $folding == 2 ? 'quoted-printable' : NULL, + '', RCUBE_CHARSET + ); + } } - } } // choose transfer encoding for plain/text body -if (preg_match('/[^\x00-\x7F]/', $MAIL_MIME->getTXTBody())) - $transfer_encoding = $RCMAIL->config->get('force_7bit') ? 'quoted-printable' : '8bit'; -else - $transfer_encoding = '7bit'; +if (preg_match('/[^\x00-\x7F]/', $MAIL_MIME->getTXTBody())) { + $text_charset = $message_charset; + $transfer_encoding = $RCMAIL->config->get('force_7bit') ? 'quoted-printable' : '8bit'; +} +else { + $text_charset = ''; + $transfer_encoding = '7bit'; +} + +if ($flowed) { + if (!$text_charset) { + $text_charset = 'US-ASCII'; + } + + $text_charset .= ";\r\n format=flowed"; +} // encoding settings for mail composing $MAIL_MIME->setParam('text_encoding', $transfer_encoding); @@ -663,191 +485,432 @@ $MAIL_MIME->setParam('html_encoding', 'quoted-printable'); $MAIL_MIME->setParam('head_encoding', 'quoted-printable'); $MAIL_MIME->setParam('head_charset', $message_charset); $MAIL_MIME->setParam('html_charset', $message_charset); -$MAIL_MIME->setParam('text_charset', $message_charset . ($flowed ? ";\r\n format=flowed" : '')); +$MAIL_MIME->setParam('text_charset', $text_charset); // encoding subject header with mb_encode provides better results with asian characters if (function_exists('mb_encode_mimeheader')) { - mb_internal_encoding($message_charset); - $headers['Subject'] = mb_encode_mimeheader($headers['Subject'], - $message_charset, 'Q', "\r\n", 8); - mb_internal_encoding(RCMAIL_CHARSET); + mb_internal_encoding($message_charset); + $headers['Subject'] = mb_encode_mimeheader($headers['Subject'], + $message_charset, 'Q', "\r\n", 8); + mb_internal_encoding(RCUBE_CHARSET); } // pass headers to message object $MAIL_MIME->headers($headers); // Begin SMTP Delivery Block -if (!$savedraft) -{ - // check 'From' address (identity may be incomplete) - if (empty($from)) { - $OUTPUT->show_message('nofromaddress', 'error'); - $OUTPUT->send('iframe'); - } - - // Handle Delivery Status Notification request - if (!empty($_POST['_dsn'])) { - $smtp_opts['dsn'] = true; - } - - $sent = rcmail_deliver_message($MAIL_MIME, $from, $mailto, - $smtp_error, $mailbody_file, $smtp_opts); +if (!$savedraft) { + // check 'From' address (identity may be incomplete) + if (empty($from)) { + $OUTPUT->show_message('nofromaddress', 'error'); + $OUTPUT->send('iframe'); + } - // return to compose page if sending failed - if (!$sent) { - // remove temp file - if ($mailbody_file) { - unlink($mailbody_file); + // Handle Delivery Status Notification request + if (!empty($_POST['_dsn'])) { + $smtp_opts['dsn'] = true; } - if ($smtp_error) - $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']); - else - $OUTPUT->show_message('sendingfailed', 'error'); - $OUTPUT->send('iframe'); - } + $sent = $RCMAIL->deliver_message($MAIL_MIME, $from, $mailto, + $smtp_error, $mailbody_file, $smtp_opts); - // save message sent time - if (!empty($CONFIG['sendmail_delay'])) - $RCMAIL->user->save_prefs(array('last_message_time' => time())); + // return to compose page if sending failed + if (!$sent) { + // remove temp file + if ($mailbody_file) { + unlink($mailbody_file); + } - // set replied/forwarded flag - if ($COMPOSE['reply_uid']) - $RCMAIL->storage->set_flag($COMPOSE['reply_uid'], 'ANSWERED', $COMPOSE['mailbox']); - else if ($COMPOSE['forward_uid']) - $RCMAIL->storage->set_flag($COMPOSE['forward_uid'], 'FORWARDED', $COMPOSE['mailbox']); + if ($smtp_error) + $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']); + else + $OUTPUT->show_message('sendingfailed', 'error'); + $OUTPUT->send('iframe'); + } -} // End of SMTP Delivery Block + // save message sent time + if ($sendmail_delay) { + $RCMAIL->user->save_prefs(array('last_message_time' => time())); + } + // set replied/forwarded flag + if ($COMPOSE['reply_uid']) + $RCMAIL->storage->set_flag($COMPOSE['reply_uid'], 'ANSWERED', $COMPOSE['mailbox']); + else if ($COMPOSE['forward_uid']) + $RCMAIL->storage->set_flag($COMPOSE['forward_uid'], 'FORWARDED', $COMPOSE['mailbox']); +} // Determine which folder to save message -if ($savedraft) - $store_target = $CONFIG['drafts_mbox']; -else if (!$RCMAIL->config->get('no_save_sent_messages')) - $store_target = isset($_POST['_store_target']) ? get_input_value('_store_target', RCUBE_INPUT_POST) : $CONFIG['sent_mbox']; +if ($savedraft) { + $store_target = $drafts_mbox; +} +else if (!$RCMAIL->config->get('no_save_sent_messages')) { + $store_target = rcube_utils::get_input_value('_store_target', rcube_utils::INPUT_POST); + if (!strlen($store_target)) { + $sore_target = $RCMAIL->config->get('sent_mbox'); + } +} if ($store_target) { - // check if folder is subscribed - if ($RCMAIL->storage->folder_exists($store_target, true)) - $store_folder = true; - // folder may be existing but not subscribed (#1485241) - else if (!$RCMAIL->storage->folder_exists($store_target)) - $store_folder = $RCMAIL->storage->create_folder($store_target, true); - else if ($RCMAIL->storage->subscribe($store_target)) - $store_folder = true; - - // append message to sent box - if ($store_folder) { - // message body in file - if ($mailbody_file || $MAIL_MIME->getParam('delay_file_io')) { - $headers = $MAIL_MIME->txtHeaders(); - - // file already created - if ($mailbody_file) - $msg = $mailbody_file; - else { - $temp_dir = $RCMAIL->config->get('temp_dir'); - $mailbody_file = tempnam($temp_dir, 'rcmMsg'); - if (!PEAR::isError($msg = $MAIL_MIME->saveMessageBody($mailbody_file))) - $msg = $mailbody_file; - } + // check if folder is subscribed + if ($RCMAIL->storage->folder_exists($store_target, true)) { + $store_folder = true; } - else { - $msg = $MAIL_MIME->getMessage(); - $headers = ''; + // folder may be existing but not subscribed (#1485241) + else if (!$RCMAIL->storage->folder_exists($store_target)) { + $store_folder = $RCMAIL->storage->create_folder($store_target, true); } - - if (PEAR::isError($msg)) - raise_error(array('code' => 650, 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Could not create message: ".$msg->getMessage()), - TRUE, FALSE); - else { - $saved = $RCMAIL->storage->save_message($store_target, $msg, $headers, - $mailbody_file ? true : false, array('SEEN')); + else if ($RCMAIL->storage->subscribe($store_target)) { + $store_folder = true; } - if ($mailbody_file) { - unlink($mailbody_file); - $mailbody_file = null; - } - } + // append message to sent box + if ($store_folder) { + // message body in file + if ($mailbody_file || $MAIL_MIME->getParam('delay_file_io')) { + $headers = $MAIL_MIME->txtHeaders(); - // raise error if saving failed - if (!$saved) { - raise_error(array('code' => 800, 'type' => 'imap', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Could not save message in $store_target"), TRUE, FALSE); + // file already created + if ($mailbody_file) { + $msg = $mailbody_file; + } + else { + $temp_dir = $RCMAIL->config->get('temp_dir'); + $mailbody_file = tempnam($temp_dir, 'rcmMsg'); - if ($savedraft) { - $OUTPUT->show_message('errorsaving', 'error'); - // start the auto-save timer again - $OUTPUT->command('auto_save_start'); - $OUTPUT->send('iframe'); - } - } + if (!PEAR::isError($msg = $MAIL_MIME->saveMessageBody($mailbody_file))) { + $msg = $mailbody_file; + } + } + } + else { + $msg = $MAIL_MIME->getMessage(); + $headers = ''; + } - if ($olddraftmessageid) { - // delete previous saved draft - // @TODO: use message UID (remember to check UIDVALIDITY) to skip this SEARCH - $delete_idx = $RCMAIL->storage->search_once($CONFIG['drafts_mbox'], - 'HEADER Message-ID '.$olddraftmessageid); + if (PEAR::isError($msg)) { + rcube::raise_error(array('code' => 650, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Could not create message: ".$msg->getMessage()), + true, false); + } + else { + $saved = $RCMAIL->storage->save_message($store_target, $msg, $headers, + $mailbody_file ? true : false, array('SEEN')); + } - if ($del_uid = $delete_idx->get_element('FIRST')) { - $deleted = $RCMAIL->storage->delete_message($del_uid, $CONFIG['drafts_mbox']); + if ($mailbody_file) { + unlink($mailbody_file); + $mailbody_file = null; + } + } - // raise error if deletion of old draft failed - if (!$deleted) - raise_error(array('code' => 800, 'type' => 'imap', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => "Could not delete message from ".$CONFIG['drafts_mbox']), TRUE, FALSE); + // raise error if saving failed + if (!$saved) { + rcube::raise_error(array('code' => 800, 'type' => 'imap', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Could not save message in $store_target"), true, false); + + if ($savedraft) { + $OUTPUT->show_message('errorsaving', 'error'); + // start the auto-save timer again + $OUTPUT->command('auto_save_start'); + $OUTPUT->send('iframe'); + } + } + + // delete previous saved draft + if ($saved && ($old_id = rcube_utils::get_input_value('_draft_saveid', rcube_utils::INPUT_POST))) { + $deleted = $RCMAIL->storage->delete_message($old_id, $drafts_mbox); + + // raise error if deletion of old draft failed + if (!$deleted) { + rcube::raise_error(array('code' => 800, 'type' => 'imap', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Could not delete message from $drafts_mbox"), true, false); + } } - } } // remove temp file else if ($mailbody_file) { - unlink($mailbody_file); + unlink($mailbody_file); } if ($savedraft) { - $msgid = strtr($message_id, array('>' => '', '<' => '')); + // remember new draft-uid ($saved could be an UID or true/false here) + if ($saved && is_bool($saved)) { + $index = $RCMAIL->storage->search_once($drafts_mbox, 'HEADER Message-ID ' . $message_id); + $saved = @max($index->get()); + } - // remember new draft-uid ($saved could be an UID or TRUE here) - if (is_bool($saved)) { - $draft_idx = $RCMAIL->storage->search_once($CONFIG['drafts_mbox'], 'HEADER Message-ID '.$msgid); - $saved = $draft_idx->get_element('FIRST'); - } - $COMPOSE['param']['draft_uid'] = $saved; - $plugin = $RCMAIL->plugins->exec_hook('message_draftsaved', array('msgid' => $msgid, 'uid' => $saved, 'folder' => $store_target)); + if ($saved) { + $plugin = $RCMAIL->plugins->exec_hook('message_draftsaved', + array('msgid' => $message_id, 'uid' => $saved, 'folder' => $store_target)); - // display success - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'messagesaved', 'confirmation'); + // display success + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'messagesaved', 'confirmation'); - // update "_draft_saveid" and the "cmp_hash" to prevent "Unsaved changes" warning - $OUTPUT->command('set_draft_id', $msgid); - $OUTPUT->command('compose_field_hash', true); + // update "_draft_saveid" and the "cmp_hash" to prevent "Unsaved changes" warning + $COMPOSE['param']['draft_uid'] = $plugin['uid']; + $OUTPUT->command('set_draft_id', $plugin['uid']); + $OUTPUT->command('compose_field_hash', true); + } - // start the auto-save timer again - $OUTPUT->command('auto_save_start'); + // start the auto-save timer again + $OUTPUT->command('auto_save_start'); } else { - $folders = array(); + $folders = array(); - if ($COMPOSE['mode'] == 'reply' || $COMPOSE['mode'] == 'forward') - $folders[] = $COMPOSE['mailbox']; + if ($COMPOSE['mode'] == 'reply' || $COMPOSE['mode'] == 'forward') { + $folders[] = $COMPOSE['mailbox']; + } - rcmail_compose_cleanup($COMPOSE_ID); + rcmail_compose_cleanup($COMPOSE_ID); + $OUTPUT->command('remove_compose_data', $COMPOSE_ID); - if ($store_folder && !$saved) - $OUTPUT->command('sent_successfully', 'error', rcube_label('errorsavingsent'), $folders); - else { - if ($store_folder) { - $folders[] = $store_target; + if ($store_folder && !$saved) { + $OUTPUT->command('sent_successfully', 'error', $RCMAIL->gettext('errorsavingsent'), $folders); + } + else if ($store_folder) { + $folders[] = $store_target; } - $OUTPUT->command('sent_successfully', 'confirmation', rcube_label('messagesent'), $folders); - } + $OUTPUT->command('sent_successfully', 'confirmation', $RCMAIL->gettext('messagesent'), $folders); } $OUTPUT->send('iframe'); + + +/****** message sending functions ********/ + +// encrypt parts of the header +function rcmail_encrypt_header($what) +{ + global $RCMAIL; + + if (!$RCMAIL->config->get('http_received_header_encrypt')) { + return $what; + } + + return $RCMAIL->encrypt($what); +} + +// get identity record +function rcmail_get_identity($id) +{ + global $RCMAIL, $message_charset; + + if ($sql_arr = $RCMAIL->user->get_identity($id)) { + $out = $sql_arr; + + if ($message_charset != RCUBE_CHARSET) { + foreach ($out as $k => $v) { + $out[$k] = rcube_charset::convert($v, RCUBE_CHARSET, $message_charset); + } + } + + $out['mailto'] = $sql_arr['email']; + $out['string'] = format_email_recipient($sql_arr['email'], $sql_arr['name']); + + return $out; + } + + return false; +} + +/** + * go from this: + * <img src="http[s]://.../tiny_mce/plugins/emotions/images/smiley-cool.gif" border="0" alt="Cool" title="Cool" /> + * + * to this: + * + * <img src="/path/on/server/.../tiny_mce/plugins/emotions/images/smiley-cool.gif" border="0" alt="Cool" title="Cool" /> + */ +function rcmail_fix_emoticon_paths($mime_message) +{ + global $RCMAIL; + + $body = $mime_message->getHTMLBody(); + + // remove any null-byte characters before parsing + $body = preg_replace('/\x00/', '', $body); + + $searchstr = 'program/js/tiny_mce/plugins/emotions/img/'; + $offset = 0; + + // keep track of added images, so they're only added once + $included_images = array(); + + if (preg_match_all('# src=[\'"]([^\'"]+)#', $body, $matches, PREG_OFFSET_CAPTURE)) { + foreach ($matches[1] as $m) { + // find emoticon image tags + if (preg_match('#'.$searchstr.'(.*)$#', $m[0], $imatches)) { + $image_name = $imatches[1]; + + // sanitize image name so resulting attachment doesn't leave images dir + $image_name = preg_replace('/[^a-zA-Z0-9_\.\-]/i', '', $image_name); + $img_file = INSTALL_PATH . '/' . $searchstr . $image_name; + + if (! in_array($image_name, $included_images)) { + // add the image to the MIME message + if (!$mime_message->addHTMLImage($img_file, 'image/gif', '', true, $image_name)) { + $RCMAIL->output->show_message("emoticonerror", 'error'); + } + + array_push($included_images, $image_name); + } + + $body = substr_replace($body, $img_file, $m[1] + $offset, strlen($m[0])); + $offset += strlen($img_file) - strlen($m[0]); + } + } + } + + $mime_message->setHTMLBody($body); +} + +/** + * Extract image attachments from HTML content (data URIs) + */ +function rcmail_extract_inline_images($mime_message, $from) +{ + $body = $mime_message->getHTMLBody(); + $offset = 0; + $list = array(); + $domain = 'localhost'; + $regexp = '#img[^>]+src=[\'"](data:([^;]*);base64,([a-z0-9+/=\r\n]+))([\'"])#i'; + + if (preg_match_all($regexp, $body, $matches, PREG_OFFSET_CAPTURE)) { + // get domain for the Content-ID, must be the same as in Mail_Mime::get() + if (preg_match('#@([0-9a-zA-Z\-\.]+)#', $from, $m)) { + $domain = $m[1]; + } + + foreach ($matches[1] as $idx => $m) { + $data = preg_replace('/\r\n/', '', $matches[3][$idx][0]); + $data = base64_decode($data); + + if (empty($data)) { + continue; + } + + $hash = md5($data) . '@' . $domain; + $mime_type = $matches[2][$idx][0]; + $name = $list[$hash]; + + if (empty($mime_type)) { + $mime_type = rcube_mime::image_content_type($data); + } + + // add the image to the MIME message + if (!$name) { + $ext = preg_replace('#^[^/]+/#', '', $mime_type); + $name = substr($hash, 0, 8) . '.' . $ext; + $list[$hash] = $name; + + $mime_message->addHTMLImage($data, $mime_type, $name, false, $hash); + } + + $body = substr_replace($body, $name, $m[1] + $offset, strlen($m[0])); + $offset += strlen($name) - strlen($m[0]); + } + } + + $mime_message->setHTMLBody($body); +} + +/** + * Parse and cleanup email address input (and count addresses) + * + * @param string Address input + * @param boolean Do count recipients (saved in global $RECIPIENT_COUNT) + * @param boolean Validate addresses (errors saved in global $EMAIL_FORMAT_ERROR) + * @return string Canonical recipients string separated by comma + */ +function rcmail_email_input_format($mailto, $count=false, $check=true) +{ + global $RCMAIL, $EMAIL_FORMAT_ERROR, $RECIPIENT_COUNT; + + // simplified email regexp, supporting quoted local part + $email_regexp = '(\S+|("[^"]+"))@\S+'; + + $delim = trim($RCMAIL->config->get('recipients_separator', ',')); + $regexp = array("/[,;$delim]\s*[\r\n]+/", '/[\r\n]+/', "/[,;$delim]\s*\$/m", '/;/', '/(\S{1})(<'.$email_regexp.'>)/U'); + $replace = array($delim.' ', ', ', '', $delim, '\\1 \\2'); + + // replace new lines and strip ending ', ', make address input more valid + $mailto = trim(preg_replace($regexp, $replace, $mailto)); + $items = rcube_utils::explode_quoted_string($delim, $mailto); + $result = array(); + + foreach ($items as $item) { + $item = trim($item); + // address in brackets without name (do nothing) + if (preg_match('/^<'.$email_regexp.'>$/', $item)) { + $item = rcube_utils::idn_to_ascii(trim($item, '<>')); + $result[] = $item; + } + // address without brackets and without name (add brackets) + else if (preg_match('/^'.$email_regexp.'$/', $item)) { + $item = rcube_utils::idn_to_ascii($item); + $result[] = $item; + } + // address with name (handle name) + else if (preg_match('/<*'.$email_regexp.'>*$/', $item, $matches)) { + $address = $matches[0]; + $name = trim(str_replace($address, '', $item)); + if ($name[0] == '"' && $name[count($name)-1] == '"') { + $name = substr($name, 1, -1); + } + $name = stripcslashes($name); + $address = rcube_utils::idn_to_ascii(trim($address, '<>')); + $result[] = format_email_recipient($address, $name); + $item = $address; + } + else if (trim($item)) { + continue; + } + + // check address format + $item = trim($item, '<>'); + if ($item && $check && !rcube_utils::check_email($item)) { + $EMAIL_FORMAT_ERROR = $item; + return; + } + } + + if ($count) { + $RECIPIENT_COUNT += count($result); + } + + return implode(', ', $result); +} + + +function rcmail_generic_message_footer($isHtml) +{ + global $RCMAIL; + + if ($isHtml && ($file = $RCMAIL->config->get('generic_message_footer_html'))) { + $html_footer = true; + } + else { + $file = $RCMAIL->config->get('generic_message_footer'); + $html_footer = false; + } + + if ($file && realpath($file)) { + // sanity check + if (!preg_match('/\.(php|ini|conf)$/', $file) && strpos($file, '/etc/') === false) { + $footer = file_get_contents($file); + if ($isHtml && !$html_footer) { + $footer = '<pre>' . $footer . '</pre>'; + } + return $footer; + } + } + + return false; +} diff --git a/program/steps/mail/sendmdn.inc b/program/steps/mail/sendmdn.inc index 01d0807be..727e75bb9 100644 --- a/program/steps/mail/sendmdn.inc +++ b/program/steps/mail/sendmdn.inc @@ -5,7 +5,7 @@ | program/steps/mail/sendmdn.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2009, The Roundcube Dev Team | + | Copyright (C) 2008-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -20,23 +20,24 @@ */ // only process ajax requests -if (!$OUTPUT->ajax_call) - return; +if (!$OUTPUT->ajax_call) { + return; +} if (!empty($_POST['_uid'])) { - $sent = rcmail_send_mdn(get_input_value('_uid', RCUBE_INPUT_POST), $smtp_error); + $sent = rcmail_send_mdn(rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST), $smtp_error); } // show either confirm or error message if ($sent) { - $OUTPUT->set_env('mdn_request', false); - $OUTPUT->show_message('receiptsent', 'confirmation'); + $OUTPUT->set_env('mdn_request', false); + $OUTPUT->show_message('receiptsent', 'confirmation'); } else if ($smtp_error) { - $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']); + $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']); } else { - $OUTPUT->show_message('errorsendingreceipt', 'error'); + $OUTPUT->show_message('errorsendingreceipt', 'error'); } $OUTPUT->send(); diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 9d85f9c8f..9498d1dc5 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -5,7 +5,7 @@ | program/steps/mail/show.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -22,312 +22,333 @@ $PRINT_MODE = $RCMAIL->action == 'print' ? TRUE : FALSE; // Read browser capabilities and store them in session -if ($caps = get_input_value('_caps', RCUBE_INPUT_GET)) { - $browser_caps = array(); - foreach (explode(',', $caps) as $cap) { - $cap = explode('=', $cap); - $browser_caps[$cap[0]] = $cap[1]; - } - $_SESSION['browser_caps'] = $browser_caps; +if ($caps = rcube_utils::get_input_value('_caps', rcube_utils::INPUT_GET)) { + $browser_caps = array(); + foreach (explode(',', $caps) as $cap) { + $cap = explode('=', $cap); + $browser_caps[$cap[0]] = $cap[1]; + } + $_SESSION['browser_caps'] = $browser_caps; } -$uid = get_input_value('_uid', RCUBE_INPUT_GET); +$uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET); $mbox_name = $RCMAIL->storage->get_folder(); // similar code as in program/steps/mail/get.inc if ($uid) { - // set message format (need to be done before rcube_message construction) - if (!empty($_GET['_format'])) { - $prefer_html = $_GET['_format'] == 'html'; - $RCMAIL->config->set('prefer_html', $prefer_html); - $_SESSION['msg_formats'][$mbox_name.':'.$uid] = $prefer_html; - } - else if (isset($_SESSION['msg_formats'][$mbox_name.':'.$uid])) { - $RCMAIL->config->set('prefer_html', $_SESSION['msg_formats'][$mbox_name.':'.$uid]); - } - - $MESSAGE = new rcube_message($uid); - - // if message not found (wrong UID)... - if (empty($MESSAGE->headers)) { - rcmail_message_error($uid); - } - - - // show images? - rcmail_check_safe($MESSAGE); - - // set message charset as default - if (!empty($MESSAGE->headers->charset)) - $RCMAIL->storage->set_charset($MESSAGE->headers->charset); - - $OUTPUT->set_pagetitle(abbreviate_string($MESSAGE->subject, 128, '...', true)); - - // give message uid to the client - $OUTPUT->set_env('uid', $MESSAGE->uid); - // set environement - $OUTPUT->set_env('safemode', $MESSAGE->is_safe); - $OUTPUT->set_env('sender', $MESSAGE->sender['string']); - $OUTPUT->set_env('permaurl', rcmail_url('show', array('_uid' => $MESSAGE->uid, '_mbox' => $mbox_name))); - $OUTPUT->set_env('delimiter', $RCMAIL->storage->get_hierarchy_delimiter()); - $OUTPUT->set_env('mailbox', $mbox_name); - $OUTPUT->set_env('compose_extwin', $RCMAIL->config->get('compose_extwin',false)); - - // mimetypes supported by the browser (default settings) - $mimetypes = (array)$RCMAIL->config->get('client_mimetypes'); - - // Remove unsupported types, which makes that attachment which cannot be - // displayed in a browser will be downloaded directly without displaying an overlay page - if (empty($_SESSION['browser_caps']['pdf']) && ($key = array_search('application/pdf', $mimetypes)) !== false) { - unset($mimetypes[$key]); - } - if (empty($_SESSION['browser_caps']['flash']) && ($key = array_search('application/x-shockwave-flash', $mimetypes)) !== false) { - unset($mimetypes[$key]); - } - if (empty($_SESSION['browser_caps']['tif']) && ($key = array_search('image/tiff', $mimetypes)) !== false) { - // we can convert tiff to jpeg - if (!$RCMAIL->config->get('im_convert_path')) { - unset($mimetypes[$key]); + // set message format (need to be done before rcube_message construction) + if (!empty($_GET['_format'])) { + $prefer_html = $_GET['_format'] == 'html'; + $RCMAIL->config->set('prefer_html', $prefer_html); + $_SESSION['msg_formats'][$mbox_name.':'.$uid] = $prefer_html; } - } - - $OUTPUT->set_env('mimetypes', array_values($mimetypes)); - - if ($CONFIG['drafts_mbox']) - $OUTPUT->set_env('drafts_mailbox', $CONFIG['drafts_mbox']); - if ($CONFIG['trash_mbox']) - $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']); - if ($CONFIG['junk_mbox']) - $OUTPUT->set_env('junk_mailbox', $CONFIG['junk_mbox']); - if ($CONFIG['delete_junk']) - $OUTPUT->set_env('delete_junk', true); - if ($CONFIG['flag_for_deletion']) - $OUTPUT->set_env('flag_for_deletion', true); - if ($CONFIG['read_when_deleted']) - $OUTPUT->set_env('read_when_deleted', true); - if ($CONFIG['skip_deleted']) - $OUTPUT->set_env('skip_deleted', true); - if ($CONFIG['display_next']) - $OUTPUT->set_env('display_next', true); - if ($MESSAGE->headers->get('list-post', false)) - $OUTPUT->set_env('list_post', true); - if ($CONFIG['forward_attachment']) - $OUTPUT->set_env('forward_attachment', true); - - if (!$OUTPUT->ajax_call) - $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', - 'movingmessage', 'deletingmessage', 'markingmessage', 'replyall', 'replylist'); - - $prefer_html = $RCMAIL->config->get('prefer_html'); - if ($MESSAGE->has_html_part()) { - $OUTPUT->set_env('optional_format', $prefer_html ? 'text' : 'html'); - } - - // check for unset disposition notification - if ($MESSAGE->headers->mdn_to - && empty($MESSAGE->headers->flags['MDNSENT']) - && empty($MESSAGE->headers->flags['SEEN']) - && ($RCMAIL->storage->check_permflag('MDNSENT') || $RCMAIL->storage->check_permflag('*')) - && $mbox_name != $CONFIG['drafts_mbox'] - && $mbox_name != $CONFIG['sent_mbox'] - ) { - $mdn_cfg = intval($CONFIG['mdn_requests']); - - if ($mdn_cfg == 1 || (($mdn_cfg == 3 || $mdn_cfg == 4) && rcmail_contact_exists($MESSAGE->sender['mailto']))) { - // Send MDN - if (rcmail_send_mdn($MESSAGE, $smtp_error)) - $OUTPUT->show_message('receiptsent', 'confirmation'); - else if ($smtp_error) - $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']); - else - $OUTPUT->show_message('errorsendingreceipt', 'error'); + else if (isset($_SESSION['msg_formats'][$mbox_name.':'.$uid])) { + $RCMAIL->config->set('prefer_html', $_SESSION['msg_formats'][$mbox_name.':'.$uid]); } - else if ($mdn_cfg != 2 && $mdn_cfg != 4) { - // Ask user - $OUTPUT->add_label('mdnrequest'); - $OUTPUT->set_env('mdn_request', true); + + $MESSAGE = new rcube_message($uid); + + // if message not found (wrong UID)... + if (empty($MESSAGE->headers)) { + rcmail_message_error($uid); } - } - - if (empty($MESSAGE->headers->flags['SEEN']) - && ($RCMAIL->action == 'show' || ($RCMAIL->action == 'preview' && intval($CONFIG['preview_pane_mark_read']) == 0)) - ) { - $RCMAIL->plugins->exec_hook('message_read', array('uid' => $MESSAGE->uid, - 'mailbox' => $mbox_name, 'message' => $MESSAGE)); - } -} + // show images? + rcmail_check_safe($MESSAGE); -function rcmail_message_attachments($attrib) -{ - global $PRINT_MODE, $MESSAGE, $RCMAIL; - - $out = $ol = ''; - $attachments = array(); - - if (sizeof($MESSAGE->attachments)) { - foreach ($MESSAGE->attachments as $attach_prop) { - $filename = rcmail_attachment_name($attach_prop, true); - - if ($PRINT_MODE) { - $size = $RCMAIL->message_part_size($attach_prop); - $ol .= html::tag('li', null, Q(sprintf("%s (%s)", $filename, $size))); - } - else { - if ($attrib['maxlength'] && mb_strlen($filename) > $attrib['maxlength']) { - $title = $filename; - $filename = abbreviate_string($filename, $attrib['maxlength']); + // set message charset as default + if (!empty($MESSAGE->headers->charset)) { + $RCMAIL->storage->set_charset($MESSAGE->headers->charset); + } + + $OUTPUT->set_pagetitle(abbreviate_string($MESSAGE->subject, 128, '...', true)); + + // set message environment + $OUTPUT->set_env('uid', $MESSAGE->uid); + $OUTPUT->set_env('safemode', $MESSAGE->is_safe); + $OUTPUT->set_env('sender', $MESSAGE->sender['string']); + $OUTPUT->set_env('mailbox', $mbox_name); + $OUTPUT->set_env('permaurl', $RCMAIL->url(array('_action' => 'show', '_uid' => $MESSAGE->uid, '_mbox' => $mbox_name))); + + if ($MESSAGE->headers->get('list-post', false)) { + $OUTPUT->set_env('list_post', true); + } + + // set environment + $OUTPUT->set_env('delimiter', $RCMAIL->storage->get_hierarchy_delimiter()); + + // set configuration + $RCMAIL->set_env_config(array('delete_junk', 'flag_for_deletion', 'read_when_deleted', + 'skip_deleted', 'display_next', 'compose_extwin', 'forward_attachment')); + + // set special folders + foreach (array('drafts', 'trash', 'junk') as $mbox) { + if ($folder = $RCMAIL->config->get($mbox . '_mbox')) { + $OUTPUT->set_env($mbox . '_mailbox', $folder); } - else { - $title = ''; + } + + // mimetypes supported by the browser (default settings) + $mimetypes = (array)$RCMAIL->config->get('client_mimetypes'); + + // Remove unsupported types, which makes that attachment which cannot be + // displayed in a browser will be downloaded directly without displaying an overlay page + if (empty($_SESSION['browser_caps']['pdf']) && ($key = array_search('application/pdf', $mimetypes)) !== false) { + unset($mimetypes[$key]); + } + if (empty($_SESSION['browser_caps']['flash']) && ($key = array_search('application/x-shockwave-flash', $mimetypes)) !== false) { + unset($mimetypes[$key]); + } + if (empty($_SESSION['browser_caps']['tif']) && ($key = array_search('image/tiff', $mimetypes)) !== false) { + // we can convert tiff to jpeg + if (!$RCMAIL->config->get('im_convert_path')) { + unset($mimetypes[$key]); } + } - $mimetype = rcmail_fix_mimetype($attach_prop->mimetype); - $class = rcmail_filetype2classname($mimetype, $filename); - $id = 'attach' . $attach_prop->mime_id; - $link = html::a(array( - 'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), - 'onclick' => sprintf('return %s.command(\'load-attachment\',\'%s\',this)', - JS_OBJECT_NAME, $attach_prop->mime_id), - 'onmouseover' => $title ? '' : 'rcube_webmail.long_subject_title_ex(this, 0)', - 'title' => Q($title), - ), Q($filename)); - $ol .= html::tag('li', array('class' => $class, 'id' => $id), $link); - - $attachments[$attach_prop->mime_id] = $mimetype; - } + $OUTPUT->set_env('mimetypes', array_values($mimetypes)); + + if ($MESSAGE->has_html_part()) { + $prefer_html = $RCMAIL->config->get('prefer_html'); + $OUTPUT->set_env('optional_format', $prefer_html ? 'text' : 'html'); + } + + if (!$OUTPUT->ajax_call) { + $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', + 'movingmessage', 'deletingmessage', 'markingmessage', 'replyall', 'replylist'); } - $out = html::tag('ul', $attrib, $ol, html::$common_attrib); - $RCMAIL->output->set_env('attachments', $attachments); - } + // check for unset disposition notification + if ($MESSAGE->headers->mdn_to + && empty($MESSAGE->headers->flags['MDNSENT']) + && empty($MESSAGE->headers->flags['SEEN']) + && ($RCMAIL->storage->check_permflag('MDNSENT') || $RCMAIL->storage->check_permflag('*')) + && $mbox_name != $RCMAIL->config->get('drafts_mbox') + && $mbox_name != $RCMAIL->config->get('sent_mbox') + ) { + $mdn_cfg = intval($RCMAIL->config->get('mdn_requests')); + + if ($mdn_cfg == 1 || (($mdn_cfg == 3 || $mdn_cfg == 4) && rcmail_contact_exists($MESSAGE->sender['mailto']))) { + // Send MDN + if (rcmail_send_mdn($MESSAGE, $smtp_error)) + $OUTPUT->show_message('receiptsent', 'confirmation'); + else if ($smtp_error) + $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']); + else + $OUTPUT->show_message('errorsendingreceipt', 'error'); + } + else if ($mdn_cfg != 2 && $mdn_cfg != 4) { + // Ask user + $OUTPUT->add_label('mdnrequest'); + $OUTPUT->set_env('mdn_request', true); + } + } - return $out; + if (empty($MESSAGE->headers->flags['SEEN']) + && ($RCMAIL->action == 'show' || ($RCMAIL->action == 'preview' && intval($RCMAIL->config->get('preview_pane_mark_read')) == 0)) + ) { + $RCMAIL->plugins->exec_hook('message_read', array( + 'uid' => $MESSAGE->uid, + 'mailbox' => $mbox_name, + 'message' => $MESSAGE, + )); + } } -function rcmail_remote_objects_msg() + +$OUTPUT->add_handlers(array( + 'messageattachments' => 'rcmail_message_attachments', + 'mailboxname' => 'rcmail_mailbox_name_display', + 'messageobjects' => 'rcmail_message_objects', + 'contactphoto' => 'rcmail_message_contactphoto', +)); + + +if ($RCMAIL->action == 'print' && $OUTPUT->template_exists('messageprint')) + $OUTPUT->send('messageprint', false); +else if ($RCMAIL->action == 'preview' && $OUTPUT->template_exists('messagepreview')) + $OUTPUT->send('messagepreview', false); +else + $OUTPUT->send('message', false); + + +// mark message as read +if ($MESSAGE && $MESSAGE->headers && empty($MESSAGE->headers->flags['SEEN']) && + ($RCMAIL->action == 'show' || ($RCMAIL->action == 'preview' && intval($RCMAIL->config->get('preview_pane_mark_read')) == 0)) +) { + if ($RCMAIL->storage->set_flag($MESSAGE->uid, 'SEEN')) { + if ($count = rcmail_get_unseen_count($mbox_name)) { + rcmail_set_unseen_count($mbox_name, $count - 1); + } + } +} + +exit; + + + +function rcmail_message_attachments($attrib) { - global $MESSAGE, $RCMAIL; + global $PRINT_MODE, $MESSAGE, $RCMAIL; + + $out = $ol = ''; + $attachments = array(); + + if (sizeof($MESSAGE->attachments)) { + foreach ($MESSAGE->attachments as $attach_prop) { + $filename = rcmail_attachment_name($attach_prop, true); + + if ($PRINT_MODE) { + $size = $RCMAIL->message_part_size($attach_prop); + $ol .= html::tag('li', null, rcube::Q(sprintf("%s (%s)", $filename, $size))); + } + else { + if ($attrib['maxlength'] && mb_strlen($filename) > $attrib['maxlength']) { + $title = $filename; + $filename = abbreviate_string($filename, $attrib['maxlength']); + } + else { + $title = ''; + } + + $mimetype = rcmail_fix_mimetype($attach_prop->mimetype); + $class = rcube_utils::file2class($mimetype, $filename); + $id = 'attach' . $attach_prop->mime_id; + $link = html::a(array( + 'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), + 'onclick' => sprintf('return %s.command(\'load-attachment\',\'%s\',this)', + rcmail_output::JS_OBJECT_NAME, $attach_prop->mime_id), + 'onmouseover' => $title ? '' : 'rcube_webmail.long_subject_title_ex(this, 0)', + 'title' => rcube::Q($title), + ), rcube::Q($filename)); + + $ol .= html::tag('li', array('class' => $class, 'id' => $id), $link); + + $attachments[$attach_prop->mime_id] = $mimetype; + } + } - $attrib['id'] = 'remote-objects-message'; - $attrib['class'] = 'notice'; - $attrib['style'] = 'display: none'; + $out = html::tag('ul', $attrib, $ol, html::$common_attrib); - $msg = Q(rcube_label('blockedimages')) . ' '; - $msg .= html::a(array('href' => "#loadimages", 'onclick' => JS_OBJECT_NAME.".command('load-images')"), Q(rcube_label('showimages'))); + $RCMAIL->output->set_env('attachments', $attachments); + } + + return $out; +} + +function rcmail_remote_objects_msg() +{ + global $MESSAGE, $RCMAIL; + + $attrib['id'] = 'remote-objects-message'; + $attrib['class'] = 'notice'; + $attrib['style'] = 'display: none'; + + $msg = rcube::Q($RCMAIL->gettext('blockedimages')) . ' '; + $msg .= html::a(array( + 'href' => "#loadimages", + 'onclick' => rcmail_output::JS_OBJECT_NAME.".command('load-images')" + ), + rcube::Q($RCMAIL->gettext('showimages'))); + + // add link to save sender in addressbook and reload message + if ($MESSAGE->sender['mailto'] && $RCMAIL->config->get('show_images') == 1) { + $msg .= ' ' . html::a(array( + 'href' => "#alwaysload", + 'onclick' => rcmail_output::JS_OBJECT_NAME.".command('always-load')", + 'style' => "white-space:nowrap" + ), + rcube::Q($RCMAIL->gettext(array('name' => 'alwaysshow', 'vars' => array('sender' => $MESSAGE->sender['mailto']))))); + } - // add link to save sender in addressbook and reload message - if ($MESSAGE->sender['mailto'] && $RCMAIL->config->get('show_images') == 1) { - $msg .= ' ' . html::a(array('href' => "#alwaysload", 'onclick' => JS_OBJECT_NAME.".command('always-load')", 'style' => "white-space:nowrap"), - Q(rcube_label(array('name' => 'alwaysshow', 'vars' => array('sender' => $MESSAGE->sender['mailto']))))); - } + $RCMAIL->output->add_gui_object('remoteobjectsmsg', $attrib['id']); - $RCMAIL->output->add_gui_object('remoteobjectsmsg', $attrib['id']); - return html::div($attrib, $msg); + return html::div($attrib, $msg); } function rcmail_message_buttons() { - global $RCMAIL; + global $RCMAIL; - $mbox = $RCMAIL->storage->get_folder(); - $delim = $RCMAIL->storage->get_hierarchy_delimiter(); - $dbox = $RCMAIL->config->get('drafts_mbox'); + $mbox = $RCMAIL->storage->get_folder(); + $delim = $RCMAIL->storage->get_hierarchy_delimiter(); + $dbox = $RCMAIL->config->get('drafts_mbox'); - // the message is not a draft - if ($mbox != $dbox && strpos($mbox, $dbox.$delim) !== 0) { - return ''; - } + // the message is not a draft + if ($mbox != $dbox && strpos($mbox, $dbox.$delim) !== 0) { + return ''; + } - $attrib['id'] = 'message-buttons'; - $attrib['class'] = 'notice'; + $attrib['id'] = 'message-buttons'; + $attrib['class'] = 'notice'; - $msg = Q(rcube_label('isdraft')) . ' '; - $msg .= html::a(array('href' => "#edit", 'onclick' => JS_OBJECT_NAME.".command('edit')"), Q(rcube_label('edit'))); + $msg = rcube::Q($RCMAIL->gettext('isdraft')) . ' '; + $msg .= html::a(array( + 'href' => "#edit", + 'onclick' => rcmail_output::JS_OBJECT_NAME.".command('edit')" + ), + rcube::Q($RCMAIL->gettext('edit'))); - return html::div($attrib, $msg); + return html::div($attrib, $msg); } function rcmail_message_objects($attrib) { - global $RCMAIL, $MESSAGE; + global $RCMAIL, $MESSAGE; - if (!$attrib['id']) - $attrib['id'] = 'message-objects'; + if (!$attrib['id']) + $attrib['id'] = 'message-objects'; - $content = array( - rcmail_message_buttons(), - rcmail_remote_objects_msg(), - ); + $content = array( + rcmail_message_buttons(), + rcmail_remote_objects_msg(), + ); - $plugin = $RCMAIL->plugins->exec_hook('message_objects', - array('content' => $content, 'message' => $MESSAGE)); + $plugin = $RCMAIL->plugins->exec_hook('message_objects', + array('content' => $content, 'message' => $MESSAGE)); - $content = implode("\n", $plugin['content']); + $content = implode("\n", $plugin['content']); - return html::div($attrib, $content); + return html::div($attrib, $content); } function rcmail_contact_exists($email) { - global $RCMAIL; + global $RCMAIL; - if ($email) { - // @TODO: search in all address books? - $CONTACTS = $RCMAIL->get_address_book(-1, true); + if ($email) { + // @TODO: search in all address books? + $CONTACTS = $RCMAIL->get_address_book(-1, true); - if (is_object($CONTACTS)) { - $existing = $CONTACTS->search('email', $email, true, false); - if ($existing->count) { - return true; - } + if (is_object($CONTACTS)) { + $existing = $CONTACTS->search('email', $email, true, false); + if ($existing->count) { + return true; + } + } } - } - return false; + return false; } function rcmail_message_contactphoto($attrib) { - global $RCMAIL, $MESSAGE; + global $RCMAIL, $MESSAGE; - $placeholder = $attrib['placeholder'] ? $RCMAIL->config->get('skin_path') . $attrib['placeholder'] : null; - if ($MESSAGE->sender) - $photo_img = $RCMAIL->url(array('_task' => 'addressbook', '_action' => 'photo', '_email' => $MESSAGE->sender['mailto'], '_alt' => $placeholder)); - else - $photo_img = $placeholder ? $placeholder : 'program/resources/blank.gif'; + $placeholder = $attrib['placeholder'] ? $RCMAIL->config->get('skin_path') . $attrib['placeholder'] : null; - return html::img(array('src' => $photo_img) + $attrib); -} - - -$OUTPUT->add_handlers(array( - 'messageattachments' => 'rcmail_message_attachments', - 'mailboxname' => 'rcmail_mailbox_name_display', - 'messageobjects' => 'rcmail_message_objects', - 'contactphoto' => 'rcmail_message_contactphoto', -)); - - -if ($RCMAIL->action == 'print' && $OUTPUT->template_exists('messageprint')) - $OUTPUT->send('messageprint', false); -else if ($RCMAIL->action == 'preview' && $OUTPUT->template_exists('messagepreview')) - $OUTPUT->send('messagepreview', false); -else - $OUTPUT->send('message', false); - - -// mark message as read -if ($MESSAGE && $MESSAGE->headers && empty($MESSAGE->headers->flags['SEEN']) && - ($RCMAIL->action == 'show' || ($RCMAIL->action == 'preview' && intval($CONFIG['preview_pane_mark_read']) == 0))) -{ - if ($RCMAIL->storage->set_flag($MESSAGE->uid, 'SEEN')) { - if ($count = rcmail_get_unseen_count($mbox_name)) { - rcmail_set_unseen_count($mbox_name, $count - 1); + if ($MESSAGE->sender) { + $photo_img = $RCMAIL->url(array( + '_task' => 'addressbook', + '_action' => 'photo', + '_email' => $MESSAGE->sender['mailto'], + '_alt' => $placeholder + )); + } + else { + $photo_img = $placeholder ? $placeholder : 'program/resources/blank.gif'; } - } -} - -exit; + return html::img(array('src' => $photo_img) + $attrib); +} diff --git a/program/steps/mail/viewsource.inc b/program/steps/mail/viewsource.inc index c560d7d41..0328d9600 100644 --- a/program/steps/mail/viewsource.inc +++ b/program/steps/mail/viewsource.inc @@ -5,7 +5,7 @@ | program/steps/mail/viewsource.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -22,39 +22,39 @@ ob_end_clean(); // similar code as in program/steps/mail/get.inc -if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) -{ - $headers = $RCMAIL->storage->get_message_headers($uid); - $charset = $headers->charset ? $headers->charset : $CONFIG['default_charset']; - header("Content-Type: text/plain; charset={$charset}"); - - if (!empty($_GET['_save'])) { - $subject = rcube_mime::decode_header($headers->subject, $headers->charset); - $filename = ($subject ? $subject : $RCMAIL->config->get('product_name', 'email')) . '.eml'; - $browser = $RCMAIL->output->browser; - - if ($browser->ie && $browser->ver < 7) - $filename = rawurlencode(abbreviate_string($filename, 55)); - else if ($browser->ie) - $filename = rawurlencode($filename); - else - $filename = addcslashes($filename, '"'); - - header("Content-Length: {$headers->size}"); - header("Content-Disposition: attachment; filename=\"$filename\""); - } - - $RCMAIL->storage->print_raw_body($uid, empty($_GET['_save'])); +if ($uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET)) { + $headers = $RCMAIL->storage->get_message_headers($uid); + $charset = $headers->charset ? $headers->charset : $RCMAIL->config->get('default_charset'); + + header("Content-Type: text/plain; charset={$charset}"); + + if (!empty($_GET['_save'])) { + $subject = rcube_mime::decode_header($headers->subject, $headers->charset); + $filename = ($subject ? $subject : $RCMAIL->config->get('product_name', 'email')) . '.eml'; + $browser = $RCMAIL->output->browser; + + if ($browser->ie && $browser->ver < 7) + $filename = rawurlencode(abbreviate_string($filename, 55)); + else if ($browser->ie) + $filename = rawurlencode($filename); + else + $filename = addcslashes($filename, '"'); + + header("Content-Length: {$headers->size}"); + header("Content-Disposition: attachment; filename=\"$filename\""); + } + + $RCMAIL->storage->print_raw_body($uid, empty($_GET['_save'])); } -else -{ - raise_error(array( - 'code' => 500, - 'type' => 'php', - 'file' => __FILE__, 'line' => __LINE__, - 'message' => 'Message UID '.$uid.' not found'), - true, true); +else { + rcube::raise_error(array( + 'code' => 500, + 'type' => 'php', + 'file' => __FILE__, + 'line' => __LINE__, + 'message' => "Message UID $uid not found" + ), + true, true); } exit; - diff --git a/program/steps/settings/about.inc b/program/steps/settings/about.inc index 0fdefddda..026bfc1a2 100644 --- a/program/steps/settings/about.inc +++ b/program/steps/settings/about.inc @@ -5,8 +5,8 @@ | program/steps/settings/about.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | - | Copyright (C) 2011, Kolab Systems AG | + | Copyright (C) 2005-2013, The Roundcube Dev Team | + | Copyright (C) 2011-2013, Kolab Systems AG | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | @@ -21,78 +21,83 @@ */ +$OUTPUT->set_pagetitle($RCMAIL->gettext('about')); + +$OUTPUT->add_handler('supportlink', 'rcmail_supportlink'); +$OUTPUT->add_handler('pluginlist', 'rcmail_plugins_list'); + +$OUTPUT->send('about'); + + + function rcmail_supportlink($attrib) { - global $RCMAIL; + global $RCMAIL; + + if ($url = $RCMAIL->config->get('support_url')) { + $label = $attrib['label'] ? $attrib['label'] : 'support'; + $attrib['href'] = $url; - if ($url = $RCMAIL->config->get('support_url')) { - $label = $attrib['label'] ? $attrib['label'] : 'support'; - $attrib['href'] = $url; - return html::a($attrib, rcube_label($label)); - } + return html::a($attrib, $RCMAIL->gettext($label)); + } } function rcmail_plugins_list($attrib) { - global $RCMAIL; - - if (!$attrib['id']) - $attrib['id'] = 'rcmpluginlist'; - - $plugins = array_filter((array) $RCMAIL->config->get('plugins')); - $plugin_info = array(); - - foreach ($plugins as $name) { - if ($info = $RCMAIL->plugins->get_info($name)) - $plugin_info[$name] = $info; - } - - // load info from required plugins, too - foreach ($plugin_info as $name => $info) { - if (is_array($info['required']) && !empty($info['required'])) { - foreach ($info['required'] as $req_name) { - if (!isset($plugin_info[$req_name]) && ($req_info = $RCMAIL->plugins->get_info($req_name))) - $plugin_info[$req_name] = $req_info; - } - } - } + global $RCMAIL; - if (empty($plugin_info)) { - return ''; - } + if (!$attrib['id']) { + $attrib['id'] = 'rcmpluginlist'; + } - ksort($plugin_info, SORT_LOCALE_STRING); + $plugins = array_filter((array) $RCMAIL->config->get('plugins')); + $plugin_info = array(); - $table = new html_table($attrib); + foreach ($plugins as $name) { + if ($info = $RCMAIL->plugins->get_info($name)) { + $plugin_info[$name] = $info; + } + } - // add table header - $table->add_header('name', rcube_label('plugin')); - $table->add_header('version', rcube_label('version')); - $table->add_header('license', rcube_label('license')); - $table->add_header('source', rcube_label('source')); + // load info from required plugins, too + foreach ($plugin_info as $name => $info) { + if (is_array($info['required']) && !empty($info['required'])) { + foreach ($info['required'] as $req_name) { + if (!isset($plugin_info[$req_name]) && ($req_info = $RCMAIL->plugins->get_info($req_name))) { + $plugin_info[$req_name] = $req_info; + } + } + } + } - foreach ($plugin_info as $name => $data) { - $uri = $data['src_uri'] ? $data['src_uri'] : $data['uri']; - if ($uri && stripos($uri, 'http') !== 0) { - $uri = 'http://' . $uri; + if (empty($plugin_info)) { + return ''; } - $table->add_row(); - $table->add('name', Q($data['name'] ? $data['name'] : $name)); - $table->add('version', Q($data['version'])); - $table->add('license', $data['license_uri'] ? html::a(array('target' => '_blank', href=> Q($data['license_uri'])), - Q($data['license'])) : $data['license']); - $table->add('source', $uri ? html::a(array('target' => '_blank', href=> Q($uri)), - Q(rcube_label('download'))) : ''); - } + ksort($plugin_info, SORT_LOCALE_STRING); + + $table = new html_table($attrib); + + // add table header + $table->add_header('name', $RCMAIL->gettext('plugin')); + $table->add_header('version', $RCMAIL->gettext('version')); + $table->add_header('license', $RCMAIL->gettext('license')); + $table->add_header('source', $RCMAIL->gettext('source')); + + foreach ($plugin_info as $name => $data) { + $uri = $data['src_uri'] ? $data['src_uri'] : $data['uri']; + if ($uri && stripos($uri, 'http') !== 0) { + $uri = 'http://' . $uri; + } + + $table->add_row(); + $table->add('name', rcube::Q($data['name'] ? $data['name'] : $name)); + $table->add('version', rcube::Q($data['version'])); + $table->add('license', $data['license_uri'] ? html::a(array('target' => '_blank', href=> rcube::Q($data['license_uri'])), + rcube::Q($data['license'])) : $data['license']); + $table->add('source', $uri ? html::a(array('target' => '_blank', href=> rcube::Q($uri)), + rcube::Q($RCMAIL->gettext('download'))) : ''); + } - return $table->show(); + return $table->show(); } - - -$OUTPUT->set_pagetitle(rcube_label('about')); - -$OUTPUT->add_handler('supportlink', 'rcmail_supportlink'); -$OUTPUT->add_handler('pluginlist', 'rcmail_plugins_list'); - -$OUTPUT->send('about'); diff --git a/program/steps/settings/delete_identity.inc b/program/steps/settings/delete_identity.inc index d5146db66..f77620438 100644 --- a/program/steps/settings/delete_identity.inc +++ b/program/steps/settings/delete_identity.inc @@ -5,7 +5,7 @@ | program/steps/settings/delete_identity.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -19,33 +19,37 @@ +-----------------------------------------------------------------------+ */ -$iid = get_input_value('_iid', RCUBE_INPUT_GPC); +$iid = rcube_utils::get_input_value('_iid', rcube_utils::INPUT_GPC); // check request token -if (!$OUTPUT->ajax_call && !$RCMAIL->check_request(RCUBE_INPUT_GPC)) { - $OUTPUT->show_message('invalidrequest', 'error'); - rcmail_overwrite_action('identities'); - return; +if (!$OUTPUT->ajax_call && !$RCMAIL->check_request(rcube_utils::INPUT_GPC)) { + $OUTPUT->show_message('invalidrequest', 'error'); + $RCMAIL->overwrite_action('identities'); + return; } -if ($iid && preg_match('/^[0-9]+(,[0-9]+)*$/', $iid)) -{ - $plugin = $RCMAIL->plugins->exec_hook('identity_delete', array('id' => $iid)); - - $deleted = !$plugin['abort'] ? $RCMAIL->user->delete_identity($iid) : $plugin['result']; +if ($iid && preg_match('/^[0-9]+(,[0-9]+)*$/', $iid)) { + $plugin = $RCMAIL->plugins->exec_hook('identity_delete', array('id' => $iid)); - if ($deleted > 0 && $deleted !== false) - $OUTPUT->show_message('deletedsuccessfully', 'confirmation', null, false); - else - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : ($deleted < 0 ? 'nodeletelastidentity' : 'errorsaving'), 'error', null, false); + $deleted = !$plugin['abort'] ? $RCMAIL->user->delete_identity($iid) : $plugin['result']; - // send response - if ($OUTPUT->ajax_call) - $OUTPUT->send(); + if ($deleted > 0 && $deleted !== false) { + $OUTPUT->show_message('deletedsuccessfully', 'confirmation', null, false); + } + else { + $msg = $plugin['message'] ? $plugin['message'] : ($deleted < 0 ? 'nodeletelastidentity' : 'errorsaving'); + $OUTPUT->show_message($msg, 'error', null, false); + } + + // send response + if ($OUTPUT->ajax_call) { + $OUTPUT->send(); + } } -if ($OUTPUT->ajax_call) - exit; +if ($OUTPUT->ajax_call) { + exit; +} // go to identities page -rcmail_overwrite_action('identities'); +$RCMAIL->overwrite_action('identities'); diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc index f19e2177b..fc6b2cd16 100644 --- a/program/steps/settings/edit_folder.inc +++ b/program/steps/settings/edit_folder.inc @@ -5,7 +5,7 @@ | program/steps/settings/edit_folder.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -19,7 +19,17 @@ +-----------------------------------------------------------------------+ */ -// WARNING: folder names in UI are encoded with RCMAIL_CHARSET +// register UI objects +$OUTPUT->add_handlers(array( + 'folderdetails' => 'rcmail_folder_form', +)); + +$OUTPUT->add_label('nonamewarning'); + +$OUTPUT->send('folderedit'); + + +// WARNING: folder names in UI are encoded with RCUBE_CHARSET function rcmail_folder_form($attrib) { @@ -28,12 +38,12 @@ function rcmail_folder_form($attrib) $storage = $RCMAIL->get_storage(); // edited folder name (empty in create-folder mode) - $mbox = trim(get_input_value('_mbox', RCUBE_INPUT_GPC, true)); - $mbox_imap = rcube_charset_convert($mbox, RCMAIL_CHARSET, 'UTF7-IMAP'); + $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true); + $mbox_imap = rcube_charset::convert($mbox, RCUBE_CHARSET, 'UTF7-IMAP'); // predefined path for new folder - $parent = trim(get_input_value('_path', RCUBE_INPUT_GPC, true)); - $parent_imap = rcube_charset_convert($parent, RCMAIL_CHARSET, 'UTF7-IMAP'); + $parent = rcube_utils::get_input_value('_path', rcube_utils::INPUT_GPC, true); + $parent_imap = rcube_charset::convert($parent, RCUBE_CHARSET, 'UTF7-IMAP'); $threading_supported = $storage->get_capability('THREAD'); $delimiter = $storage->get_hierarchy_delimiter(); @@ -46,7 +56,7 @@ function rcmail_folder_form($attrib) $path = explode($delimiter, $mbox_imap); $folder = array_pop($path); $path = implode($delimiter, $path); - $folder = rcube_charset_convert($folder, 'UTF7-IMAP'); + $folder = rcube_charset::convert($folder, 'UTF7-IMAP'); $hidden_fields = array('name' => '_mbox', 'value' => $mbox); } @@ -73,33 +83,33 @@ function rcmail_folder_form($attrib) // General tab $form['props'] = array( - 'name' => rcube_label('properties'), + 'name' => $RCMAIL->gettext('properties'), ); // Location (name) if ($options['protected']) { - $foldername = str_replace($delimiter, ' » ', Q(rcmail_localize_folderpath($mbox_imap))); + $foldername = str_replace($delimiter, ' » ', rcube::Q($RCMAIL->localize_folderpath($mbox_imap))); } else if ($options['norename']) { - $foldername = Q($folder); + $foldername = rcube::Q($folder); } else { if (isset($_POST['_name'])) - $folder = trim(get_input_value('_name', RCUBE_INPUT_POST, true)); + $folder = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true)); $foldername = new html_inputfield(array('name' => '_name', 'id' => '_name', 'size' => 30)); $foldername = $foldername->show($folder); if ($options['special']) { - $foldername .= ' (' . Q(rcmail_localize_foldername($mbox_imap)) .')'; + $foldername .= ' (' . rcube::Q($RCMAIL->localize_foldername($mbox_imap)) .')'; } } $form['props']['fieldsets']['location'] = array( - 'name' => rcube_label('location'), + 'name' => $RCMAIL->gettext('location'), 'content' => array( 'name' => array( - 'label' => rcube_label('foldername'), + 'label' => $RCMAIL->gettext('foldername'), 'value' => $foldername, ), ), @@ -121,7 +131,7 @@ function rcmail_folder_form($attrib) $exceptions[] = substr($prefix, 0, -1); } - $select = rcmail_mailbox_select(array( + $select = $RCMAIL->folder_selector(array( 'name' => '_parent', 'noselection' => '---', 'realnames' => false, @@ -132,21 +142,21 @@ function rcmail_folder_form($attrib) )); $form['props']['fieldsets']['location']['content']['path'] = array( - 'label' => rcube_label('parentfolder'), + 'label' => $RCMAIL->gettext('parentfolder'), 'value' => $select->show($selected), ); } // Settings $form['props']['fieldsets']['settings'] = array( - 'name' => rcube_label('settings'), + 'name' => $RCMAIL->gettext('settings'), ); // Settings: threading if ($threading_supported && ($mbox_imap == 'INBOX' || (!$options['noselect'] && !$options['is_root']))) { $select = new html_select(array('name' => '_viewmode', 'id' => '_listmode')); - $select->add(rcube_label('list'), 0); - $select->add(rcube_label('threads'), 1); + $select->add($RCMAIL->gettext('list'), 0); + $select->add($RCMAIL->gettext('threads'), 1); if (isset($_POST['_viewmode'])) { $value = (int) $_POST['_viewmode']; @@ -157,38 +167,38 @@ function rcmail_folder_form($attrib) } $form['props']['fieldsets']['settings']['content']['viewmode'] = array( - 'label' => rcube_label('listmode'), + 'label' => $RCMAIL->gettext('listmode'), 'value' => $select->show($value), ); } /* // Settings: sorting column $select = new html_select(array('name' => '_sortcol', 'id' => '_sortcol')); - $select->add(rcube_label('nonesort'), ''); - $select->add(rcube_label('arrival'), 'arrival'); - $select->add(rcube_label('sentdate'), 'date'); - $select->add(rcube_label('subject'), 'subject'); - $select->add(rcube_label('fromto'), 'from'); - $select->add(rcube_label('replyto'), 'replyto'); - $select->add(rcube_label('cc'), 'cc'); - $select->add(rcube_label('size'), 'size'); + $select->add($RCMAIL->gettext('nonesort'), ''); + $select->add($RCMAIL->gettext('arrival'), 'arrival'); + $select->add($RCMAIL->gettext('sentdate'), 'date'); + $select->add($RCMAIL->gettext('subject'), 'subject'); + $select->add($RCMAIL->gettext('fromto'), 'from'); + $select->add($RCMAIL->gettext('replyto'), 'replyto'); + $select->add($RCMAIL->gettext('cc'), 'cc'); + $select->add($RCMAIL->gettext('size'), 'size'); $value = isset($_POST['_sortcol']) ? $_POST['_sortcol'] : ''; $form['props']['fieldsets']['settings']['content']['sortcol'] = array( - 'label' => rcube_label('listsorting'), + 'label' => $RCMAIL->gettext('listsorting'), 'value' => $select->show($value), ); // Settings: sorting order $select = new html_select(array('name' => '_sortord', 'id' => '_sortord')); - $select->add(rcube_label('asc'), 'ASC'); - $select->add(rcube_label('desc'), 'DESC'); + $select->add($RCMAIL->gettext('asc'), 'ASC'); + $select->add($RCMAIL->gettext('desc'), 'DESC'); $value = isset($_POST['_sortord']) ? $_POST['_sortord'] : ''; $form['props']['fieldsets']['settings']['content']['sortord'] = array( - 'label' => rcube_label('listorder'), + 'label' => $RCMAIL->gettext('listorder'), 'value' => $select->show(), ); */ @@ -196,7 +206,7 @@ function rcmail_folder_form($attrib) if (strlen($mbox)) { // Number of messages $form['props']['fieldsets']['info'] = array( - 'name' => rcube_label('info'), + 'name' => $RCMAIL->gettext('info'), 'content' => array() ); @@ -207,9 +217,9 @@ function rcmail_folder_form($attrib) if ($msgcount) { // create link with folder-size command $onclick = sprintf("return %s.command('folder-size', '%s', this)", - JS_OBJECT_NAME, JQ($mbox_imap)); + rcmail_output::JS_OBJECT_NAME, rcube::JQ($mbox_imap)); $size = html::a(array('href' => '#', 'onclick' => $onclick, - 'id' => 'folder-size'), rcube_label('getfoldersize')); + 'id' => 'folder-size'), $RCMAIL->gettext('getfoldersize')); } else { // no messages -> zero size @@ -217,11 +227,11 @@ function rcmail_folder_form($attrib) } $form['props']['fieldsets']['info']['content']['count'] = array( - 'label' => rcube_label('messagecount'), + 'label' => $RCMAIL->gettext('messagecount'), 'value' => (int) $msgcount ); $form['props']['fieldsets']['info']['content']['size'] = array( - 'label' => rcube_label('size'), + 'label' => $RCMAIL->gettext('size'), 'value' => $size, ); } @@ -229,8 +239,8 @@ function rcmail_folder_form($attrib) // show folder type only if we have non-private namespaces if (!empty($namespace['shared']) || !empty($namespace['others'])) { $form['props']['fieldsets']['info']['content']['foldertype'] = array( - 'label' => rcube_label('foldertype'), - 'value' => rcube_label($options['namespace'] . 'folder')); + 'label' => $RCMAIL->gettext('foldertype'), + 'value' => $RCMAIL->gettext($options['namespace'] . 'folder')); } } @@ -256,7 +266,8 @@ function rcmail_folder_form($attrib) foreach ($tab['fieldsets'] as $fieldset) { $subcontent = rcmail_get_form_part($fieldset, $attrib); if ($subcontent) { - $content .= html::tag('fieldset', null, html::tag('legend', null, Q($fieldset['name'])) . $subcontent) ."\n"; + $subcontent = html::tag('legend', null, rcube::Q($fieldset['name'])) . $subcontent; + $content .= html::tag('fieldset', null, $subcontent) ."\n"; } } } @@ -265,7 +276,7 @@ function rcmail_folder_form($attrib) } if ($content && sizeof($form) > 1) { - $out .= html::tag('fieldset', null, html::tag('legend', null, Q($tab['name'])) . $content) ."\n"; + $out .= html::tag('fieldset', null, html::tag('legend', null, rcube::Q($tab['name'])) . $content) ."\n"; } else { $out .= $content ."\n"; @@ -287,9 +298,9 @@ function rcmail_get_form_part($form, $attrib = array()) $table = new html_table(array('cols' => 2)); foreach ($form['content'] as $col => $colprop) { $colprop['id'] = '_'.$col; - $label = !empty($colprop['label']) ? $colprop['label'] : rcube_label($col); + $label = !empty($colprop['label']) ? $colprop['label'] : $RCMAIL->gettext($col); - $table->add('title', html::label($colprop['id'], Q($label))); + $table->add('title', html::label($colprop['id'], rcube::Q($label))); $table->add(null, $colprop['value']); } $content = $table->show($attrib); @@ -300,15 +311,3 @@ function rcmail_get_form_part($form, $attrib = array()) return $content; } - - -//$OUTPUT->set_pagetitle(rcube_label('folders')); - -// register UI objects -$OUTPUT->add_handlers(array( - 'folderdetails' => 'rcmail_folder_form', -)); - -$OUTPUT->add_label('nonamewarning'); - -$OUTPUT->send('folderedit'); diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index edd4ba60d..f208c8a05 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -5,7 +5,7 @@ | program/steps/settings/edit_identity.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | 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. | @@ -23,152 +23,158 @@ define('IDENTITIES_LEVEL', intval($RCMAIL->config->get('identities_level', 0))); // edit-identity if (($_GET['_iid'] || $_POST['_iid']) && $RCMAIL->action=='edit-identity') { - $IDENTITY_RECORD = $RCMAIL->user->get_identity(get_input_value('_iid', RCUBE_INPUT_GPC)); - - if (is_array($IDENTITY_RECORD)) - $OUTPUT->set_env('iid', $IDENTITY_RECORD['identity_id']); - else { - $OUTPUT->show_message('dberror', 'error'); - // go to identities page - rcmail_overwrite_action('identities'); - return; - } + $id = rcube_utils::get_input_value('_iid', rcube_utils::INPUT_GPC); + $IDENTITY_RECORD = $RCMAIL->user->get_identity($id); + + if (is_array($IDENTITY_RECORD)) { + $OUTPUT->set_env('iid', $IDENTITY_RECORD['identity_id']); + } + else { + $OUTPUT->show_message('dberror', 'error'); + // go to identities page + $RCMAIL->overwrite_action('identities'); + return; + } } // add-identity else { - if (IDENTITIES_LEVEL > 1) { - $OUTPUT->show_message('opnotpermitted', 'error'); - // go to identities page - rcmail_overwrite_action('identities'); - return; - } - else if (IDENTITIES_LEVEL == 1) { - $IDENTITY_RECORD['email'] = $RCMAIL->get_user_email(); - } + if (IDENTITIES_LEVEL > 1) { + $OUTPUT->show_message('opnotpermitted', 'error'); + // go to identities page + $RCMAIL->overwrite_action('identities'); + return; + } + else if (IDENTITIES_LEVEL == 1) { + $IDENTITY_RECORD['email'] = $RCMAIL->get_user_email(); + } +} + +$OUTPUT->include_script('list.js'); +$OUTPUT->add_handler('identityform', 'rcube_identity_form'); +$OUTPUT->set_env('identities_level', IDENTITIES_LEVEL); +$OUTPUT->add_label('deleteidentityconfirm'); + +$OUTPUT->set_pagetitle($RCMAIL->gettext(($RCMAIL->action == 'add-identity' ? 'newidentity' : 'edititem'))); + +if ($RCMAIL->action == 'add-identity' && $OUTPUT->template_exists('identityadd')) { + $OUTPUT->send('identityadd'); } +$OUTPUT->send('identityedit'); + function rcube_identity_form($attrib) { - global $IDENTITY_RECORD, $RCMAIL, $OUTPUT; - - // Add HTML editor script(s) - rcube_html_editor('identity'); - - // add some labels to client - $OUTPUT->add_label('noemailwarning', 'nonamewarning', 'converting', 'editorwarning'); - - $i_size = !empty($attrib['size']) ? $attrib['size'] : 40; - $t_rows = !empty($attrib['textarearows']) ? $attrib['textarearows'] : 6; - $t_cols = !empty($attrib['textareacols']) ? $attrib['textareacols'] : 40; - - // list of available cols - $form = array( - 'addressing' => array( - 'name' => rcube_label('settings'), - 'content' => array( - 'name' => array('type' => 'text', 'size' => $i_size), - 'email' => array('type' => 'text', 'size' => $i_size), - 'organization' => array('type' => 'text', 'size' => $i_size), - 'reply-to' => array('type' => 'text', 'size' => $i_size), - 'bcc' => array('type' => 'text', 'size' => $i_size), - 'standard' => array('type' => 'checkbox', 'label' => rcube_label('setdefault')), - )), - 'signature' => array( - 'name' => rcube_label('signature'), - 'content' => array( - 'signature' => array('type' => 'textarea', 'size' => $t_cols, 'rows' => $t_rows, - 'spellcheck' => true), - 'html_signature' => array('type' => 'checkbox', 'label' => rcube_label('htmlsignature'), - 'onclick' => 'return rcmail_toggle_editor(this, \'rcmfd_signature\');'), - )) - ); - - // Enable TinyMCE editor - if ($IDENTITY_RECORD['html_signature']) { - $form['signature']['content']['signature']['class'] = 'mce_editor'; - $form['signature']['content']['signature']['is_escaped'] = true; - - // Correctly handle HTML entities in HTML editor (#1488483) - $IDENTITY_RECORD['signature'] = htmlspecialchars($IDENTITY_RECORD['signature'], ENT_NOQUOTES, RCMAIL_CHARSET); - } - - // disable some field according to access level - if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) { - $form['addressing']['content']['email']['disabled'] = true; - $form['addressing']['content']['email']['class'] = 'disabled'; - } - - if (IDENTITIES_LEVEL == 4) { - foreach($form['addressing']['content'] as $formfield => $value){ - $form['addressing']['content'][$formfield]['disabled'] = true; - $form['addressing']['content'][$formfield]['class'] = 'disabled'; + global $IDENTITY_RECORD, $RCMAIL, $OUTPUT; + + // Add HTML editor script(s) + $RCMAIL->html_editor('identity'); + + // add some labels to client + $OUTPUT->add_label('noemailwarning', 'nonamewarning', 'converting', 'editorwarning'); + + $i_size = !empty($attrib['size']) ? $attrib['size'] : 40; + $t_rows = !empty($attrib['textarearows']) ? $attrib['textarearows'] : 6; + $t_cols = !empty($attrib['textareacols']) ? $attrib['textareacols'] : 40; + + // list of available cols + $form = array( + 'addressing' => array( + 'name' => $RCMAIL->gettext('settings'), + 'content' => array( + 'name' => array('type' => 'text', 'size' => $i_size), + 'email' => array('type' => 'text', 'size' => $i_size), + 'organization' => array('type' => 'text', 'size' => $i_size), + 'reply-to' => array('type' => 'text', 'size' => $i_size), + 'bcc' => array('type' => 'text', 'size' => $i_size), + 'standard' => array('type' => 'checkbox', 'label' => $RCMAIL->gettext('setdefault')), + )), + 'signature' => array( + 'name' => $RCMAIL->gettext('signature'), + 'content' => array( + 'signature' => array('type' => 'textarea', 'size' => $t_cols, 'rows' => $t_rows, + 'spellcheck' => true), + 'html_signature' => array('type' => 'checkbox', + 'label' => $RCMAIL->gettext('htmlsignature'), + 'onclick' => 'return rcmail_toggle_editor(this, \'rcmfd_signature\');'), + )) + ); + + // Enable TinyMCE editor + if ($IDENTITY_RECORD['html_signature']) { + $form['signature']['content']['signature']['class'] = 'mce_editor'; + $form['signature']['content']['signature']['is_escaped'] = true; + + // Correctly handle HTML entities in HTML editor (#1488483) + $IDENTITY_RECORD['signature'] = htmlspecialchars($IDENTITY_RECORD['signature'], ENT_NOQUOTES, RCUBE_CHARSET); } - } - $IDENTITY_RECORD['email'] = rcube_idn_to_utf8($IDENTITY_RECORD['email']); + // disable some field according to access level + if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) { + $form['addressing']['content']['email']['disabled'] = true; + $form['addressing']['content']['email']['class'] = 'disabled'; + } - // Allow plugins to modify identity form content - $plugin = $RCMAIL->plugins->exec_hook('identity_form', array( - 'form' => $form, 'record' => $IDENTITY_RECORD)); + if (IDENTITIES_LEVEL == 4) { + foreach($form['addressing']['content'] as $formfield => $value){ + $form['addressing']['content'][$formfield]['disabled'] = true; + $form['addressing']['content'][$formfield]['class'] = 'disabled'; + } + } - $form = $plugin['form']; - $IDENTITY_RECORD = $plugin['record']; + $IDENTITY_RECORD['email'] = rcube_utils::idn_to_utf8($IDENTITY_RECORD['email']); - // Set form tags and hidden fields - list($form_start, $form_end) = get_form_tags($attrib, 'save-identity', - intval($IDENTITY_RECORD['identity_id']), - array('name' => '_iid', 'value' => $IDENTITY_RECORD['identity_id'])); + // Allow plugins to modify identity form content + $plugin = $RCMAIL->plugins->exec_hook('identity_form', array( + 'form' => $form, 'record' => $IDENTITY_RECORD)); - unset($plugin); - unset($attrib['form'], $attrib['id']); + $form = $plugin['form']; + $IDENTITY_RECORD = $plugin['record']; - // return the complete edit form as table - $out = "$form_start\n"; + // Set form tags and hidden fields + list($form_start, $form_end) = get_form_tags($attrib, 'save-identity', + intval($IDENTITY_RECORD['identity_id']), + array('name' => '_iid', 'value' => $IDENTITY_RECORD['identity_id'])); - foreach ($form as $fieldset) { - if (empty($fieldset['content'])) - continue; + unset($plugin); + unset($attrib['form'], $attrib['id']); - $content = ''; - if (is_array($fieldset['content'])) { - $table = new html_table(array('cols' => 2)); - foreach ($fieldset['content'] as $col => $colprop) { - $colprop['id'] = 'rcmfd_'.$col; + // return the complete edit form as table + $out = "$form_start\n"; - $label = !empty($colprop['label']) ? $colprop['label'] : - rcube_label(str_replace('-', '', $col)); + foreach ($form as $fieldset) { + if (empty($fieldset['content'])) { + continue; + } - $value = !empty($colprop['value']) ? $colprop['value'] : - rcmail_get_edit_field($col, $IDENTITY_RECORD[$col], $colprop, $colprop['type']); + $content = ''; + if (is_array($fieldset['content'])) { + $table = new html_table(array('cols' => 2)); - $table->add('title', html::label($colprop['id'], Q($label))); - $table->add(null, $value); - } - $content = $table->show($attrib); - } - else { - $content = $fieldset['content']; - } + foreach ($fieldset['content'] as $col => $colprop) { + $colprop['id'] = 'rcmfd_'.$col; - $out .= html::tag('fieldset', null, html::tag('legend', null, Q($fieldset['name'])) . $content) ."\n"; - } + $label = !empty($colprop['label']) ? $colprop['label'] : + $RCMAIL->gettext(str_replace('-', '', $col)); - $out .= $form_end; + $value = !empty($colprop['value']) ? $colprop['value'] : + rcube_output::get_edit_field($col, $IDENTITY_RECORD[$col], $colprop, $colprop['type']); - return $out; -} + $table->add('title', html::label($colprop['id'], rcube::Q($label))); + $table->add(null, $value); + } -$OUTPUT->include_script('list.js'); -$OUTPUT->add_handler('identityform', 'rcube_identity_form'); -$OUTPUT->set_env('identities_level', IDENTITIES_LEVEL); -$OUTPUT->add_label('deleteidentityconfirm'); - -$OUTPUT->set_pagetitle(rcube_label(($RCMAIL->action=='add-identity' ? 'newidentity' : 'edititem'))); - -if ($RCMAIL->action=='add-identity' && $OUTPUT->template_exists('identityadd')) - $OUTPUT->send('identityadd'); + $content = $table->show($attrib); + } + else { + $content = $fieldset['content']; + } -$OUTPUT->send('identityedit'); + $content = html::tag('legend', null, rcube::Q($fieldset['name'])) . $content; + $out .= html::tag('fieldset', null, $content) . "\n"; + } + $out .= $form_end; + return $out; +} diff --git a/program/steps/settings/edit_prefs.inc b/program/steps/settings/edit_prefs.inc index adf6b1623..05f4db6a6 100644 --- a/program/steps/settings/edit_prefs.inc +++ b/program/steps/settings/edit_prefs.inc @@ -5,7 +5,7 @@ | program/steps/settings/edit_prefs.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2007, The Roundcube Dev Team | + | 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. | @@ -19,65 +19,65 @@ +-----------------------------------------------------------------------+ */ -if (!$OUTPUT->ajax_call) - $OUTPUT->set_pagetitle(rcube_label('preferences')); +if (!$OUTPUT->ajax_call) { + $OUTPUT->set_pagetitle($RCMAIL->gettext('preferences')); +} -$CURR_SECTION = get_input_value('_section', RCUBE_INPUT_GPC); +$CURR_SECTION = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GPC); list($SECTIONS,) = rcmail_user_prefs($CURR_SECTION); +// register UI objects +$OUTPUT->add_handlers(array( + 'userprefs' => 'rcmail_user_prefs_form', + 'sectionname' => 'rcmail_prefs_section_name', +)); + +$OUTPUT->send('settingsedit'); + + + function rcmail_user_prefs_form($attrib) { - global $RCMAIL, $CURR_SECTION, $SECTIONS; + global $RCMAIL, $CURR_SECTION, $SECTIONS; - // add some labels to client - $RCMAIL->output->add_label('nopagesizewarning'); + // add some labels to client + $RCMAIL->output->add_label('nopagesizewarning'); - unset($attrib['form']); + unset($attrib['form']); - list($form_start, $form_end) = get_form_tags($attrib, 'save-prefs', null, - array('name' => '_section', 'value' => $CURR_SECTION)); + list($form_start, $form_end) = get_form_tags($attrib, 'save-prefs', null, + array('name' => '_section', 'value' => $CURR_SECTION)); - $out = $form_start; + $out = $form_start; - foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $class => $block) { - if (!empty($block['options'])) { - $table = new html_table(array('cols' => 2)); + foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $class => $block) { + if (!empty($block['options'])) { + $table = new html_table(array('cols' => 2)); - foreach ($block['options'] as $option) { - if (isset($option['title'])) { - $table->add('title', $option['title']); - $table->add(null, $option['content']); + foreach ($block['options'] as $option) { + if (isset($option['title'])) { + $table->add('title', $option['title']); + $table->add(null, $option['content']); + } + else { + $table->add(array('colspan' => 2), $option['content']); + } + } + + $out .= html::tag('fieldset', $class, html::tag('legend', null, $block['name']) . $table->show($attrib)); } - else { - $table->add(array('colspan' => 2), $option['content']); + else if (!empty($block['content'])) { + $out .= html::tag('fieldset', null, html::tag('legend', null, $block['name']) . $block['content']); } - } - - $out .= html::tag('fieldset', $class, html::tag('legend', null, $block['name']) . $table->show($attrib)); } - else if (!empty($block['content'])) { - $out .= html::tag('fieldset', null, html::tag('legend', null, $block['name']) . $block['content']); - } - } - return $out . $form_end; + return $out . $form_end; } function rcmail_prefs_section_name() { - global $SECTIONS, $CURR_SECTION; - - return $SECTIONS[$CURR_SECTION]['section']; -} - - -// register UI objects -$OUTPUT->add_handlers(array( - 'userprefs' => 'rcmail_user_prefs_form', - 'sectionname' => 'rcmail_prefs_section_name', -)); - -$OUTPUT->send('settingsedit'); - + global $SECTIONS, $CURR_SECTION; + return $SECTIONS[$CURR_SECTION]['section']; +} diff --git a/program/steps/settings/edit_response.inc b/program/steps/settings/edit_response.inc new file mode 100644 index 000000000..6d3c3dc41 --- /dev/null +++ b/program/steps/settings/edit_response.inc @@ -0,0 +1,108 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | program/steps/settings/edit_response.inc | + | | + | This file is part of the Roundcube Webmail client | + | Copyright (C) 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: | + | Show edit form for a canned response record or to add a new one | + | | + +-----------------------------------------------------------------------+ + | Author: Thomas Bruederli <roundcube@gmail.com> | + +-----------------------------------------------------------------------+ +*/ + +$responses = $RCMAIL->get_compose_responses(); + +// edit-response +if (($key = rcube_utils::get_input_value('_key', rcube_utils::INPUT_GPC))) { + foreach ($responses as $i => $response) { + if ($response['key'] == $key) { + $RESPONSE_RECORD = $response; + $RESPONSE_RECORD['index'] = $i; + break; + } + } +} + +// save response +if ($RCMAIL->action == 'save-response' && isset($_POST['_name']) && !$RESPONSE_RECORD['static']) { + $name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST)); + $text = trim(rcube_utils::get_input_value('_text', rcube_utils::INPUT_POST, true)); + + if (!empty($name) && !empty($text)) { + $dupes = 0; + foreach ($responses as $i => $resp) { + if ($RESPONSE_RECORD && $RESPONSE_RECORD['index'] === $i) + continue; + if (strcasecmp($name, preg_replace('/\s\(\d+\)$/', '', $resp['name'])) == 0) + $dupes++; + } + if ($dupes) { // require a unique name + $name .= ' (' . ++$dupes . ')'; + } + + $response = array('name' => $name, 'text' => $text, 'format' => 'text', 'key' => substr(md5($name), 0, 16)); + if ($RESPONSE_RECORD && $responses[$RESPONSE_RECORD['index']]) { + $responses[$RESPONSE_RECORD['index']] = $response; + } + else { + $responses[] = $response; + } + + $responses = array_filter($responses, function($item){ return empty($item['static']); }); + if ($RCMAIL->user->save_prefs(array('compose_responses' => array_values($responses)))) { + $RCMAIL->output->show_message('successfullysaved', 'confirmation'); + $RCMAIL->output->command('parent.update_response_row', $response, $key); + $RCMAIL->overwrite_action('edit-response'); + $RESPONSE_RECORD = $response; + } + } + else { + $RCMAIL->output->show_message('formincomplete', 'error'); + } +} + +$OUTPUT->set_env('readonly', !empty($RESPONSE_RECORD['static'])); +$OUTPUT->add_handler('responseform', 'rcube_response_form'); +$OUTPUT->set_pagetitle($RCMAIL->gettext($RCMAIL->action == 'add-response' ? 'savenewresponse' : 'editresponse')); + +$OUTPUT->send('responseedit'); + + +function rcube_response_form($attrib) +{ + global $RCMAIL, $OUTPUT, $RESPONSE_RECORD; + + // Set form tags and hidden fields + $disabled = !empty($RESPONSE_RECORD['static']); + $key = $RESPONSE_RECORD['key']; + list($form_start, $form_end) = get_form_tags($attrib, 'save-response', $key, array('name' => '_key', 'value' => $key)); + unset($attrib['form'], $attrib['id']); + + // return the complete edit form as table + $out = "$form_start\n"; + + $table = new html_table(array('cols' => 2)); + $label = $RCMAIL->gettext('responsename'); + + $table->add('title', html::label('ffname', rcube::Q($RCMAIL->gettext('responsename')))); + $table->add(null, rcube_output::get_edit_field('name', $RESPONSE_RECORD['name'], + array('id' => 'ffname', 'size' => $attrib['size'], 'disabled' => $disabled), 'text')); + + $table->add('title', html::label('fftext', rcube::Q($RCMAIL->gettext('responsetext')))); + $table->add(null, rcube_output::get_edit_field('text', $RESPONSE_RECORD['text'], + array('id' => 'fftext', 'size' => $attrib['textareacols'], 'rows' => $attrib['textarearows'], 'disabled' => $disabled), 'textarea')); + + $out .= $table->show($attrib); + $out .= $form_end; + + return $out; +} diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc index 64af18d62..b09ea03ce 100644 --- a/program/steps/settings/folders.inc +++ b/program/steps/settings/folders.inc @@ -5,7 +5,7 @@ | program/steps/settings/folders.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -20,15 +20,15 @@ +-----------------------------------------------------------------------+ */ -// WARNING: folder names in UI are encoded with RCMAIL_CHARSET +// WARNING: folder names in UI are encoded with RCUBE_CHARSET // init IMAP connection $STORAGE = $RCMAIL->get_storage(); // subscribe mailbox -if ($RCMAIL->action == 'subscribe') -{ - $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true, 'UTF7-IMAP'); +if ($RCMAIL->action == 'subscribe') { + $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true, 'UTF7-IMAP'); + if (strlen($mbox)) { $result = $STORAGE->subscribe(array($mbox)); @@ -53,28 +53,24 @@ if ($RCMAIL->action == 'subscribe') $OUTPUT->show_message('foldersubscribed', 'confirmation'); } else - rcmail_display_server_error('errorsaving'); + $RCMAIL->display_server_error('errorsaving'); } } - // unsubscribe mailbox -else if ($RCMAIL->action == 'unsubscribe') -{ - $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true, 'UTF7-IMAP'); +else if ($RCMAIL->action == 'unsubscribe') { + $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true, 'UTF7-IMAP'); if (strlen($mbox)) { $result = $STORAGE->unsubscribe(array($mbox)); if ($result) $OUTPUT->show_message('folderunsubscribed', 'confirmation'); else - rcmail_display_server_error('errorsaving'); + $RCMAIL->display_server_error('errorsaving'); } } - // delete an existing mailbox -else if ($RCMAIL->action == 'delete-folder') -{ - $mbox_utf8 = get_input_value('_mbox', RCUBE_INPUT_POST, true); - $mbox = rcube_charset_convert($mbox_utf8, RCMAIL_CHARSET, 'UTF7-IMAP'); +else if ($RCMAIL->action == 'delete-folder') { + $mbox_utf8 = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true); + $mbox = rcube_charset::convert($mbox_utf8, RCUBE_CHARSET, 'UTF7-IMAP'); if (strlen($mbox)) { $plugin = $RCMAIL->plugins->exec_hook('folder_delete', array('name' => $mbox)); @@ -98,22 +94,20 @@ else if ($RCMAIL->action == 'delete-folder') $OUTPUT->show_message('folderdeleted', 'confirmation'); // Clear content frame $OUTPUT->command('subscription_select'); - $OUTPUT->command('set_quota', rcmail_quota_content()); + $OUTPUT->command('set_quota', $RCMAIL->quota_content()); } else if (!$deleted) { - rcmail_display_server_error('errorsaving'); + $RCMAIL->display_server_error('errorsaving'); } } - // rename an existing mailbox -else if ($RCMAIL->action == 'rename-folder') -{ - $name_utf8 = trim(get_input_value('_folder_newname', RCUBE_INPUT_POST, true)); - $oldname_utf8 = trim(get_input_value('_folder_oldname', RCUBE_INPUT_POST, true)); +else if ($RCMAIL->action == 'rename-folder') { + $name_utf8 = trim(rcube_utils::get_input_value('_folder_newname', rcube_utils::INPUT_POST, true)); + $oldname_utf8 = rcube_utils::get_input_value('_folder_oldname', rcube_utils::INPUT_POST, true); if (strlen($name_utf8) && strlen($oldname_utf8)) { - $name = rcube_charset_convert($name_utf8, RCMAIL_CHARSET, 'UTF7-IMAP'); - $oldname = rcube_charset_convert($oldname_utf8, RCMAIL_CHARSET, 'UTF7-IMAP'); + $name = rcube_charset::convert($name_utf8, RCUBE_CHARSET, 'UTF7-IMAP'); + $oldname = rcube_charset::convert($oldname_utf8, RCUBE_CHARSET, 'UTF7-IMAP'); $rename = rcmail_rename_folder($oldname, $name); } @@ -122,20 +116,19 @@ else if ($RCMAIL->action == 'rename-folder') rcmail_update_folder_row($name, $oldname); } else if (!$rename) { - rcmail_display_server_error('errorsaving'); + $RCMAIL->display_server_error('errorsaving'); } } - // clear mailbox -else if ($RCMAIL->action == 'purge') -{ - $mbox_utf8 = get_input_value('_mbox', RCUBE_INPUT_POST, true); - $mbox = rcube_charset_convert($mbox_utf8, RCMAIL_CHARSET, 'UTF7-IMAP'); - $delimiter = $STORAGE->get_hierarchy_delimiter(); - $trash_regexp = '/^' . preg_quote($CONFIG['trash_mbox'] . $delimiter, '/') . '/'; +else if ($RCMAIL->action == 'purge') { + $mbox_utf8 = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true); + $mbox = rcube_charset::convert($mbox_utf8, RCUBE_CHARSET, 'UTF7-IMAP'); + $delimiter = $STORAGE->get_hierarchy_delimiter(); + $trash_mbox = $RCMAIL->config->get('trash_mbox'); + $trash_regexp = '/^' . preg_quote($trash . $delimiter, '/') . '/'; // we should only be purging trash (or their subfolders) - if (!strlen($CONFIG['trash_mbox']) || $mbox == $CONFIG['trash_mbox'] + if (!strlen($trash_mbox) || $mbox === $trash_mbox || preg_match($trash_regexp, $mbox) ) { $success = $STORAGE->delete_message('*', $mbox); @@ -143,7 +136,7 @@ else if ($RCMAIL->action == 'purge') } // copy to Trash else { - $success = $STORAGE->move_message('1:*', $CONFIG['trash_mbox'], $mbox); + $success = $STORAGE->move_message('1:*', $trash_mbox, $mbox); $delete = false; } @@ -151,7 +144,7 @@ else if ($RCMAIL->action == 'purge') $OUTPUT->set_env('messagecount', 0); if ($delete) { $OUTPUT->show_message('folderpurged', 'confirmation'); - $OUTPUT->command('set_quota', rcmail_quota_content()); + $OUTPUT->command('set_quota', $RCMAIL->quota_content()); } else { $OUTPUT->show_message('messagemoved', 'confirmation'); @@ -160,29 +153,48 @@ else if ($RCMAIL->action == 'purge') $OUTPUT->command('show_folder', $mbox_utf8, null, true); } else { - rcmail_display_server_error('errorsaving'); + $RCMAIL->display_server_error('errorsaving'); } } - // get mailbox size -else if ($RCMAIL->action == 'folder-size') -{ - $name = trim(get_input_value('_mbox', RCUBE_INPUT_POST, true)); +else if ($RCMAIL->action == 'folder-size') { + $name = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true); $size = $STORAGE->folder_size($name); // @TODO: check quota and show percentage usage of specified mailbox? if ($size !== false) { - $OUTPUT->command('folder_size_update', show_bytes($size)); + $OUTPUT->command('folder_size_update', $RCMAIL->show_bytes($size)); } else { - rcmail_display_server_error(); + $RCMAIL->display_server_error(); } } -if ($OUTPUT->ajax_call) +if ($OUTPUT->ajax_call) { $OUTPUT->send(); +} + +$OUTPUT->set_pagetitle($RCMAIL->gettext('folders')); +$OUTPUT->include_script('list.js'); +$OUTPUT->set_env('prefix_ns', $STORAGE->get_namespace('prefix')); +if ($STORAGE->get_capability('QUOTA')) { + $OUTPUT->set_env('quota', true); +} + +// add some labels to client +$OUTPUT->add_label('deletefolderconfirm', 'purgefolderconfirm', 'folderdeleting', + 'foldermoving', 'foldersubscribing', 'folderunsubscribing', 'quota'); + +// register UI objects +$OUTPUT->add_handlers(array( + 'foldersubscription' => 'rcube_subscription_form', + 'folderframe' => 'rcmail_folder_frame', + 'quotadisplay' => array($RCMAIL, 'quota_display'), +)); + +$OUTPUT->send('folders'); // build table with all folders listed by server @@ -200,7 +212,7 @@ function rcube_subscription_form($attrib) if ($attrib['noheader'] !== true && $attrib['noheader'] != "true") { // add table header - $table->add_header('name', rcube_label('foldername')); + $table->add_header('name', $RCMAIL->gettext('foldername')); $table->add_header('subscribed', ''); } @@ -225,7 +237,7 @@ function rcube_subscription_form($attrib) $folder_id = $folder; $folder = $STORAGE->mod_folder($folder); $foldersplit = explode($delimiter, $folder); - $name = rcube_charset_convert(array_pop($foldersplit), 'UTF7-IMAP'); + $name = rcube_charset::convert(array_pop($foldersplit), 'UTF7-IMAP'); $parent_folder = join($delimiter, $foldersplit); $level = count($foldersplit); @@ -234,7 +246,7 @@ function rcube_subscription_form($attrib) for ($i=1; $i<=$level; $i++) { $ancestor_folder = join($delimiter, array_slice($foldersplit, 0, $i)); if ($ancestor_folder && !$seen[$ancestor_folder]++) { - $ancestor_name = rcube_charset_convert($foldersplit[$i-1], 'UTF7-IMAP'); + $ancestor_name = rcube_charset::convert($foldersplit[$i-1], 'UTF7-IMAP'); $list_folders[] = array( 'id' => $ancestor_folder, 'name' => $ancestor_name, @@ -270,8 +282,8 @@ function rcube_subscription_form($attrib) $checkbox_subscribe = new html_checkbox(array( 'name' => '_subscribed[]', - 'title' => rcube_label('changesubscription'), - 'onclick' => JS_OBJECT_NAME.".command(this.checked?'subscribe':'unsubscribe',this.value)", + 'title' => $RCMAIL->gettext('changesubscription'), + 'onclick' => rcmail_output::JS_OBJECT_NAME.".command(this.checked?'subscribe':'unsubscribe',this.value)", )); // create list of available folders @@ -283,9 +295,9 @@ function rcube_subscription_form($attrib) $noselect = false; $classes = array($i%2 ? 'even' : 'odd'); - $folder_utf8 = rcube_charset_convert($folder['id'], 'UTF7-IMAP'); + $folder_utf8 = rcube_charset::convert($folder['id'], 'UTF7-IMAP'); $display_folder = str_repeat(' ', $folder['level']) - . Q($protected ? rcmail_localize_foldername($folder['id']) : $folder['name']); + . rcube::Q($protected ? $RCMAIL->localize_foldername($folder['id']) : $folder['name']); if ($folder['virtual']) { $classes[] = 'virtual'; @@ -366,8 +378,9 @@ function rcmail_folder_frame($attrib) { global $OUTPUT; - if (!$attrib['id']) + if (!$attrib['id']) { $attrib['id'] = 'rcmfolderframe'; + } return $OUTPUT->frame($attrib, true); } @@ -416,25 +429,3 @@ function rcmail_rename_folder($oldname, $newname) return false; } - - -$OUTPUT->set_pagetitle(rcube_label('folders')); -$OUTPUT->include_script('list.js'); -$OUTPUT->set_env('prefix_ns', $STORAGE->get_namespace('prefix')); -if ($STORAGE->get_capability('QUOTA')) { - $OUTPUT->set_env('quota', true); -} - -// add some labels to client -$OUTPUT->add_label('deletefolderconfirm', 'purgefolderconfirm', 'folderdeleting', - 'foldermoving', 'foldersubscribing', 'folderunsubscribing', 'quota'); - -// register UI objects -$OUTPUT->add_handlers(array( - 'foldersubscription' => 'rcube_subscription_form', - 'folderframe' => 'rcmail_folder_frame', - 'quotadisplay' => 'rcmail_quota_display', -)); - -$OUTPUT->send('folders'); - diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index af278e5fa..7c36df3b1 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -5,7 +5,7 @@ | program/steps/settings/func.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | 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. | @@ -20,9 +20,33 @@ */ if (!$OUTPUT->ajax_call) { - $OUTPUT->set_pagetitle(rcube_label('preferences')); + $OUTPUT->set_pagetitle($RCMAIL->gettext('preferences')); } +// register UI objects +$OUTPUT->add_handlers(array( + 'settingstabs' => 'rcmail_settings_tabs', + 'prefsframe' => 'rcmail_preferences_frame', + 'sectionslist' => 'rcmail_sections_list', + 'identitieslist' => 'rcmail_identities_list', +)); + +// register action aliases +$RCMAIL->register_action_map(array( + 'folders' => 'folders.inc', + 'rename-folder' => 'folders.inc', + 'delete-folder' => 'folders.inc', + 'subscribe' => 'folders.inc', + 'unsubscribe' => 'folders.inc', + 'purge' => 'folders.inc', + 'folder-size' => 'folders.inc', + 'add-identity' => 'edit_identity.inc', + 'add-response' => 'edit_response.inc', + 'save-response' => 'edit_response.inc', + 'delete-response' => 'responses.inc', +)); + + // similar function as /steps/settings/identities.inc::rcmail_identity_frame() function rcmail_preferences_frame($attrib) { @@ -48,7 +72,7 @@ function rcmail_sections_list($attrib) list($list, $cols) = rcmail_user_prefs(); // create XHTML table - $out = rcube_table_output($attrib, $list, $cols, 'id'); + $out = $RCMAIL->table_output($attrib, $list, $cols, 'id'); // set client env $RCMAIL->output->add_gui_object('sectionslist', $attrib['id']); @@ -70,7 +94,7 @@ function rcmail_identities_list($attrib) // get identities list and define 'mail' column $list = $RCMAIL->user->list_identities(); foreach ($list as $idx => $row) { - $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_idn_to_utf8($row['email']) .'>'); + $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_utils::idn_to_utf8($row['email']) .'>'); } // get all identites from DB and define list of cols to be displayed @@ -81,7 +105,7 @@ function rcmail_identities_list($attrib) // @TODO: use <UL> instead of <TABLE> for identities list // create XHTML table - $out = rcube_table_output($attrib, $plugin['list'], $plugin['cols'], 'identity_id'); + $out = $RCMAIL->table_output($attrib, $plugin['list'], $plugin['cols'], 'identity_id'); // set client env $OUTPUT->add_gui_object('identitieslist', $attrib['id']); @@ -127,13 +151,13 @@ function rcmail_user_prefs($current = null) { global $RCMAIL; - $sections['general'] = array('id' => 'general', 'section' => rcube_label('uisettings')); - $sections['mailbox'] = array('id' => 'mailbox', 'section' => rcube_label('mailboxview')); - $sections['mailview'] = array('id' => 'mailview','section' => rcube_label('messagesdisplaying')); - $sections['compose'] = array('id' => 'compose', 'section' => rcube_label('messagescomposition')); - $sections['addressbook'] = array('id' => 'addressbook','section' => rcube_label('addressbook')); - $sections['folders'] = array('id' => 'folders', 'section' => rcube_label('specialfolders')); - $sections['server'] = array('id' => 'server', 'section' => rcube_label('serversettings')); + $sections['general'] = array('id' => 'general', 'section' => $RCMAIL->gettext('uisettings')); + $sections['mailbox'] = array('id' => 'mailbox', 'section' => $RCMAIL->gettext('mailboxview')); + $sections['mailview'] = array('id' => 'mailview','section' => $RCMAIL->gettext('messagesdisplaying')); + $sections['compose'] = array('id' => 'compose', 'section' => $RCMAIL->gettext('messagescomposition')); + $sections['addressbook'] = array('id' => 'addressbook','section' => $RCMAIL->gettext('addressbook')); + $sections['folders'] = array('id' => 'folders', 'section' => $RCMAIL->gettext('specialfolders')); + $sections['server'] = array('id' => 'server', 'section' => $RCMAIL->gettext('serversettings')); // hook + define list cols $plugin = $RCMAIL->plugins->exec_hook('preferences_sections_list', @@ -155,10 +179,10 @@ function rcmail_user_prefs($current = null) // general case 'general': $blocks = array( - 'main' => array('name' => Q(rcube_label('mainoptions'))), - 'skin' => array('name' => Q(rcube_label('skin'))), - 'browser' => array('name' => Q(rcube_label('browseroptions'))), - 'advanced'=> array('name' => Q(rcube_label('advancedoptions'))), + 'main' => array('name' => rcube::Q($RCMAIL->gettext('mainoptions'))), + 'skin' => array('name' => rcube::Q($RCMAIL->gettext('skin'))), + 'browser' => array('name' => rcube::Q($RCMAIL->gettext('browseroptions'))), + 'advanced'=> array('name' => rcube::Q($RCMAIL->gettext('advancedoptions'))), ); // language selection @@ -175,7 +199,7 @@ function rcmail_user_prefs($current = null) $select->add(array_values($a_lang), array_keys($a_lang)); $blocks['main']['options']['language'] = array( - 'title' => html::label($field_id, Q(rcube_label('language'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('language'))), 'content' => $select->show($RCMAIL->user->language), ); } @@ -188,7 +212,7 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_timezone'; $select = new html_select(array('name' => '_timezone', 'id' => $field_id)); - $select->add(rcube_label('autodetect'), 'auto'); + $select->add($RCMAIL->gettext('autodetect'), 'auto'); $zones = array(); foreach (DateTimeZone::listIdentifiers() as $i => $tzs) { @@ -210,7 +234,7 @@ function rcmail_user_prefs($current = null) } $blocks['main']['options']['timezone'] = array( - 'title' => html::label($field_id, Q(rcube_label('timezone'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('timezone'))), 'content' => $select->show((string)$config['timezone']), ); } @@ -232,7 +256,7 @@ function rcmail_user_prefs($current = null) } $blocks['main']['options']['time_format'] = array( - 'title' => html::label($field_id, Q(rcube_label('timeformat'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('timeformat'))), 'content' => $select->show($RCMAIL->config->get('time_format')), ); } @@ -253,7 +277,7 @@ function rcmail_user_prefs($current = null) } $blocks['main']['options']['date_format'] = array( - 'title' => html::label($field_id, Q(rcube_label('dateformat'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('dateformat'))), 'content' => $select->show($config['date_format']), ); } @@ -268,7 +292,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_pretty_date', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['prettydate'] = array( - 'title' => html::label($field_id, Q(rcube_label('prettydate'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('prettydate'))), 'content' => $input->show($config['prettydate']?1:0), ); } @@ -281,16 +305,16 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_refresh_interval'; $select = new html_select(array('name' => '_refresh_interval', 'id' => $field_id)); - $select->add(rcube_label('never'), 0); + $select->add($RCMAIL->gettext('never'), 0); foreach (array(1, 3, 5, 10, 15, 30, 60) as $min) { if (!$config['min_refresh_interval'] || $config['min_refresh_interval'] <= $min * 60) { - $label = rcube_label(array('name' => 'everynminutes', 'vars' => array('n' => $min))); + $label = $RCMAIL->gettext(array('name' => 'everynminutes', 'vars' => array('n' => $min))); $select->add($label, $min); } } $blocks['main']['options']['refresh_interval'] = array( - 'title' => html::label($field_id, Q(rcube_label('refreshinterval'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('refreshinterval'))), 'content' => $select->show($config['refresh_interval']/60), ); } @@ -318,16 +342,16 @@ function rcmail_user_prefs($current = null) if (is_array($meta) && $meta['name']) { $skinname = $meta['name']; - $author_link = $meta['url'] ? html::a(array('href' => $meta['url'], 'target' => '_blank'), Q($meta['author'])) : Q($meta['author']); - $license_link = $meta['license-url'] ? html::a(array('href' => $meta['license-url'], 'target' => '_blank'), Q($meta['license'])) : Q($meta['license']); + $author_link = $meta['url'] ? html::a(array('href' => $meta['url'], 'target' => '_blank'), rcube::Q($meta['author'])) : rcube::Q($meta['author']); + $license_link = $meta['license-url'] ? html::a(array('href' => $meta['license-url'], 'target' => '_blank'), rcube::Q($meta['license'])) : rcube::Q($meta['license']); } $blocks['skin']['options'][$skin]['content'] = html::label(array('class' => 'skinselection'), html::span('skinitem', $input->show($config['skin'], array('value' => $skin, 'id' => $field_id.$skin))) . html::span('skinitem', html::img(array('src' => $thumbnail, 'class' => 'skinthumbnail', 'alt' => $skin, 'width' => 64, 'height' => 64))) . - html::span('skinitem', html::span('skinname', Q($skinname)) . html::br() . + html::span('skinitem', html::span('skinname', rcube::Q($skinname)) . html::br() . html::span('skinauthor', $author_link ? 'by ' . $author_link : '') . html::br() . - html::span('skinlicense', $license_link ? rcube_label('license').': ' . $license_link : '')) + html::span('skinlicense', $license_link ? $RCMAIL->gettext('license').': ' . $license_link : '')) ); } } @@ -344,7 +368,7 @@ function rcmail_user_prefs($current = null) $checkbox = new html_checkbox(array('name' => '_standard_windows', 'id' => $field_id, 'value' => 1)); $blocks['browser']['options']['standard_windows'] = array( - 'title' => html::label($field_id, Q(rcube_label('standardwindows'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('standardwindows'))), 'content' => $checkbox->show($config['standard_windows']?1:0), ); } @@ -352,13 +376,13 @@ function rcmail_user_prefs($current = null) if ($current) { $product_name = $RCMAIL->config->get('product_name', 'Roundcube Webmail'); $RCMAIL->output->add_script(sprintf("%s.check_protocol_handler('%s', '#mailtoprotohandler');", - JS_OBJECT_NAME, JQ($product_name)), 'foot'); + rcmail_output::JS_OBJECT_NAME, rcube::JQ($product_name)), 'foot'); } $blocks['browser']['options']['mailtoprotohandler'] = array( 'content' => html::a(array( 'href' => '#', - 'id' => 'mailtoprotohandler'), Q(rcube_label('mailtoprotohandler'))), + 'id' => 'mailtoprotohandler'), rcube::Q($RCMAIL->gettext('mailtoprotohandler'))), ); break; @@ -366,9 +390,9 @@ function rcmail_user_prefs($current = null) // Mailbox view (mail screen) case 'mailbox': $blocks = array( - 'main' => array('name' => Q(rcube_label('mainoptions'))), - 'new_message' => array('name' => Q(rcube_label('newmessage'))), - 'advanced' => array('name' => Q(rcube_label('advancedoptions'))), + 'main' => array('name' => rcube::Q($RCMAIL->gettext('mainoptions'))), + 'new_message' => array('name' => rcube::Q($RCMAIL->gettext('newmessage'))), + 'advanced' => array('name' => rcube::Q($RCMAIL->gettext('advancedoptions'))), ); // show config parameter for preview pane @@ -382,7 +406,7 @@ function rcmail_user_prefs($current = null) 'onchange' => "$('#rcmfd_preview_pane_mark_read').prop('disabled', !this.checked)")); $blocks['main']['options']['preview_pane'] = array( - 'title' => html::label($field_id, Q(rcube_label('previewpane'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('previewpane'))), 'content' => $input->show($config['preview_pane']?1:0), ); } @@ -400,16 +424,16 @@ function rcmail_user_prefs($current = null) $select = new html_select(array('name' => '_preview_pane_mark_read', 'id' => $field_id, 'disabled' => $config['preview_pane']?0:1)); - $select->add(rcube_label('never'), '-1'); - $select->add(rcube_label('immediately'), 0); + $select->add($RCMAIL->gettext('never'), '-1'); + $select->add($RCMAIL->gettext('immediately'), 0); foreach (array(5, 10, 20, 30) as $sec) { - $label = rcube_label(array('name' => 'afternseconds', 'vars' => array('n' => $sec))); + $label = $RCMAIL->gettext(array('name' => 'afternseconds', 'vars' => array('n' => $sec))); $select->add($label, $sec); } $blocks['main']['options']['preview_pane_mark_read'] = array( - 'title' => html::label($field_id, Q(rcube_label('previewpanemarkread'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('previewpanemarkread'))), 'content' => $select->show(intval($config['preview_pane_mark_read'])), ); } @@ -421,14 +445,14 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_mdn_requests'; $select = new html_select(array('name' => '_mdn_requests', 'id' => $field_id)); - $select->add(rcube_label('askuser'), 0); - $select->add(rcube_label('autosend'), 1); - $select->add(rcube_label('autosendknown'), 3); - $select->add(rcube_label('autosendknownignore'), 4); - $select->add(rcube_label('ignore'), 2); + $select->add($RCMAIL->gettext('askuser'), 0); + $select->add($RCMAIL->gettext('autosend'), 1); + $select->add($RCMAIL->gettext('autosendknown'), 3); + $select->add($RCMAIL->gettext('autosendknownignore'), 4); + $select->add($RCMAIL->gettext('ignore'), 2); $blocks['main']['options']['mdn_requests'] = array( - 'title' => html::label($field_id, Q(rcube_label('mdnrequests'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('mdnrequests'))), 'content' => $select->show($config['mdn_requests']), ); } @@ -444,12 +468,12 @@ function rcmail_user_prefs($current = null) if ($supported) { $field_id = 'rcmfd_autoexpand_threads'; $select = new html_select(array('name' => '_autoexpand_threads', 'id' => $field_id)); - $select->add(rcube_label('never'), 0); - $select->add(rcube_label('do_expand'), 1); - $select->add(rcube_label('expand_only_unread'), 2); + $select->add($RCMAIL->gettext('never'), 0); + $select->add($RCMAIL->gettext('do_expand'), 1); + $select->add($RCMAIL->gettext('expand_only_unread'), 2); $blocks['main']['options']['autoexpand_threads'] = array( - 'title' => html::label($field_id, Q(rcube_label('autoexpand_threads'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('autoexpand_threads'))), 'content' => $select->show($config['autoexpand_threads']), ); } @@ -466,7 +490,7 @@ function rcmail_user_prefs($current = null) $size = intval($config['mail_pagesize'] ? $config['mail_pagesize'] : $config['pagesize']); $blocks['main']['options']['pagesize'] = array( - 'title' => html::label($field_id, Q(rcube_label('pagesize'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('pagesize'))), 'content' => $input->show($size ? $size : 50), ); } @@ -480,7 +504,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_check_all_folders', 'id' => $field_id, 'value' => 1)); $blocks['new_message']['options']['check_all_folders'] = array( - 'title' => html::label($field_id, Q(rcube_label('checkallfolders'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('checkallfolders'))), 'content' => $input->show($config['check_all_folders']?1:0), ); } @@ -489,8 +513,8 @@ function rcmail_user_prefs($current = null) // Message viewing case 'mailview': $blocks = array( - 'main' => array('name' => Q(rcube_label('mainoptions'))), - 'advanced' => array('name' => Q(rcube_label('advancedoptions'))), + 'main' => array('name' => rcube::Q($RCMAIL->gettext('mainoptions'))), + 'advanced' => array('name' => rcube::Q($RCMAIL->gettext('advancedoptions'))), ); // show checkbox to open message view in new window @@ -503,7 +527,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_message_extwin', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['message_extwin'] = array( - 'title' => html::label($field_id, Q(rcube_label('showinextwin'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('showinextwin'))), 'content' => $input->show($config['message_extwin']?1:0), ); } @@ -518,7 +542,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_message_show_email', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['message_show_email'] = array( - 'title' => html::label($field_id, Q(rcube_label('showemail'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('showemail'))), 'content' => $input->show($config['message_show_email']?1:0), ); } @@ -534,7 +558,7 @@ function rcmail_user_prefs($current = null) 'onchange' => "$('#rcmfd_show_images').prop('disabled', !this.checked).val(0)")); $blocks['main']['options']['prefer_html'] = array( - 'title' => html::label($field_id, Q(rcube_label('preferhtml'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('preferhtml'))), 'content' => $input->show($config['prefer_html']?1:0), ); } @@ -547,7 +571,7 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_default_charset'; $blocks['advanced']['options']['default_charset'] = array( - 'title' => html::label($field_id, Q(rcube_label('defaultcharset'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('defaultcharset'))), 'content' => $RCMAIL->output->charset_selector(array( 'id' => $field_id, 'name' => '_default_charset', 'selected' => $config['default_charset'] ))); @@ -562,12 +586,12 @@ function rcmail_user_prefs($current = null) $input = new html_select(array('name' => '_show_images', 'id' => $field_id, 'disabled' => !$config['prefer_html'])); - $input->add(rcube_label('never'), 0); - $input->add(rcube_label('fromknownsenders'), 1); - $input->add(rcube_label('always'), 2); + $input->add($RCMAIL->gettext('never'), 0); + $input->add($RCMAIL->gettext('fromknownsenders'), 1); + $input->add($RCMAIL->gettext('always'), 2); $blocks['main']['options']['show_images'] = array( - 'title' => html::label($field_id, Q(rcube_label('showremoteimages'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('showremoteimages'))), 'content' => $input->show($config['prefer_html'] ? $config['show_images'] : 0), ); } @@ -581,7 +605,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_inline_images', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['inline_images'] = array( - 'title' => html::label($field_id, Q(rcube_label('showinlineimages'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('showinlineimages'))), 'content' => $input->show($config['inline_images']?1:0), ); } @@ -596,7 +620,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_display_next', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['display_next'] = array( - 'title' => html::label($field_id, Q(rcube_label('displaynext'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('displaynext'))), 'content' => $input->show($config['display_next']?1:0), ); } @@ -605,10 +629,10 @@ function rcmail_user_prefs($current = null) // Mail composition case 'compose': $blocks = array( - 'main' => array('name' => Q(rcube_label('mainoptions'))), - 'sig' => array('name' => Q(rcube_label('signatureoptions'))), - 'spellcheck' => array('name' => Q(rcube_label('spellcheckoptions'))), - 'advanced' => array('name' => Q(rcube_label('advancedoptions'))), + 'main' => array('name' => rcube::Q($RCMAIL->gettext('mainoptions'))), + 'sig' => array('name' => rcube::Q($RCMAIL->gettext('signatureoptions'))), + 'spellcheck' => array('name' => rcube::Q($RCMAIL->gettext('spellcheckoptions'))), + 'advanced' => array('name' => rcube::Q($RCMAIL->gettext('advancedoptions'))), ); // show checkbox to compose messages in a new window @@ -621,7 +645,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_compose_extwin', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['compose_extwin'] = array( - 'title' => html::label($field_id, Q(rcube_label('composeextwin'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('composeextwin'))), 'content' => $input->show($config['compose_extwin']?1:0), ); } @@ -634,13 +658,13 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_htmleditor'; $select = new html_select(array('name' => '_htmleditor', 'id' => $field_id)); - $select->add(rcube_label('never'), 0); - $select->add(rcube_label('always'), 1); - $select->add(rcube_label('htmlonreply'), 2); - $select->add(rcube_label('htmlonreplyandforward'), 3); + $select->add($RCMAIL->gettext('never'), 0); + $select->add($RCMAIL->gettext('always'), 1); + $select->add($RCMAIL->gettext('htmlonreply'), 2); + $select->add($RCMAIL->gettext('htmlonreplyandforward'), 3); $blocks['main']['options']['htmleditor'] = array( - 'title' => html::label($field_id, Q(rcube_label('htmleditor'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('htmleditor'))), 'content' => $select->show(intval($config['htmleditor'])), ); } @@ -653,14 +677,14 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_autosave'; $select = new html_select(array('name' => '_draft_autosave', 'id' => $field_id, 'disabled' => empty($config['drafts_mbox']))); - $select->add(rcube_label('never'), 0); + $select->add($RCMAIL->gettext('never'), 0); foreach (array(1, 3, 5, 10) as $i => $min) { - $label = rcube_label(array('name' => 'everynminutes', 'vars' => array('n' => $min))); + $label = $RCMAIL->gettext(array('name' => 'everynminutes', 'vars' => array('n' => $min))); $select->add($label, $min*60); } $blocks['main']['options']['draft_autosave'] = array( - 'title' => html::label($field_id, Q(rcube_label('autosavedraft'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('autosavedraft'))), 'content' => $select->show($config['draft_autosave']), ); } @@ -673,12 +697,12 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_param_folding'; $select = new html_select(array('name' => '_mime_param_folding', 'id' => $field_id)); - $select->add(rcube_label('2231folding'), 0); - $select->add(rcube_label('miscfolding'), 1); - $select->add(rcube_label('2047folding'), 2); + $select->add($RCMAIL->gettext('2231folding'), 0); + $select->add($RCMAIL->gettext('miscfolding'), 1); + $select->add($RCMAIL->gettext('2047folding'), 2); $blocks['advanced']['options']['mime_param_folding'] = array( - 'title' => html::label($field_id, Q(rcube_label('mimeparamfolding'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('mimeparamfolding'))), 'content' => $select->show($config['mime_param_folding']), ); } @@ -692,7 +716,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_force_7bit', 'id' => $field_id, 'value' => 1)); $blocks['advanced']['options']['force_7bit'] = array( - 'title' => html::label($field_id, Q(rcube_label('force7bit'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('force7bit'))), 'content' => $input->show($config['force_7bit']?1:0), ); } @@ -706,7 +730,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_mdn_default', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['mdn_default'] = array( - 'title' => html::label($field_id, Q(rcube_label('reqmdn'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('reqmdn'))), 'content' => $input->show($config['mdn_default']?1:0), ); } @@ -720,7 +744,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_dsn_default', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['dsn_default'] = array( - 'title' => html::label($field_id, Q(rcube_label('reqdsn'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('reqdsn'))), 'content' => $input->show($config['dsn_default']?1:0), ); } @@ -734,7 +758,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_reply_same_folder', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['reply_same_folder'] = array( - 'title' => html::label($field_id, Q(rcube_label('replysamefolder'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('replysamefolder'))), 'content' => $input->show($config['reply_same_folder']?1:0), ); } @@ -747,12 +771,12 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_reply_mode'; $select = new html_select(array('name' => '_reply_mode', 'id' => $field_id)); - $select->add(rcube_label('replyempty'), -1); - $select->add(rcube_label('replybottomposting'), 0); - $select->add(rcube_label('replytopposting'), 1); + $select->add($RCMAIL->gettext('replyempty'), -1); + $select->add($RCMAIL->gettext('replybottomposting'), 0); + $select->add($RCMAIL->gettext('replytopposting'), 1); $blocks['main']['options']['reply_mode'] = array( - 'title' => html::label($field_id, Q(rcube_label('whenreplying'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('whenreplying'))), 'content' => $select->show(intval($config['reply_mode'])), ); } @@ -766,7 +790,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_spellcheck_before_send', 'id' => $field_id, 'value' => 1)); $blocks['spellcheck']['options']['spellcheck_before_send'] = array( - 'title' => html::label($field_id, Q(rcube_label('spellcheckbeforesend'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('spellcheckbeforesend'))), 'content' => $input->show($config['spellcheck_before_send']?1:0), ); } @@ -782,7 +806,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_'.$key, 'id' => 'rcmfd_'.$key, 'value' => 1)); $blocks['spellcheck']['options'][$key] = array( - 'title' => html::label($field_id, Q(rcube_label(str_replace('_', '', $key)))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext(str_replace('_', '', $key)))), 'content' => $input->show($config[$key]?1:0), ); } @@ -797,13 +821,13 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_show_sig'; $select = new html_select(array('name' => '_show_sig', 'id' => $field_id)); - $select->add(rcube_label('never'), 0); - $select->add(rcube_label('always'), 1); - $select->add(rcube_label('newmessageonly'), 2); - $select->add(rcube_label('replyandforwardonly'), 3); + $select->add($RCMAIL->gettext('never'), 0); + $select->add($RCMAIL->gettext('always'), 1); + $select->add($RCMAIL->gettext('newmessageonly'), 2); + $select->add($RCMAIL->gettext('replyandforwardonly'), 3); $blocks['sig']['options']['show_sig'] = array( - 'title' => html::label($field_id, Q(rcube_label('autoaddsignature'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('autoaddsignature'))), 'content' => $select->show($RCMAIL->config->get('show_sig', 1)), ); } @@ -817,7 +841,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_strip_existing_sig', 'id' => $field_id, 'value' => 1)); $blocks['sig']['options']['strip_existing_sig'] = array( - 'title' => html::label($field_id, Q(rcube_label('replyremovesignature'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('replyremovesignature'))), 'content' => $input->show($config['strip_existing_sig']?1:0), ); } @@ -830,11 +854,11 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_forward_attachment'; $select = new html_select(array('name' => '_forward_attachment', 'id' => $field_id)); - $select->add(rcube_label('inline'), 0); - $select->add(rcube_label('asattachment'), 1); + $select->add($RCMAIL->gettext('inline'), 0); + $select->add($RCMAIL->gettext('asattachment'), 1); $blocks['main']['options']['forward_attachment'] = array( - 'title' => html::label($field_id, Q(rcube_label('forwardmode'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('forwardmode'))), 'content' => $select->show(intval($config['forward_attachment'])), ); } @@ -858,24 +882,42 @@ function rcmail_user_prefs($current = null) $select_default_font = new html_select(array('name' => '_default_font', 'id' => $field_id)); $select_default_font->add('', ''); - $fonts = rcube_fontdefs(); + $fonts = rcmail::font_defs(); foreach ($fonts as $fname => $font) { $select_default_font->add($fname, $fname); } $blocks['main']['options']['default_font'] = array( - 'title' => html::label($field_id, Q(rcube_label('defaultfont'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('defaultfont'))), 'content' => $select_default_font->show($RCMAIL->config->get('default_font', 1)) . $select_default_font_size->show($RCMAIL->config->get('default_font_size', 1)) ); } + + if (!isset($no_override['reply_all_mode'])) { + if (!$current) { + continue 2; + } + + $field_id = 'rcmfd_reply_all_mode'; + $select = new html_select(array('name' => '_reply_all_mode', 'id' => $field_id)); + + $select->add($RCMAIL->gettext('replyalldefault'), 0); + $select->add($RCMAIL->gettext('replyalllist'), 1); + + $blocks['main']['options']['reply_all_mode'] = array( + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('replyallmode'))), + 'content' => $select->show(intval($config['reply_all_mode'])), + ); + } + break; // Addressbook config case 'addressbook': $blocks = array( - 'main' => array('name' => Q(rcube_label('mainoptions'))), - 'advanced' => array('name' => Q(rcube_label('advancedoptions'))), + 'main' => array('name' => rcube::Q($RCMAIL->gettext('mainoptions'))), + 'advanced' => array('name' => rcube::Q($RCMAIL->gettext('advancedoptions'))), ); if (!isset($no_override['default_addressbook']) @@ -893,7 +935,7 @@ function rcmail_user_prefs($current = null) } $blocks['main']['options']['default_addressbook'] = array( - 'title' => html::label($field_id, Q(rcube_label('defaultabook'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('defaultabook'))), 'content' => $select->show($config['default_addressbook']), ); } @@ -907,13 +949,13 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_addressbook_name_listing'; $select = new html_select(array('name' => '_addressbook_name_listing', 'id' => $field_id)); - $select->add(rcube_label('name'), 0); - $select->add(rcube_label('firstname') . ' ' . rcube_label('surname'), 1); - $select->add(rcube_label('surname') . ' ' . rcube_label('firstname'), 2); - $select->add(rcube_label('surname') . ', ' . rcube_label('firstname'), 3); + $select->add($RCMAIL->gettext('name'), 0); + $select->add($RCMAIL->gettext('firstname') . ' ' . $RCMAIL->gettext('surname'), 1); + $select->add($RCMAIL->gettext('surname') . ' ' . $RCMAIL->gettext('firstname'), 2); + $select->add($RCMAIL->gettext('surname') . ', ' . $RCMAIL->gettext('firstname'), 3); $blocks['main']['options']['list_name_listing'] = array( - 'title' => html::label($field_id, Q(rcube_label('listnamedisplay'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('listnamedisplay'))), 'content' => $select->show($config['addressbook_name_listing']), ); } @@ -927,12 +969,12 @@ function rcmail_user_prefs($current = null) $field_id = 'rcmfd_addressbook_sort_col'; $select = new html_select(array('name' => '_addressbook_sort_col', 'id' => $field_id)); - $select->add(rcube_label('name'), 'name'); - $select->add(rcube_label('firstname'), 'firstname'); - $select->add(rcube_label('surname'), 'surname'); + $select->add($RCMAIL->gettext('name'), 'name'); + $select->add($RCMAIL->gettext('firstname'), 'firstname'); + $select->add($RCMAIL->gettext('surname'), 'surname'); $blocks['main']['options']['sort_col'] = array( - 'title' => html::label($field_id, Q(rcube_label('listsorting'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('listsorting'))), 'content' => $select->show($config['addressbook_sort_col']), ); } @@ -948,7 +990,7 @@ function rcmail_user_prefs($current = null) $size = intval($config['addressbook_pagesize'] ? $config['addressbook_pagesize'] : $config['pagesize']); $blocks['main']['options']['pagesize'] = array( - 'title' => html::label($field_id, Q(rcube_label('pagesize'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('pagesize'))), 'content' => $input->show($size ? $size : 50), ); } @@ -962,7 +1004,7 @@ function rcmail_user_prefs($current = null) $checkbox = new html_checkbox(array('name' => '_autocomplete_single', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['autocomplete_single'] = array( - 'title' => html::label($field_id, Q(rcube_label('autocompletesingle'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('autocompletesingle'))), 'content' => $checkbox->show($config['autocomplete_single']?1:0), ); } @@ -971,8 +1013,8 @@ function rcmail_user_prefs($current = null) // Special IMAP folders case 'folders': $blocks = array( - 'main' => array('name' => Q(rcube_label('mainoptions'))), - 'advanced' => array('name' => Q(rcube_label('advancedoptions'))), + 'main' => array('name' => rcube::Q($RCMAIL->gettext('mainoptions'))), + 'advanced' => array('name' => rcube::Q($RCMAIL->gettext('advancedoptions'))), ); if (!isset($no_override['show_real_foldernames'])) { @@ -984,14 +1026,14 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_show_real_foldernames', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['show_real_foldernames'] = array( - 'title' => html::label($field_id, Q(rcube_label('show_real_foldernames'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('show_real_foldernames'))), 'content' => $input->show($config['show_real_foldernames']?1:0), ); } // Configure special folders if (!isset($no_override['default_folders']) && $current) { - $select = rcmail_mailbox_select(array( + $select = $RCMAIL->folder_selector(array( 'noselection' => '---', 'realnames' => true, 'maxlength' => 30, @@ -1009,7 +1051,7 @@ function rcmail_user_prefs($current = null) } $blocks['main']['options']['drafts_mbox'] = array( - 'title' => Q(rcube_label('drafts')), + 'title' => rcube::Q($RCMAIL->gettext('drafts')), 'content' => $select->show($config['drafts_mbox'], array('name' => "_drafts_mbox", 'onchange' => $onchange)), ); } @@ -1020,7 +1062,7 @@ function rcmail_user_prefs($current = null) } $blocks['main']['options']['sent_mbox'] = array( - 'title' => Q(rcube_label('sent')), + 'title' => rcube::Q($RCMAIL->gettext('sent')), 'content' => $select->show($config['sent_mbox'], array('name' => "_sent_mbox", 'onchange' => '')), ); } @@ -1031,7 +1073,7 @@ function rcmail_user_prefs($current = null) } $blocks['main']['options']['junk_mbox'] = array( - 'title' => Q(rcube_label('junk')), + 'title' => rcube::Q($RCMAIL->gettext('junk')), 'content' => $select->show($config['junk_mbox'], array('name' => "_junk_mbox", 'onchange' => $onchange)), ); } @@ -1042,7 +1084,7 @@ function rcmail_user_prefs($current = null) } $blocks['main']['options']['trash_mbox'] = array( - 'title' => Q(rcube_label('trash')), + 'title' => rcube::Q($RCMAIL->gettext('trash')), 'content' => $select->show($config['trash_mbox'], array('name' => "_trash_mbox", 'onchange' => $onchange)), ); } @@ -1051,9 +1093,9 @@ function rcmail_user_prefs($current = null) // Server settings case 'server': $blocks = array( - 'main' => array('name' => Q(rcube_label('mainoptions'))), - 'maintenance' => array('name' => Q(rcube_label('maintenance'))), - 'advanced' => array('name' => Q(rcube_label('advancedoptions'))), + 'main' => array('name' => rcube::Q($RCMAIL->gettext('mainoptions'))), + 'maintenance' => array('name' => rcube::Q($RCMAIL->gettext('maintenance'))), + 'advanced' => array('name' => rcube::Q($RCMAIL->gettext('advancedoptions'))), ); if (!isset($no_override['read_when_deleted'])) { @@ -1065,7 +1107,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_read_when_deleted', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['read_when_deleted'] = array( - 'title' => html::label($field_id, Q(rcube_label('readwhendeleted'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('readwhendeleted'))), 'content' => $input->show($config['read_when_deleted']?1:0), ); } @@ -1079,7 +1121,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_flag_for_deletion', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['flag_for_deletion'] = array( - 'title' => html::label($field_id, Q(rcube_label('flagfordeletion'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('flagfordeletion'))), 'content' => $input->show($config['flag_for_deletion']?1:0), ); } @@ -1094,7 +1136,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_skip_deleted', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['skip_deleted'] = array( - 'title' => html::label($field_id, Q(rcube_label('skipdeleted'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('skipdeleted'))), 'content' => $input->show($config['skip_deleted']?1:0), ); } @@ -1108,7 +1150,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_delete_always', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['delete_always'] = array( - 'title' => html::label($field_id, Q(rcube_label('deletealways'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('deletealways'))), 'content' => $input->show($config['delete_always']?1:0), ); } @@ -1122,7 +1164,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_delete_junk', 'id' => $field_id, 'value' => 1)); $blocks['main']['options']['delete_junk'] = array( - 'title' => html::label($field_id, Q(rcube_label('deletejunk'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('deletejunk'))), 'content' => $input->show($config['delete_junk']?1:0), ); } @@ -1137,7 +1179,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_logout_purge', 'id' => $field_id, 'value' => 1)); $blocks['maintenance']['options']['logout_purge'] = array( - 'title' => html::label($field_id, Q(rcube_label('logoutclear'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('logoutclear'))), 'content' => $input->show($config['logout_purge']?1:0), ); } @@ -1152,7 +1194,7 @@ function rcmail_user_prefs($current = null) $input = new html_checkbox(array('name' => '_logout_expunge', 'id' => $field_id, 'value' => 1)); $blocks['maintenance']['options']['logout_expunge'] = array( - 'title' => html::label($field_id, Q(rcube_label('logoutcompact'))), + 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('logoutcompact'))), 'content' => $input->show($config['logout_expunge']?1:0), ); } @@ -1162,14 +1204,31 @@ function rcmail_user_prefs($current = null) $data = $RCMAIL->plugins->exec_hook('preferences_list', array('section' => $sect['id'], 'blocks' => $blocks, 'current' => $current)); + $advanced_prefs = (array) $RCMAIL->config->get('advanced_prefs'); + // create output - foreach ($data['blocks'] as $block) { + foreach ($data['blocks'] as $key => $block) { if (!empty($block['content']) || !empty($block['options'])) { $found = true; - break; + } + // move some options to the 'advanced' block as configured by admin + if ($key != 'advanced') { + foreach ($advanced_prefs as $opt) { + if ($block['options'][$opt]) { + $data['blocks']['advanced']['options'][$opt] = $block['options'][$opt]; + unset($data['blocks'][$key]['options'][$opt]); + } + } } } + // move 'advanced' block to the end of the list + if (!empty($data['blocks']['advanced'])) { + $adv = $data['blocks']['advanced']; + unset($data['blocks']['advanced']); + $data['blocks']['advanced'] = $adv; + } + if (!$found) unset($sections[$idx]); else @@ -1230,20 +1289,22 @@ function rcmail_update_folder_row($name, $oldname=null, $subscribe=false, $class $storage = $RCMAIL->get_storage(); $delimiter = $storage->get_hierarchy_delimiter(); - $name_utf8 = rcube_charset_convert($name, 'UTF7-IMAP'); + $name_utf8 = rcube_charset::convert($name, 'UTF7-IMAP'); $protected = $protect_folders && in_array($name, $default_folders); $foldersplit = explode($delimiter, $storage->mod_folder($name)); $level = count($foldersplit) - 1; $display_name = str_repeat(' ', $level) - . Q($protected ? rcmail_localize_foldername($name) : rcube_charset_convert($foldersplit[$level], 'UTF7-IMAP')); + . rcube::Q($protected ? $RCMAIL->localize_foldername($name) : rcube_charset::convert($foldersplit[$level], 'UTF7-IMAP')); - if ($oldname === null) + if ($oldname === null) { $OUTPUT->command('add_folder_row', $name_utf8, $display_name, $protected, $subscribe, false, $class_name); - else - $OUTPUT->command('replace_folder_row', rcube_charset_convert($oldname, 'UTF7-IMAP'), + } + else { + $OUTPUT->command('replace_folder_row', rcube_charset::convert($oldname, 'UTF7-IMAP'), $name_utf8, $display_name, $protected, $class_name); + } } /** @@ -1260,17 +1321,18 @@ function rcmail_settings_tabs($attrib) array('command' => 'preferences', 'type' => 'link', 'label' => 'preferences', 'title' => 'editpreferences'), array('command' => 'folders', 'type' => 'link', 'label' => 'folders', 'title' => 'managefolders'), array('command' => 'identities', 'type' => 'link', 'label' => 'identities', 'title' => 'manageidentities'), + array('command' => 'responses', 'type' => 'link', 'label' => 'responses', 'title' => 'editresponses'), ); // get all identites from DB and define list of cols to be displayed $plugin = $RCMAIL->plugins->exec_hook('settings_actions', array( 'actions' => $default_actions, - 'attrib' => $attrib, + 'attrib' => $attrib, )); - $attrib = $plugin['attrib']; + $attrib = $plugin['attrib']; $tagname = $attrib['tagname']; - $tabs = array(); + $tabs = array(); foreach ($plugin['actions'] as $k => $action) { if (!$action['command'] && !$action['href'] && $action['action']) { @@ -1278,13 +1340,15 @@ function rcmail_settings_tabs($attrib) } $button = $OUTPUT->button($action); - $attr = $attrib; + $attr = $attrib; $cmd = $action['action'] ? $action['action'] : $action['command']; - $id = $action['id'] ? $action['id'] : $cmd; + $id = $action['id'] ? $action['id'] : $cmd; + if (!empty($id)) { $attr['id'] = preg_replace('/[^a-z0-9]/i', '', $attrib['idprefix'] . $id); } + $classnames = array($attrib['class']); if (!empty($action['class'])) { $classnames[] = $action['class']; @@ -1295,30 +1359,10 @@ function rcmail_settings_tabs($attrib) if ($RCMAIL->action == $cmd) { $classnames[] = $attrib['selclass']; } + $attr['class'] = join(' ', $classnames); $tabs[] = html::tag($tagname, $attr, $button, html::$common_attrib); } return join('', $tabs); } - - -// register UI objects -$OUTPUT->add_handlers(array( - 'settingstabs' => 'rcmail_settings_tabs', - 'prefsframe' => 'rcmail_preferences_frame', - 'sectionslist' => 'rcmail_sections_list', - 'identitieslist' => 'rcmail_identities_list', -)); - -// register action aliases -$RCMAIL->register_action_map(array( - 'folders' => 'folders.inc', - 'rename-folder' => 'folders.inc', - 'delete-folder' => 'folders.inc', - 'subscribe' => 'folders.inc', - 'unsubscribe' => 'folders.inc', - 'purge' => 'folders.inc', - 'folder-size' => 'folders.inc', - 'add-identity' => 'edit_identity.inc', -)); diff --git a/program/steps/settings/identities.inc b/program/steps/settings/identities.inc index 82a1841a3..e19c16c79 100644 --- a/program/steps/settings/identities.inc +++ b/program/steps/settings/identities.inc @@ -5,7 +5,7 @@ | program/steps/settings/identities.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2007, The Roundcube Dev Team | + | 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. | @@ -21,23 +21,24 @@ define('IDENTITIES_LEVEL', intval($RCMAIL->config->get('identities_level', 0))); -$OUTPUT->set_pagetitle(rcube_label('identities')); +$OUTPUT->set_pagetitle($RCMAIL->gettext('identities')); $OUTPUT->include_script('list.js'); - -// similar function as /steps/addressbook/func.inc::rcmail_contact_frame() -function rcmail_identity_frame($attrib) - { - global $OUTPUT; - - if (!$attrib['id']) - $attrib['id'] = 'rcmIdentityFrame'; - - return $OUTPUT->frame($attrib, true); - } - $OUTPUT->add_handler('identityframe', 'rcmail_identity_frame'); $OUTPUT->set_env('identities_level', IDENTITIES_LEVEL); $OUTPUT->add_label('deleteidentityconfirm'); $OUTPUT->send('identities'); + + +// similar function as /steps/addressbook/func.inc::rcmail_contact_frame() +function rcmail_identity_frame($attrib) +{ + global $OUTPUT; + + if (!$attrib['id']) { + $attrib['id'] = 'rcmIdentityFrame'; + } + + return $OUTPUT->frame($attrib, true); +} diff --git a/program/steps/settings/responses.inc b/program/steps/settings/responses.inc new file mode 100644 index 000000000..06093b3b8 --- /dev/null +++ b/program/steps/settings/responses.inc @@ -0,0 +1,133 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | program/steps/settings/responses.inc | + | | + | This file is part of the Roundcube Webmail client | + | Copyright (C) 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: | + | Manage and save canned response texts | + | | + +-----------------------------------------------------------------------+ + | Author: Thomas Bruederli <roundcube@gmail.com> | + +-----------------------------------------------------------------------+ +*/ + + +if (!empty($_POST['_insert'])) { + $name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST)); + $text = trim(rcube_utils::get_input_value('_text', rcube_utils::INPUT_POST, true)); + + if (!empty($name) && !empty($text)) { + $dupes = 0; + $responses = $RCMAIL->get_compose_responses(false, true); + foreach ($responses as $resp) { + if (strcasecmp($name, preg_replace('/\s\(\d+\)$/', '', $resp['name'])) == 0) + $dupes++; + } + if ($dupes) { // require a unique name + $name .= ' (' . ++$dupes . ')'; + } + + $response = array('name' => $name, 'text' => $text, 'format' => 'text', 'key' => substr(md5($name), 0, 16)); + $responses[] = $response; + + if ($RCMAIL->user->save_prefs(array('compose_responses' => $responses))) { + $RCMAIL->output->command('add_response_item', $response); + $RCMAIL->output->command('display_message', $RCMAIL->gettext('successfullysaved'), 'confirmation'); + } + else { + $RCMAIL->output->command('display_message', $RCMAIL->gettext('errorsaving'), 'error'); + } + } + + // send response + $RCMAIL->output->send(); +} + +if ($RCMAIL->action == 'delete-response') { + if ($key = rcube_utils::get_input_value('_key', rcube_utils::INPUT_GPC)) { + $responses = $RCMAIL->get_compose_responses(false, true); + foreach ($responses as $i => $response) { + if (empty($response['key'])) + $response['key'] = substr(md5($response['name']), 0, 16); + if ($response['key'] == $key) { + unset($responses[$i]); + $deleted = $RCMAIL->user->save_prefs(array('compose_responses' => $responses)); + break; + } + } + } + + if ($deleted) { + $RCMAIL->output->command('display_message', $RCMAIL->gettext('deletedsuccessfully'), 'confirmation'); + $RCMAIL->output->command('remove_response', $key); + } + + if ($RCMAIL->output->ajax_call) { + $RCMAIL->output->send(); + } +} + + +$OUTPUT->set_pagetitle($RCMAIL->gettext('responses')); +$OUTPUT->include_script('list.js'); + +$OUTPUT->add_handlers(array( + 'responseframe' => 'rcmail_response_frame', + 'responseslist' => 'rcmail_responses_list', +)); +$OUTPUT->add_label('deleteresponseconfirm'); + +$OUTPUT->send('responses'); + + +/** + * + */ +function rcmail_responses_list($attrib) +{ + global $RCMAIL, $OUTPUT; + + $attrib += array('id' => 'rcmresponseslist', 'tagname' => 'table', 'cols' => 1); + + $plugin = $RCMAIL->plugins->exec_hook('responses_list', array( + 'list' => $RCMAIL->get_compose_responses(true), + 'cols' => array('name') + )); + + $out = $RCMAIL->table_output($attrib, $plugin['list'], $plugin['cols'], 'key'); + + $readonly_responses = array(); + foreach ($plugin['list'] as $item) { + if (!empty($item['static'])) { + $readonly_responses[] = $item['key']; + } + } + + // set client env + $OUTPUT->add_gui_object('responseslist', $attrib['id']); + $OUTPUT->set_env('readonly_responses', $readonly_responses); + + return $out; +} + +// similar function as /steps/addressbook/func.inc::rcmail_contact_frame() +function rcmail_response_frame($attrib) +{ + global $OUTPUT; + + if (!$attrib['id']) { + $attrib['id'] = 'rcmResponseFrame'; + } + + $OUTPUT->set_env('contentframe', $attrib['id']); + + return $OUTPUT->frame($attrib, true); +} diff --git a/program/steps/settings/save_folder.inc b/program/steps/settings/save_folder.inc index 877b0fbbe..d1449bb38 100644 --- a/program/steps/settings/save_folder.inc +++ b/program/steps/settings/save_folder.inc @@ -1,11 +1,11 @@ <?php -/** +/* +-----------------------------------------------------------------------+ | program/steps/settings/save_folder.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | 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. | @@ -19,18 +19,17 @@ +-----------------------------------------------------------------------+ */ -// WARNING: folder names in UI are encoded with RCMAIL_CHARSET +// WARNING: folder names in UI are encoded with RCUBE_CHARSET // init IMAP connection $STORAGE = $RCMAIL->get_storage(); +$name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true)); +$old = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true); +$path = rcube_utils::get_input_value('_parent', rcube_utils::INPUT_POST, true); -$name = trim(get_input_value('_name', RCUBE_INPUT_POST, true)); -$old = trim(get_input_value('_mbox', RCUBE_INPUT_POST, true)); -$path = trim(get_input_value('_parent', RCUBE_INPUT_POST, true)); - -$name_imap = rcube_charset_convert($name, RCMAIL_CHARSET, 'UTF7-IMAP'); -$old_imap = rcube_charset_convert($old, RCMAIL_CHARSET, 'UTF7-IMAP'); +$name_imap = rcube_charset::convert($name, RCUBE_CHARSET, 'UTF7-IMAP'); +$old_imap = rcube_charset::convert($old, RCUBE_CHARSET, 'UTF7-IMAP'); // $path is in UTF7-IMAP already $delimiter = $STORAGE->get_hierarchy_delimiter(); @@ -40,16 +39,16 @@ $options = strlen($old_imap) ? rcmail_folder_options($old_imap) : array(); if ($options['protected'] || $options['norename']) { } else if (!strlen($name)) { - $error = rcube_label('cannotbeempty'); + $error = $RCMAIL->gettext('namecannotbeempty'); } else if (mb_strlen($name) > 128) { - $error = rcube_label('nametoolong'); + $error = $RCMAIL->gettext('nametoolong'); } else { // these characters are problematic e.g. when used in LIST/LSUB foreach (array($delimiter, '%', '*') as $char) { if (strpos($name, $delimiter) !== false) { - $error = rcube_label('forbiddencharacter') . " ($char)"; + $error = $RCMAIL->gettext('forbiddencharacter') . " ($char)"; break; } } @@ -76,7 +75,7 @@ if (!$error && strlen($path) && (!strlen($old_imap) || $old_imap != $name_imap)) if ($parent_opts['namespace'] != 'personal' && (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts['rights']))) ) { - $error = rcube_label('parentnotwritable'); + $error = $RCMAIL->gettext('parentnotwritable'); } } @@ -90,15 +89,14 @@ else { $folder['options'] = $options; $folder['settings'] = array( // List view mode: 0-list, 1-threads - 'view_mode' => (int) get_input_value('_viewmode', RCUBE_INPUT_POST), - 'sort_column' => get_input_value('_sortcol', RCUBE_INPUT_POST), - 'sort_order' => get_input_value('_sortord', RCUBE_INPUT_POST), + 'view_mode' => (int) rcube_utils::get_input_value('_viewmode', rcube_utils::INPUT_POST), + 'sort_column' => rcube_utils::get_input_value('_sortcol', rcube_utils::INPUT_POST), + 'sort_order' => rcube_utils::get_input_value('_sortord', rcube_utils::INPUT_POST), ); } // create a new mailbox if (!$error && !strlen($old)) { - $folder['subscribe'] = true; $plugin = $RCMAIL->plugins->exec_hook('folder_create', array('record' => $folder)); @@ -136,7 +134,6 @@ if (!$error && !strlen($old)) { $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error', null, false); } } - // update a mailbox else if (!$error) { $plugin = $RCMAIL->plugins->exec_hook('folder_update', array('record' => $folder)); @@ -192,6 +189,9 @@ else if (!$error) { rcmail_update_folder_row($folder['name'], $folder['oldname'], $folder['subscribe'], $folder['class']); $OUTPUT->send('iframe'); } + else if (!empty($folder['class'])) { + rcmail_update_folder_row($folder['name'], $folder['oldname'], $folder['subscribe'], $folder['class']); + } } else { // show error message @@ -199,4 +199,4 @@ else if (!$error) { } } -rcmail_overwrite_action('edit-folder'); +$RCMAIL->overwrite_action('edit-folder'); diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc index d3b132f8b..1584c5f00 100644 --- a/program/steps/settings/save_identity.inc +++ b/program/steps/settings/save_identity.inc @@ -5,7 +5,7 @@ | program/steps/settings/save_identity.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -21,161 +21,173 @@ define('IDENTITIES_LEVEL', intval($RCMAIL->config->get('identities_level', 0))); -$a_save_cols = array('name', 'email', 'organization', 'reply-to', 'bcc', 'standard', 'signature', 'html_signature'); +$a_save_cols = array('name', 'email', 'organization', 'reply-to', 'bcc', 'standard', 'signature', 'html_signature'); $a_boolean_cols = array('standard', 'html_signature'); $updated = $default_id = false; // check input if (IDENTITIES_LEVEL != 4 && (empty($_POST['_name']) || (empty($_POST['_email']) && IDENTITIES_LEVEL != 1 && IDENTITIES_LEVEL != 3))) { - $OUTPUT->show_message('formincomplete', 'warning'); - rcmail_overwrite_action('edit-identity'); - return; + $OUTPUT->show_message('formincomplete', 'warning'); + $RCMAIL->overwrite_action('edit-identity'); + return; } $save_data = array(); foreach ($a_save_cols as $col) { - $fname = '_'.$col; - if (isset($_POST[$fname])) - $save_data[$col] = get_input_value($fname, RCUBE_INPUT_POST, true); + $fname = '_'.$col; + if (isset($_POST[$fname])) { + $save_data[$col] = rcube_utils::get_input_value($fname, rcube_utils::INPUT_POST, true); + } } // set "off" values for checkboxes that were not checked, and therefore // not included in the POST body. foreach ($a_boolean_cols as $col) { - $fname = '_' . $col; - if (!isset($_POST[$fname])) - $save_data[$col] = 0; + $fname = '_' . $col; + if (!isset($_POST[$fname])) { + $save_data[$col] = 0; + } } // unset email address if user has no rights to change it if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) { - unset($save_data['email']); + unset($save_data['email']); } // unset all fields except signature else if (IDENTITIES_LEVEL == 4) { - foreach ($save_data as $idx => $value) { - if ($idx != 'signature' && $idx != 'html_signature') { - unset($save_data[$idx]); + foreach ($save_data as $idx => $value) { + if ($idx != 'signature' && $idx != 'html_signature') { + unset($save_data[$idx]); + } } - } } // Validate e-mail addresses -$email_checks = array(rcube_idn_to_ascii($save_data['email'])); +$email_checks = array(rcube_utils::idn_to_ascii($save_data['email'])); foreach (array('reply-to', 'bcc') as $item) { - foreach (rcube_mime::decode_address_list($save_data[$item], null, false) as $rcpt) - $email_checks[] = rcube_idn_to_ascii($rcpt['mailto']); + foreach (rcube_mime::decode_address_list($save_data[$item], null, false) as $rcpt) { + $email_checks[] = rcube_utils::idn_to_ascii($rcpt['mailto']); + } } foreach ($email_checks as $email) { - if ($email && !check_email($email)) { - // show error message - $OUTPUT->show_message('emailformaterror', 'error', array('email' => rcube_idn_to_utf8($email)), false); - rcmail_overwrite_action('edit-identity'); - return; - } + if ($email && !rcube_utils::check_email($email)) { + // show error message + $OUTPUT->show_message('emailformaterror', 'error', array('email' => rcube_utils::idn_to_utf8($email)), false); + $RCMAIL->overwrite_action('edit-identity'); + return; + } } // XSS protection in HTML signature (#1489251) if (!empty($save_data['signature']) && !empty($save_data['html_signature'])) { - $save_data['signature'] = rcmail_wash_html($save_data['signature']); + $save_data['signature'] = rcmail_wash_html($save_data['signature']); - // clear POST data of signature, we want to use safe content - // when the form is displayed again - unset($_POST['_signature']); + // clear POST data of signature, we want to use safe content + // when the form is displayed again + unset($_POST['_signature']); } // update an existing contact if ($_POST['_iid']) { - $iid = get_input_value('_iid', RCUBE_INPUT_POST); - - if (in_array(IDENTITIES_LEVEL, array(1,3,4))) { - // merge with old identity data, fixes #1488834 - $identity = $RCMAIL->user->get_identity($iid); - $save_data = array_merge($identity, $save_data); - unset($save_data['changed'], $save_data['del'], $save_data['user_id'], $save_data['identity_id']); - } - - $plugin = $RCMAIL->plugins->exec_hook('identity_update', array('id' => $iid, 'record' => $save_data)); - $save_data = $plugin['record']; - - if ($save_data['email']) - $save_data['email'] = rcube_idn_to_ascii($save_data['email']); - if (!$plugin['abort']) - $updated = $RCMAIL->user->update_identity($iid, $save_data); - else - $updated = $plugin['result']; - - if ($updated) { - $OUTPUT->show_message('successfullysaved', 'confirmation'); - - if (!empty($save_data['standard'])) - $default_id = $iid; - - if ($_POST['_framed']) { - // update the changed col in list - $OUTPUT->command('parent.update_identity_row', $iid, Q(trim($save_data['name'] . ' <' . rcube_idn_to_utf8($save_data['email']) .'>'))); + $iid = rcube_utils::get_input_value('_iid', rcube_utils::INPUT_POST); + + if (in_array(IDENTITIES_LEVEL, array(1,3,4))) { + // merge with old identity data, fixes #1488834 + $identity = $RCMAIL->user->get_identity($iid); + $save_data = array_merge($identity, $save_data); + + unset($save_data['changed'], $save_data['del'], $save_data['user_id'], $save_data['identity_id']); } - } - else { - // show error message - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error', null, false); - rcmail_overwrite_action('edit-identity'); - return; - } -} + $plugin = $RCMAIL->plugins->exec_hook('identity_update', array('id' => $iid, 'record' => $save_data)); + $save_data = $plugin['record']; + + if ($save_data['email']) { + $save_data['email'] = rcube_utils::idn_to_ascii($save_data['email']); + } + + if (!$plugin['abort']) + $updated = $RCMAIL->user->update_identity($iid, $save_data); + else + $updated = $plugin['result']; + + if ($updated) { + $OUTPUT->show_message('successfullysaved', 'confirmation'); + + if (!empty($save_data['standard'])) { + $default_id = $iid; + } + + if ($_POST['_framed']) { + // update the changed col in list + $name = $save_data['name'] . ' <' . rcube_utils::idn_to_utf8($save_data['email']) .'>'; + $OUTPUT->command('parent.update_identity_row', $iid, rcube::Q(trim($name))); + } + } + else { + // show error message + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error', null, false); + $RCMAIL->overwrite_action('edit-identity'); + return; + } +} // insert a new identity record else if (IDENTITIES_LEVEL < 2) { - if (IDENTITIES_LEVEL == 1) { - $save_data['email'] = $RCMAIL->get_user_email(); - } + if (IDENTITIES_LEVEL == 1) { + $save_data['email'] = $RCMAIL->get_user_email(); + } - $plugin = $RCMAIL->plugins->exec_hook('identity_create', array('record' => $save_data)); - $save_data = $plugin['record']; + $plugin = $RCMAIL->plugins->exec_hook('identity_create', array('record' => $save_data)); + $save_data = $plugin['record']; - if ($save_data['email']) - $save_data['email'] = rcube_idn_to_ascii($save_data['email']); + if ($save_data['email']) { + $save_data['email'] = rcube_utils::idn_to_ascii($save_data['email']); + } - if (!$plugin['abort']) - $insert_id = $save_data['email'] ? $RCMAIL->user->insert_identity($save_data) : null; - else - $insert_id = $plugin['result']; + if (!$plugin['abort']) + $insert_id = $save_data['email'] ? $RCMAIL->user->insert_identity($save_data) : null; + else + $insert_id = $plugin['result']; - if ($insert_id) { - $OUTPUT->show_message('successfullysaved', 'confirmation', null, false); + if ($insert_id) { + $OUTPUT->show_message('successfullysaved', 'confirmation', null, false); - $_GET['_iid'] = $insert_id; + $_GET['_iid'] = $insert_id; - if (!empty($save_data['standard'])) - $default_id = $insert_id; + if (!empty($save_data['standard'])) { + $default_id = $insert_id; + } - if ($_POST['_framed']) { - // add a new row to the list - $OUTPUT->command('parent.update_identity_row', $insert_id, Q(trim($save_data['name'] . ' <' . rcube_idn_to_utf8($save_data['email']) .'>')), true); + if ($_POST['_framed']) { + // add a new row to the list + $name = $save_data['name'] . ' <' . rcube_utils::idn_to_utf8($save_data['email']) .'>'; + $OUTPUT->command('parent.update_identity_row', $insert_id, rcube::Q(trim($name)), true); + } + } + else { + // show error message + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error', null, false); + $RCMAIL->overwrite_action('edit-identity'); + return; } - } - else { - // show error message - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error', null, false); - rcmail_overwrite_action('edit-identity'); - return; - } } -else - $OUTPUT->show_message('opnotpermitted', 'error'); - +else { + $OUTPUT->show_message('opnotpermitted', 'error'); +} // mark all other identities as 'not-default' -if ($default_id) - $RCMAIL->user->set_default($default_id); +if ($default_id) { + $RCMAIL->user->set_default($default_id); +} // go to next step if (!empty($_REQUEST['_framed'])) { - rcmail_overwrite_action('edit-identity'); + $RCMAIL->overwrite_action('edit-identity'); +} +else { + $RCMAIL->overwrite_action('identities'); } -else - rcmail_overwrite_action('identities'); /** @@ -185,16 +197,16 @@ function rcmail_wash_html($html) { // Add header with charset spec., washtml cannot work without that $html = '<html><head>' - . '<meta http-equiv="Content-Type" content="text/html; charset='.RCMAIL_CHARSET.'" />' + . '<meta http-equiv="Content-Type" content="text/html; charset='.RCUBE_CHARSET.'" />' . '</head><body>' . $html . '</body></html>'; // clean HTML with washhtml by Frederic Motte $wash_opts = array( - 'show_washed' => false, - 'allow_remote' => 1, - 'charset' => RCMAIL_CHARSET, + 'show_washed' => false, + 'allow_remote' => 1, + 'charset' => RCUBE_CHARSET, 'html_elements' => array('body', 'link'), - 'html_attribs' => array('rel', 'type'), + 'html_attribs' => array('rel', 'type'), ); // initialize HTML washer @@ -204,12 +216,12 @@ function rcmail_wash_html($html) //$washer->add_callback('style', 'rcmail_washtml_callback'); // Remove non-UTF8 characters (#1487813) - $html = rc_utf8_clean($html); + $html = rcube_charset::clean($html); $html = $washer->wash($html); // remove unwanted comments and tags (produced by washtml) $html = preg_replace(array('/<!--[^>]+-->/', '/<\/?body>/'), '', $html); - return $html; + return $html; } diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 717c7ad8c..f71eee39a 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -5,7 +5,7 @@ | program/steps/settings/save_prefs.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2009, The Roundcube Dev Team | + | 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. | @@ -19,190 +19,191 @@ +-----------------------------------------------------------------------+ */ -$CURR_SECTION = get_input_value('_section', RCUBE_INPUT_POST); - +$CURR_SECTION = rcube_utils::get_input_value('_section', rcube_utils::INPUT_POST); $a_user_prefs = array(); // set options for specified section -switch ($CURR_SECTION) -{ - case 'general': +switch ($CURR_SECTION) { +case 'general': $a_user_prefs = array( - 'language' => isset($_POST['_language']) ? get_input_value('_language', RCUBE_INPUT_POST) : $CONFIG['language'], - 'timezone' => isset($_POST['_timezone']) ? get_input_value('_timezone', RCUBE_INPUT_POST) : $CONFIG['timezone'], - 'date_format' => isset($_POST['_date_format']) ? get_input_value('_date_format', RCUBE_INPUT_POST) : $CONFIG['date_format'], - 'time_format' => isset($_POST['_time_format']) ? get_input_value('_time_format', RCUBE_INPUT_POST) : ($CONFIG['time_format'] ? $CONFIG['time_format'] : 'H:i'), - 'prettydate' => isset($_POST['_pretty_date']) ? TRUE : FALSE, - 'refresh_interval' => isset($_POST['_refresh_interval']) ? intval($_POST['_refresh_interval'])*60 : $CONFIG['refresh_interval'], - 'standard_windows' => isset($_POST['_standard_windows']) ? TRUE : FALSE, - 'skin' => isset($_POST['_skin']) ? get_input_value('_skin', RCUBE_INPUT_POST) : $CONFIG['skin'], + 'language' => isset($_POST['_language']) ? rcube_utils::get_input_value('_language', rcube_utils::INPUT_POST) : $CONFIG['language'], + 'timezone' => isset($_POST['_timezone']) ? rcube_utils::get_input_value('_timezone', rcube_utils::INPUT_POST) : $CONFIG['timezone'], + 'date_format' => isset($_POST['_date_format']) ? rcube_utils::get_input_value('_date_format', rcube_utils::INPUT_POST) : $CONFIG['date_format'], + 'time_format' => isset($_POST['_time_format']) ? rcube_utils::get_input_value('_time_format', rcube_utils::INPUT_POST) : ($CONFIG['time_format'] ? $CONFIG['time_format'] : 'H:i'), + 'prettydate' => isset($_POST['_pretty_date']) ? true : false, + 'refresh_interval' => isset($_POST['_refresh_interval']) ? intval($_POST['_refresh_interval'])*60 : $CONFIG['refresh_interval'], + 'standard_windows' => isset($_POST['_standard_windows']) ? true : false, + 'skin' => isset($_POST['_skin']) ? rcube_utils::get_input_value('_skin', rcube_utils::INPUT_POST) : $CONFIG['skin'], ); // compose derived date/time format strings if ((isset($_POST['_date_format']) || isset($_POST['_time_format'])) && $a_user_prefs['date_format'] && $a_user_prefs['time_format']) { - $a_user_prefs['date_short'] = 'D ' . $a_user_prefs['time_format']; - $a_user_prefs['date_long'] = $a_user_prefs['date_format'] . ' ' . $a_user_prefs['time_format']; + $a_user_prefs['date_short'] = 'D ' . $a_user_prefs['time_format']; + $a_user_prefs['date_long'] = $a_user_prefs['date_format'] . ' ' . $a_user_prefs['time_format']; } - break; + break; - case 'mailbox': +case 'mailbox': $a_user_prefs = array( - 'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE, - 'preview_pane_mark_read' => isset($_POST['_preview_pane_mark_read']) ? intval($_POST['_preview_pane_mark_read']) : $CONFIG['preview_pane_mark_read'], - 'autoexpand_threads' => isset($_POST['_autoexpand_threads']) ? intval($_POST['_autoexpand_threads']) : 0, - 'mdn_requests' => isset($_POST['_mdn_requests']) ? intval($_POST['_mdn_requests']) : 0, - 'check_all_folders' => isset($_POST['_check_all_folders']) ? TRUE : FALSE, - 'mail_pagesize' => is_numeric($_POST['_mail_pagesize']) ? max(2, intval($_POST['_mail_pagesize'])) : $CONFIG['mail_pagesize'], + 'preview_pane' => isset($_POST['_preview_pane']) ? true : false, + 'preview_pane_mark_read' => isset($_POST['_preview_pane_mark_read']) ? intval($_POST['_preview_pane_mark_read']) : $CONFIG['preview_pane_mark_read'], + 'autoexpand_threads' => isset($_POST['_autoexpand_threads']) ? intval($_POST['_autoexpand_threads']) : 0, + 'mdn_requests' => isset($_POST['_mdn_requests']) ? intval($_POST['_mdn_requests']) : 0, + 'check_all_folders' => isset($_POST['_check_all_folders']) ? true : false, + 'mail_pagesize' => is_numeric($_POST['_mail_pagesize']) ? max(2, intval($_POST['_mail_pagesize'])) : $CONFIG['mail_pagesize'], ); - break; + break; - case 'mailview': +case 'mailview': $a_user_prefs = array( - 'message_extwin' => intval($_POST['_message_extwin']), - 'message_show_email' => isset($_POST['_message_show_email']) ? TRUE : FALSE, - 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, - 'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE, - 'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0, - 'display_next' => isset($_POST['_display_next']) ? TRUE : FALSE, - 'default_charset' => get_input_value('_default_charset', RCUBE_INPUT_POST), + 'message_extwin' => intval($_POST['_message_extwin']), + 'message_show_email' => isset($_POST['_message_show_email']) ? true : false, + 'prefer_html' => isset($_POST['_prefer_html']) ? true : false, + 'inline_images' => isset($_POST['_inline_images']) ? true : false, + 'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0, + 'display_next' => isset($_POST['_display_next']) ? true : false, + 'default_charset' => rcube_utils::get_input_value('_default_charset', rcube_utils::INPUT_POST), ); - break; + break; - case 'compose': +case 'compose': $a_user_prefs = array( - 'compose_extwin' => intval($_POST['_compose_extwin']), - 'htmleditor' => intval($_POST['_htmleditor']), - 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, - 'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0, - 'force_7bit' => isset($_POST['_force_7bit']) ? TRUE : FALSE, - 'mdn_default' => isset($_POST['_mdn_default']) ? TRUE : FALSE, - 'dsn_default' => isset($_POST['_dsn_default']) ? TRUE : FALSE, - 'reply_same_folder' => isset($_POST['_reply_same_folder']) ? TRUE : FALSE, - 'spellcheck_before_send' => isset($_POST['_spellcheck_before_send']) ? TRUE : FALSE, - 'spellcheck_ignore_syms' => isset($_POST['_spellcheck_ignore_syms']) ? TRUE : FALSE, - 'spellcheck_ignore_nums' => isset($_POST['_spellcheck_ignore_nums']) ? TRUE : FALSE, - 'spellcheck_ignore_caps' => isset($_POST['_spellcheck_ignore_caps']) ? TRUE : FALSE, - 'show_sig' => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 1, - 'reply_mode' => isset($_POST['_reply_mode']) ? intval($_POST['_reply_mode']) : 0, - 'strip_existing_sig' => isset($_POST['_strip_existing_sig']), - 'default_font' => get_input_value('_default_font', RCUBE_INPUT_POST), - 'default_font_size' => get_input_value('_default_font_size', RCUBE_INPUT_POST), - 'forward_attachment' => !empty($_POST['_forward_attachment']), + 'compose_extwin' => intval($_POST['_compose_extwin']), + 'htmleditor' => intval($_POST['_htmleditor']), + 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, + 'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0, + 'force_7bit' => isset($_POST['_force_7bit']) ? true : false, + 'mdn_default' => isset($_POST['_mdn_default']) ? true : false, + 'dsn_default' => isset($_POST['_dsn_default']) ? true : false, + 'reply_same_folder' => isset($_POST['_reply_same_folder']) ? true : false, + 'spellcheck_before_send' => isset($_POST['_spellcheck_before_send']) ? true : false, + 'spellcheck_ignore_syms' => isset($_POST['_spellcheck_ignore_syms']) ? true : false, + 'spellcheck_ignore_nums' => isset($_POST['_spellcheck_ignore_nums']) ? true : false, + 'spellcheck_ignore_caps' => isset($_POST['_spellcheck_ignore_caps']) ? true : false, + 'show_sig' => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 1, + 'reply_mode' => isset($_POST['_reply_mode']) ? intval($_POST['_reply_mode']) : 0, + 'strip_existing_sig' => isset($_POST['_strip_existing_sig']), + 'default_font' => rcube_utils::get_input_value('_default_font', rcube_utils::INPUT_POST), + 'default_font_size' => rcube_utils::get_input_value('_default_font_size', rcube_utils::INPUT_POST), + 'reply_all_mode' => intval($_POST['_reply_all_mode']), + 'forward_attachment' => !empty($_POST['_forward_attachment']), ); - break; + break; - case 'addressbook': +case 'addressbook': $a_user_prefs = array( - 'default_addressbook' => get_input_value('_default_addressbook', RCUBE_INPUT_POST, true), - 'autocomplete_single' => isset($_POST['_autocomplete_single']) ? TRUE : FALSE, - 'addressbook_sort_col' => get_input_value('_addressbook_sort_col', RCUBE_INPUT_POST), - 'addressbook_name_listing' => intval(get_input_value('_addressbook_name_listing', RCUBE_INPUT_POST)), - 'addressbook_pagesize' => is_numeric($_POST['_addressbook_pagesize']) ? max(2, intval($_POST['_addressbook_pagesize'])) : $CONFIG['addressbook_pagesize'], + 'default_addressbook' => rcube_utils::get_input_value('_default_addressbook', rcube_utils::INPUT_POST, true), + 'autocomplete_single' => isset($_POST['_autocomplete_single']) ? true : false, + 'addressbook_sort_col' => rcube_utils::get_input_value('_addressbook_sort_col', rcube_utils::INPUT_POST), + 'addressbook_name_listing' => intval(rcube_utils::get_input_value('_addressbook_name_listing', rcube_utils::INPUT_POST)), + 'addressbook_pagesize' => is_numeric($_POST['_addressbook_pagesize']) ? max(2, intval($_POST['_addressbook_pagesize'])) : $CONFIG['addressbook_pagesize'], ); - break; + break; - case 'server': +case 'server': $a_user_prefs = array( - 'read_when_deleted' => isset($_POST['_read_when_deleted']) ? TRUE : FALSE, - 'skip_deleted' => isset($_POST['_skip_deleted']) ? TRUE : FALSE, - 'flag_for_deletion' => isset($_POST['_flag_for_deletion']) ? TRUE : FALSE, - 'delete_always' => isset($_POST['_delete_always']) ? TRUE : FALSE, - 'delete_junk' => isset($_POST['_delete_junk']) ? TRUE : FALSE, - 'logout_purge' => isset($_POST['_logout_purge']) ? TRUE : FALSE, - 'logout_expunge' => isset($_POST['_logout_expunge']) ? TRUE : FALSE, + 'read_when_deleted' => isset($_POST['_read_when_deleted']) ? true : false, + 'skip_deleted' => isset($_POST['_skip_deleted']) ? true : false, + 'flag_for_deletion' => isset($_POST['_flag_for_deletion']) ? true : false, + 'delete_always' => isset($_POST['_delete_always']) ? true : false, + 'delete_junk' => isset($_POST['_delete_junk']) ? true : false, + 'logout_purge' => isset($_POST['_logout_purge']) ? true : false, + 'logout_expunge' => isset($_POST['_logout_expunge']) ? true : false, ); - break; + break; - case 'folders': +case 'folders': $a_user_prefs = array( - 'show_real_foldernames' => - isset($_POST['_show_real_foldernames']) ? TRUE : FALSE, - 'drafts_mbox' => get_input_value('_drafts_mbox', RCUBE_INPUT_POST, true), - 'sent_mbox' => get_input_value('_sent_mbox', RCUBE_INPUT_POST, true), - 'junk_mbox' => get_input_value('_junk_mbox', RCUBE_INPUT_POST, true), - 'trash_mbox' => get_input_value('_trash_mbox', RCUBE_INPUT_POST, true), + 'show_real_foldernames' => isset($_POST['_show_real_foldernames']) ? true : false, + 'drafts_mbox' => rcube_utils::get_input_value('_drafts_mbox', rcube_utils::INPUT_POST, true), + 'sent_mbox' => rcube_utils::get_input_value('_sent_mbox', rcube_utils::INPUT_POST, true), + 'junk_mbox' => rcube_utils::get_input_value('_junk_mbox', rcube_utils::INPUT_POST, true), + 'trash_mbox' => rcube_utils::get_input_value('_trash_mbox', rcube_utils::INPUT_POST, true), ); - break; + break; } $plugin = rcmail::get_instance()->plugins->exec_hook('preferences_save', - array('prefs' => $a_user_prefs, 'section' => $CURR_SECTION)); + array('prefs' => $a_user_prefs, 'section' => $CURR_SECTION)); $a_user_prefs = $plugin['prefs']; // don't override these parameters -foreach ((array)$CONFIG['dont_override'] as $p) - $a_user_prefs[$p] = $CONFIG[$p]; +foreach ((array)$CONFIG['dont_override'] as $p) { + $a_user_prefs[$p] = $CONFIG[$p]; +} // verify some options -switch ($CURR_SECTION) -{ - case 'general': - +switch ($CURR_SECTION) { +case 'general': // switch UI language if (isset($_POST['_language']) && $a_user_prefs['language'] != $_SESSION['language']) { - $RCMAIL->load_language($a_user_prefs['language']); - $OUTPUT->command('reload', 500); + $RCMAIL->load_language($a_user_prefs['language']); + $OUTPUT->command('reload', 500); } // switch skin (if valid, otherwise unset the pref and fall back to default) if (!$OUTPUT->set_skin($a_user_prefs['skin'])) - unset($a_user_prefs['skin']); + unset($a_user_prefs['skin']); else if ($RCMAIL->config->get('skin') != $a_user_prefs['skin']) - $OUTPUT->command('reload', 500); + $OUTPUT->command('reload', 500); $a_user_prefs['timezone'] = (string) $a_user_prefs['timezone']; if (!empty($a_user_prefs['refresh_interval']) && !empty($CONFIG['min_refresh_interval'])) { - if ($a_user_prefs['refresh_interval'] < $CONFIG['min_refresh_interval']) { - $a_user_prefs['refresh_interval'] = $CONFIG['min_refresh_interval']; - } + if ($a_user_prefs['refresh_interval'] < $CONFIG['min_refresh_interval']) { + $a_user_prefs['refresh_interval'] = $CONFIG['min_refresh_interval']; + } } break; - case 'mailbox': - +case 'mailbox': // force min size - if ($a_user_prefs['mail_pagesize'] < 1) - $a_user_prefs['mail_pagesize'] = 10; + if ($a_user_prefs['mail_pagesize'] < 1) { + $a_user_prefs['mail_pagesize'] = 10; + } - if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['mail_pagesize'] > $CONFIG['max_pagesize'])) - $a_user_prefs['mail_pagesize'] = (int) $CONFIG['max_pagesize']; + if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['mail_pagesize'] > $CONFIG['max_pagesize'])) { + $a_user_prefs['mail_pagesize'] = (int) $CONFIG['max_pagesize']; + } break; - case 'addressbook': - +case 'addressbook': // force min size - if ($a_user_prefs['addressbook_pagesize'] < 1) - $a_user_prefs['addressbook_pagesize'] = 10; + if ($a_user_prefs['addressbook_pagesize'] < 1) { + $a_user_prefs['addressbook_pagesize'] = 10; + } - if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['addressbook_pagesize'] > $CONFIG['max_pagesize'])) - $a_user_prefs['addressbook_pagesize'] = (int) $CONFIG['max_pagesize']; + if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['addressbook_pagesize'] > $CONFIG['max_pagesize'])) { + $a_user_prefs['addressbook_pagesize'] = (int) $CONFIG['max_pagesize']; + } break; - case 'folders': - +case 'folders': // special handling for 'default_folders' if (in_array('default_folders', (array)$CONFIG['dont_override'])) { - foreach (array('drafts_mbox','sent_mbox','junk_mbox','trash_mbox') as $p) - $a_user_prefs[$p] = $CONFIG[$p]; - } else { - $a_user_prefs['default_folders'] = array('INBOX'); - foreach (array('drafts_mbox','sent_mbox','junk_mbox','trash_mbox') as $p) { - if ($a_user_prefs[$p]) - $a_user_prefs['default_folders'][] = $a_user_prefs[$p]; - } + foreach (array('drafts_mbox','sent_mbox','junk_mbox','trash_mbox') as $p) { + $a_user_prefs[$p] = $CONFIG[$p]; + } + } + else { + $a_user_prefs['default_folders'] = array('INBOX'); + foreach (array('drafts_mbox','sent_mbox','junk_mbox','trash_mbox') as $p) { + if ($a_user_prefs[$p]) { + $a_user_prefs['default_folders'][] = $a_user_prefs[$p]; + } + } } break; @@ -210,15 +211,14 @@ switch ($CURR_SECTION) // Save preferences if (!$plugin['abort']) - $saved = $RCMAIL->user->save_prefs($a_user_prefs); + $saved = $RCMAIL->user->save_prefs($a_user_prefs); else - $saved = $plugin['result']; + $saved = $plugin['result']; if ($saved) - $OUTPUT->show_message('successfullysaved', 'confirmation'); + $OUTPUT->show_message('successfullysaved', 'confirmation'); else - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); + $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); // display the form again -rcmail_overwrite_action('edit-prefs'); - +$RCMAIL->overwrite_action('edit-prefs'); diff --git a/program/steps/utils/error.inc b/program/steps/utils/error.inc index 9fb71c528..2a3a9a61e 100644 --- a/program/steps/utils/error.inc +++ b/program/steps/utils/error.inc @@ -5,7 +5,7 @@ | program/steps/utils/error.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | 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. | @@ -22,10 +22,10 @@ $rcmail = rcmail::get_instance(); // browser is not compatible with this application -if ($ERROR_CODE==409) { - $user_agent = htmlentities($_SERVER['HTTP_USER_AGENT']); - $__error_title = 'Your browser does not suit the requirements for this application'; - $__error_text = <<<EOF +if ($ERROR_CODE == 409) { + $user_agent = htmlentities($_SERVER['HTTP_USER_AGENT']); + $__error_title = 'Your browser does not suit the requirements for this application'; + $__error_text = <<<EOF <i>Supported browsers:</i><br /> » Microsoft Internet Explorer 7+<br /> » Mozilla Firefox 3+<br /> @@ -42,24 +42,24 @@ EOF; } // authorization error -else if ($ERROR_CODE==401) { - $__error_title = "AUTHORIZATION FAILED"; - $__error_text = "Could not verify that you are authorized to access this service!<br />\n". - "Please contact your server-administrator."; +else if ($ERROR_CODE == 401) { + $__error_title = "AUTHORIZATION FAILED"; + $__error_text = "Could not verify that you are authorized to access this service!<br />\n" + . "Please contact your server-administrator."; } // forbidden due to request check -else if ($ERROR_CODE==403) { - $__error_title = "REQUEST CHECK FAILED"; - $__error_text = "Access to this service was denied due to failing security checks!<br />\n". - "Please contact your server-administrator."; +else if ($ERROR_CODE == 403) { + $__error_title = "REQUEST CHECK FAILED"; + $__error_text = "Access to this service was denied due to failing security checks!<br />\n" + . "Please contact your server-administrator."; } // failed request (wrong step in URL) -else if ($ERROR_CODE==404) { - $__error_title = "REQUEST FAILED/FILE NOT FOUND"; - $request_url = htmlentities($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); - $__error_text = <<<EOF +else if ($ERROR_CODE == 404) { + $request_url = htmlentities($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); + $__error_title = "REQUEST FAILED/FILE NOT FOUND"; + $__error_text = <<<EOF The requested page was not found!<br /> Please contact your server-administrator. @@ -69,35 +69,36 @@ EOF; } // database connection error -else if ($ERROR_CODE==601) -{ - $__error_title = "CONFIGURATION ERROR"; - $__error_text = nl2br($ERROR_MESSAGE) . "<br />Please read the INSTALL instructions!"; +else if ($ERROR_CODE == 601) { + $__error_title = "CONFIGURATION ERROR"; + $__error_text = nl2br($ERROR_MESSAGE) . "<br />Please read the INSTALL instructions!"; } // database connection error -else if ($ERROR_CODE==603) { - $__error_title = "DATABASE ERROR: CONNECTION FAILED!"; - $__error_text = "Unable to connect to the database!<br />Please contact your server-administrator."; +else if ($ERROR_CODE == 603) { + $__error_title = "DATABASE ERROR: CONNECTION FAILED!"; + $__error_text = "Unable to connect to the database!<br />Please contact your server-administrator."; } // system error else { - $__error_title = "SERVICE CURRENTLY NOT AVAILABLE!"; - $__error_text = "Please contact your server-administrator."; - - if (($rcmail->config->get('debug_level') & 4) && $ERROR_MESSAGE) - $__error_text = $ERROR_MESSAGE; - else - $__error_text = sprintf('Error No. [%s]', $ERROR_CODE); + $__error_title = "SERVICE CURRENTLY NOT AVAILABLE!"; + $__error_text = "Please contact your server-administrator."; + + if (($rcmail->config->get('debug_level') & 4) && $ERROR_MESSAGE) { + $__error_text = $ERROR_MESSAGE; + } + else { + $__error_text = sprintf('Error No. [%s]', $ERROR_CODE); + } } $HTTP_ERR_CODE = $ERROR_CODE && $ERROR_CODE < 600 ? $ERROR_CODE : 500; // Ajax request if ($rcmail->output && $rcmail->output->type == 'js') { - header("HTTP/1.0 $HTTP_ERR_CODE $__error_title"); - die; + header("HTTP/1.0 $HTTP_ERR_CODE $__error_title"); + die; } // compose page content @@ -109,8 +110,9 @@ $__page_content = <<<EOF EOF; if ($rcmail->output && $rcmail->output->template_exists('error')) { - $rcmail->output->reset(); - $rcmail->output->send('error'); + $rcmail->output->reset(); + $rcmail->output->set_env('server_error', $ERROR_CODE); + $rcmail->output->send('error'); } $__skin = $rcmail->config->get('skin', 'default'); @@ -136,4 +138,3 @@ $__page_content EOF; exit; - diff --git a/program/steps/utils/html2text.inc b/program/steps/utils/html2text.inc index c6481b197..c01443b22 100644 --- a/program/steps/utils/html2text.inc +++ b/program/steps/utils/html2text.inc @@ -22,7 +22,7 @@ $html = $HTTP_RAW_POST_DATA; // Replace emoticon images with its text representation -$html = rcmail_replace_emoticons($html); +$html = $RCMAIL->replace_emoticons($html); $converter = new rcube_html2text($html, false, true, 0); diff --git a/program/steps/utils/modcss.inc b/program/steps/utils/modcss.inc index 1a28c6598..c8a7cb524 100644 --- a/program/steps/utils/modcss.inc +++ b/program/steps/utils/modcss.inc @@ -55,7 +55,7 @@ $ctype = '~Content-Type:\s+text/(css|plain)~i'; if ($source !== false && preg_match($ctype, $headers)) { header('Content-Type: text/css'); - echo rcmail_mod_css_styles($source, preg_replace('/[^a-z0-9]/i', '', $_GET['_c'])); + echo rcube_utils::mod_css_styles($source, preg_replace('/[^a-z0-9]/i', '', $_GET['_c'])); exit; } diff --git a/program/steps/utils/save_pref.inc b/program/steps/utils/save_pref.inc index 7def8733d..183c398d3 100644 --- a/program/steps/utils/save_pref.inc +++ b/program/steps/utils/save_pref.inc @@ -5,7 +5,7 @@ | program/steps/utils/save_pref.inc | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2005-2010, The Roundcube Dev Team | + | 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. | @@ -19,17 +19,27 @@ +-----------------------------------------------------------------------+ */ -$name = get_input_value('_name', RCUBE_INPUT_POST); -$value = get_input_value('_value', RCUBE_INPUT_POST); +$name = rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST); +$value = rcube_utils::get_input_value('_value', rcube_utils::INPUT_POST); +$sessname = rcube_utils::get_input_value('_session', rcube_utils::INPUT_POST); + +// Whitelisted preferences and session variables, others +// can be added by plugins $whitelist = array( 'preview_pane', 'list_cols', 'collapsed_folders', 'collapsed_abooks', ); +$whitelist_sess = array( + 'list_attrib/columns', +); + +$whitelist = array_merge($whitelist, $RCMAIL->plugins->allowed_prefs); +$whitelist_sess = array_merge($whitelist_sess, $RCMAIL->plugins->allowed_session_prefs); -if (!in_array($name, array_merge($whitelist, $RCMAIL->plugins->allowed_prefs))) { - raise_error(array('code' => 500, 'type' => 'php', +if (!in_array($name, $whitelist) || ($sessname && !in_array($sessname, $whitelist_sess))) { + rcube::raise_error(array('code' => 500, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => sprintf("Hack attempt detected (user: %s)", $RCMAIL->get_user_name())), true, false); @@ -42,7 +52,7 @@ if (!in_array($name, array_merge($whitelist, $RCMAIL->plugins->allowed_prefs))) $RCMAIL->user->save_prefs(array($name => $value)); // update also session if requested -if ($sessname = get_input_value('_session', RCUBE_INPUT_POST)) { +if ($sessname) { // Support multidimensional arrays... $vars = explode('/', $sessname); @@ -57,5 +67,3 @@ if ($sessname = get_input_value('_session', RCUBE_INPUT_POST)) { $OUTPUT->reset(); $OUTPUT->send(); - - diff --git a/program/steps/utils/spell.inc b/program/steps/utils/spell.inc index 1c68e8328..c8807e32f 100644 --- a/program/steps/utils/spell.inc +++ b/program/steps/utils/spell.inc @@ -20,7 +20,7 @@ */ // read input -$lang = get_input_value('lang', RCUBE_INPUT_GET); +$lang = rcube_utils::get_input_value('lang', rcube_utils::INPUT_GET); $data = file_get_contents('php://input'); $learn_word = strpos($data, '<learnword>'); @@ -29,13 +29,13 @@ $learn_word = strpos($data, '<learnword>'); $left = strpos($data, '<text>'); $right = strrpos($data, '</text>'); $data = substr($data, $left+6, $right-($left+6)); -$data = html_entity_decode($data, ENT_QUOTES, RCMAIL_CHARSET); +$data = html_entity_decode($data, ENT_QUOTES, RCUBE_CHARSET); $spellchecker = new rcube_spellchecker($lang); if ($learn_word) { $spellchecker->add_word($data); - $result = '<?xml version="1.0" encoding="'.RCMAIL_CHARSET.'"?><learnwordresult></learnwordresult>'; + $result = '<?xml version="1.0" encoding="'.RCUBE_CHARSET.'"?><learnwordresult></learnwordresult>'; } else { $spellchecker->check($data); @@ -47,12 +47,15 @@ if ($err = $spellchecker->error()) { 'file' => __FILE__, 'line' => __LINE__, 'message' => "Spell check engine error: " . trim($err)), true, false); + + header("HTTP/1.0 500 Internal Server Error"); + exit; } // set response length header("Content-Length: " . strlen($result)); // Don't use server's default Content-Type charset (#1486406) -header("Content-Type: text/xml; charset=" . RCMAIL_CHARSET); +header("Content-Type: text/xml; charset=" . RCUBE_CHARSET); print $result; exit; diff --git a/program/steps/utils/spell_html.inc b/program/steps/utils/spell_html.inc index 96b41e230..27b14acef 100644 --- a/program/steps/utils/spell_html.inc +++ b/program/steps/utils/spell_html.inc @@ -56,7 +56,7 @@ if ($error = $spellchecker->error()) { } // send output -header("Content-Type: text/xml; charset=".RCMAIL_CHARSET); +header("Content-Type: text/xml; charset=".RCUBE_CHARSET); echo json_encode($result); exit; diff --git a/public_html/.htaccess b/public_html/.htaccess new file mode 120000 index 000000000..94546dc49 --- /dev/null +++ b/public_html/.htaccess @@ -0,0 +1 @@ +../.htaccess
\ No newline at end of file diff --git a/public_html/index.php b/public_html/index.php new file mode 100644 index 000000000..cec0dca07 --- /dev/null +++ b/public_html/index.php @@ -0,0 +1,27 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | Roundcube Webmail IMAP Client | + | Version 1.0-git | + | | + | 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. | + | | + | PURPOSE: | + | This is the public entry point for all HTTP requests to the | + | Roundcue webmail application. | + +-----------------------------------------------------------------------+ + | Author: Thomas Bruederli <roundcube@gmail.com> | + | Author: Aleksander Machniak <alec@alec.pl> | + +-----------------------------------------------------------------------+ +*/ + +define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/'); + +// include index.php from application root directory +include INSTALL_PATH . 'index.php'; + diff --git a/public_html/plugins b/public_html/plugins new file mode 120000 index 000000000..7655edcc0 --- /dev/null +++ b/public_html/plugins @@ -0,0 +1 @@ +../plugins
\ No newline at end of file diff --git a/public_html/program/js b/public_html/program/js new file mode 120000 index 000000000..2c7564380 --- /dev/null +++ b/public_html/program/js @@ -0,0 +1 @@ +../../program/js
\ No newline at end of file diff --git a/public_html/program/resources b/public_html/program/resources new file mode 120000 index 000000000..a1164a03c --- /dev/null +++ b/public_html/program/resources @@ -0,0 +1 @@ +../../program/resources
\ No newline at end of file diff --git a/public_html/robots.txt b/public_html/robots.txt new file mode 120000 index 000000000..123b16649 --- /dev/null +++ b/public_html/robots.txt @@ -0,0 +1 @@ +../robots.txt
\ No newline at end of file diff --git a/public_html/skins b/public_html/skins new file mode 120000 index 000000000..249223789 --- /dev/null +++ b/public_html/skins @@ -0,0 +1 @@ +../skins
\ No newline at end of file diff --git a/skins/classic/addressbook.css b/skins/classic/addressbook.css index 9575ae25f..2fcb1715a 100644 --- a/skins/classic/addressbook.css +++ b/skins/classic/addressbook.css @@ -224,6 +224,24 @@ -o-text-overflow: ellipsis; } +/* This padding-left should be equal to the focused border-left + the focused padding-left */ +#contacts-table thead tr td:first-child, +#contacts-table tbody tr td:first-child { + border-left: 0; + padding-left: 8px; +} + +/* because of border-collapse, we make the left border twice what we want it to be - half will be hidden to the left */ +#contacts-table tbody tr.focused > td:first-child { + border-left: 2px solid #d4d4d4; + padding-left: 6px; +} + +#contacts-table tbody tr.selected.focused > td:first-child { + border-left: 1px solid #ccc; + padding-left: 7px; +} + #contacts-table .contact.readonly td { font-style: italic; diff --git a/skins/classic/common.css b/skins/classic/common.css index 3c322f0ed..b1ec7c7df 100644 --- a/skins/classic/common.css +++ b/skins/classic/common.css @@ -483,6 +483,9 @@ body.iframe .boxtitle top: 32px; left: 90px; width: auto; + max-height: 70%; + overflow: -moz-scrollbars-vertical; + overflow-y: auto; display: none; background-color: #fff; background-color: rgba(255, 255, 255, 0.95); @@ -492,6 +495,7 @@ body.iframe .boxtitle border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; + box-shadow: 1px 1px 12px #999; -moz-box-shadow: 1px 1px 12px #999; -webkit-box-shadow: #999 1px 1px 12px; } @@ -511,16 +515,25 @@ body.iframe .boxtitle margin: 3px -4px; } -.popupmenu li a +.popupmenu li a, +.popupmenu li label { display: block; color: #a0a0a0; - padding: 2px 10px; + padding: 2px 16px 2px 10px; text-decoration: none; min-height: 14px; background: transparent; } +.popupmenu li label.comment +{ + color: #999; + font-style: italic; + padding-top: 4px; + padding-bottom: 3px; +} + .popupmenu li a.active, .popupmenu li a.active:active, .popupmenu li a.active:visited @@ -704,6 +717,24 @@ ul.treelist li div.expanded outline: none; } +.propform div.prop +{ + margin-bottom: 0.5em; +} + +.propform div.prop.block label +{ + display: block; + margin-bottom: 2px; +} + +.propform div.prop.block input, +.propform div.prop.block textarea +{ + width: 97%; +} + + /***** roundcube webmail pre-defined classes *****/ #rcmversion @@ -734,6 +765,7 @@ ul.treelist li div.expanded border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; + box-shadow: 1px 1px 12px #999; -moz-box-shadow: 1px 1px 12px #999; -webkit-box-shadow: #999 1px 1px 12px; } @@ -935,6 +967,57 @@ ul.toolbarmenu li.separator_above } +/*** folder selector ***/ + +#folder-selector li a +{ + padding: 0; +} + +#folder-selector li a span +{ + background: url(images/icons/folders.png) no-repeat 6px 0; + display: block; + height: 15px; + min-height: 14px; + padding: 2px 4px 2px 28px; + overflow: hidden; + max-width: 120px; + text-overflow: ellipsis; +} + +#folder-selector li a.virtual +{ + color: #A0A0A0; +} + +#folder-selector li a.active:hover span +{ + color: white; +} + +#folder-selector li a.inbox span +{ + background-position: 6px -18px; +} +#folder-selector li a.drafts span +{ + background-position: 6px -37px; +} +#folder-selector li a.sent span +{ + background-position: 6px -54px; +} +#folder-selector li a.trash span +{ + background-position: 6px -91px; +} +#folder-selector li a.junk span +{ + background-position: 6px -73px; +} + + /***** tabbed interface elements *****/ div.tabsbar, diff --git a/skins/classic/functions.js b/skins/classic/functions.js index 4ad13136f..049e4d5d4 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -419,6 +419,7 @@ body_mouseup: function(evt, p) && !this.popups[i].toggle && (!this.popups[i].editable || !this.target_overlaps(target, this.popups[i].id)) && (!this.popups[i].sticky || !rcube_mouse_is_over(evt, rcube_find_object(this.popups[i].id))) + && !$(target).is('.folder-selector-link') && !$(target).children('.folder-selector-link').length ) { window.setTimeout('rcmail_ui.show_popup("'+i+'",false);', 50); } @@ -625,7 +626,7 @@ prev_sibling: function(elm) enable_command: function(p) { - if (p.command == 'reply-list') { + if (p.command == 'reply-list' && rcmail.env.reply_all_mode == 1) { var label = rcmail.gettext(p.status ? 'replylist' : 'replyall'); $('a.button.replyAll').attr('title', label); } @@ -975,8 +976,6 @@ function rcube_init_mail_ui() rcmail.addEventListener('responseaftercheck-recent', rcube_render_mailboxlist); rcmail.addEventListener('responseafterrefresh', rcube_render_mailboxlist); rcmail.addEventListener('afterimport-messages', function(){ rcmail_ui.show_popup('uploadform', false); }); - - new rcmail_scroller('#mailboxlist-content', '#mailboxlist-title', '#mailboxlist-footer'); } if (rcmail.env.action == 'compose') @@ -984,15 +983,12 @@ function rcube_init_mail_ui() else if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') // add menu link for each attachment $('#attachment-list > li[id^="attach"]').each(function() { - $(this).append($('<a class="drop">').click(function() { rcmail_ui.show_attachmentmenu(this); })); + $(this).append($('<a class="drop"></a>').click(function() { rcmail_ui.show_attachmentmenu(this); })); }); } else if (rcmail.env.task == 'addressbook') { rcmail.addEventListener('afterupload-photo', function(){ rcmail_ui.show_popup('uploadform', false); }); - if (rcmail.gui_objects.folderlist) - new rcmail_scroller('#directorylist-content', '#directorylist-title', '#directorylist-footer'); - rcmail.gui_object('dragmenu', 'dragmenu'); } else if (rcmail.env.task == 'settings') { diff --git a/skins/classic/images/icons/folders.gif b/skins/classic/images/icons/folders.gif Binary files differindex eb06bd8c1..279519496 100644 --- a/skins/classic/images/icons/folders.gif +++ b/skins/classic/images/icons/folders.gif diff --git a/skins/classic/images/icons/folders.png b/skins/classic/images/icons/folders.png Binary files differindex 4c27052a5..92432521c 100644 --- a/skins/classic/images/icons/folders.png +++ b/skins/classic/images/icons/folders.png diff --git a/skins/classic/images/mail_toolbar.png b/skins/classic/images/mail_toolbar.png Binary files differindex 4a8431715..3ef003f23 100644 --- a/skins/classic/images/mail_toolbar.png +++ b/skins/classic/images/mail_toolbar.png diff --git a/skins/classic/images/messageactions.gif b/skins/classic/images/messageactions.gif Binary files differindex b73fbb354..3bdd0d735 100644 --- a/skins/classic/images/messageactions.gif +++ b/skins/classic/images/messageactions.gif diff --git a/skins/classic/images/messageactions.png b/skins/classic/images/messageactions.png Binary files differindex 2ea7b4f54..0dc655487 100644 --- a/skins/classic/images/messageactions.png +++ b/skins/classic/images/messageactions.png diff --git a/skins/classic/includes/messagetoolbar.html b/skins/classic/includes/messagetoolbar.html index 8f8efd291..6936c7def 100644 --- a/skins/classic/includes/messagetoolbar.html +++ b/skins/classic/includes/messagetoolbar.html @@ -20,9 +20,6 @@ <roundcube:container name="toolbar" id="messagetoolbar" /> <roundcube:button name="markmenulink" id="markmenulink" type="link" class="button markmessage" title="markmessages" onclick="rcmail_ui.show_popup('markmenu');return false" content=" " /> <roundcube:button name="messagemenulink" id="messagemenulink" type="link" class="button messagemenu" title="moreactions" onclick="rcmail_ui.show_popup('messagemenu');return false" content=" " /> -<roundcube:if condition="template:name == 'message'" /> -<roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('move', this.options[this.selectedIndex].value)" class="mboxlist" folder_filter="mail" /> -<roundcube:endif /> </div> <div id="forwardmenu" class="popupmenu"> @@ -46,6 +43,8 @@ <li><roundcube:button class="printlink" command="print" label="printmessage" classAct="printlink active" /></li> <li><roundcube:button class="downloadlink" command="download" label="emlsave" classAct="downloadlink active" /></li> <li><roundcube:button class="editlink" command="edit" prop="new" label="editasnew" classAct="editlink active" /></li> + <li><roundcube:button class="movelink" command="move" label="moveto" classAct="movelink active" innerclass="folder-selector-link" /></li> + <li><roundcube:button class="copylink" command="copy" label="copyto" classAct="copylink active" innerclass="folder-selector-link" /></li> <li class="separator_below"><roundcube:button class="sourcelink" command="viewsource" label="viewsource" classAct="sourcelink active" /></li> <li><roundcube:button class="openlink" command="open" label="openinextwin" target="_blank" classAct="openlink active" /></li> <roundcube:container name="messagemenu" id="messagemenu" /> diff --git a/skins/classic/mail.css b/skins/classic/mail.css index 43367749c..10efd350f 100644 --- a/skins/classic/mail.css +++ b/skins/classic/mail.css @@ -171,21 +171,8 @@ background-position: -480px -32px; } -#messagetoolbar select.mboxlist -{ - position: relative; - margin: 0 8px; - top: 7px; -} - -#messagetoolbar select.mboxlist option -{ - padding-left: 15px; -} - -#messagetoolbar select.mboxlist option[value=""] -{ - padding-left: 2px; +#messagetoolbar a.responses { + background-position: -512px 0; } #messagemenu li a.active:hover, @@ -222,12 +209,22 @@ #messagemenu li a.openlink, #attachmentmenu li a.openlink { - background-position: 7px -53px; + background-position: 7px -52px; } #messagemenu li a.editlink { - background-position: 7px -71px; + background-position: 6px -70px; +} + +#messagemenu li a.movelink +{ + background-position: 6px -161px; +} + +#messagemenu li a.copylink +{ + background-position: 6px -143px; } #markmessagemenu li a, @@ -408,38 +405,42 @@ display: block; position: relative; font-size: 11px; - background: url(images/icons/folders.png) 5px 0 no-repeat; border-bottom: 1px solid #EBEBEB; } #mailboxlist li ul li:last-child { - border-bottom: none; + border-bottom: 0 none; } -#mailboxlist li.inbox +#mailboxlist li.inbox a { background-position: 5px -18px; } -#mailboxlist li.drafts +#mailboxlist li.drafts a { background-position: 5px -37px; } -#mailboxlist li.sent +#mailboxlist li.sent a { background-position: 5px -54px; } -#mailboxlist li.junk +#mailboxlist li.junk a { background-position: 5px -73px; } -#mailboxlist li.trash +#mailboxlist li.trash a +{ + background-position: 5px -180px; +} + +#mailboxlist li.trash.empty a { - background-position: 5px -91px; + background-position: 5px -90px; } #mailboxlist li a @@ -452,6 +453,7 @@ padding-bottom: 2px; text-decoration: none; height: 15px; + background: url(images/icons/folders.png) 5px 0 no-repeat; } #mailboxlist li.unread @@ -493,13 +495,75 @@ padding: 0; margin: 0; border-top: 1px solid #EBEBEB; - padding-left: 15px; - background-position: 25px 1px; background-color: #FFF; - color: blue; font-weight: normal; } +#mailboxlist li.mailbox ul li a { + padding-left: 40px; /* 24 + 1 x 16 */ + background-position: 20px 0; /* 4 + 1 x 16 */ +} +#mailboxlist li.mailbox ul li div.treetoggle { + left: 23px !important; +} + +#mailboxlist li.mailbox ul ul li.mailbox a { + padding-left: 56px; /* 2x */ + background-position: 36px 0; +} +#mailboxlist li.mailbox ul ul li div.treetoggle { + left: 39px !important; +} + +#mailboxlist li.mailbox ul ul ul li.mailbox a { + padding-left: 72px; /* 3x */ + background-position: 52px 0; +} +#mailboxlist li.mailbox ul ul ul li div.treetoggle { + left: 55px !important; +} + +#mailboxlist li.mailbox ul ul ul ul li.mailbox a { + padding-left: 88px; /* 4x */ + background-position: 68px 0; +} +#mailboxlist li.mailbox ul ul ul ul li div.treetoggle { + left: 71px !important; +} + +/* indent folders on levels > 4 */ +#mailboxlist li.mailbox ul ul ul ul ul li { + padding-left: 16px; +} +#mailboxlist li.mailbox ul ul ul ul ul li div.treetoggle { + left: 87px !important; +} + +#mailboxlist li.mailbox ul li.drafts a +{ + background-position: 21px -37px; +} + +#mailboxlist li.mailbox ul li.sent a +{ + background-position: 21px -54px; +} + +#mailboxlist li.mailbox ul li.junk a +{ + background-position: 21px -73px; +} + +#mailboxlist li.mailbox ul li.trash a +{ + background-position: 21px -180px; +} + +#mailboxlist li.mailbox ul li.trash.empty a +{ + background-position: 21px -90px; +} + #listcontrols { position: relative; @@ -933,7 +997,7 @@ table.messagelist.fixedcopy .messagelist tr td.date { - width: 118px; + width: 135px; padding: 0 2px; } @@ -954,6 +1018,24 @@ table.messagelist.fixedcopy color: #CC0000; } +/* This padding-left minus the focused padding left should be half of the focused border-left */ +.messagelist thead tr td:first-child, +.messagelist tbody tr td:first-child { + border-left: 0; + padding-left: 6px; +} + +/* because of border-collapse, we make the left border twice what we want it to be - half will be hidden to the left */ +.messagelist tbody tr.focused > td:first-child { + border-left: 4px solid #d4d4d4; + padding-left: 4px; +} + +.messagelist tbody tr.selected.focused > td:first-child { + border-left: 2px solid #ccc; + padding-left: 5px; +} + .messagelist tr.selected td { color: #FFFFFF; @@ -985,6 +1067,7 @@ table.messagelist.fixedcopy #listmenu { padding: 6px; + max-height: none; } #listmenu legend diff --git a/skins/classic/settings.css b/skins/classic/settings.css index 2433f5040..acd0b9fd0 100644 --- a/skins/classic/settings.css +++ b/skins/classic/settings.css @@ -34,6 +34,11 @@ height: 18px; } +#identities-table tbody tr.readonly td +{ + font-style: italic; +} + #subscription-table tr.virtual td { color: #666; @@ -81,6 +86,7 @@ } #identity-details table td.title, +#response-details table td.title, #folder-details table td.title { font-weight: bold; @@ -89,6 +95,14 @@ white-space: nowrap; } +#response-details table td.title +{ + text-align: left; + vertical-align: top; + width: 140px; + padding-top: 5px; +} + #bottomboxes { position: absolute; @@ -149,6 +163,12 @@ body.iframe, float: right; } +#formfooter .footerindent +{ + padding: 10px 0; + margin-left: 155px; +} + #quota { position: absolute; diff --git a/skins/classic/splitter.js b/skins/classic/splitter.js index 72ada5719..cec6a4713 100644 --- a/skins/classic/splitter.js +++ b/skins/classic/splitter.js @@ -17,6 +17,8 @@ function rcube_splitter(attrib) this.drag_active = false; this.callback = attrib.callback; + var me = this; + this.init = function() { this.p1 = document.getElementById(this.p1id); @@ -42,9 +44,9 @@ function rcube_splitter(attrib) this.elm.unselectable = 'on'; // add the mouse event listeners - rcube_event.add_listener({element: this.elm, event:'mousedown', object:this, method:'onDragStart'}); + $(this.elm).mousedown(onDragStart); if (bw.ie) - rcube_event.add_listener({element: window, event:'resize', object:this, method:'onResize'}); + $(window).resize(onResize); // read saved position from cookie var cookie = rcmail.get_cookie(this.id); @@ -90,19 +92,19 @@ function rcube_splitter(attrib) /** * Handler for mousedown events */ - this.onDragStart = function(e) + function onDragStart(e) { + me.drag_active = true; + // disable text selection while dragging the splitter if (bw.konq || bw.chrome || bw.safari) document.body.style.webkitUserSelect = 'none'; - this.p1pos = this.relative ? $(this.p1).position() : $(this.p1).offset(); - this.p2pos = this.relative ? $(this.p2).position() : $(this.p2).offset(); - this.drag_active = true; + me.p1pos = me.relative ? $(me.p1).position() : $(me.p1).offset(); + me.p2pos = me.relative ? $(me.p2).position() : $(me.p2).offset(); // start listening to mousemove events - rcube_event.add_listener({element:document, event:'mousemove', object:this, method:'onDrag'}); - rcube_event.add_listener({element:document, event:'mouseup', object:this, method:'onDragStop'}); + $(document).bind('mousemove.'+me.id, onDrag).bind('mouseup.'+me.id, onDragStop); // enable dragging above iframes $('iframe').each(function() { @@ -119,59 +121,64 @@ function rcube_splitter(attrib) /** * Handler for mousemove events */ - this.onDrag = function(e) + function onDrag(e) { - if (!this.drag_active) + if (!me.drag_active) return false; + // with timing events dragging action is more responsive + window.clearTimeout(me.ts); + me.ts = window.setTimeout(function() { onDragAction(e); }, 1); + + return false; + }; + + function onDragAction(e) + { var pos = rcube_event.get_mouse_pos(e); - if (this.relative) { - var parent = $(this.p1.parentNode).offset(); + if (me.relative) { + var parent = $(me.p1.parentNode).offset(); pos.x -= parent.left; pos.y -= parent.top; } - if (this.horizontal) { - if (((pos.y - this.layer.height * 1.5) > this.p1pos.top) && ((pos.y + this.layer.height * 1.5) < (this.p2pos.top + this.p2.offsetHeight))) { - this.pos = pos.y; - this.resize(); + if (me.horizontal) { + if (((pos.y - me.layer.height * 1.5) > me.p1pos.top) && ((pos.y + me.layer.height * 1.5) < (me.p2pos.top + me.p2.offsetHeight))) { + me.pos = pos.y; + me.resize(); } } - else { - if (((pos.x - this.layer.width * 1.5) > this.p1pos.left) && ((pos.x + this.layer.width * 1.5) < (this.p2pos.left + this.p2.offsetWidth))) { - this.pos = pos.x; - this.resize(); - } + else if (((pos.x - me.layer.width * 1.5) > me.p1pos.left) && ((pos.x + me.layer.width * 1.5) < (me.p2pos.left + me.p2.offsetWidth))) { + me.pos = pos.x; + me.resize(); } - this.p1pos = this.relative ? $(this.p1).position() : $(this.p1).offset(); - this.p2pos = this.relative ? $(this.p2).position() : $(this.p2).offset(); - - return false; + me.p1pos = me.relative ? $(me.p1).position() : $(me.p1).offset(); + me.p2pos = me.relative ? $(me.p2).position() : $(me.p2).offset(); }; /** * Handler for mouseup events */ - this.onDragStop = function(e) + function onDragStop(e) { + me.drag_active = false; + // resume the ability to highlight text if (bw.konq || bw.chrome || bw.safari) document.body.style.webkitUserSelect = 'auto'; // cancel the listening for drag events - rcube_event.remove_listener({element:document, event:'mousemove', object:this, method:'onDrag'}); - rcube_event.remove_listener({element:document, event:'mouseup', object:this, method:'onDragStop'}); - this.drag_active = false; + $(document).unbind('.' + me.id); // remove temp divs - $('div.iframe-splitter-fix').each(function() { this.parentNode.removeChild(this); }); + $('div.iframe-splitter-fix').remove(); - this.set_cookie(); + me.set_cookie(); - if (typeof this.callback == 'function') - this.callback(this); + if (typeof me.callback == 'function') + me.callback(me); return bw.safari ? true : rcube_event.cancel(e); }; @@ -179,15 +186,15 @@ function rcube_splitter(attrib) /** * Handler for window resize events */ - this.onResize = function(e) + function onResize(e) { - if (this.horizontal) { - var new_height = parseInt(this.p2.parentNode.offsetHeight, 10) - parseInt(this.p2.style.top, 10) - (bw.ie8 ? 2 : 0); - this.p2.style.height = (new_height > 0 ? new_height : 0) +'px'; + if (me.horizontal) { + var new_height = parseInt(me.p2.parentNode.offsetHeight, 10) - parseInt(me.p2.style.top, 10) - (bw.ie8 ? 2 : 0); + me.p2.style.height = (new_height > 0 ? new_height : 0) +'px'; } else { - var new_width = parseInt(this.p2.parentNode.offsetWidth, 10) - parseInt(this.p2.style.left, 10); - this.p2.style.width = (new_width > 0 ? new_width : 0) + 'px'; + var new_width = parseInt(me.p2.parentNode.offsetWidth, 10) - parseInt(me.p2.style.left, 10); + me.p2.style.width = (new_width > 0 ? new_width : 0) + 'px'; } }; diff --git a/skins/classic/templates/compose.html b/skins/classic/templates/compose.html index 7d8aa1e43..74d25778b 100644 --- a/skins/classic/templates/compose.html +++ b/skins/classic/templates/compose.html @@ -40,6 +40,7 @@ <span id="spellmenulink" onclick="rcmail_ui.show_popup('spellmenu');return false"></span> </span> <roundcube:endif /> + <a href="#responses" class="button responses" label="responses" title="<roundcube:label name='insertresponse' />" id="responsesmenulink" unselectable="on" onmousedown="return false" onclick="rcmail_ui.show_popup('responsesmenu');return false"> </a> <roundcube:container name="toolbar" id="compose-toolbar" /> <roundcube:button name="messageoptions" id="composemenulink" type="link" class="button messagemenu" title="messageoptions" onclick="rcmail_ui.show_popup('composemenu', true);return false" content=" " /> </div> @@ -198,6 +199,16 @@ </table> </div> +<div id="responsesmenu" class="popupmenu"> + <ul id="textresponsesmenu"> + <li><label class="comment"><roundcube:label name="insertresponse" /></label></li> + <roundcube:object name="responseslist" id="responseslist" tagname="ul" itemclass="active" /> + <li><label class="comment"><roundcube:label name="manageresponses" /></label></li> + <li><roundcube:button command="save-response" type="link" label="savenewresponse" classAct="active" unselectable="on" /></li> + <li><roundcube:button command="responses" type="link" label="editresponses" classAct="active" /></li> + </ul> +</div> + <div id="spellmenu" class="popupmenu selectable"></div> </form> diff --git a/skins/classic/templates/message.html b/skins/classic/templates/message.html index bd4fbf277..3ab0a2e5e 100644 --- a/skins/classic/templates/message.html +++ b/skins/classic/templates/message.html @@ -30,11 +30,13 @@ <div id="mailboxlist-container"> <div id="mailboxlist-title" class="boxtitle"><roundcube:label name="mailboxlist" /></div> <div class="boxlistcontent"> - <roundcube:object name="mailboxlist" id="mailboxlist" class="treelist" maxlength="25" /> + <roundcube:object name="mailboxlist" id="mailboxlist" class="treelist" folder_filter="mail" /> </div> <div class="boxfooter"></div> </div> </div> +<roundcube:else /> +<roundcube:object name="mailboxlist" folder_filter="mail" type="js" /> <roundcube:endif /> <div id="messageframe"> diff --git a/skins/classic/templates/responseedit.html b/skins/classic/templates/responseedit.html new file mode 100644 index 000000000..67ba35bac --- /dev/null +++ b/skins/classic/templates/responseedit.html @@ -0,0 +1,24 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title><roundcube:object name="pagetitle" /></title> +<roundcube:include file="/includes/links.html" /> +<script type="text/javascript" src="/functions.js"></script> + +</head> +<body class="iframe"> + +<div id="prefs-title" class="boxtitle"><roundcube:object name="steptitle" /></div> + +<div id="response-details" class="boxcontent"> + <roundcube:object name="responseform" class="propform" size="60" textareacols="60" textarearows="18" /> + + <div id="formfooter"> + <div class="footerindent"> + <roundcube:button command="save" type="input" class="button mainaction" label="save" condition="!env:readonly" /> + </div> + </div> +</div> + +</body> +</html> diff --git a/skins/classic/templates/responses.html b/skins/classic/templates/responses.html new file mode 100644 index 000000000..2459827b0 --- /dev/null +++ b/skins/classic/templates/responses.html @@ -0,0 +1,46 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title><roundcube:object name="pagetitle" /></title> +<roundcube:include file="/includes/links.html" /> +<script type="text/javascript" src="/functions.js"></script> +<script type="text/javascript" src="/splitter.js"></script> +<style type="text/css"> +#identities-list { width: <roundcube:exp expression="!empty(cookie:identviewsplitter) ? cookie:identviewsplitter-5 : 295" />px; } +#identity-box { left: <roundcube:exp expression="!empty(cookie:identviewsplitter) ? cookie:identviewsplitter+5 : 305" />px; + <roundcube:exp expression="browser:ie ? ('width:expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:identviewsplitter) ? cookie:identviewsplitter+5 : 305).')+\\'px\\');') : ''" /> +} +</style> + +</head> +<body> + +<roundcube:include file="/includes/taskbar.html" /> +<roundcube:include file="/includes/header.html" /> +<roundcube:include file="/includes/settingstabs.html" /> + +<div id="mainscreen"> + +<div id="identities-list"> +<div id="identity-title" class="boxtitle"><roundcube:label name="responses" /></div> +<div class="boxlistcontent"> +<roundcube:object name="responsesList" id="identities-table" class="records-table" cellspacing="0" summary="Responses list" noheader="true" editIcon="" /> +</div> +<div class="boxfooter"> +<roundcube:button command="add" type="link" title="newidentity" class="buttonPas addgroup" classAct="button addgroup" content=" " condition="config:identities_level:0<2" /><roundcube:button command="delete" type="link" title="delete" class="buttonPas delgroup" classAct="button delgroup" content=" " condition="config:identities_level:0<2" /> +</div> +</div> + +<script type="text/javascript"> + var identviewsplit = new rcube_splitter({id:'identviewsplitter', p1: 'identities-list', p2: 'identity-box', orientation: 'v', relative: true, start: 300 }); + rcmail.add_onload('identviewsplit.init()'); +</script> + +<div id="identity-box"> + <roundcube:object name="responseframe" id="identity-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" /> +</div> + +</div> + +</body> +</html> diff --git a/skins/larry/addressbook.css b/skins/larry/addressbook.css index 39d0cce21..54a14da0b 100644 --- a/skins/larry/addressbook.css +++ b/skins/larry/addressbook.css @@ -149,26 +149,59 @@ background: url(images/listicons.png) -2px -1180px no-repeat; } +/* This padding-left should be equal to the focused border-left + the focused padding-left */ +#contacts-table thead tr td:first-child, +#contacts-table tbody tr td:first-child { + border-left: 0; + padding-left: 36px; +} + +/* because of border-collapse, we make the left border twice what we want it to be - half will be hidden to the left */ +#contacts-table tbody tr.focused > td:first-child { + border-left: 2px solid #b0ccd7; + padding-left: 34px; +} + +#contacts-table tbody tr.selected.focused > td:first-child { + border-left-color: #9ec2d0; +} + #contacts-table .contact td.name { background-position: 6px -1603px; } +#contacts-table .contact.focused td.name { + background-position: 4px -1603px; +} + #contacts-table .contact.selected td.name, #contacts-table .contact.unfocused td.name { background-position: 6px -1627px; font-weight: bold; } +#contacts-table .contact.selected.focused td.name { + background-position: 4px -1627px; +} + #contacts-table .group td.name { background-position: 6px -1555px; } +#contacts-table .group.focused td.name { + background-position: 4px -1555px; +} + #contacts-table .group.selected td.name, #contacts-table .group.unfocused td.name { background-position: 6px -1579px; font-weight: bold; } +#contacts-table .group.selected.focused td.name { + background-position: 4px -1579px; +} + #addresslist .boxtitle { padding-right: 95px; overflow: hidden; @@ -187,7 +220,7 @@ top: 0; left: 0; right: 0; - bottom: 28px; + bottom: 0px; border: 0; border-radius: 4px; } @@ -380,7 +413,7 @@ a.deletebutton { #import-box { position: absolute; - bottom: 28px; + bottom: 0px; top: 34px; left: 0; right: 0; diff --git a/skins/larry/ie7hacks.css b/skins/larry/ie7hacks.css index fc4713361..60adff7a1 100644 --- a/skins/larry/ie7hacks.css +++ b/skins/larry/ie7hacks.css @@ -43,7 +43,8 @@ a.deletebutton, .attachmentslist li a.cancelupload, #contacts-table td.action a, .previewheader .iconlink, -.minimal #taskbar .button-inner { +.minimal #taskbar .button-inner, +#preferences-details fieldset.advanced .advanced-toggle { /* workaround for text-indent which also offsets the background image */ text-indent: 0; font-size: 0; diff --git a/skins/larry/iehacks.css b/skins/larry/iehacks.css index 960ce7648..7c1585107 100644 --- a/skins/larry/iehacks.css +++ b/skins/larry/iehacks.css @@ -56,6 +56,10 @@ input.button:active { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eaeaea', endColorstr='#c8c8c8', GradientType=0); } +#messagestack div { + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e0404040', endColorstr='#e0303030', GradientType=0); +} + .ui-dialog.popupmessage .ui-dialog-titlebar { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e3e3e3', endColorstr='#cfcfcf', GradientType=0); } diff --git a/skins/larry/images/ajaxloader_dark.gif b/skins/larry/images/ajaxloader_dark.gif Binary files differnew file mode 100644 index 000000000..f1cce35ac --- /dev/null +++ b/skins/larry/images/ajaxloader_dark.gif diff --git a/skins/larry/images/buttons.png b/skins/larry/images/buttons.png Binary files differindex 9f8f44536..8e2560198 100644 --- a/skins/larry/images/buttons.png +++ b/skins/larry/images/buttons.png diff --git a/skins/larry/images/filetypes.png b/skins/larry/images/filetypes.png Binary files differindex 53b2eee9a..09772660b 100644 --- a/skins/larry/images/filetypes.png +++ b/skins/larry/images/filetypes.png diff --git a/skins/larry/images/listicons.png b/skins/larry/images/listicons.png Binary files differindex e4ffef660..551639876 100644 --- a/skins/larry/images/listicons.png +++ b/skins/larry/images/listicons.png diff --git a/skins/larry/images/messages_dark.png b/skins/larry/images/messages_dark.png Binary files differnew file mode 100644 index 000000000..d7c932502 --- /dev/null +++ b/skins/larry/images/messages_dark.png diff --git a/skins/larry/includes/footer.html b/skins/larry/includes/footer.html index a4fa69296..5cf9d1ec5 100644 --- a/skins/larry/includes/footer.html +++ b/skins/larry/includes/footer.html @@ -1,3 +1,5 @@ +<roundcube:object name="message" id="messagestack" condition="env:task != 'login'" /> + <script type="text/javascript"> // UI startup diff --git a/skins/larry/includes/mailtoolbar.html b/skins/larry/includes/mailtoolbar.html index 59f2d581a..5708a94f1 100644 --- a/skins/larry/includes/mailtoolbar.html +++ b/skins/larry/includes/mailtoolbar.html @@ -39,6 +39,8 @@ <li><roundcube:button command="download" label="emlsave" class="icon" classAct="icon active" innerclass="icon download" /></li> <li><roundcube:button command="edit" prop="new" label="editasnew" class="icon" classAct="icon active" innerclass="icon edit" /></li> <li><roundcube:button command="viewsource" label="viewsource" class="icon" classAct="icon active" innerclass="icon viewsource" /></li> + <li><roundcube:button command="move" label="moveto" class="icon" classAct="icon active" innerclass="icon move folder-selector-link" /></li> + <li><roundcube:button command="copy" label="copyto" class="icon" classAct="icon active" innerclass="icon copy folder-selector-link" /></li> <li><roundcube:button command="open" label="openinextwin" target="_blank" class="icon" classAct="icon active" innerclass="icon extwin" /></li> <roundcube:container name="messagemenu" id="messagemenu" /> </ul> diff --git a/skins/larry/mail.css b/skins/larry/mail.css index b65b08112..6cfbcaac3 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -36,20 +36,18 @@ position: absolute; top: 42px; left: 0; - width: 100%; - bottom: 28px; -} - -#mailview-top.fullheight { - border-radius: 4px 4px 0 0; + right: 0; + bottom: 0px; + overflow: visible; /* fixes display issues of fixed list header in IE */ } #mailview-bottom { + display: none; position: absolute; left: 0; bottom: 0; - width: 100%; - height: 27px; + right: 0; + height: 0; border-radius: 4px; border-top: none; } @@ -58,12 +56,6 @@ border-radius: 0 0 4px 4px; } -#folderlist-header { - width: 100%; - height: 12px; - top: 32px; -} - #mailboxcontainer, #messagelistcontainer { position: absolute; @@ -102,10 +94,6 @@ html>/**/body #messagelist { border-radius: 0 0 4px 4px; } -#mailview-top.fullheight #messagelistfooter { - border-radius: 0; -} - #messagelistfooter.rightalign { text-align: right; } @@ -214,6 +202,14 @@ a.iconbutton.threadmode.selected { background-position: 6px -406px; } +#mailboxlist li.mailbox.trash.empty > a { + background-position: 6px -1924px; +} + +#mailboxlist li.mailbox.trash.empty.selected > a { + background-position: 6px -1948px; +} + #mailboxlist li.mailbox.archive > a { background-position: 6px -1699px; } @@ -254,6 +250,14 @@ a.iconbutton.threadmode.selected { background-position: 23px -406px; } +#mailboxlist li.mailbox ul li.trash.empty > a { + background-position: 23px -1924px; +} + +#mailboxlist li.mailbox ul li.trash.empty.selected > a { + background-position: 23px -1948px; +} + #mailboxlist li.mailbox ul li.archive > a { background-position: 23px -1699px; } @@ -424,12 +428,6 @@ a.iconbutton.threadmode.selected { right: 0; } -#messagetoolbar .toolbarselect { - position: absolute; - bottom: 6px; - right: 3px; -} - #messagesearchtools { position: absolute; right: 0; @@ -453,11 +451,6 @@ a.iconbutton.threadmode.selected { /*** message list ***/ -/* this is necessary to make FF3 display borders */ -body:-moz-last-node #messagelist { - border-collapse: separate; -} - table.messagelist { z-index: 1; } @@ -518,7 +511,7 @@ table.messagelist.fixedcopy { } .messagelist tr td.date { - width: 135px; + width: 155px; } .messagelist tr.message { @@ -621,6 +614,10 @@ table.messagelist.fixedcopy { background-position: -24px -1116px; } +.messagelist thead tr td.priority span.priority { + background-position: -24px -1845px; +} + .messagelist tr td.priority span.prio5 { background-position: 0 -1905px; } @@ -642,7 +639,7 @@ table.messagelist.fixedcopy { } .messagelist thead tr td.flag span.flagged { - background-position: -24px -1036px; + background-position: -22px -1036px; } .messagelist tr td.status span.msgicon:hover { @@ -696,7 +693,7 @@ table.messagelist.fixedcopy { } .messagelist thead tr td.status span.status { - background-position: -24px -1016px; + background-position: -23px -1017px; } .messagelist tr td div.collapsed { @@ -753,7 +750,7 @@ table.messagelist.fixedcopy { top: 0; left: 0; width: 100%; - bottom: 28px; + bottom: 0px; } #messagecontframe { @@ -766,8 +763,9 @@ table.messagelist.fixedcopy { top: 110px; left: 0; width: 100%; - bottom: 27px; + bottom: 1px; overflow: auto; + -webkit-overflow-scrolling: touch; } #messageheader, @@ -1068,20 +1066,20 @@ div.hide-headers { margin: 8px; } -#message-objects div.notice, -#message-buttons div.notice { +#message-objects div.notice { display: block; color: #960; border: 1px solid #ffdf0e; background-color: #fef893; background-position: 5px -83px; - padding: 6px 12px 4px 30px; + padding: 6px 12px 6px 30px; white-space: normal; } #message-objects div a.button, #messagebody span.part-notice a.button { margin-left: 10px; + margin-top: -1px; } div.message-part, @@ -1366,10 +1364,8 @@ div.message-partheaders .headers-table td.header { position: absolute; top: 42px; left: 0; - width: 100%; - bottom: 28px; - border-radius: 4px 4px 0 0; - border-bottom: none; + right: 0; + bottom: 0px; overflow: hidden; } @@ -1456,7 +1452,6 @@ div.message-partheaders .headers-table td.header { -o-box-shadow: inset 0 1px 0 0 #fff; -webkit-box-shadow: inset 0 1px 0 0 #fff; -moz-box-shadow: inset 0 1px 0 0 #fff; - } .composeoption { @@ -1490,6 +1485,7 @@ div.message-partheaders .headers-table td.header { left: 0; right: 260px; bottom: 0; + border-radius: 0 0 0 4px; } #composebodycontainer.buttons { @@ -1503,7 +1499,7 @@ div.message-partheaders .headers-table td.header { bottom: 0; width: 99%; border: 0; - border-radius: 0; + border-radius: 0 0 0 4px; padding: 8px 0 8px 8px; resize: none; font-family: monospace; diff --git a/skins/larry/settings.css b/skins/larry/settings.css index 6afa48c40..af667b9e7 100644 --- a/skins/larry/settings.css +++ b/skins/larry/settings.css @@ -2,7 +2,7 @@ * Roundcube webmail styles for the Settings section * * Copyright (c) 2012, The Roundcube Dev Team - * Screendesign by FLINT / Büro für Gestaltung, bueroflint.com + * Screendesign by FLINT / Büro für Gestaltung, bueroflint.com * * The contents are subject to the Creative Commons Attribution-ShareAlike * License. It is allowed to copy, distribute, transmit and to adapt the work @@ -61,11 +61,21 @@ #preferences-details fieldset.advanced .advanced-toggle { position: absolute; - top: 2px; + display: block; + top: 0px; right: 6px; text-decoration: none; color: #666; font-size: 11px; + width: 20px; + height: 18px; + background: url('images/listicons.png') 0 -1157px no-repeat; + text-indent: 1000px; + overflow: hidden; +} + +#preferences-details fieldset.advanced .collapsed .advanced-toggle { + background-position: -24px -1137px; } #sections-table tbody td.section, @@ -130,6 +140,14 @@ background-position: 6px -1819px; } +#settings-sections span.responses a { + background-position: 6px -1972px; +} + +#settings-sections span.responses.selected a { + background-position: 6px -1996px; +} + #sections-table #rcmrowgeneral td.section { background-position: 6px -573px; } @@ -206,6 +224,10 @@ text-overflow: ellipsis; } +#identities-table tbody tr.readonly td { + font-style: italic; +} + #folder-details, #identity-details { position: absolute; diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 4b238c163..e1a813373 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -509,6 +509,7 @@ a.iconlink.upload { } #message.statusbar { + display: none; position: absolute; bottom: 0; left: 0; @@ -528,6 +529,102 @@ a.iconlink.upload { text-overflow: ellipsis; } +#messagestack { + position: absolute; + bottom: 20px; + right: 12px; + z-index: 50000; + width: auto; + height: auto; + max-height: 85%; + overflow-y: auto; + padding: 2px; +} + +#messagestack div { + display: block; + position: relative; + width: 280px; + height: auto; + min-height: 16px; + margin: 3px 2px 5px 2px; + padding: 8px 10px 7px 30px; + cursor: default; + font-size: 12px; + font-weight: bold; + border-radius: 4px; + border: 1px solid #444; + color: #ebebeb; + text-shadow: 0 1px 1px #000; + + background: rgba(64,64,64,0.85); + background: -moz-linear-gradient(top, rgba(64,64,64,0.85) 0%, rgba(48,48,48,0.9) 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(64,64,64,0.85)), color-stop(100%,rgba(48,48,48,0.9))); + background: -webkit-linear-gradient(top, rgba(64,64,64,0.85) 0%, rgba(48,48,48,0.85) 100%); + background: -o-linear-gradient(top, rgba(64,64,64,0.85) 0%, rgba(48,48,48,0.85) 100%); + background: -ms-linear-gradient(top, rgba(64,64,64,0.85) 0%, rgba(48,48,48,0.85) 100%); + background: linear-gradient(to bottom, rgba(64,64,64,0.85) 0%, rgba(48,48,48,0.85) 100%); + + -moz-box-shadow: 0 1px 4px 0 rgba(50,50,50,0.8), inset 0px 1px 0 0px #888; + -webkit-box-shadow: 0 1px 4px 0 rgba(50,50,50,0.8), inset 0px 1px 0 0px #888; + -o-box-shadow: 0 1px 4px 0 rgba(50,50,50,0.8), inset 0px 1px 0 0px #888; + box-shadow: 0 1px 4px 0 rgba(50,50,50,0.8), inset 0px 1px 0 0px #888; +} + +#messagestack div:after { + content: ""; + position: absolute; + display: block; + top: 0; + left: 4px; + width: 20px; + height: 24px; + background: url(images/messages_dark.png) 0 7px no-repeat; +} + +#messagestack div.error { + color: #ff615d; +} + +#messagestack div.error:after { + background-position: 0 -55px; +} + +#messagestack div.warning { + color: #f4bf0e; +} + +#messagestack div.warning:after { + background-position: 0 -84px; +} + +#messagestack div.confirmation { + color: #00e05a; +} + +#messagestack div.confirmation:after { + background-position: 0 -25px; +} + +#messagestack div.loading { + color: #ddd; +} + +#messagestack div.loading:after { + top: 4px; + left: 6px; + background: url(images/ajaxloader_dark.gif) 0 4px no-repeat; +} + +#messagestack div a { + color: #94c0da; +} + +#messagestack div a:hover { + text-decoration: underline; + cursor: pointer; +} + .ui-dialog.error .ui-dialog-title, .ui-dialog.warning .ui-dialog-title, .ui-dialog.confirmation .ui-dialog-title { @@ -1045,6 +1142,9 @@ ul.listing { ul.listing li { background-color: #d9ecf4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } ul.listing li ul { @@ -1241,7 +1341,6 @@ table.records-table { display: table; width: 100%; table-layout: fixed; - border-collapse: collapse; border-spacing: 0; border: 1px solid #bbd3da; } @@ -1291,9 +1390,21 @@ table.records-table { background-color: #fff; } +/* This padding-left minus the focused padding left should be half of the focused border-left */ .records-table thead tr td:first-child, .records-table tbody tr td:first-child { border-left: 0; + padding-left: 6px; +} + +/* because of border-collapse, we make the left border twice what we want it to be - half will be hidden to the left */ +.records-table tbody tr.focused > td:first-child { + border-left: 2px solid #b0ccd7; + padding-left: 4px; +} + +.records-table tbody tr.selected.focused > td:first-child { + border-left-color: #49b3d2; } .records-table tr.selected td { @@ -1313,7 +1424,7 @@ table.records-table { .records-table tr.unfocused td { color: #fff !important; - background: #4db0d2 !important; + background-color: #4db0d2 !important; } .records-table tr.unfocused td a, @@ -1326,7 +1437,6 @@ table.records-table { color: #ccc !important; } - /*** iFrames ***/ #aboutframe { @@ -1405,7 +1515,7 @@ body.iframe .footerleft.floating:before, top: 34px; left: 0; right: 0; - bottom: 28px; + bottom: 0px; overflow: auto; } @@ -1414,7 +1524,7 @@ body.iframe .footerleft.floating:before, top: 0; left: 0; right: 0; - bottom: 28px; + bottom: 0px; } .footerleft { @@ -1440,6 +1550,20 @@ body.iframe .footerleft.floating:before, font-size: 12px; } +.propform div.prop { + margin-bottom: 0.5em; +} + +.propform div.prop.block label { + display: block; + margin-bottom: 0.3em; +} + +.propform div.prop.block input, +.propform div.prop.block textarea { + width: 95%; +} + fieldset.floating { float: left; margin-right: 10px; @@ -1597,11 +1721,13 @@ ul.proplist li { min-height: 40px; padding: 5px 25px; text-align: center; + font-size: 1.1em; } #login-form #message div { display: inline-block; padding-right: 0; + font-size: 12px; } #bottomline { @@ -1620,7 +1746,7 @@ ul.proplist li { #quicksearchbar { position: absolute; - right: 1px; + right: 2px; top: 2px; width: 240px; } @@ -1817,7 +1943,11 @@ ul.proplist li { } .toolbar a.button.download { - background-position: center -1906px; + background-position: center -1892px; +} + +.toolbar a.button.responses { + background-position: center -1932px; } a.menuselector { @@ -1889,11 +2019,11 @@ select.decorated option { #quotadisplay { left: 6px; + height: 18px; font-size: 12px; font-weight: bold; text-shadow: 0px 1px 1px #fff; padding-left: 30px; - height: 18px; background: url(images/quota.png) -100px 0 no-repeat; } @@ -1906,6 +2036,9 @@ select.decorated option { top: 32px; left: 90px; width: auto; + max-height: 70%; + overflow: -moz-scrollbars-vertical; + overflow-y: auto; background: #444; border: 1px solid #999; z-index: 240; @@ -1922,6 +2055,7 @@ select.decorated option { } ul.toolbarmenu, +ul.toolbarmenu ul, #rcmKSearchpane ul { margin: 0; padding: 0; @@ -1940,13 +2074,13 @@ ul.toolbarmenu li, } .googie_list tr:first-child td, -ul.toolbarmenu li:first-child, +ul.toolbarmenu > li:first-child, select.decorated option:first-child { border-top: 0; } .googie_list tr:last-child td, -ul.toolbarmenu li:last-child, +ul.toolbarmenu > li:last-child, select.decorated option:last-child { border-bottom: 0; } @@ -2000,6 +2134,11 @@ ul.toolbarmenu li label { text-shadow: 0px 1px 1px #333; } +ul.toolbarmenu li.separator label { + color: #bbb; + font-style: italic; +} + ul.toolbarmenu li a.icon { color: #eee; padding: 2px 6px; @@ -2078,6 +2217,23 @@ ul.toolbarmenu li span.conversation { background-position: 0 -1532px; } +ul.toolbarmenu li span.move { + background-position: 0 -2126px; +} + +ul.toolbarmenu li span.copy { + background-position: 0 -2150px; +} + +#snippetslist { + max-width: 200px; +} + +#snippetslist li a { + overflow: hidden; + text-overflow: ellipsis; +} + #rcmKSearchpane { border-radius: 0 0 4px 4px; border-top: 0; @@ -2181,6 +2337,38 @@ ul.toolbarmenu li span.conversation { z-index: 255; } +/*** folder selector ***/ + +#folder-selector li a span { + background: url("images/listicons.png") 4px -2021px no-repeat; + display: block; + height: 17px; + min-height: 14px; + padding: 4px 4px 1px 28px; + overflow: hidden; + max-width: 120px; + text-overflow: ellipsis; +} + +#folder-selector li a.virtual { + opacity: .2; +} + +#folder-selector li a.inbox span { + background-position: 4px -2049px; +} +#folder-selector li a.drafts span { + background-position: 4px -1388px; +} +#folder-selector li a.sent span { + background-position: 4px -2074px; +} +#folder-selector li a.trash span { + background-position: 4px -1508px; +} +#folder-selector li a.junk span { + background-position: 4px -2100px; +} /*** attachment list ***/ @@ -2287,6 +2475,18 @@ ul.toolbarmenu li span.conversation { background-position: 0 -494px; } +.attachmentslist li.ppt, +.attachmentslist li.pptx, +.attachmentslist li.ppsx, +.attachmentslist li.vnd.mspowerpoint { + background-position: 0 -520px; +} + +.attachmentslist li.odp, +.attachmentslist li.otp { + background-position: 0 -546px; +} + .attachmentslist li a, #compose-attachments ul li { display: block; diff --git a/skins/larry/svggradients.css b/skins/larry/svggradients.css index c40d44f4b..2596f2bd2 100644 --- a/skins/larry/svggradients.css +++ b/skins/larry/svggradients.css @@ -56,6 +56,10 @@ input.button:active { background-image: url(svggradient.php?c=eaeaea;c8c8c8); } +#messagestack div { + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQwNDA0MCIgc3RvcC1vcGFjaXR5PSIwLjg4Ii8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMzMDMwMzAiIHN0b3Atb3BhY2l0eT0iMC44OCIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); +} + .ui-dialog.popupmessage .ui-dialog-titlebar { background-image: url(svggradient.php?c=e3e3e3;cfcfcf); } diff --git a/skins/larry/templates/addressbook.html b/skins/larry/templates/addressbook.html index b33ebd999..9f83853b2 100644 --- a/skins/larry/templates/addressbook.html +++ b/skins/larry/templates/addressbook.html @@ -71,7 +71,6 @@ <div class="iframebox"> <roundcube:object name="addressframe" id="contact-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" /> </div> - <roundcube:object name="message" id="message" class="statusbar" /> </div> diff --git a/skins/larry/templates/compose.html b/skins/larry/templates/compose.html index 15c8e56ff..11662d185 100644 --- a/skins/larry/templates/compose.html +++ b/skins/larry/templates/compose.html @@ -30,6 +30,7 @@ <roundcube:endif /> <roundcube:button name="addattachment" type="link" class="button attach" classAct="button attach" classSel="button attach pressed" label="attach" title="addattachment" onclick="UI.show_uploadform();return false" /> <roundcube:button command="insert-sig" type="link" class="button insertsig disabled" classAct="button insertsig" classSel="button insertsig pressed" label="signature" title="insertsignature" /> + <a href="#responses" class="button responses" label="responses" title="<roundcube:label name='insertresponse' />" id="responsesmenulink" unselectable="on" onmousedown="return false" onclick="UI.show_popup('responsesmenu');return false"><roundcube:label name="responses" /></a> <roundcube:container name="toolbar" id="compose-toolbar" /> </div> </div> @@ -178,10 +179,6 @@ </form> -<div id="mailview-bottom" class="uibox"> - <roundcube:object name="message" id="message" class="statusbar" /> -</div> - </div><!-- end mailview-right --> </div><!-- end mainscreen --> @@ -196,6 +193,16 @@ <div id="spellmenu" class="popupmenu"></div> +<div id="responsesmenu" class="popupmenu"> + <ul class="toolbarmenu" id="textresponsesmenu"> + <li class="separator" id=""><label><roundcube:label name="insertresponse" /></label></li> + <roundcube:object name="responseslist" id="responseslist" tagname="ul" itemclass="active" /> + <li class="separator"><label><roundcube:label name="manageresponses" /></label></li> + <li><roundcube:button command="save-response" type="link" label="savenewresponse" classAct="active" unselectable="on" /></li> + <li><roundcube:button command="responses" type="link" label="editresponses" classAct="active" /></li> + </ul> +</div> + <roundcube:include file="/includes/footer.html" /> </body> diff --git a/skins/larry/templates/folders.html b/skins/larry/templates/folders.html index 988ff952c..56396bf1d 100644 --- a/skins/larry/templates/folders.html +++ b/skins/larry/templates/folders.html @@ -31,7 +31,6 @@ <div class="iframebox"> <roundcube:object name="folderframe" id="preferences-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" /> </div> - <roundcube:object name="message" id="message" class="statusbar" /> </div> </div> diff --git a/skins/larry/templates/identities.html b/skins/larry/templates/identities.html index d9270b68a..e3d2cc842 100644 --- a/skins/larry/templates/identities.html +++ b/skins/larry/templates/identities.html @@ -28,7 +28,6 @@ <div class="iframebox"> <roundcube:object name="identityframe" id="preferences-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" /> </div> - <roundcube:object name="message" id="message" class="statusbar" /> </div> </div> diff --git a/skins/larry/templates/importcontacts.html b/skins/larry/templates/importcontacts.html index 69b138b9a..a670d0354 100644 --- a/skins/larry/templates/importcontacts.html +++ b/skins/larry/templates/importcontacts.html @@ -25,8 +25,7 @@ </p> </div> -<roundcube:object name="message" id="message" class="statusbar" /> - +</div> </div> <roundcube:include file="/includes/footer.html" /> diff --git a/skins/larry/templates/login.html b/skins/larry/templates/login.html index 13e919ad3..8da941189 100644 --- a/skins/larry/templates/login.html +++ b/skins/larry/templates/login.html @@ -39,11 +39,13 @@ <roundcube:object name="preloader" images=" /images/ajaxloader.gif + /images/ajaxloader_dark.gif /images/buttons.png /images/addcontact.png /images/filetypes.png /images/listicons.png /images/messages.png + /images/messages_dark.png /images/quota.png /images/selector.png /images/splitter.png diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html index f2c52c820..ff5f7549c 100644 --- a/skins/larry/templates/mail.html +++ b/skins/larry/templates/mail.html @@ -5,8 +5,8 @@ <roundcube:include file="/includes/links.html" /> <style type="text/css"> <roundcube:if condition="config:preview_pane == true" /> - #mailview-top { height: <roundcube:exp expression="!empty(cookie:mailviewsplitter) ? cookie:mailviewsplitter-48 : 276" />px; } - #mailview-bottom { top: <roundcube:exp expression="!empty(cookie:mailviewsplitter) ? cookie:mailviewsplitter+6 : 330" />px; height: auto; } + #mailview-top { height: 276px; } + #mailview-bottom { top: 330px; height: auto; display: block; } #mailpreviewframe { display: block; } <roundcube:endif /> </style> @@ -27,7 +27,6 @@ <div id="mailview-left"> <!-- folders list --> -<div id="folderlist-header"></div> <div id="mailboxcontainer" class="uibox listbox"> <div id="folderlist-content" class="scroller withfooter"> <roundcube:object name="mailboxlist" id="mailboxlist" class="treelist listing" folder_filter="mail" unreadwrap="%s" /> @@ -116,8 +115,6 @@ <roundcube:object name="messagecontentframe" id="messagecontframe" style="width:100%; height:100%" frameborder="0" src="/watermark.html" /> </div> -<roundcube:object name="message" id="message" class="statusbar" /> - </div><!-- end mailview-bottom --> </div><!-- end mailview-right --> diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html index 6937b00af..df92b7511 100644 --- a/skins/larry/templates/message.html +++ b/skins/larry/templates/message.html @@ -16,9 +16,6 @@ <roundcube:button command="list" type="link" class="button back disabled" classAct="button back" classSel="button back pressed" label="back" /> <roundcube:endif /> <roundcube:include file="/includes/mailtoolbar.html" /> - <div class="toolbarselect"> - <roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('move', this.options[this.selectedIndex].value)" class="mailboxlist decorated" folder_filter="mail" /> - </div> </div> <roundcube:if condition="!env:extwin" /> @@ -36,6 +33,7 @@ <div id="mailview-right" class="offset uibox"> <roundcube:else /> +<roundcube:object name="mailboxlist" folder_filter="mail" type="js" /> <div id="mailview-right" class="offset fullwidth uibox"> <roundcube:endif /> @@ -84,8 +82,6 @@ </div> </div> -<roundcube:object name="message" id="message" class="statusbar" /> - </div><!-- end mailview-right --> </div><!-- end mainscreen --> diff --git a/skins/larry/templates/messageerror.html b/skins/larry/templates/messageerror.html index a735d47f2..dbe373a12 100644 --- a/skins/larry/templates/messageerror.html +++ b/skins/larry/templates/messageerror.html @@ -38,8 +38,6 @@ <div id="messagecontent" class="watermark"></div> -<roundcube:object name="message" id="message" class="statusbar" /> - </div><!-- end mailview-right --> </div><!-- end mainscreen --> diff --git a/skins/larry/templates/messagepart.html b/skins/larry/templates/messagepart.html index d0e3a808d..0ec935873 100644 --- a/skins/larry/templates/messagepart.html +++ b/skins/larry/templates/messagepart.html @@ -27,7 +27,6 @@ <div class="iframebox"> <roundcube:object name="messagePartFrame" id="messagepartframe" frameborder="0" /> </div> - <roundcube:object name="message" id="message" class="statusbar" /> </div> </div> diff --git a/skins/larry/templates/plugin.html b/skins/larry/templates/plugin.html index 341f604ac..5b86563ab 100644 --- a/skins/larry/templates/plugin.html +++ b/skins/larry/templates/plugin.html @@ -16,7 +16,6 @@ <div id="pluginbody" class="uibox contentbox"> <roundcube:object name="plugin.body" /> -<roundcube:object name="message" id="message" class="statusbar" /> </div> </div> diff --git a/skins/larry/templates/responseedit.html b/skins/larry/templates/responseedit.html new file mode 100644 index 000000000..8f180fe7f --- /dev/null +++ b/skins/larry/templates/responseedit.html @@ -0,0 +1,22 @@ +<roundcube:object name="doctype" value="html5" /> +<html> +<head> +<title><roundcube:object name="pagetitle" /></title> +<roundcube:include file="/includes/links.html" /> +</head> +<body class="iframe"> + +<h1 class="boxtitle"><roundcube:object name="steptitle" /></h1> + +<div id="preferences-details" class="boxcontent"> +<roundcube:object name="responseform" class="propform" size="60" textareacols="60" textarearows="18" /> +</div> + +<div class="footerleft formbuttons"> + <roundcube:button command="save" type="input" class="button mainaction" label="save" condition="!env:readonly" /> +</div> + +<roundcube:include file="/includes/footer.html" /> + +</body> +</html> diff --git a/skins/larry/templates/responses.html b/skins/larry/templates/responses.html new file mode 100644 index 000000000..8e6884539 --- /dev/null +++ b/skins/larry/templates/responses.html @@ -0,0 +1,40 @@ +<roundcube:object name="doctype" value="html5" /> +<html> +<head> +<title><roundcube:object name="pagetitle" /></title> +<roundcube:include file="/includes/links.html" /> +</head> +<body class="noscroll"> + +<roundcube:include file="/includes/header.html" /> + +<div id="mainscreen" class="offset"> + +<roundcube:include file="/includes/settingstabs.html" /> + +<div id="settings-right"> + +<div id="identitieslist" class="uibox listbox"> +<h2 class="boxtitle"><roundcube:label name="responses" /></h2> +<div class="scroller withfooter"> +<roundcube:object name="responsesList" id="identities-table" class="listing" cellspacing="0" summary="Responses list" noheader="true" /> +</div> +<div class="boxfooter"> +<roundcube:button command="add" type="link" title="savenewresponse" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button command="delete" type="link" title="delete" class="listbutton delete disabled" classAct="listbutton delete" innerClass="inner" content="-" /> +</div> +</div> + +<div id="identity-details" class="uibox contentbox"> + <div class="iframebox"> + <roundcube:object name="responseframe" id="preferences-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" /> + </div> +</div> + +</div> + +</div> + +<roundcube:include file="/includes/footer.html" /> + +</body> +</html> diff --git a/skins/larry/templates/settings.html b/skins/larry/templates/settings.html index 427e0a4f5..08df7686e 100644 --- a/skins/larry/templates/settings.html +++ b/skins/larry/templates/settings.html @@ -24,7 +24,6 @@ <div class="iframebox"> <roundcube:object name="prefsframe" id="preferences-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" /> </div> - <roundcube:object name="message" id="message" class="statusbar" /> </div> </div> diff --git a/skins/larry/ui.js b/skins/larry/ui.js index d558f16a2..44fc727f6 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -31,6 +31,7 @@ function rcube_mail_ui() var me = this; var mailviewsplit; var compose_headers = {}; + var prefs; // export public methods this.set = setenv; @@ -44,11 +45,13 @@ function rcube_mail_ui() this.show_header_row = show_header_row; this.hide_header_row = hide_header_row; this.update_quota = update_quota; + this.get_pref = get_pref; + this.save_pref = save_pref; // set minimal mode on small screens (don't wait for document.ready) if (window.$ && document.body) { - var minmode = rcmail.get_cookie('minimalmode'); + var minmode = get_pref('minimalmode'); if (parseInt(minmode) || (minmode === null && $(window).height() < 850)) { $(document.body).addClass('minimal'); } @@ -68,6 +71,51 @@ function rcube_mail_ui() } /** + * Get preference stored in browser + */ + function get_pref(key) + { + if (!prefs) { + prefs = window.localStorage ? rcmail.local_storage_get_item('prefs.larry', {}) : {}; + } + + // fall-back to cookies + if (prefs[key] == null) { + var cookie = rcmail.get_cookie(key); + if (cookie != null) { + prefs[key] = cookie; + + // copy value to local storage and remove cookie + if (window.localStorage) { + rcmail.local_storage_set_item('prefs.larry', prefs); + rcmail.set_cookie(key, cookie, new Date()); // expire cookie + } + } + } + + return prefs[key]; + } + + /** + * Saves preference value to browser storage + */ + function save_pref(key, val) + { + prefs[key] = val; + + // write prefs to local storage + if (window.localStorage) { + rcmail.local_storage_set_item('prefs.larry', prefs); + } + else { + // store value in cookie + var exp = new Date(); + exp.setYear(exp.getFullYear() + 1); + rcmail.set_cookie(key, val, exp); + } + } + + /** * Initialize UI * Called on document.ready */ @@ -82,15 +130,15 @@ function rcube_mail_ui() $('#taskbar .minmodetoggle').click(function(e){ var ismin = $(document.body).toggleClass('minimal').hasClass('minimal'); - rcmail.set_cookie('minimalmode', ismin?1:0); + save_pref('minimalmode', ismin?1:0); $(window).resize(); }); /*** mail task ***/ if (rcmail.env.task == 'mail') { - rcmail.addEventListener('menu-open', menu_open); - rcmail.addEventListener('menu-save', menu_save); - rcmail.addEventListener('responseafterlist', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list') }); + rcmail.addEventListener('menu-open', menu_open) + .addEventListener('menu-save', menu_save) + .addEventListener('responseafterlist', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list') }); var dragmenu = $('#dragmessagemenu'); if (dragmenu.length) { @@ -99,21 +147,28 @@ function rcube_mail_ui() } if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') { - rcmail.addEventListener('enable-command', enable_command); - rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); }); - rcmail.addEventListener('afterhide-headers', function() { layout_messageview(); }); + rcmail.addEventListener('enable-command', enable_command) + .addEventListener('aftershow-headers', function() { layout_messageview(); }) + .addEventListener('afterhide-headers', function() { layout_messageview(); }); $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(); return false }); // add menu link for each attachment $('#attachment-list > li').each(function() { - $(this).append($('<a class="drop">').click(function() { attachmentmenu(this); })); + $(this).append($('<a class="drop"></a>').click(function() { attachmentmenu(this); })); }); + + if (get_pref('previewheaders') == '1') { + toggle_preview_headers(); + } } else if (rcmail.env.action == 'compose') { - rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 200); }); - rcmail.addEventListener('aftersend-attachment', show_uploadform); - rcmail.addEventListener('add-recipient', function(p){ show_header_row(p.field, true); }); - layout_composeview(); + rcmail.addEventListener('aftersend-attachment', show_uploadform) + .addEventListener('add-recipient', function(p){ show_header_row(p.field, true); }) + .addEventListener('aftertoggle-editor', function(e){ + window.setTimeout(function(){ layout_composeview() }, 200); + if (e && e.mode) + $("select[name='editorSelector']").val(e.mode); + }); // Show input elements with non-empty value var f, v, field, fields = ['cc', 'bcc', 'replyto', 'followupto']; @@ -130,9 +185,18 @@ function rcube_mail_ui() $('#composeoptionstoggle').toggleClass('remove'); $('#composeoptions').toggle(); layout_composeview(); + save_pref('composeoptions', $('#composeoptions').is(':visible') ? '1' : '0'); return false; }).css('cursor', 'pointer'); + if (get_pref('composeoptions') !== '0') { + $('#composeoptionstoggle').click(); + } + + // adjust hight when textarea starts to scroll + $("textarea[name='_to'], textarea[name='_cc'], textarea[name='_bcc']").change(function(e){ adjust_compose_editfields(this); }).change(); + rcmail.addEventListener('autocomplete_insert', function(p){ adjust_compose_editfields(p.field); }); + // toggle compose options if opened in new window and they were visible before var opener_rc = rcmail.opener(); if (opener_rc && opener_rc.env.action == 'compose' && $('#composeoptionstoggle', opener.document).hasClass('remove')) @@ -152,11 +216,9 @@ function rcube_mail_ui() if (previewframe) mailviewsplit.init(); - new rcube_scroller('#folderlist-content', '#folderlist-header', '#folderlist-footer'); - - rcmail.addEventListener('setquota', update_quota); - rcmail.addEventListener('enable-command', enable_command); - rcmail.addEventListener('afterimport-messages', show_uploadform); + rcmail.addEventListener('setquota', update_quota) + .addEventListener('enable-command', enable_command) + .addEventListener('afterimport-messages', show_uploadform); } else if (rcmail.env.action == 'get') { new rcube_splitter({ id:'mailpartsplitterv', p1:'#messagepartheader', p2:'#messagepartcontainer', @@ -211,17 +273,15 @@ function rcube_mail_ui() } /*** addressbook task ***/ else if (rcmail.env.task == 'addressbook') { - rcmail.addEventListener('afterupload-photo', show_uploadform); - rcmail.addEventListener('beforepushgroup', push_contactgroup); - rcmail.addEventListener('beforepopgroup', pop_contactgroup); + rcmail.addEventListener('afterupload-photo', show_uploadform) + .addEventListener('beforepushgroup', push_contactgroup) + .addEventListener('beforepopgroup', pop_contactgroup); if (rcmail.env.action == '') { new rcube_splitter({ id:'addressviewsplitterd', p1:'#addressview-left', p2:'#addressview-right', orientation:'v', relative:true, start:226, min:150, size:12, render:resize_leftcol }).init(); new rcube_splitter({ id:'addressviewsplitter', p1:'#addresslist', p2:'#contacts-box', orientation:'v', relative:true, start:286, min:270, size:12 }).init(); - - new rcube_scroller('#directorylist-content', '#directorylist-header', '#directorylist-footer'); } var dragmenu = $('#dragcontactmenu'); @@ -309,8 +369,10 @@ function rcube_mail_ui() function body_mouseup(e) { var config, obj, target = e.target; + if (target.className == 'inner') target = e.target.parentNode; + for (var id in popups) { obj = popups[id]; config = popupconfig[id]; @@ -319,9 +381,10 @@ function rcube_mail_ui() && !config.toggle && (!config.editable || !target_overlaps(target, obj.get(0))) && (!config.sticky || !rcube_mouse_is_over(e, obj.get(0))) + && !$(target).is('.folder-selector-link') ) { var myid = id+''; - window.setTimeout(function(){ show_popupmenu(myid, false) }, 10); + window.setTimeout(function() { show_popupmenu(myid, false); }, 10); } } } @@ -366,8 +429,15 @@ function rcube_mail_ui() */ function message_displayed(p) { + var siblings = $(p.object).siblings('div'); + if (siblings.length) + $(p.object).insertBefore(siblings.first()); + // show a popup dialog on errors if (p.type == 'error' && rcmail.env.task != 'login') { + // hide original message object, we don't want both + rcmail.hide_message(p.object); + if (me.message_timer) { window.clearTimeout(me.message_timer); } @@ -376,8 +446,10 @@ function rcube_mail_ui() } var msg = p.message, - pos = $(p.object).offset(); - pos.top -= (rcmail.env.task == 'login' ? 20 : 160); + dialog_close = function() { + // check if dialog is still displayed, to prevent from js error + me.messagedialog.is(':visible') && me.messagedialog.dialog('destroy').hide(); + }; if (me.messagedialog.is(':visible')) msg = me.messagedialog.html() + '<p>' + p.message + '</p>'; @@ -388,16 +460,14 @@ function rcube_mail_ui() closeOnEscape: true, dialogClass: 'popupmessage ' + p.type, title: env.errortitle, - close: function() { - me.messagedialog.dialog('destroy').hide(); - }, - position: ['center', pos.top], - hide: { effect:'drop', direction:'down' }, + close: dialog_close, + position: ['center', 'center'], + hide: {effect: 'fadeOut'}, width: 420, minHeight: 90 }).show(); - me.message_timer = window.setTimeout(function(){ me.messagedialog.dialog('close'); }, Math.max(2000, p.timeout / 2)); + me.message_timer = window.setTimeout(dialog_close, p.timeout); } } @@ -428,6 +498,16 @@ function rcube_mail_ui() // STUB } + function adjust_compose_editfields(elem) + { + if (elem.nodeName == 'TEXTAREA') { + var $elem = $(elem), line_height = 14, // hard-coded because some browsers only provide the outer height in elem.clientHeight + content_height = elem.scrollHeight, + rows = elem.value.length > 80 && content_height > line_height*1.5 ? 2 : 1; + $elem.css('height', (line_height*rows) + 'px'); + layout_composeview(); + } + } function layout_composeview() { @@ -473,7 +553,7 @@ function rcube_mail_ui() function enable_command(p) { - if (p.command == 'reply-list') { + if (p.command == 'reply-list' && rcmail.env.reply_all_mode == 1) { var label = rcmail.gettext(p.status ? 'replylist' : 'replyall'); if (rcmail.env.action == 'preview') $('a.button.replyall').attr('title', label); @@ -584,7 +664,7 @@ function rcube_mail_ui() var button = $(e.target), frame = $('#mailpreviewframe'), visible = !frame.is(':visible'), - splitter = mailviewsplit.pos || parseInt(rcmail.get_cookie('mailviewsplitter') || 320), + splitter = mailviewsplit.pos || parseInt(get_pref('mailviewsplitter') || 320), topstyles, bottomstyles, uid; frame.toggle(); @@ -592,7 +672,7 @@ function rcube_mail_ui() if (visible) { $('#mailview-top').removeClass('fullheight').css({ bottom:'auto' }); - $('#mailview-bottom').css({ height:'auto' }); + $('#mailview-bottom').css({ height:'auto' }).show(); rcmail.env.contentframe = 'messagecontframe'; if (uid = rcmail.message_list.get_single_selection()) @@ -610,8 +690,8 @@ function rcube_mail_ui() rcmail.env.contentframe = null; rcmail.show_contentframe(false); - $('#mailview-top').addClass('fullheight').css({ height:'auto', bottom:'28px' }); - $('#mailview-bottom').css({ top:'auto', height:'26px' }); + $('#mailview-top').addClass('fullheight').css({ height:'auto', bottom:'0px' }); + $('#mailview-bottom').css({ top:'auto', height:'0px' }).hide(); if (mailviewsplit.handle) mailviewsplit.handle.hide(); @@ -641,6 +721,8 @@ function rcube_mail_ui() button.attr('href', '#hide').removeClass('add').addClass('remove') else button.attr('href', '#details').removeClass('remove').addClass('add') + + save_pref('previewheaders', full.is(':visible') ? '1' : '0'); } @@ -1157,7 +1239,7 @@ function rcube_splitter(p) $(window).resize(onResize); // read saved position from cookie - var cookie = rcmail.get_cookie(this.id); + var cookie = this.get_cookie(); if (cookie && !isNaN(cookie)) { this.pos = parseFloat(cookie); this.resize(); @@ -1246,6 +1328,18 @@ function rcube_splitter(p) if (!me.drag_active) return false; + // with timing events dragging action is more responsive + window.clearTimeout(me.ts); + me.ts = window.setTimeout(function() { onDragAction(e); }, 1); + + return false; + }; + + /** + * Dragging action (see onDrag()) + */ + function onDragAction(e) + { var pos = rcube_event.get_mouse_pos(e); if (me.relative) { @@ -1269,7 +1363,6 @@ function rcube_splitter(p) me.p1pos = me.relative ? me.p1.position() : me.p1.offset(); me.p2pos = me.relative ? me.p2.position() : me.p2.offset(); - return false; }; /** @@ -1312,13 +1405,20 @@ function rcube_splitter(p) }; /** + * Get saved splitter position from cookie + */ + this.get_cookie = function() + { + return window.UI ? UI.get_pref(this.id) : null; + }; + + /** * Saves splitter position in cookie */ this.set_cookie = function() { - var exp = new Date(); - exp.setYear(exp.getFullYear() + 1); - rcmail.set_cookie(this.id, this.pos, exp); + if (window.UI) + UI.save_pref(this.id, this.pos); }; } // end class rcube_splitter diff --git a/temp/.gitignore b/temp/.gitignore new file mode 100644 index 000000000..f59ec20aa --- /dev/null +++ b/temp/.gitignore @@ -0,0 +1 @@ +*
\ No newline at end of file diff --git a/temp/.htaccess b/temp/.htaccess deleted file mode 100644 index 8e6a345dc..000000000 --- a/temp/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Order allow,deny -Deny from all
\ No newline at end of file diff --git a/tests/Framework/Browser.php b/tests/Framework/Browser.php index 832d4bf14..6afd2144c 100644 --- a/tests/Framework/Browser.php +++ b/tests/Framework/Browser.php @@ -21,7 +21,7 @@ class Framework_Browser extends PHPUnit_Framework_TestCase /** * @dataProvider browsers */ - function test_browser($useragent, $opera, $chrome, $ie, $ns, $ns4, $khtml, $safari, $mz) + function test_browser($useragent, $opera, $chrome, $ie, $ns, $safari, $mz) { $object = $this->getBrowser($useragent); @@ -30,8 +30,6 @@ class Framework_Browser extends PHPUnit_Framework_TestCase $this->assertEquals($chrome, $object->chrome, 'Check for Chrome failed'); $this->assertEquals($ie, $object->ie, 'Check for IE failed'); $this->assertEquals($ns, $object->ns, 'Check for NS failed'); - $this->assertEquals($ns4, $object->ns4, 'Check for NS4 failed'); - $this->assertEquals($khtml, $object->khtml, 'Check for khtml failed'); $this->assertEquals($safari, $object->safari, 'Check for Safari failed'); $this->assertEquals($mz, $object->mz, 'Check for MZ failed'); } @@ -132,7 +130,7 @@ class Framework_Browser extends PHPUnit_Framework_TestCase function browsers() { - return $this->extractDataSet(array('isOpera','isChrome','isIE','isNS','isNS4','isKHTML','isSafari','isMZ')); + return $this->extractDataSet(array('isOpera','isChrome','isIE','isNS','isSafari','isMZ')); } function useragents() @@ -149,8 +147,6 @@ class Framework_Browser extends PHPUnit_Framework_TestCase 'isChrome' => false, //isChrome 'isIE' => false, //isIE 'isNS' => false, //isNS - 'isNS4' => false, //isNS4 - 'isKHTML' => false, //isKHTML 'isSafari' => false, //isSafari 'isMZ' => true, //isMZ 'lang' => 'en-US', //lang @@ -169,8 +165,6 @@ class Framework_Browser extends PHPUnit_Framework_TestCase 'isChrome' => false, //isChrome 'isIE' => false, //isIE 'isNS' => false, //isNS - 'isNS4' => false, //isNS4 - 'isKHTML' => false, //isKHTML 'isSafari' => false, //isSafari 'isMZ' => true, //isMZ 'lang' => 'en-US', //lang @@ -181,7 +175,7 @@ class Framework_Browser extends PHPUnit_Framework_TestCase 'Chrome Mac' => array( 'useragent' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.461.0 Safari/534.3', - 'version' => '5', //Version + 'version' => '6', //Version 'isWin' => false, //isWindows 'isLinux' => false, 'isMac' => true, //isMac @@ -190,8 +184,6 @@ class Framework_Browser extends PHPUnit_Framework_TestCase 'isChrome' => true, //isChrome 'isIE' => false, //isIE 'isNS' => false, //isNS - 'isNS4' => false, //isNS4 - 'isKHTML' => true, //isKHTML 'isSafari' => false, //isSafari 'isMZ' => false, //isMZ 'lang' => 'en-US', //lang @@ -199,6 +191,44 @@ class Framework_Browser extends PHPUnit_Framework_TestCase 'canPNGALPHA' => false, //canPNGALPHA 'canIMGDATA' => true, //canIMGDATA ), + + 'IE 11' => array( + 'useragent' => 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C; rv:11.0) like Gecko', + 'version' => '11.0', //Version + 'isWin' => true, //isWindows + 'isLinux' => false, + 'isMac' => false, //isMac + 'isUnix' => false, //isUnix + 'isOpera' => false, //isOpera + 'isChrome' => false, //isChrome + 'isIE' => true, //isIE + 'isNS' => false, //isNS + 'isSafari' => false, //isSafari + 'isMZ' => false, //isMZ + 'lang' => '', //lang + 'hasDOM' => true, //hasDOM + 'canPNGALPHA' => true, //canPNGALPHA + 'canIMGDATA' => false, //canIMGDATA + ), + + 'Opera 15' => array( + 'useragent' => 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.29 Safari/537.36 OPR/15.0.1147.24', + 'version' => '15.0', //Version + 'isWin' => true, //isWindows + 'isLinux' => false, + 'isMac' => false, //isMac + 'isUnix' => false, //isUnix + 'isOpera' => true, //isOpera + 'isChrome' => false, //isChrome + 'isIE' => false, //isIE + 'isNS' => false, //isNS + 'isSafari' => false, //isSafari + 'isMZ' => false, //isMZ + 'lang' => '', //lang + 'hasDOM' => true, //hasDOM + 'canPNGALPHA' => true, //canPNGALPHA + 'canIMGDATA' => true, //canIMGDATA + ), ); } diff --git a/tests/Framework/CacheShared.php b/tests/Framework/CacheShared.php new file mode 100644 index 000000000..9ddcafc7f --- /dev/null +++ b/tests/Framework/CacheShared.php @@ -0,0 +1,20 @@ +<?php + +/** + * Test class to test rcube_cache_shared class + * + * @package Tests + */ +class Framework_CacheShared extends PHPUnit_Framework_TestCase +{ + + /** + * Class constructor + */ + function test_class() + { + $object = new rcube_cache_shared('db'); + + $this->assertInstanceOf('rcube_cache_shared', $object, "Class constructor"); + } +} diff --git a/tests/Framework/Contacts.php b/tests/Framework/Contacts.php new file mode 100644 index 000000000..0167ea366 --- /dev/null +++ b/tests/Framework/Contacts.php @@ -0,0 +1,20 @@ +<?php + +/** + * Test class to test rcube_contacts class + * + * @package Tests + */ +class Framework_Contacts extends PHPUnit_Framework_TestCase +{ + + /** + * Class constructor + */ + function test_class() + { + $object = new rcube_contacts(null, null); + + $this->assertInstanceOf('rcube_contacts', $object, "Class constructor"); + } +} diff --git a/tests/Framework/DB.php b/tests/Framework/DB.php new file mode 100644 index 000000000..b7a063841 --- /dev/null +++ b/tests/Framework/DB.php @@ -0,0 +1,20 @@ +<?php + +/** + * Test class to test rcube_db class + * + * @package Tests + */ +class Framework_DB extends PHPUnit_Framework_TestCase +{ + + /** + * Class constructor + */ + function test_class() + { + $object = new rcube_db('test'); + + $this->assertInstanceOf('rcube_db', $object, "Class constructor"); + } +} diff --git a/tests/Framework/Html2text.php b/tests/Framework/Html2text.php index 3e0df48d9..2c7759f7d 100644 --- a/tests/Framework/Html2text.php +++ b/tests/Framework/Html2text.php @@ -75,4 +75,32 @@ EOF; $this->assertContains('>> INNER 3', $res, 'Quote inner'); $this->assertContains('> OUTER END', $res, 'Quote outer'); } + + function test_broken_blockquotes() + { + // no end tag + $html = <<<EOF +Begin<br> +<blockquote>QUOTED TEXT +<blockquote> +NO END TAG FOUND +EOF; + $ht = new rcube_html2text($html, false, false); + $res = $ht->get_text(); + + $this->assertContains('QUOTED TEXT NO END TAG FOUND', $res, 'No quoating on invalid html'); + + // with some (nested) end tags + $html = <<<EOF +Begin<br> +<blockquote>QUOTED TEXT +<blockquote>INNER 1</blockquote> +<blockquote>INNER 2</blockquote> +NO END TAG FOUND +EOF; + $ht = new rcube_html2text($html, false, false); + $res = $ht->get_text(); + + $this->assertContains('QUOTED TEXT INNER 1 INNER 2 NO END', $res, 'No quoating on invalid html'); + } } diff --git a/tests/Framework/ImapCache.php b/tests/Framework/ImapCache.php new file mode 100644 index 000000000..83612c549 --- /dev/null +++ b/tests/Framework/ImapCache.php @@ -0,0 +1,20 @@ +<?php + +/** + * Test class to test rcube_imap_cache class + * + * @package Tests + */ +class Framework_ImapCache extends PHPUnit_Framework_TestCase +{ + + /** + * Class constructor + */ + function test_class() + { + $object = new rcube_imap_cache(null, null, null, null); + + $this->assertInstanceOf('rcube_imap_cache', $object, "Class constructor"); + } +} diff --git a/tests/Framework/LdapGeneric.php b/tests/Framework/LdapGeneric.php new file mode 100644 index 000000000..8cb1a2ce5 --- /dev/null +++ b/tests/Framework/LdapGeneric.php @@ -0,0 +1,20 @@ +<?php + +/** + * Test class to test rcube_ldap_generic class + * + * @package Tests + */ +class Framework_LdapGeneric extends PHPUnit_Framework_TestCase +{ + + /** + * Class constructor + */ + function test_class() + { + $object = new rcube_ldap_generic(array()); + + $this->assertInstanceOf('rcube_ldap_generic', $object, "Class constructor"); + } +} diff --git a/tests/Framework/Mime.php b/tests/Framework/Mime.php index 1450b4f90..d767905e3 100644 --- a/tests/Framework/Mime.php +++ b/tests/Framework/Mime.php @@ -41,6 +41,7 @@ class Framework_Mime extends PHPUnit_Framework_TestCase 21 => '"test test"@domain.tld', // invalid (#1489092) 22 => '"John Doe @ SomeBusinessName" <MAILER-DAEMON>', + 23 => '=?UTF-8?B?IlRlc3QsVGVzdCI=?= <test@domain.tld>', ); $results = array( @@ -68,6 +69,7 @@ class Framework_Mime extends PHPUnit_Framework_TestCase 21 => array(1, '', '"test test"@domain.tld'), // invalid (#1489092) 22 => array(1, 'John Doe @ SomeBusinessName', 'MAILER-DAEMON'), + 23 => array(1, 'Test,Test', 'test@domain.tld'), ); foreach ($headers as $idx => $header) { diff --git a/tests/Framework/ResultIndex.php b/tests/Framework/ResultIndex.php index efbba6da7..da1cc628f 100644 --- a/tests/Framework/ResultIndex.php +++ b/tests/Framework/ResultIndex.php @@ -17,4 +17,51 @@ class Framework_ResultIndex extends PHPUnit_Framework_TestCase $this->assertInstanceOf('rcube_result_index', $object, "Class constructor"); } + + /** + * thread parser test + */ + function test_parse() + { + $text = "* SORT 2001 2002 2035 2036 2037 2038 2044 2046 2043 2045 2226 2225 2224 2223"; + $object = new rcube_result_index('INBOX', $text); + + $this->assertSame(false, $object->is_empty(), "Object is empty"); + $this->assertSame(false, $object->is_error(), "Object is error"); + $this->assertSame(2226, $object->max(), "Max message UID"); + $this->assertSame(2001, $object->min(), "Min message UID"); + $this->assertSame(14, $object->count_messages(), "Messages count"); + $this->assertSame(14, $object->count(), "Messages count"); + $this->assertSame(1, $object->exists(2002, true), "Message exists"); + $this->assertSame(true, $object->exists(2002), "Message exists (bool)"); + $this->assertSame(2001, $object->get_element('FIRST'), "Get first element"); + $this->assertSame(2223, $object->get_element('LAST'), "Get last element"); + $this->assertSame(2035, (int) $object->get_element(2), "Get specified element"); + $this->assertSame("2001:2002,2035:2038,2043:2046,2223:2226", $object->get_compressed(), "Get compressed index"); + $this->assertSame('INBOX', $object->get_parameters('MAILBOX'), "Get parameter"); + + $clone = clone $object; + $clone->filter(array(2035, 2002)); + + $this->assertSame(2, $clone->count(), "Messages count (filtered)"); + $this->assertSame(2002, $clone->get_element('FIRST'), "Get first element (filtered)"); + + $clone = clone $object; + $clone->revert(); + + $this->assertSame(14, $clone->count(), "Messages count (reverted)"); + $this->assertSame(12, $clone->exists(2002, true), "Message exists (reverted)"); + $this->assertSame(true, $clone->exists(2002), "Message exists (bool) (reverted)"); + $this->assertSame(2223, $clone->get_element('FIRST'), "Get first element (reverted)"); + $this->assertSame(2001, $clone->get_element('LAST'), "Get last element (reverted)"); + $this->assertSame(2225, (int) $clone->get_element(2), "Get specified element (reverted)"); + + $clone = clone $object; + $clone->slice(2, 3); + + $this->assertSame(3, $clone->count(), "Messages count (sliced)"); + $this->assertSame(2035, $clone->get_element('FIRST'), "Get first element (sliced)"); + $this->assertSame(2037, $clone->get_element('LAST'), "Get last element (sliced)"); + } + } diff --git a/tests/Framework/ResultThread.php b/tests/Framework/ResultThread.php index f980845cc..55fca4c6a 100644 --- a/tests/Framework/ResultThread.php +++ b/tests/Framework/ResultThread.php @@ -17,4 +17,43 @@ class Framework_ResultThread extends PHPUnit_Framework_TestCase $this->assertInstanceOf('rcube_result_thread', $object, "Class constructor"); } + + /** + * thread parser test + */ + function test_parse_thread() + { + $text = file_get_contents(__DIR__ . '/../src/imap_thread.txt'); + $object = new rcube_result_thread('INBOX', $text); + + $this->assertSame(false, $object->is_empty(), "Object is empty"); + $this->assertSame(false, $object->is_error(), "Object is error"); + $this->assertSame(1721, $object->max(), "Max message UID"); + $this->assertSame(1, $object->min(), "Min message UID"); + $this->assertSame(1721, $object->count_messages(), "Messages count"); + $this->assertSame(1691, $object->exists(1720, true), "Message exists"); + $this->assertSame(true, $object->exists(1720), "Message exists (bool)"); + $this->assertSame(1, $object->get_element('FIRST'), "Get first element"); + $this->assertSame(1719, $object->get_element('LAST'), "Get last element"); + $this->assertSame(14, (int) $object->get_element(2), "Get specified element"); + + $clone = clone $object; + $clone->filter(array(7)); + $clone = $clone->get_tree(); + + $this->assertSame(1, count($clone), "Structure check"); + $this->assertSame(3, count($clone[7]), "Structure check"); + $this->assertSame(0, count($clone[7][12]), "Structure check"); + $this->assertSame(1, count($clone[7][167]), "Structure check"); + $this->assertSame(0, count($clone[7][167][197]), "Structure check"); + $this->assertSame(2, count($clone[7][458]), "Structure check"); + $this->assertSame(1, count($clone[7][458][460]), "Structure check"); + $this->assertSame(0, count($clone[7][458][460][463]), "Structure check"); + $this->assertSame(1, count($clone[7][458][464]), "Structure check"); + $this->assertSame(0, count($clone[7][458][464][471]), "Structure check"); + + $object->filter(array(784)); + $this->assertSame(118, $object->count_messages(), "Messages filter"); + $this->assertSame(1, $object->count(), "Messages filter (count)"); + } } diff --git a/tests/Framework/SpellcheckAtd.php b/tests/Framework/SpellcheckAtd.php new file mode 100644 index 000000000..cc828240f --- /dev/null +++ b/tests/Framework/SpellcheckAtd.php @@ -0,0 +1,21 @@ +<?php + +/** + * Test class to test rcube_spellcheck_atd class + * + * @package Tests + */ +class Framework_SpellcheckAtd extends PHPUnit_Framework_TestCase +{ + + /** + * Class constructor + */ + function test_class() + { + $object = new rcube_spellcheck_atd(null, 'en'); + + $this->assertInstanceOf('rcube_spellcheck_atd', $object, "Class constructor"); + $this->assertInstanceOf('rcube_spellcheck_engine', $object, "Class constructor"); + } +} diff --git a/tests/Framework/SpellcheckEnchant.php b/tests/Framework/SpellcheckEnchant.php new file mode 100644 index 000000000..85393e76c --- /dev/null +++ b/tests/Framework/SpellcheckEnchant.php @@ -0,0 +1,21 @@ +<?php + +/** + * Test class to test rcube_spellcheck_enchant class + * + * @package Tests + */ +class Framework_SpellcheckEnchant extends PHPUnit_Framework_TestCase +{ + + /** + * Class constructor + */ + function test_class() + { + $object = new rcube_spellcheck_enchant(null, 'en'); + + $this->assertInstanceOf('rcube_spellcheck_enchant', $object, "Class constructor"); + $this->assertInstanceOf('rcube_spellcheck_engine', $object, "Class constructor"); + } +} diff --git a/tests/Framework/SpellcheckGoogie.php b/tests/Framework/SpellcheckGoogie.php new file mode 100644 index 000000000..dc7d70dcc --- /dev/null +++ b/tests/Framework/SpellcheckGoogie.php @@ -0,0 +1,21 @@ +<?php + +/** + * Test class to test rcube_spellcheck_googie class + * + * @package Tests + */ +class Framework_SpellcheckGoogie extends PHPUnit_Framework_TestCase +{ + + /** + * Class constructor + */ + function test_class() + { + $object = new rcube_spellcheck_googie(null, 'en'); + + $this->assertInstanceOf('rcube_spellcheck_googie', $object, "Class constructor"); + $this->assertInstanceOf('rcube_spellcheck_engine', $object, "Class constructor"); + } +} diff --git a/tests/Framework/SpellcheckPspell.php b/tests/Framework/SpellcheckPspell.php new file mode 100644 index 000000000..bd622b206 --- /dev/null +++ b/tests/Framework/SpellcheckPspell.php @@ -0,0 +1,21 @@ +<?php + +/** + * Test class to test rcube_spellcheck_pspell class + * + * @package Tests + */ +class Framework_SpellcheckPspell extends PHPUnit_Framework_TestCase +{ + + /** + * Class constructor + */ + function test_class() + { + $object = new rcube_spellcheck_pspell(null, 'en'); + + $this->assertInstanceOf('rcube_spellcheck_pspell', $object, "Class constructor"); + $this->assertInstanceOf('rcube_spellcheck_engine', $object, "Class constructor"); + } +} diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php index 3f7f48c3a..082aaea3b 100644 --- a/tests/Framework/Utils.php +++ b/tests/Framework/Utils.php @@ -171,6 +171,12 @@ class Framework_Utils extends PHPUnit_Framework_TestCase $this->assertRegExp('/#rcmbody h1\s\{/', $mod, "Prefix tag styles (single)"); $this->assertRegExp('/#rcmbody h1, #rcmbody h2, #rcmbody h3, #rcmbody textarea\s+\{/', $mod, "Prefix tag styles (multiple)"); $this->assertRegExp('/#rcmbody \.noscript\s+\{/', $mod, "Prefix class styles"); + + $css = file_get_contents(TESTS_DIR . 'src/media.css'); + $mod = rcube_utils::mod_css_styles($css, 'rcmbody'); + + $this->assertContains('#rcmbody table[class=w600]', $mod, 'Replace styles nested in @media block'); + $this->assertContains('#rcmbody {width:600px', $mod, 'Replace body selector nested in @media block'); } /** @@ -288,7 +294,33 @@ class Framework_Utils extends PHPUnit_Framework_TestCase } /** - * rcube:utils::normalize _string() + * rcube:utils::anytodatetime() + */ + function test_anytodatetime() + { + $test = array( + '2013-04-22' => '2013-04-22', + '2013/04/22' => '2013-04-22', + '2013.04.22' => '2013-04-22', + '22-04-2013' => '2013-04-22', + '22/04/2013' => '2013-04-22', + '22.04.2013' => '2013-04-22', + '04/22/2013' => '2013-04-22', + '22.4.2013' => '2013-04-22', + '20130422' => '2013-04-22', + '1900-10-10' => '1900-10-10', + '01-01-1900' => '1900-01-01', + '01/30/1960' => '1960-01-30' + ); + + foreach ($test as $datetime => $ts) { + $result = rcube_utils::anytodatetime($datetime); + $this->assertSame($ts, $result ? $result->format('Y-m-d') : '', "Error parsing date: $datetime"); + } + } + + /** + * rcube:utils::normalize_string() */ function test_normalize_string() { @@ -302,4 +334,30 @@ class Framework_Utils extends PHPUnit_Framework_TestCase $this->assertSame($output, $result); } } + + /** + * rcube:utils::is_absolute_path() + */ + function test_is_absolute_path() + { + if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { + $test = array( + '' => false, + "C:\\" => true, + 'some/path' => false, + ); + } + else { + $test = array( + '' => false, + '/path' => true, + 'some/path' => false, + ); + } + + foreach ($test as $input => $output) { + $result = rcube_utils::is_absolute_path($input); + $this->assertSame($output, $result); + } + } } diff --git a/tests/Framework/Washtml.php b/tests/Framework/Washtml.php index cb7234314..7485d4383 100644 --- a/tests/Framework/Washtml.php +++ b/tests/Framework/Washtml.php @@ -68,4 +68,60 @@ class Framework_Washtml extends PHPUnit_Framework_TestCase $this->assertRegExp('|<textarea>test</textarea>|', $washed, "Self-closing textarea (#1489137)"); } + /** + * Test fixing of invalid closing tags (#1489446) + */ + function test_closing_tag_attrs() + { + $html = "<a href=\"http://test.com\">test</a href>"; + + $washer = new rcube_washtml; + $washed = $washer->wash($html); + + $this->assertRegExp('|</a>|', $washed, "Invalid closing tag (#1489446)"); + } + + /** + * Test fixing of invalid lists nesting (#1488768) + */ + function test_lists() + { + $data = array( + array( + "<ol><li>First</li><li>Second</li><ul><li>First sub</li></ul><li>Third</li></ol>", + "<ol><li>First</li><li>Second<ul><li>First sub</li></ul></li><li>Third</li></ol>" + ), + array( + "<ol><li>First<ul><li>First sub</li></ul></li></ol>", + "<ol><li>First<ul><li>First sub</li></ul></li></ol>", + ), + array( + "<ol><li>First<ol><li>First sub</li></ol></li></ol>", + "<ol><li>First<ol><li>First sub</li></ol></li></ol>", + ), + array( + "<ul><li>First</li><ul><li>First sub</li><ul><li>sub sub</li></ul></ul><li></li></ul>", + "<ul><li>First<ul><li>First sub<ul><li>sub sub</li></ul></li></ul></li><li></li></ul>", + ), + array( + "<ul><li>First</li><li>second</li><ul><ul><li>sub sub</li></ul></ul></ul>", + "<ul><li>First</li><li>second<ul><ul><li>sub sub</li></ul></ul></li></ul>", + ), + array( + "<ol><ol><ol></ol></ol></ol>", + "<ol><ol><ol></ol></ol></ol>", + ), + array( + "<div><ol><ol><ol></ol></ol></ol></div>", + "<div><ol><ol><ol></ol></ol></ol></div>", + ), + ); + + foreach ($data as $element) { + rcube_washtml::fix_broken_lists($element[0]); + + $this->assertSame($element[1], $element[0], "Broken nested lists (#1488768)"); + } + } + } diff --git a/tests/MailFunc.php b/tests/MailFunc.php index 6ea39b1ec..ab0074ef2 100644 --- a/tests/MailFunc.php +++ b/tests/MailFunc.php @@ -17,8 +17,6 @@ class MailFunc extends PHPUnit_Framework_TestCase $RCMAIL->storage_init(false); require_once INSTALL_PATH . 'program/steps/mail/func.inc'; - - $GLOBALS['EMAIL_ADDRESS_PATTERN'] = $EMAIL_ADDRESS_PATTERN; } /** @@ -183,4 +181,88 @@ class MailFunc extends PHPUnit_Framework_TestCase $this->assertRegExp('|src="cid:theCID"|', $html, "URI base resolving exception [1]"); $this->assertRegExp('|src="http://other\.domain\.tld/img3\.gif"|', $html, "URI base resolving exception [2]"); } + + /** + * Test identities selection using Return-Path header + */ + function test_rcmail_identity_select() + { + $identities = array( + array( + 'name' => 'Test', + 'email_ascii' => 'addr@domain.tld', + 'ident' => 'Test <addr@domain.tld>', + ), + array( + 'name' => 'Test', + 'email_ascii' => 'thing@domain.tld', + 'ident' => 'Test <thing@domain.tld>', + ), + array( + 'name' => 'Test', + 'email_ascii' => 'other@domain.tld', + 'ident' => 'Test <other@domain.tld>', + ), + ); + + $message = new stdClass; + $message->headers = new rcube_message_header; + $message->headers->set('Return-Path', '<some_thing@domain.tld>'); + $res = rcmail_identity_select($message, $identities); + + $this->assertSame($identities[0], $res); + + $message->headers->set('Return-Path', '<thing@domain.tld>'); + $res = rcmail_identity_select($message, $identities); + + $this->assertSame($identities[1], $res); + } + + /** + * Test identities selection (#1489378) + */ + function test_rcmail_identity_select2() + { + $identities = array( + array( + 'name' => 'Test 1', + 'email_ascii' => 'addr1@domain.tld', + 'ident' => 'Test 1 <addr1@domain.tld>', + ), + array( + 'name' => 'Test 2', + 'email_ascii' => 'addr2@domain.tld', + 'ident' => 'Test 2 <addr2@domain.tld>', + ), + array( + 'name' => 'Test 3', + 'email_ascii' => 'addr3@domain.tld', + 'ident' => 'Test 3 <addr3@domain.tld>', + ), + array( + 'name' => 'Test 4', + 'email_ascii' => 'addr2@domain.tld', + 'ident' => 'Test 4 <addr2@domain.tld>', + ), + ); + + $message = new stdClass; + $message->headers = new rcube_message_header; + + $message->headers->set('From', '<addr2@domain.tld>'); + $res = rcmail_identity_select($message, $identities); + $this->assertSame($identities[1], $res); + + $message->headers->set('From', 'Test 2 <addr2@domain.tld>'); + $res = rcmail_identity_select($message, $identities); + $this->assertSame($identities[1], $res); + + $message->headers->set('From', 'Other <addr2@domain.tld>'); + $res = rcmail_identity_select($message, $identities); + $this->assertSame($identities[1], $res); + + $message->headers->set('From', 'Test 4 <addr2@domain.tld>'); + $res = rcmail_identity_select($message, $identities); + $this->assertSame($identities[3], $res); + } } diff --git a/tests/phpunit.xml b/tests/phpunit.xml index a5942c433..bd92e585a 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -7,15 +7,20 @@ <file>Framework/Bootstrap.php</file> <file>Framework/Browser.php</file> <file>Framework/Cache.php</file> + <file>Framework/CacheShared.php</file> <file>Framework/Charset.php</file> + <file>Framework/Contacts.php</file> <file>Framework/ContentFilter.php</file> <file>Framework/Csv2vcard.php</file> + <file>Framework/DB.php</file> <file>Framework/Enriched.php</file> <file>Framework/Html.php</file> <file>Framework/Html2text.php</file> <file>Framework/Imap.php</file> + <file>Framework/ImapCache.php</file> <file>Framework/ImapGeneric.php</file> <file>Framework/Image.php</file> + <file>Framework/LdapGeneric.php</file> <file>Framework/MessageHeader.php</file> <file>Framework/MessagePart.php</file> <file>Framework/Mime.php</file> @@ -24,6 +29,10 @@ <file>Framework/ResultSet.php</file> <file>Framework/ResultThread.php</file> <file>Framework/Smtp.php</file> + <file>Framework/SpellcheckAtd.php</file> + <file>Framework/SpellcheckEnchant.php</file> + <file>Framework/SpellcheckGoogie.php</file> + <file>Framework/SpellcheckPspell.php</file> <file>Framework/Spellchecker.php</file> <file>Framework/StringReplacer.php</file> <file>Framework/User.php</file> diff --git a/tests/src/imap_thread.txt b/tests/src/imap_thread.txt new file mode 100644 index 000000000..88e0a8a66 --- /dev/null +++ b/tests/src/imap_thread.txt @@ -0,0 +1 @@ +* THREAD (1)(2)(14)(3)(4 18 39 100)((5)(6)(8 (11)(13 15)(465))(209))(7 (12)(167 197)(458 (460 463)(464 471)))((9)(10 1057))((16 32)(33))(17)(48)(22 23)((19)(314))(20 21)(26)((24 27 1598)(1578)(1580)(1591)(1592)(1593)(1596))((25)(160)(329)(334)(355)(383)(847)(910))(28 30 31)(29)(34 35 36)(37)(38 (42 (72)(96))(107)(106))(40)(41)((43)(330 (336 (366)(367)(380))(1116)(1150)))(45)(44 49 52 55 56 60 61 62 65 66 68 69 70 71 90 91 93 94 95 103 108 109 111 120 123 125 126 129 130 132 134 136 138)(46)((47)(1117)(1122))(50 58 (77)(110 113 117 122 145))(51)(53)(54 57 64 84 87 88 89 92)(59 99)(63)(67)((73)(133)(141))(74 (98)(205))(75 (101)(200)(202))(76 (82)(201)(203))((78)(504)(534)(535))(79)(80)(81)(83)(85)(86)(97)(114)(115)(102 318 (319 320)(332))(104 (466)(468))(105)(112 118 135 144 146)(116)(119)(147)(121)(124)(127)(128)(131)(137)(139)(148)((140)(384)(682)(713)(881)(967)(991)(996)(1010)(1028)(1080)(1088)(1634))(149)(142 143)(150 151)(152)(153 155 161)(154)(168)(156 157)((158)(159)(163)(164))(162)((165)(361)(362))(166 (229)(232)(240 242 247 292))(169 (172)(177)(178)(179 1058))(170)(171)(173)(174 425 431 476 510 511)(188)(175 176)(180 (182 183)(185)(184 1068))((181)(419)(418)(705)(992)(1123)(1374)(1594))(186 (204)(226)(225))((187)(422)(708))(189)(190)(191)(192)(193 215 246)(194 199 218 245 290)(195)(196)(198)(206)(207)(208)(210 211)((212)(213))(214)(216)(217 (219 (220)(221)(227))(223)(224)(222 (1054)(1055)))(234)(228)(230 235 236)(231)(233 772 1566)(237)(238 (244)(251)(257)(258 1061))(239)(241 (590)(873)(874)(900))(243)(248)(249)(250)(252)((253)(255)(338)(339)(340)(341)(436)(437)(438)(439)(441)(442)(447)(450)(512)(513)(514)(597)(598)(601)(604)(605)(635)(646)(649)(652))(254 313)(256)(296)((259)(260)(359)(358))(261)(262)(263)((264)(803)(804))(265)(266 (268)(283))(267)(269)(270)((271)(272))((273)(842)(844))(274 289 303)(275)(277)(276)(278)(279)(280)(281)(282)((284)(433))((285)(595))(286)(295)(287)(288)(291 310)(293)(294)(297 299)((298)(574)(777)(1083)(1161)(1440)(1711))(300)(301 348 356 357 360 365 392)(302 (304)(305)(323)(324 1059))(306)(308)(307)(309 364)(311)((312)(573))(315)((317)(316))((344)(326))(321)(322)(342)(325)(345)(353 354 (698)(707))(343)(327 328 331)(333)((335)(400))(337)(346 (350)(370)(371)(372 1060))(347)(349 388 524 566 577 690 1491)(351)(352)(363)(368)(369)(390)(373)((374)(376))(375)(377)(378 589)(379)(381)((382)(588)(592)(1496))(385)(386)(387 399 426)(389 397 427)(391)(393)(394)(407)(395 396)(398 408)(401 (402 403)(404 (405 (410)(415))(406 (416)(443)(638)(1291)(1522))(413 414 (448 (449)(451)(478))(484)(485 (477)(515 (527)(554))(1521)))))(409)(411)(412)(428)((417)(480)(482))(420 (421)(564)(565))((423)(808))(424)(429)(430 446)(432)(434)(435)(440 445 (454 470)(456))((444)(555 (763)(764)))(452 (453)(459)(461)(462)(473)(475 1063))(455 457)(518)(467)(469 474 (483)(539)(540))(472)(479 486 525 528 530)(481 (487)(489)(506)(507 1062))(488)(490 (491)(492)(496)(498)(500)(502)(509)(521)(946)(1404)(1681)(1682)(1683)(1685)(1686)(1693)(1721))(494)(493)((495)(1079)(1401)(1582))(497)(499)(501)(503)((505)(517)(520))(508 523)(516)(519)(522)(526 529)(531)(532 538 582)(533)(536)(537)(541 614)((542)(543)(546)(547)(572))(544 545)(548)(549 (550)(551)(553)(552 1056))(556 (559)(562)(563))(557 (558)(561)(560))((567)(1502))(569)(568)(570)((571)(749)(751)(752)(757)(760)(776)(775)(1034)(1035)(1076))(575)(576 579)(578)(580)(581)(583)(584)(585)(586)(587)(591)(593)(594)(624)(596)(625)(628)(599 (600)(603 617)(619)(620)(621 1064))(602 (613 (615)(618))(616 (622)(675)))(606 607 608 609 (610 612)(629))(611)(623)(627)(626)(630)(631)(632)(633)((634)(650)(651))(636 (641 677)(848)(1595 1597))(637)(642 644 645)(639 640)(643)(669)(647)(648)(653)(654)(655)(656 (657)(659)(660 1065))(658 (661 665)(662))(663 664 666)(667)(668)((670)(1008))(671 686)(674)(672)(673)(688)(676)(678)(679 681)(680)(683)(684 689)(685)(687)(691)(692)(693)(699)((694)(704))(695)(696 715 853 899)(697)(700 (701)(710)(720)(721 1066))(702)(703)(709)(706)(711)(712)(714)(716 734)(717)(718 724 (727)(728 730 732 733 735))(719 723 731)(722 729)(725)(726)(736)(738)((737)(1620))(754)(739)(740 (741)(742 (743)(745)(746)(761))(744)(765 (766)(767)))(747)(748)(753)(750)(755)(756)(758)(759)(762)(768)(769)(770)(774)(771)(773)(779)(778)(780)(781)(782)(783)(784 786 787 788 790 791 793 795 796 798 802 805 809 815 (816)(817 818 821 822 824 825 827 829 830 831 832 833 834 836 838 839 840 841 854 856 862 863 879 882 884 885 886 888 890 892 894 895 896 897 898 908 912 924 926 941 943 947 948 952 956 957 958 959 960 961 962 963 964 965 970 971 973 974 975 976 978 979 980 981 982 984 985 986 987 989 993 994 995 997 1000 1002 1003 1007 1009 1011 1013 1014 1015 1016 1018 1020 1021 1022 1023 1027 1029 1031 1033 1040 1041 1043 1044 1045 1047 1048 1049 1052 1053))(785)(789 792)(811)(794)(812)(797)(799)(800)(801)(806)(807)(810 813)(823)(814)(872)(819 (820)(826)(843 845)(916 (921)(923)(922 1067)))(828)(866)(837)(835)((868)(867)(869))(846)(871)(870)(849)(850 (883)(903 (938)(1515)))(851)(852)((855)(857))(858)(859 (928)(933)(935))(860 (929)(931)(934))(861 (930)(932)(936))(864 1469)(865 889 940)(875)(876 (877)(878)(901)(966))(880 939)(905)(887)(891)(893)(902)(904)(907)(906 1102)(909 969)(911)(913 (914 915)(917 918)(919 937)(920 927 942 944 945 1051 (1073 1081)(1103 1106 1125)))(925)(949)(950)(951)(953)(954)(955)(972)(968 (1113)(1147 (1114)(1115)(1148)))(977)(983)(998)(988 1104)(990)(1036)(999 1019)(1004)(1001)(1005 1006 (1279)(1285 1290))(1012)(1017)(1038)(1037)(1024 (1025)(1096)(1097)(1403))(1026)(1030)(1032)(1039)(1042)(1046)(1050)(1084)((1069)(1070))(1071)(1072)(1074)(1075 1078)(1077)(1082)(1085)((1086)(1091))(1087)(1089)(1090)(1093)(1092)(1094)(1095)(1098)(1099)(1100)((1107)(1204))(1101)(1108)(1105 (1152 1395)(1605))((1112 1215 1228)(1231 1233)(1230))(1109)(1110)(1111)(1118)(1119)(1149 (1124 1146 1151)(1218 1219)(1220)(1474))(1120)(1121)(1126)(1127)(1128 1136)(1129)(1130)(1140)(1131)(1132)(1133)(1134 1135)(1137 1138 1203)(1139)(1141)(1142)(1143)(1144)(1145)(1153)(1154)(1155)(1156)(1157)(1158)(1205)((1159)(1160))(1207)((1162)(1481))(1206)(1163)(1164)(1165)(1211 (1241 1366)(1367)(1368 1369))(1166 (1183)(1238 (1239)(1303)(1300)))(1167 (1184)(1334)(1310))(1168 (1185)(1296)(1341))(1169 (1186)(1308)(1337))(1170 (1187)(1240 (1242)(1306)(1298)))(1171 (1188)(1295)(1336))(1172 (1189)(1343)(1339))(1173 (1190)(1299)(1333))(1174 (1191)(1309)(1312))(1175 (1198)(1307)(1332))(1176 (1192)(1335)(1311))(1177 (1193)(1301)(1342))(1178 (1194)(1305)(1314))(1179 (1195)(1302)(1313))(1180 (1196)(1340)(1297))(1181 (1182)(1197)(1304)(1338))(1199)(1200 1201)(1202 1225 1365)(1208)(1209)(1210)(1212 (1216 1236)(1217 1280))(1213)(1221)(1214)(1222)(1223)(1224)(1226)(1227)(1229)(1232 1234 1235)(1282)(1237)(1243 (1259)(1315))(1244 (1260)(1316))(1245 (1261)(1317))(1246 (1262)(1318))(1247 (1263)(1319))(1248 (1264)(1320))(1249 (1265)(1321))(1250 (1266)(1322))(1251 (1268)(1323))(1252 (1269)(1324))(1253 (1270)(1325))(1254 (1271)(1326))(1255 (1272)(1327))(1256 (1273)(1328))(1257 (1274)(1329))(1258 (1267 1276 1277 1278 1331)(1275)(1330))(1281)(1283)(1284)(1370)(1286)((1287)(1288)(1289)(1375)(1377)(1376)(1378)(1380)(1386)(1387))((1292)(1293)(1294)(1381)(1382)(1383)(1384)(1385))(1344 (1354)(1453)(1461))(1346 (1355)(1455)(1472))(1345 (1356)(1392 (1393 1424)(1458)(1459)))(1347 (1357)(1468)(1473))(1348 (1358)(1426 (1431)(1467)(1462)))(1349 (1359)(1465)(1470))(1350 (1360 1362)(1428 (1432)(1456)(1460)))(1351 (1361)(1466)(1463))(1352 (1363)(1430 (1433)(1454)(1464)))(1353 (1364)(1457)(1471))(1371 (1425 1483)(1450 1484 1489))(1372)(1373)(1379)(1388)(1389)(1390)(1391)((1394 1397 1398)(1421))(1396 1400)(1399)(1402)(1405)(1406)(1407 1410)(1408 (1579)(1583 1584 (1585)(1586)))(1409)(1411)(1412)(1413)(1416)(1414)(1415)(1417)(1418)(1419)(1420)(1422)((1442)(1427))(1423)(1429)(1434 (1435)(1451)(1452))(1436)(1439)(1441)(1437)(1438 1495 (1559)(1561))(1443)(1444)(1445)(1446)(1507)(1447)(1448)(1449)(1506)(1475)(1476)(1505)((1477)(1478))((1479)(1480))(1482)(1485)(1486)(1487)(1488)(1490)(1492)(1493)(1494)(1497 (1498)(1644)(1645))(1499)(1500)(1501 1704)(1503)(1504)(1508)(1509)(1510)(1519 (1520)(1523))(1511 1512 1513 1516)(1562)(1514)(1517)(1518)(1524 (1540)(1647)(1666))(1525 (1541)(1656)(1646))(1526 (1542 1643)(1573))(1527 (1543)(1574 1641))(1528 (1544)(1650)(1663))(1529 (1545)(1654)(1649))(1530 1546 1575)(1531 (1547)(1651)(1653))(1532 (1548)(1658)(1672))(1533 (1549)(1665)(1662))(1534 (1550 1603)(1576))(1535 (1551)(1648)(1667))(1536 (1552)(1652)(1669))(1537 (1553)(1655)(1668))(1538 (1554 1604)(1577 (1640)(1657)(1670)))(1539 (1555)(1661)(1671))(1556)(1557)(1558)(1560 1567)(1563)(1564)(1565)(1587)(1568 (1569)(1570)(1581))(1571)(1572 (1589 (1612)(1613)(1617))(1599 1600)(1601)(1602))(1588)(1590)(1606)(1607 1608 (1610)(1629))(1609 (1614)(1618)(1619))(1611)(1615)(1616)(1621 (1622)(1624)(1623 1627)(1628 1632 (1637 1673 1675 1678)(1664)))(1625 1626)(1630)((1631 1635)(1633))(1636 1638)(1639)(1642 (1659)(1660 1679)(1674 1680))(1676)(1677 1684)(1687)(1720)(1689)(1688)(1690 1697)(1691 1694)(1692)(1695)(1696)(1713)(1698)(1699)(1700)(1701 1707)(1702)(1703)(1705 1706)(1708)(1709)(1710)(1712)(1714)(1715)(1716)(1717)(1718)(1719)
\ No newline at end of file diff --git a/tests/src/media.css b/tests/src/media.css new file mode 100644 index 000000000..24eacc8a1 --- /dev/null +++ b/tests/src/media.css @@ -0,0 +1,22 @@ +.ReadMsgBody{width: 100%;} +.ExternalClass{width: 100%;} +div, p, a, li, td { -webkit-text-size-adjust:none; } +@media (max-width: 450px){ + table[class=w600], td[class=w600], table[class=w540], td[class=w540], img[class=w600]{ width:100% !important; } + table[class=w30], td[class=w30]{ width:20px !important; } + .pict img {max-width:260px; height:auto !important;} +} +@media (min-width: 450px) and (max-width: 600px){ + table[class=w600], td[class=w600], table[class=w540], td[class=w540], img[class=w600]{ width:100% !important; } + table[class=w30], td[class=w30]{ width:20px !important; } + .pict img {max-width:410px; height:auto !important;} +} +@media (min-width:600px){ + body {width:600px !important; margin:auto !important;} + .pict img {max-width:540px !important; height:auto !important;} +} +h1{ font-weight:bold; font-size:14px;color:#3c3c3c ;margin:0px; } +h2{ color:#8DB048 ; font-size:14px; font-weight:bold; margin-top:20px; border-bottom:1px solid #d6d6d6; padding-bottom:4px; } +h3{ color:#7e7e7e ; font-size:14px; font-weight:bold; margin:20px 0px 0px 0px; border-bottom:1px solid #d6d6d6; padding-bottom:0px 0px 4px 0px; } +h4{ color:#8DB048 ; font-size:12px; font-weight:bold; margin:0px; padding:0px; } +a:visited{cursor:pointer; color:#8DB048; text-decoration:none; border:none;} |