Small fixes

This commit is contained in:
RainLoop Team 2014-05-15 20:06:44 +04:00
parent 67f666fa7d
commit 9b59ad32dc
16 changed files with 433 additions and 233 deletions

View file

@ -273,6 +273,16 @@ AbstractApp.prototype.pub = function (sName, aArgs)
return this; return this;
}; };
/**
* @param {string} sName
* @return {boolean}
*/
AbstractApp.prototype.capa = function (sName)
{
var mCapa = this.settingsGet('Capa');
return Utils.isArray(mCapa) && Utils.isNormal(sName) && -1 < Utils.inArray(sName, mCapa);
};
AbstractApp.prototype.bootstart = function () AbstractApp.prototype.bootstart = function ()
{ {
var self = this; var self = this;

View file

@ -212,6 +212,11 @@ AdminApp.prototype.bootstart = function ()
} }
else else
{ {
if (!RL.capa(Enums.Capa.Prem))
{
Utils.removeSettingsViewModel(AdminBranding);
}
if (!!RL.settingsGet('Auth')) if (!!RL.settingsGet('Auth'))
{ {
// TODO // TODO

View file

@ -27,6 +27,13 @@ Enums.StateType = {
'Admin': 1 'Admin': 1
}; };
/**
* @enum {string}
*/
Enums.Capa = {
'Prem': 'PREM'
};
/** /**
* @enum {string} * @enum {string}
*/ */

View file

@ -1,7 +1,7 @@
.b-domain-content { .b-domain-content {
&.modal { &.modal {
width: 645px; width: 810px;
} }
.modal-header { .modal-header {
@ -11,17 +11,17 @@
.modal-body { .modal-body {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
width: 1300px; width: 1600px;
height: 390px; height: 370px;
left: 0; left: 0;
} }
&.domain-edit .modal-body { &.domain-edit .modal-body {
height: 350px; height: 320px;
} }
&.domain-white-list-page .modal-body { &.domain-white-list-page .modal-body {
left: -640px; left: -800px;
} }
.error-desc { .error-desc {

View file

@ -152,7 +152,8 @@ class HtmlUtils
* *
* @return string * @return string
*/ */
public static function ClearStyle($sStyle, $oElement, &$bHasExternals, &$aFoundCIDs, $aContentLocationUrls, &$aFoundedContentLocationUrls, $bDoNotReplaceExternalUrl = false) public static function ClearStyle($sStyle, $oElement, &$bHasExternals, &$aFoundCIDs,
$aContentLocationUrls, &$aFoundedContentLocationUrls, $bDoNotReplaceExternalUrl = false)
{ {
$sStyle = \trim($sStyle); $sStyle = \trim($sStyle);
$aOutStyles = array(); $aOutStyles = array();
@ -618,8 +619,6 @@ class HtmlUtils
*/ */
public static function BuildHtml($sHtml, &$aFoundCids = array(), &$mFoundDataURL = null, &$aFoundedContentLocationUrls = array()) public static function BuildHtml($sHtml, &$aFoundCids = array(), &$mFoundDataURL = null, &$aFoundedContentLocationUrls = array())
{ {
$bRtl = \MailSo\Base\Utils::IsRTL($sHtml);
$oDom = \MailSo\Base\HtmlUtils::GetDomFromText($sHtml); $oDom = \MailSo\Base\HtmlUtils::GetDomFromText($sHtml);
unset($sHtml); unset($sHtml);
@ -749,7 +748,7 @@ class HtmlUtils
$sResult = \MailSo\Base\HtmlUtils::ClearTags($sResult); $sResult = \MailSo\Base\HtmlUtils::ClearTags($sResult);
$sResult = \MailSo\Base\HtmlUtils::ClearBodyAndHtmlTag($sResult); $sResult = \MailSo\Base\HtmlUtils::ClearBodyAndHtmlTag($sResult);
return '<!DOCTYPE html><html'.($bRtl ? ' dir="rtl"' : '').'><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>'. return '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>'.
'<body>'.\trim($sResult).'</body></html>'; '<body>'.\trim($sResult).'</body></html>';
} }

View file

@ -16,7 +16,7 @@ class Utils
'iso-8859-7', 'iso-8859-8', 'iso-8859-9', 'iso-8859-10', 'iso-8859-11', 'iso-8859-12', 'iso-8859-7', 'iso-8859-8', 'iso-8859-9', 'iso-8859-10', 'iso-8859-11', 'iso-8859-12',
'iso-8859-13', 'iso-8859-14', 'iso-8859-15', 'iso-8859-16', 'iso-8859-13', 'iso-8859-14', 'iso-8859-15', 'iso-8859-16',
'koi8-r', 'koi8-u', 'koi8-ru', 'koi8-r', 'koi8-u', 'koi8-ru',
'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1257', 'cp949', 'cp1133', 'cp1125', 'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1257', 'cp949', 'cp1133',
'cp850', 'cp866', 'cp1255', 'cp1256', 'cp862', 'cp874', 'cp932', 'cp950', 'cp1258', 'cp850', 'cp866', 'cp1255', 'cp1256', 'cp862', 'cp874', 'cp932', 'cp950', 'cp1258',
'windows-1250', 'windows-1251', 'windows-1252', 'windows-1253', 'windows-1254', 'windows-1255', 'windows-1250', 'windows-1251', 'windows-1252', 'windows-1253', 'windows-1254', 'windows-1255',
'windows-1256', 'windows-1257', 'windows-1258', 'windows-874', 'windows-1256', 'windows-1257', 'windows-1258', 'windows-874',
@ -33,6 +33,62 @@ class Utils
'c99', 'java', 'ucs-2-internal', 'ucs-4-internal' 'c99', 'java', 'ucs-2-internal', 'ucs-4-internal'
); );
/**
* @var array
*/
public static $aLocaleMapping = array(
'.65001' => 'utf-8',
'.20127' => 'iso-8859-1',
'.1250' => 'windows-1250',
'.cp1250' => 'windows-1250',
'.cp-1250' => 'windows-1250',
'.1251' => 'windows-1251',
'.cp1251' => 'windows-1251',
'.cp-1251' => 'windows-1251',
'.1252' => 'windows-1252',
'.cp1252' => 'windows-1252',
'.cp-1252' => 'windows-1252',
'.1253' => 'windows-1253',
'.cp1253' => 'windows-1253',
'.cp-1253' => 'windows-1253',
'.1254' => 'windows-1254',
'.cp1254' => 'windows-1254',
'.cp-1254' => 'windows-1254',
'.1255' => 'windows-1255',
'.cp1255' => 'windows-1255',
'.cp-1255' => 'windows-1255',
'.1256' => 'windows-1256',
'.cp1256' => 'windows-1256',
'.cp-1256' => 'windows-1256',
'.1257' => 'windows-1257',
'.cp1257' => 'windows-1257',
'.cp-1257' => 'windows-1257',
'.1258' => 'windows-1258',
'.cp1258' => 'windows-1258',
'.cp-1258' => 'windows-1258',
'.28591' => 'iso-8859-1',
'.28592' => 'iso-8859-2',
'.28593' => 'iso-8859-3',
'.28594' => 'iso-8859-4',
'.28595' => 'iso-8859-5',
'.28596' => 'iso-8859-6',
'.28597' => 'iso-8859-7',
'.28598' => 'iso-8859-8',
'.28599' => 'iso-8859-9',
'.28603' => 'iso-8859-13',
'.28605' => 'iso-8859-15',
'.1125' => 'cp1125',
'.20866' => 'koi8-r',
'.21866' => 'koi8-u',
'.950' => 'big5',
'.936' => 'euc-cn',
'.20932' => 'euc-js',
'.949' => 'euc-kr',
);
/** /**
* @access private * @access private
*/ */
@ -40,6 +96,28 @@ class Utils
{ {
} }
/**
* @return string
*/
public static function DetectSystemCharset()
{
$sResult = '';
$sLocale = @\setlocale(LC_ALL, '');
$sLocaleLower = \strtolower(\trim($sLocale));
foreach (\MailSo\Base\Utils::$aLocaleMapping as $sKey => $sValue)
{
if (false !== \strpos($sLocaleLower, $sKey) ||
false !== \strpos($sLocaleLower, '.'.$sValue))
{
$sResult = $sValue;
break;
}
}
return $sResult;
}
/** /**
* @param string $sEncoding * @param string $sEncoding
* @param bool $bAsciAsUtf8 = false * @param bool $bAsciAsUtf8 = false

View file

@ -200,8 +200,22 @@ abstract class NetClient
$this->rConnect = @\fsockopen($this->sConnectedHost, $this->iConnectedPort, $this->rConnect = @\fsockopen($this->sConnectedHost, $this->iConnectedPort,
$iErrorNo, $sErrorStr, $this->iConnectTimeOut); $iErrorNo, $sErrorStr, $this->iConnectTimeOut);
if (!is_resource($this->rConnect)) if (!\is_resource($this->rConnect))
{ {
if (!empty($sErrorStr) && !\MailSo\Base\Utils::IsUtf8($sErrorStr))
{
$sCharset = \MailSo\Base\Utils::DetectSystemCharset();
if (!empty($sCharset))
{
$sErrorStr = \MailSo\Base\Utils::ConvertEncoding(
$sErrorStr, $sCharset, \MailSo\Base\Enumerations\Charset::UTF_8);
}
else
{
$sErrorStr = @\utf8_encode($sErrorStr);
}
}
$this->writeLogException( $this->writeLogException(
new Exceptions\SocketCanNotConnectToHostException( new Exceptions\SocketCanNotConnectToHostException(
$sErrorStr, $iErrorNo, $sErrorStr, $iErrorNo,

View file

@ -975,11 +975,11 @@ class Actions
'DevEmail' => '', 'DevEmail' => '',
'DevLogin' => '', 'DevLogin' => '',
'DevPassword' => '', 'DevPassword' => '',
'Title' => $oConfig->Get('webmail', 'title', ''), 'Title' => 'RainLoop Webmail',
'LoadingDescription' => $oConfig->Get('webmail', 'loading_description', ''), 'LoadingDescription' => 'RainLoop',
'LoginLogo' => $oConfig->Get('branding', 'login_logo', ''), 'LoginLogo' => '',
'LoginDescription' => $oConfig->Get('branding', 'login_desc', ''), 'LoginDescription' => '',
'LoginCss' => $oConfig->Get('branding', 'login_css', ''), 'LoginCss' => '',
'Token' => $oConfig->Get('security', 'csrf_protection', false) ? \RainLoop\Utils::GetCsrfToken() : '', 'Token' => $oConfig->Get('security', 'csrf_protection', false) ? \RainLoop\Utils::GetCsrfToken() : '',
'OpenPGP' => $oConfig->Get('security', 'openpgp', false), 'OpenPGP' => $oConfig->Get('security', 'openpgp', false),
'AllowTwoFactorAuth' => (bool) $oConfig->Get('security', 'allow_two_factor_auth', false), 'AllowTwoFactorAuth' => (bool) $oConfig->Get('security', 'allow_two_factor_auth', false),
@ -1002,6 +1002,7 @@ class Actions
'UseImapThread' => (bool) $oConfig->Get('labs', 'use_imap_thread', false), 'UseImapThread' => (bool) $oConfig->Get('labs', 'use_imap_thread', false),
'UseImapSubscribe' => (bool) $oConfig->Get('labs', 'use_imap_list_subscribe', true), 'UseImapSubscribe' => (bool) $oConfig->Get('labs', 'use_imap_list_subscribe', true),
'AllowAppendMessage' => (bool) $oConfig->Get('labs', 'allow_message_append', false), 'AllowAppendMessage' => (bool) $oConfig->Get('labs', 'allow_message_append', false),
'Capa' => $this->Capa(),
'Plugins' => array() 'Plugins' => array()
); );
@ -1010,6 +1011,16 @@ class Actions
$aResult['AuthAccountHash'] = $sAuthAccountHash; $aResult['AuthAccountHash'] = $sAuthAccountHash;
} }
if ($this->GetCapa(\RainLoop\Enumerations\Capa::PREM))
{
$aResult['Title'] = $oConfig->Get('webmail', 'title', '');
$aResult['LoadingDescription'] = $oConfig->Get('webmail', 'loading_description', '');
$aResult['LoginLogo'] = $oConfig->Get('branding', 'login_logo', '');
$aResult['LoginDescription'] = $oConfig->Get('branding', 'login_desc', '');
$aResult['LoginCss'] = $oConfig->Get('branding', 'login_css', '');
}
$oSettings = null; $oSettings = null;
if (!$bAdmin) if (!$bAdmin)
{ {
@ -2104,12 +2115,15 @@ class Actions
$this->setConfigFromParams($oConfig, 'DetermineUserLanguage', 'login', 'determine_user_language', 'bool'); $this->setConfigFromParams($oConfig, 'DetermineUserLanguage', 'login', 'determine_user_language', 'bool');
$this->setConfigFromParams($oConfig, 'Title', 'webmail', 'title', 'string'); if ($this->GetCapa(\RainLoop\Enumerations\Capa::PREM))
$this->setConfigFromParams($oConfig, 'LoadingDescription', 'webmail', 'loading_description', 'string'); {
$this->setConfigFromParams($oConfig, 'Title', 'webmail', 'title', 'string');
$this->setConfigFromParams($oConfig, 'LoadingDescription', 'webmail', 'loading_description', 'string');
$this->setConfigFromParams($oConfig, 'LoginLogo', 'branding', 'login_logo', 'string'); $this->setConfigFromParams($oConfig, 'LoginLogo', 'branding', 'login_logo', 'string');
$this->setConfigFromParams($oConfig, 'LoginDescription', 'branding', 'login_desc', 'string'); $this->setConfigFromParams($oConfig, 'LoginDescription', 'branding', 'login_desc', 'string');
$this->setConfigFromParams($oConfig, 'LoginCss', 'branding', 'login_css', 'string'); $this->setConfigFromParams($oConfig, 'LoginCss', 'branding', 'login_css', 'string');
}
$this->setConfigFromParams($oConfig, 'TokenProtection', 'security', 'csrf_protection', 'bool'); $this->setConfigFromParams($oConfig, 'TokenProtection', 'security', 'csrf_protection', 'bool');
$this->setConfigFromParams($oConfig, 'OpenPGP', 'security', 'openpgp', 'bool'); $this->setConfigFromParams($oConfig, 'OpenPGP', 'security', 'openpgp', 'bool');
@ -5943,6 +5957,26 @@ class Actions
return $this->DefaultResponse(__FUNCTION__, true); return $this->DefaultResponse(__FUNCTION__, true);
} }
/**
* @return array
*/
public function Capa()
{
return array(
\RainLoop\Enumerations\Capa::PREM
);
}
/**
* @param string $sName
*
* @return bool
*/
public function GetCapa($sName)
{
return \in_array($sName, $this->Capa());
}
/** /**
* @param string $sKey * @param string $sKey
@ -6882,16 +6916,10 @@ class Actions
$sPlain = ''; $sPlain = '';
$sHtml = \trim($mResponse->Html()); $sHtml = \trim($mResponse->Html());
$bRtl = false;
if (0 === \strlen($sHtml)) if (0 === \strlen($sHtml))
{ {
$sPlain = \trim($mResponse->Plain()); $sPlain = \trim($mResponse->Plain());
$bRtl = \MailSo\Base\Utils::IsRTL($sPlain);
}
else
{
$bRtl = \MailSo\Base\Utils::IsRTL($sHtml);
} }
$mResult['DraftInfo'] = $mResponse->DraftInfo(); $mResult['DraftInfo'] = $mResponse->DraftInfo();
@ -6903,7 +6931,7 @@ class Actions
$mResult['PlainRaw'] = $sPlain; $mResult['PlainRaw'] = $sPlain;
$mResult['Plain'] = 0 === \strlen($sPlain) ? '' : \MailSo\Base\HtmlUtils::ConvertPlainToHtml($sPlain); $mResult['Plain'] = 0 === \strlen($sPlain) ? '' : \MailSo\Base\HtmlUtils::ConvertPlainToHtml($sPlain);
$mResult['Rtl'] = $bRtl; $mResult['Rtl'] = \MailSo\Base\Utils::IsRTL($sPlain);
$mResult['TextHash'] = \md5($mResult['Html'].$mResult['Plain'].$mResult['PlainRaw']); $mResult['TextHash'] = \md5($mResult['Html'].$mResult['Plain'].$mResult['PlainRaw']);

View file

@ -0,0 +1,8 @@
<?php
namespace RainLoop\Enumerations;
class Capa
{
const PREM = 'PREM';
}

View file

@ -7,7 +7,7 @@
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal domain-form" action="#/" onsubmit="return false;"> <form class="form-horizontal domain-form" action="#/" onsubmit="return false;">
<div class="row" data-bind="visible: !edit()"> <div class="row" data-bind="visible: !edit()">
<div class="span8"> <div class="span10">
Name <span style="color: #aaa">(wildcard supported)</span> Name <span style="color: #aaa">(wildcard supported)</span>
<br /> <br />
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
@ -17,32 +17,38 @@
</div> </div>
<br /> <br />
<div class="row"> <div class="row">
<div class="span4" data-bind="css: { 'testing-done': testingDone, 'testing-error': testingImapError }"> <div class="span5" data-bind="css: { 'testing-done': testingDone, 'testing-error': testingImapError }">
<div class="legend imap-header"> <div class="legend imap-header">
<span data-placement="top" data-bind="tooltip3: testingImapErrorDesc"> <span data-placement="bottom" data-bind="tooltip3: testingImapErrorDesc">
IMAP IMAP
</span> </span>
</div> </div>
Server <div class="row">
<br /> <div class="span3">
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" Server
data-bind="value: imapServer, valueUpdate: 'afterkeydown', hasfocus: imapServerFocus" /> <br />
<br /> <input type="text" class="span3" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
<br /> data-bind="value: imapServer, valueUpdate: 'afterkeydown', hasfocus: imapServerFocus" />
Port </div>
<br /> <div class="span1">
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" Port
data-bind="value: imapPort, valueUpdate: 'afterkeydown'" /> <br />
<br /> <input type="text" class="span1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
<br /> data-bind="value: imapPort, valueUpdate: 'afterkeydown'" />
Secure </div>
<br /> </div>
<select class="span2" data-bind="value: imapSecure">
<option value="0">None</option>
<option value="1">SSL/TLS</option>
<option value="2">STARTTLS</option>
</select>
<br /> <br />
<div class="row">
<div class="span4">
Secure
<br />
<select class="span2" data-bind="value: imapSecure">
<option value="0">None</option>
<option value="1">SSL/TLS</option>
<option value="2">STARTTLS</option>
</select>
</div>
</div>
<br /> <br />
<label data-bind="click: function () { imapShortLogin(!imapShortLogin()); }"> <label data-bind="click: function () { imapShortLogin(!imapShortLogin()); }">
<i data-bind="css: imapShortLogin() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i> <i data-bind="css: imapShortLogin() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
@ -50,32 +56,38 @@
Use short login form Use short login form
</label> </label>
</div> </div>
<div class="span4" data-bind="css: { 'testing-done': testingDone, 'testing-error': testingSmtpError }"> <div class="span5" data-bind="css: { 'testing-done': testingDone, 'testing-error': testingSmtpError }">
<div class="legend smtp-header"> <div class="legend smtp-header">
<span data-placement="top" data-bind="tooltip3: testingSmtpErrorDesc"> <span data-placement="bottom" data-bind="tooltip3: testingSmtpErrorDesc">
SMTP SMTP
</span> </span>
</div> </div>
Server <div class="row">
<br /> <div class="span3">
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" Server
data-bind="value: smtpServer, valueUpdate: 'afterkeydown', hasfocus: smtpServerFocus" /> <br />
<br /> <input type="text" class="span3" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
<br /> data-bind="value: smtpServer, valueUpdate: 'afterkeydown', hasfocus: smtpServerFocus" />
Port </div>
<br /> <div class="span1">
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" Port
data-bind="value: smtpPort, valueUpdate: 'afterkeydown'" /> <br />
<br /> <input type="text" class="span1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
<br /> data-bind="value: smtpPort, valueUpdate: 'afterkeydown'" />
Secure </div>
<br /> </div>
<select class="span2" data-bind="value: smtpSecure">
<option value="0">None</option>
<option value="1">SSL/TLS</option>
<option value="2">STARTTLS</option>
</select>
<br /> <br />
<div class="row">
<div class="span4">
Secure
<br />
<select class="span2" data-bind="value: smtpSecure">
<option value="0">None</option>
<option value="1">SSL/TLS</option>
<option value="2">STARTTLS</option>
</select>
</div>
</div>
<br /> <br />
<label data-bind="click: function () { smtpShortLogin(!smtpShortLogin()); }"> <label data-bind="click: function () { smtpShortLogin(!smtpShortLogin()); }">
<i data-bind="css: smtpShortLogin() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i> <i data-bind="css: smtpShortLogin() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
@ -88,7 +100,7 @@
Use authentication Use authentication
</label> </label>
</div> </div>
<div class="span8"> <div class="span10">
<div class="legend white-list-header"> <div class="legend white-list-header">
White List White List
</div> </div>

View file

@ -637,7 +637,7 @@
border-radius: 8px; border-radius: 8px;
} }
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */ /*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
/* ============================================================================= /* =============================================================================
@ -1142,7 +1142,7 @@ table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
} }
@charset "UTF-8"; @charset "UTF-8";
@font-face { @font-face {
@ -1510,7 +1510,7 @@ table {
.icon-help:before { .icon-help:before {
content: "\e06c"; content: "\e06c";
} }
/** initial setup **/ /** initial setup **/
.nano { .nano {
/* /*
@ -1627,7 +1627,7 @@ table {
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 { .nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
background-color: rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.4);
} }
/* Magnific Popup CSS */ /* Magnific Popup CSS */
.mfp-bg { .mfp-bg {
top: 0; top: 0;
@ -1992,7 +1992,7 @@ img.mfp-img {
right: 0; right: 0;
padding-top: 0; } padding-top: 0; }
/* overlay at start */ /* overlay at start */
.mfp-fade.mfp-bg { .mfp-fade.mfp-bg {
@ -2038,7 +2038,7 @@ img.mfp-img {
-moz-transform: translateX(50px); -moz-transform: translateX(50px);
transform: translateX(50px); transform: translateX(50px);
} }
.simple-pace { .simple-pace {
-webkit-pointer-events: none; -webkit-pointer-events: none;
pointer-events: none; pointer-events: none;
@ -2109,7 +2109,7 @@ img.mfp-img {
@keyframes simple-pace-stripe-animation { @keyframes simple-pace-stripe-animation {
0% { transform: none; transform: none; } 0% { transform: none; transform: none; }
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); } 100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
} }
.inputosaurus-container { .inputosaurus-container {
background-color:#fff; background-color:#fff;
border:1px solid #bcbec0; border:1px solid #bcbec0;
@ -2177,7 +2177,7 @@ img.mfp-img {
box-shadow:none; box-shadow:none;
} }
.inputosaurus-input-hidden { display:none; } .inputosaurus-input-hidden { display:none; }
.flag-wrapper { .flag-wrapper {
width: 24px; width: 24px;
height: 16px; height: 16px;
@ -2221,7 +2221,7 @@ img.mfp-img {
.flag.flag-pt-br {background-position: -192px -11px} .flag.flag-pt-br {background-position: -192px -11px}
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px} .flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */ /* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
.clearfix { .clearfix {
*zoom: 1; *zoom: 1;
@ -9065,7 +9065,7 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
filter: alpha(opacity=100); filter: alpha(opacity=100);
} }
.b-domain-content.modal { .b-domain-content.modal {
width: 645px; width: 810px;
} }
.b-domain-content .modal-header { .b-domain-content .modal-header {
background-color: #fff; background-color: #fff;
@ -9073,15 +9073,15 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
.b-domain-content .modal-body { .b-domain-content .modal-body {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
width: 1300px; width: 1600px;
height: 390px; height: 370px;
left: 0; left: 0;
} }
.b-domain-content.domain-edit .modal-body { .b-domain-content.domain-edit .modal-body {
height: 350px; height: 320px;
} }
.b-domain-content.domain-white-list-page .modal-body { .b-domain-content.domain-white-list-page .modal-body {
left: -640px; left: -800px;
} }
.b-domain-content .error-desc { .b-domain-content .error-desc {
color: red; color: red;

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */ /*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) { (function (window, $, ko, crossroads, hasher, _) {
'use strict'; 'use strict';
@ -77,14 +77,14 @@ var
$document = $(window.document), $document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
; ;
/*jshint onevar: false*/ /*jshint onevar: false*/
/** /**
* @type {?AdminApp} * @type {?AdminApp}
*/ */
var RL = null; var RL = null;
/*jshint onevar: true*/ /*jshint onevar: true*/
/** /**
* @type {?} * @type {?}
*/ */
@ -233,7 +233,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type; return oType && 'application/pdf' === oType.type;
}); });
} }
Consts.Defaults = {}; Consts.Defaults = {};
Consts.Values = {}; Consts.Values = {};
Consts.DataImages = {}; Consts.DataImages = {};
@ -351,7 +351,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string} * @type {string}
*/ */
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII='; Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/** /**
* @enum {string} * @enum {string}
*/ */
@ -379,6 +379,13 @@ Enums.StateType = {
'Admin': 1 'Admin': 1
}; };
/**
* @enum {string}
*/
Enums.Capa = {
'Prem': 'PREM'
};
/** /**
* @enum {string} * @enum {string}
*/ */
@ -726,7 +733,7 @@ Enums.Notification = {
'UnknownNotification': 999, 'UnknownNotification': 999,
'UnknownError': 999 'UnknownError': 999
}; };
Utils.trim = $.trim; Utils.trim = $.trim;
Utils.inArray = $.inArray; Utils.inArray = $.inArray;
Utils.isArray = _.isArray; Utils.isArray = _.isArray;
@ -2470,7 +2477,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
return oItem.hasClass('open'); return oItem.hasClass('open');
})); }));
}, 50); }, 50);
// Base64 encode / decode // Base64 encode / decode
// http://www.webtoolkit.info/ // http://www.webtoolkit.info/
@ -2633,7 +2640,7 @@ Base64 = {
} }
}; };
/*jslint bitwise: false*/ /*jslint bitwise: false*/
ko.bindingHandlers.tooltip = { ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) { 'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice) if (!Globals.bMobileDevice)
@ -3460,7 +3467,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this; return this;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3772,7 +3779,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{ {
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : ''); return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
}; };
/** /**
* @type {Object} * @type {Object}
*/ */
@ -3866,7 +3873,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3940,7 +3947,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4011,7 +4018,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4054,7 +4061,7 @@ LocalStorage.prototype.get = function (iKey)
{ {
return this.oDriver ? this.oDriver.get('p' + iKey) : null; return this.oDriver ? this.oDriver.get('p' + iKey) : null;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4067,7 +4074,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{ {
}; };
/** /**
* @param {string=} sPosition = '' * @param {string=} sPosition = ''
* @param {string=} sTemplate = '' * @param {string=} sTemplate = ''
@ -4160,7 +4167,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
return true; return true;
}); });
}; };
/** /**
* @param {string} sScreenName * @param {string} sScreenName
* @param {?=} aViewModels = [] * @param {?=} aViewModels = []
@ -4236,7 +4243,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute; this.oCross = oRoute;
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4636,7 +4643,7 @@ Knoin.prototype.bootstart = function ()
}; };
kn = new Knoin(); kn = new Knoin();
/** /**
* @param {string=} sEmail * @param {string=} sEmail
* @param {string=} sName * @param {string=} sName
@ -5000,7 +5007,7 @@ EmailModel.prototype.inputoTagLine = function ()
{ {
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email; return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5044,7 +5051,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ? return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
Utils.encodeHtml(this.name()) : this.name(); Utils.encodeHtml(this.name()) : this.name();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5339,7 +5346,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
this.smtpAuth(true); this.smtpAuth(true);
this.whiteList(''); this.whiteList('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5476,7 +5483,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
} }
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5592,7 +5599,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
{ {
var sValue = this.key(); var sValue = this.key();
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue)); return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5652,7 +5659,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang); RL.data().mainLanguage(sLang);
this.cancelCommand(); this.cancelCommand();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5758,7 +5765,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5845,7 +5852,7 @@ AdminLoginViewModel.prototype.onHide = function ()
{ {
this.loginFocus(false); this.loginFocus(false);
}; };
/** /**
* @param {?} oScreen * @param {?} oScreen
* *
@ -5869,7 +5876,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
{ {
return '#/' + sRoute; return '#/' + sRoute;
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -5893,7 +5900,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
RL.remote().adminLogout(function () { RL.remote().adminLogout(function () {
RL.loginAndLogoutReload(); RL.loginAndLogoutReload();
}); });
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5993,7 +6000,7 @@ AdminGeneral.prototype.selectLanguage = function ()
{ {
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6045,7 +6052,7 @@ AdminLogin.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6114,7 +6121,7 @@ AdminBranding.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6334,7 +6341,7 @@ AdminContacts.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6423,7 +6430,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
{ {
RL.reloadDomainList(); RL.reloadDomainList();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6535,7 +6542,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
{ {
return RL.link().phpInfo(); return RL.link().phpInfo();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6651,7 +6658,7 @@ AdminSocial.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6748,7 +6755,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
RL.reloadPluginList(); RL.reloadPluginList();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6846,7 +6853,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage); RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6897,7 +6904,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
{ {
var oDate = moment.unix(this.licenseExpired()); var oDate = moment.unix(this.licenseExpired());
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')'; return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7027,7 +7034,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed')); this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
}; };
/** /**
* @constructor * @constructor
* @extends AbstractData * @extends AbstractData
@ -7069,7 +7076,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
AdminDataStorage.prototype.populateDataOnStart = function() AdminDataStorage.prototype.populateDataOnStart = function()
{ {
AbstractData.prototype.populateDataOnStart.call(this); AbstractData.prototype.populateDataOnStart.call(this);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7343,7 +7350,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion 'Version': sVersion
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractAjaxRemoteStorage * @extends AbstractAjaxRemoteStorage
@ -7588,7 +7595,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
{ {
this.defaultRequest(fCallback, 'AdminPing'); this.defaultRequest(fCallback, 'AdminPing');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7671,7 +7678,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{ {
this.oEmailsPicsHashes = oData; this.oEmailsPicsHashes = oData;
}; };
/** /**
* @constructor * @constructor
* @extends AbstractCacheStorage * @extends AbstractCacheStorage
@ -7682,7 +7689,7 @@ function AdminCacheStorage()
} }
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype); _.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
/** /**
* @param {Array} aViewModels * @param {Array} aViewModels
* @constructor * @constructor
@ -7860,7 +7867,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules] ['', oRules]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -7875,7 +7882,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
AdminLoginScreen.prototype.onShow = function () AdminLoginScreen.prototype.onShow = function ()
{ {
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSettings * @extends AbstractSettings
@ -7895,7 +7902,7 @@ AdminSettingsScreen.prototype.onShow = function ()
// AbstractSettings.prototype.onShow.call(this); // AbstractSettings.prototype.onShow.call(this);
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractBoot * @extends KnoinAbstractBoot
@ -8169,6 +8176,16 @@ AbstractApp.prototype.pub = function (sName, aArgs)
return this; return this;
}; };
/**
* @param {string} sName
* @return {boolean}
*/
AbstractApp.prototype.capa = function (sName)
{
var mCapa = this.settingsGet('Capa');
return Utils.isArray(mCapa) && Utils.isNormal(sName) && -1 < Utils.inArray(sName, mCapa);
};
AbstractApp.prototype.bootstart = function () AbstractApp.prototype.bootstart = function ()
{ {
var self = this; var self = this;
@ -8243,7 +8260,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready(); ssm.ready();
}; };
/** /**
* @constructor * @constructor
* @extends AbstractApp * @extends AbstractApp
@ -8456,6 +8473,11 @@ AdminApp.prototype.bootstart = function ()
} }
else else
{ {
if (!RL.capa(Enums.Capa.Prem))
{
Utils.removeSettingsViewModel(AdminBranding);
}
if (!!RL.settingsGet('Auth')) if (!!RL.settingsGet('Auth'))
{ {
// TODO // TODO
@ -8482,7 +8504,7 @@ AdminApp.prototype.bootstart = function ()
* @type {AdminApp} * @type {AdminApp}
*/ */
RL = new AdminApp(); RL = new AdminApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile'); $html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS); $window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -8533,9 +8555,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null; window['__RLBOOT'] = null;
}); });
}; };
if (window.SimplePace) { if (window.SimplePace) {
window.SimplePace.add(10); window.SimplePace.add(10);
} }
}(window, jQuery, ko, crossroads, hasher, _)); }(window, jQuery, ko, crossroads, hasher, _));

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */ /*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible, key) { (function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible, key) {
'use strict'; 'use strict';
@ -77,7 +77,7 @@ var
$document = $(window.document), $document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
; ;
/*jshint onevar: false*/ /*jshint onevar: false*/
/** /**
* @type {?RainLoopApp} * @type {?RainLoopApp}
@ -88,7 +88,7 @@ var
$proxyDiv = $('<div></div>') $proxyDiv = $('<div></div>')
; ;
/*jshint onevar: true*/ /*jshint onevar: true*/
/** /**
* @type {?} * @type {?}
*/ */
@ -237,7 +237,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type; return oType && 'application/pdf' === oType.type;
}); });
} }
Consts.Defaults = {}; Consts.Defaults = {};
Consts.Values = {}; Consts.Values = {};
Consts.DataImages = {}; Consts.DataImages = {};
@ -355,7 +355,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string} * @type {string}
*/ */
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII='; Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/** /**
* @enum {string} * @enum {string}
*/ */
@ -383,6 +383,13 @@ Enums.StateType = {
'Admin': 1 'Admin': 1
}; };
/**
* @enum {string}
*/
Enums.Capa = {
'Prem': 'PREM'
};
/** /**
* @enum {string} * @enum {string}
*/ */
@ -730,7 +737,7 @@ Enums.Notification = {
'UnknownNotification': 999, 'UnknownNotification': 999,
'UnknownError': 999 'UnknownError': 999
}; };
Utils.trim = $.trim; Utils.trim = $.trim;
Utils.inArray = $.inArray; Utils.inArray = $.inArray;
Utils.isArray = _.isArray; Utils.isArray = _.isArray;
@ -2474,7 +2481,7 @@ Utils.detectDropdownVisibility = _.debounce(function () {
return oItem.hasClass('open'); return oItem.hasClass('open');
})); }));
}, 50); }, 50);
// Base64 encode / decode // Base64 encode / decode
// http://www.webtoolkit.info/ // http://www.webtoolkit.info/
@ -2637,7 +2644,7 @@ Base64 = {
} }
}; };
/*jslint bitwise: false*/ /*jslint bitwise: false*/
ko.bindingHandlers.tooltip = { ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) { 'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice) if (!Globals.bMobileDevice)
@ -3464,7 +3471,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this; return this;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -3776,7 +3783,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{ {
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : ''); return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
}; };
/** /**
* @type {Object} * @type {Object}
*/ */
@ -3870,7 +3877,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
}; };
function NewHtmlEditorWrapper(oElement, fOnBlur, fOnReady, fOnModeChange) function NewHtmlEditorWrapper(oElement, fOnBlur, fOnReady, fOnModeChange)
{ {
var self = this; var self = this;
@ -4090,7 +4097,7 @@ NewHtmlEditorWrapper.prototype.clear = function (bFocus)
this.setHtml('', bFocus); this.setHtml('', bFocus);
}; };
/** /**
* @constructor * @constructor
* @param {koProperty} oKoList * @param {koProperty} oKoList
@ -4799,7 +4806,7 @@ Selector.prototype.on = function (sEventName, fCallback)
{ {
this.oCallbacks[sEventName] = fCallback; this.oCallbacks[sEventName] = fCallback;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4873,7 +4880,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4944,7 +4951,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult; return mResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -4987,7 +4994,7 @@ LocalStorage.prototype.get = function (iKey)
{ {
return this.oDriver ? this.oDriver.get('p' + iKey) : null; return this.oDriver ? this.oDriver.get('p' + iKey) : null;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5000,7 +5007,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{ {
}; };
/** /**
* @param {string=} sPosition = '' * @param {string=} sPosition = ''
* @param {string=} sTemplate = '' * @param {string=} sTemplate = ''
@ -5093,7 +5100,7 @@ KnoinAbstractViewModel.prototype.registerPopupKeyDown = function ()
return true; return true;
}); });
}; };
/** /**
* @param {string} sScreenName * @param {string} sScreenName
* @param {?=} aViewModels = [] * @param {?=} aViewModels = []
@ -5169,7 +5176,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute; this.oCross = oRoute;
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -5569,7 +5576,7 @@ Knoin.prototype.bootstart = function ()
}; };
kn = new Knoin(); kn = new Knoin();
/** /**
* @param {string=} sEmail * @param {string=} sEmail
* @param {string=} sName * @param {string=} sName
@ -5933,7 +5940,7 @@ EmailModel.prototype.inputoTagLine = function ()
{ {
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email; return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6057,7 +6064,7 @@ ContactModel.prototype.lineAsCcc = function ()
return aResult.join(' '); return aResult.join(' ');
}; };
/** /**
* @param {number=} iType = Enums.ContactPropertyType.Unknown * @param {number=} iType = Enums.ContactPropertyType.Unknown
* @param {string=} sTypeStr = '' * @param {string=} sTypeStr = ''
@ -6086,7 +6093,7 @@ function ContactPropertyModel(iType, sTypeStr, sValue, bFocused, sPlaceholder)
}, this); }, this);
} }
/** /**
* @constructor * @constructor
*/ */
@ -6130,7 +6137,7 @@ ContactTagModel.prototype.toLine = function (bEncodeHtml)
return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ? return (Utils.isUnd(bEncodeHtml) ? false : !!bEncodeHtml) ?
Utils.encodeHtml(this.name()) : this.name(); Utils.encodeHtml(this.name()) : this.name();
}; };
/** /**
* @constructor * @constructor
*/ */
@ -6366,7 +6373,7 @@ AttachmentModel.prototype.iconClass = function ()
return sClass; return sClass;
}; };
/** /**
* @constructor * @constructor
* @param {string} sId * @param {string} sId
@ -6427,7 +6434,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
} }
return bResult; return bResult;
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7621,7 +7628,7 @@ MessageModel.prototype.flagHash = function ()
return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(), return [this.deleted(), this.unseen(), this.flagged(), this.answered(), this.forwarded(),
this.isReadReceipt()].join(''); this.isReadReceipt()].join('');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -7953,7 +7960,7 @@ FolderModel.prototype.printableFullName = function ()
{ {
return this.fullName.split(this.delimiter).join(' / '); return this.fullName.split(this.delimiter).join(' / ');
}; };
/** /**
* @param {string} sEmail * @param {string} sEmail
* @param {boolean=} bCanBeDelete = true * @param {boolean=} bCanBeDelete = true
@ -7974,7 +7981,7 @@ AccountModel.prototype.email = '';
AccountModel.prototype.changeAccountLink = function () AccountModel.prototype.changeAccountLink = function ()
{ {
return RL.link().change(this.email); return RL.link().change(this.email);
}; };
/** /**
* @param {string} sId * @param {string} sId
* @param {string} sEmail * @param {string} sEmail
@ -8010,7 +8017,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
var sName = this.name(); var sName = this.name();
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>'; return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
}; };
/** /**
* @param {string} iIndex * @param {string} iIndex
* @param {string} sGuID * @param {string} sGuID
@ -8041,7 +8048,7 @@ OpenPgpKeyModel.prototype.user = '';
OpenPgpKeyModel.prototype.email = ''; OpenPgpKeyModel.prototype.email = '';
OpenPgpKeyModel.prototype.armor = ''; OpenPgpKeyModel.prototype.armor = '';
OpenPgpKeyModel.prototype.isPrivate = false; OpenPgpKeyModel.prototype.isPrivate = false;
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -8137,7 +8144,7 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
this.selectedFolder(oFolder); this.selectedFolder(oFolder);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -8247,7 +8254,7 @@ PopupsFolderCreateViewModel.prototype.onFocus = function ()
{ {
this.folderName.focused(true); this.folderName.focused(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -8360,7 +8367,7 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
this.notification(sNotification); this.notification(sNotification);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -9848,7 +9855,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
this.editorResizeThrottle(); this.editorResizeThrottle();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10590,7 +10597,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
// oItem.checked(false); // oItem.checked(false);
// }); // });
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10726,7 +10733,7 @@ PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
{ {
this.fromFocus(true); this.fromFocus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10838,7 +10845,7 @@ PopupsAddAccountViewModel.prototype.onFocus = function ()
{ {
this.emailFocus(true); this.emailFocus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10924,7 +10931,7 @@ PopupsAddOpenPgpKeyViewModel.prototype.onFocus = function ()
{ {
this.key.focus(true); this.key.focus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -10964,7 +10971,7 @@ PopupsViewOpenPgpKeyViewModel.prototype.onShow = function (oOpenPgpKey)
this.key(oOpenPgpKey.armor); this.key(oOpenPgpKey.armor);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11052,7 +11059,7 @@ PopupsGenerateNewOpenPgpKeyViewModel.prototype.onFocus = function ()
{ {
this.email.focus(true); this.email.focus(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11292,7 +11299,7 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
this.to(aRec); this.to(aRec);
this.text(sText); this.text(sText);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11440,7 +11447,7 @@ PopupsIdentityViewModel.prototype.onFocus = function ()
this.email.focused(true); this.email.focused(true);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11500,7 +11507,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang); RL.data().mainLanguage(sLang);
this.cancelCommand(); this.cancelCommand();
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11554,7 +11561,7 @@ PopupsTwoFactorTestViewModel.prototype.onFocus = function ()
{ {
this.code.focused(true); this.code.focused(true);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11660,7 +11667,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -11705,7 +11712,7 @@ PopupsKeyboardShortcutsHelpViewModel.prototype.onBuild = function (oDom)
} }
}, this)); }, this));
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -12017,7 +12024,7 @@ LoginViewModel.prototype.selectLanguage = function ()
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -12113,7 +12120,7 @@ AbstractSystemDropDownViewModel.prototype.onBuild = function ()
} }
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSystemDropDownViewModel * @extends AbstractSystemDropDownViewModel
@ -12125,7 +12132,7 @@ function MailBoxSystemDropDownViewModel()
} }
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel); Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/** /**
* @constructor * @constructor
* @extends AbstractSystemDropDownViewModel * @extends AbstractSystemDropDownViewModel
@ -12137,7 +12144,7 @@ function SettingsSystemDropDownViewModel()
} }
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel); Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -12346,7 +12353,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
kn.showScreenPopup(PopupsContactsViewModel); kn.showScreenPopup(PopupsContactsViewModel);
} }
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -13249,7 +13256,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
; ;
return !!oJua; return !!oJua;
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -13941,7 +13948,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
RL.reloadFlagsCurrentMessageListAndMessageFromCache(); RL.reloadFlagsCurrentMessageListAndMessageFromCache();
} }
}; };
/** /**
* @param {?} oScreen * @param {?} oScreen
* *
@ -13970,7 +13977,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
{ {
kn.setHash(RL.link().inbox()); kn.setHash(RL.link().inbox());
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractViewModel * @extends KnoinAbstractViewModel
@ -14001,7 +14008,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
{ {
kn.setHash(RL.link().inbox()); kn.setHash(RL.link().inbox());
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14161,7 +14168,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
{ {
kn.showScreenPopup(PopupsLanguagesViewModel); kn.showScreenPopup(PopupsLanguagesViewModel);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14211,7 +14218,7 @@ SettingsContacts.prototype.onBuild = function ()
//{ //{
// //
//}; //};
/** /**
* @constructor * @constructor
*/ */
@ -14292,7 +14299,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
} }
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14380,7 +14387,7 @@ SettingsIdentity.prototype.onBuild = function ()
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14538,7 +14545,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
}); });
}, 50); }, 50);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14688,7 +14695,7 @@ SettingsSecurity.prototype.onBuild = function ()
this.processing(true); this.processing(true);
RL.remote().getTwoFactor(this.onResult); RL.remote().getTwoFactor(this.onResult);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -14755,7 +14762,7 @@ function SettingsSocialScreen()
} }
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social'); Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
/** /**
* @constructor * @constructor
*/ */
@ -14860,7 +14867,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
Utils.getNotification(Enums.Notification.CouldNotSaveNewPassword)); Utils.getNotification(Enums.Notification.CouldNotSaveNewPassword));
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -15055,7 +15062,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
oFolder.subScribed(false); oFolder.subScribed(false);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -15169,7 +15176,7 @@ SettingsThemes.prototype.onBuild = function ()
}; };
})); }));
}; };
/** /**
* @constructor * @constructor
*/ */
@ -15237,7 +15244,7 @@ SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
RL.reloadOpenPgpKeys(); RL.reloadOpenPgpKeys();
} }
} }
}; };
/** /**
* @constructor * @constructor
*/ */
@ -15367,7 +15374,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed')); this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
}; };
/** /**
* @constructor * @constructor
* @extends AbstractData * @extends AbstractData
@ -16621,7 +16628,7 @@ WebMailDataStorage.prototype.findSelfPrivateKey = function (sPassword)
{ {
return this.findPrivateKeyByEmail(this.accountEmail(), sPassword); return this.findPrivateKeyByEmail(this.accountEmail(), sPassword);
}; };
/** /**
* @constructor * @constructor
*/ */
@ -16895,7 +16902,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion 'Version': sVersion
}); });
}; };
/** /**
* @constructor * @constructor
* @extends AbstractAjaxRemoteStorage * @extends AbstractAjaxRemoteStorage
@ -17688,7 +17695,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
this.defaultRequest(fCallback, 'SocialUsers'); this.defaultRequest(fCallback, 'SocialUsers');
}; };
/** /**
* @constructor * @constructor
*/ */
@ -17771,7 +17778,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{ {
this.oEmailsPicsHashes = oData; this.oEmailsPicsHashes = oData;
}; };
/** /**
* @constructor * @constructor
* @extends AbstractCacheStorage * @extends AbstractCacheStorage
@ -18089,7 +18096,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
this.setMessageFlagsToCache(sFolder, sUid, aFlags); this.setMessageFlagsToCache(sFolder, sUid, aFlags);
} }
}; };
/** /**
* @param {Array} aViewModels * @param {Array} aViewModels
* @constructor * @constructor
@ -18267,7 +18274,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules] ['', oRules]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -18282,7 +18289,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
LoginScreen.prototype.onShow = function () LoginScreen.prototype.onShow = function ()
{ {
RL.setTitle(''); RL.setTitle('');
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractScreen * @extends KnoinAbstractScreen
@ -18453,7 +18460,7 @@ MailBoxScreen.prototype.routes = function ()
[/^([^\/]*)$/, {'normalize_': fNormS}] [/^([^\/]*)$/, {'normalize_': fNormS}]
]; ];
}; };
/** /**
* @constructor * @constructor
* @extends AbstractSettings * @extends AbstractSettings
@ -18482,7 +18489,7 @@ SettingsScreen.prototype.onShow = function ()
RL.setTitle(this.sSettingsTitle); RL.setTitle(this.sSettingsTitle);
RL.data().keyScope(Enums.KeyState.Settings); RL.data().keyScope(Enums.KeyState.Settings);
}; };
/** /**
* @constructor * @constructor
* @extends KnoinAbstractBoot * @extends KnoinAbstractBoot
@ -18756,6 +18763,16 @@ AbstractApp.prototype.pub = function (sName, aArgs)
return this; return this;
}; };
/**
* @param {string} sName
* @return {boolean}
*/
AbstractApp.prototype.capa = function (sName)
{
var mCapa = this.settingsGet('Capa');
return Utils.isArray(mCapa) && Utils.isNormal(sName) && -1 < Utils.inArray(sName, mCapa);
};
AbstractApp.prototype.bootstart = function () AbstractApp.prototype.bootstart = function ()
{ {
var self = this; var self = this;
@ -18830,7 +18847,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready(); ssm.ready();
}; };
/** /**
* @constructor * @constructor
* @extends AbstractApp * @extends AbstractApp
@ -20132,7 +20149,7 @@ RainLoopApp.prototype.bootstart = function ()
* @type {RainLoopApp} * @type {RainLoopApp}
*/ */
RL = new RainLoopApp(); RL = new RainLoopApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile'); $html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS); $window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -20183,9 +20200,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null; window['__RLBOOT'] = null;
}); });
}; };
if (window.SimplePace) { if (window.SimplePace) {
window.SimplePace.add(10); window.SimplePace.add(10);
} }
}(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible, key)); }(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible, key));

File diff suppressed because one or more lines are too long