Merge master into new-contacts-api

This commit is contained in:
RainLoop Team 2013-11-28 01:10:36 +04:00
commit 103c6efb85
6 changed files with 234 additions and 211 deletions

View file

@ -1,173 +1,175 @@
.editorToolbar {
position: relative;
height: 20px;
margin-top: 10px;
line-height: 19px;
&.editorHideToolbar .editorToolbarButtom {
display: none;
}
.editorSwitcher {
display: inline-block;
vertical-align: middle;
}
.editorToolbarButtom {
display: inline-block;
width: 16px;
height: 16px;
padding: 3px;
a {
display: inline-block;
border: 0px;
margin: 0px;
padding: 0px;
width: 16px;
height: 16px;
cursor: default;
background: url('@{editor-sprite}');
&.bold { background-position: 0 0; }
&.italic { background-position: -16px 0; }
&.underline { background-position: -32px 0; }
&.strikethrough { background-position: -48px 0; }
&.link { background-position: -64px 0; }
&.unlink { background-position: -80px 0; }
&.orderedlist { background-position: -96px 0; }
&.unorderedlist { background-position: -112px 0; }
&.image { background-position: -128px 0; }
&.h1 { background-position: 0 -16px;}
&.h2 { background-position: -16px -16px;}
&.h3 { background-position: -32px -16px;}
&.h4 { background-position: -48px -16px;}
&.h5 { background-position: -64px -16px;}
&.h6 { background-position: -80px -16px;}
&.subscript { background-position: -96px -16px;}
&.superscript { background-position: -112px -16px;}
&.indent { background-position: -128px -16px;}
&.outdent { background-position: -144px -16px;}
&.horizontalrule { background-position: -160px -16px;}
&.p { background-position: -176px -16px;}
&.justifyleft { background-position: 0 -32px;}
&.justifycenter { background-position: -16px -32px;}
&.justifyright { background-position: -32px -32px;}
&.increasefontsize { background-position: -48px -32px;}
&.decreasefontsize { background-position: -64px -32px;}
&.forecolor { background-position: -80px -32px;}
&.backcolor { background-position: -80px -32px;}
&.removeformat { background-position: -144px 0;}
}
}
}
.textAreaParent {
padding: 0px;
.editorHtmlArea {
.box-sizing(border-box);
border: 0px !important;
overflow: auto;
overflow-y: scroll;
font-family: arial, sans-serif;
font-size: 13px;
line-height: 16px;
margin: 0px;
padding: 8px;
ul {
padding-left: 40px;
li {
list-style-type: disc !important;
}
}
ol {
padding-left: 40px;
li {
list-style-type: decimal !important;
}
}
blockquote {
border-left: solid 2px #444;
margin-left: 5px;
padding-left: 5px
}
img {
vertical-align: bottom;
}
&.editorDragOver {
background: #ffffef;
}
}
.editorTextArea {
.box-sizing(border-box);
display: block;
border: 0px !important;
width: 100%;
line-height: 16px;
margin: 0px;
padding: 8px;
overflow: auto;
overflow-y: scroll;
}
}
.editorColorPicker {
.editorCpColors {
float: left;
margin: 0;
clear: both;
width: 128px;
border: 1px solid #000;
backgroud: #000;
.editorCpColor {
border: 1px solid #fff;
float: left;
width: 14px;
height: 14px;
}
}
}
.editorSwitcher {
.g-ui-link;
.pull-right;
padding-bottom: 6px;
}
.editorFontStylePicker {
.editorFpFonts {
padding: 5px;
border: 1px solid #000;
background-color: #fff;
.editorFpFont {
padding: 5px;
}
}
}
.editorToolbar {
position: relative;
height: 20px;
margin-top: 10px;
line-height: 19px;
&.editorHideToolbar .editorToolbarButtom {
display: none;
}
.editorSwitcher {
display: inline-block;
vertical-align: middle;
}
.editorToolbarButtom {
display: inline-block;
width: 16px;
height: 16px;
padding: 3px;
a {
display: inline-block;
border: 0px;
margin: 0px;
padding: 0px;
width: 16px;
height: 16px;
cursor: default;
background: url('@{editor-sprite}');
&.bold { background-position: 0 0; }
&.italic { background-position: -16px 0; }
&.underline { background-position: -32px 0; }
&.strikethrough { background-position: -48px 0; }
&.link { background-position: -64px 0; }
&.unlink { background-position: -80px 0; }
&.orderedlist { background-position: -96px 0; }
&.unorderedlist { background-position: -112px 0; }
&.image { background-position: -128px 0; }
&.h1 { background-position: 0 -16px;}
&.h2 { background-position: -16px -16px;}
&.h3 { background-position: -32px -16px;}
&.h4 { background-position: -48px -16px;}
&.h5 { background-position: -64px -16px;}
&.h6 { background-position: -80px -16px;}
&.subscript { background-position: -96px -16px;}
&.superscript { background-position: -112px -16px;}
&.indent { background-position: -128px -16px;}
&.outdent { background-position: -144px -16px;}
&.horizontalrule { background-position: -160px -16px;}
&.p { background-position: -176px -16px;}
&.justifyleft { background-position: 0 -32px;}
&.justifycenter { background-position: -16px -32px;}
&.justifyright { background-position: -32px -32px;}
&.increasefontsize { background-position: -48px -32px;}
&.decreasefontsize { background-position: -64px -32px;}
&.forecolor { background-position: -80px -32px;}
&.backcolor { background-position: -80px -32px;}
&.removeformat { background-position: -144px 0;}
}
}
}
.textAreaParent {
padding: 0px;
.editorHtmlArea {
.box-sizing(border-box);
border: 0px !important;
overflow: auto;
overflow-y: scroll;
font-family: arial, sans-serif;
font-size: 14px;
line-height: 16px;
margin: 0px;
padding: 8px;
ul {
padding-left: 40px;
li {
list-style-type: disc !important;
}
}
ol {
padding-left: 40px;
li {
list-style-type: decimal !important;
}
}
blockquote {
border-left: solid 2px #444;
margin-left: 5px;
padding-left: 5px
}
img {
vertical-align: bottom;
}
&.editorDragOver {
background: #ffffef;
}
}
.editorTextArea {
.box-sizing(border-box);
display: block;
border: 0px !important;
width: 100%;
line-height: 16px;
margin: 0px;
padding: 8px;
font-family: arial, sans-serif;
font-size: 14px;
overflow: auto;
overflow-y: scroll;
}
}
.editorColorPicker {
.editorCpColors {
float: left;
margin: 0;
clear: both;
width: 128px;
border: 1px solid #000;
backgroud: #000;
.editorCpColor {
border: 1px solid #fff;
float: left;
width: 14px;
height: 14px;
}
}
}
.editorSwitcher {
.g-ui-link;
.pull-right;
padding-bottom: 6px;
}
.editorFontStylePicker {
.editorFpFonts {
padding: 5px;
border: 1px solid #000;
background-color: #fff;
.editorFpFont {
padding: 5px;
}
}
}

View file

@ -2,7 +2,7 @@
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.4.2",
"release": "524",
"release": "525",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "Gruntfile.js",

View file

@ -2224,26 +2224,35 @@ class Actions
return '' === $sCoreAccess || APP_SITE === $sCoreAccess;
}
private function getRepositoryDataByUrl($sRepo, &$bReal = false)
/**
* @param string $sRepo
* @param bool $bReal = false
* @param bool $bMain = true
* @return array
*/
private function getRepositoryDataByUrl($sRepo, &$bReal = false, $bMain = true)
{
$bReal = false;
$aRep = null;
$sRep = '';
$sRepoType = \strtolower(\trim($this->Config()->Get('labs', 'repo_type', 'stable')));
$sRepoFile = 'repository.json';
$iRepTime = 0;
switch ($sRepoType) {
case 'dev':
case 'nightly':
case 'beta':
$sRepoFile = 'beta.repository.json';
break;
case 'stable':
default:
$sRepoFile = 'repository.json';
break;
if ($bMain)
{
switch (\strtolower(\trim($this->Config()->Get('labs', 'repo_type', 'stable'))))
{
case 'dev':
case 'nightly':
case 'beta':
$sRepoFile = 'beta.repository.json';
break;
case 'stable':
default:
$sRepoFile = 'repository.json';
break;
}
}
$oHttp = \MailSo\Base\Http::SingletonInstance();
@ -2352,8 +2361,9 @@ class Actions
$sAddRepo = $this->rainloopRepo(true);
if (0 < \strlen($sAddRepo))
{
$aAddData = $this->getRepositoryDataByUrl($sAddRepo);
if (\is_array($aAddData) && 0 < \count($aAddData))
$bFakeReal = false;
$aAddData = $this->getRepositoryDataByUrl($sAddRepo, $bFakeReal, false);
if ($bFakeReal && \is_array($aAddData) && 0 < \count($aAddData))
{
$aResult = \array_merge($aResult, $aAddData);
}
@ -2553,7 +2563,7 @@ class Actions
$this->Logger()->Write($sUrl.' -> '.$sTmp, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
@fclose($pDest);
@\fclose($pDest);
}
else
{
@ -2572,8 +2582,8 @@ class Actions
$sTmpFolder = APP_PRIVATE_DATA.\md5($sTmp);
mkdir($sTmpFolder);
if (is_dir($sTmpFolder))
\mkdir($sTmpFolder);
if (\is_dir($sTmpFolder))
{
$bResult = 0 !== $oArchive->extract(PCLZIP_OPT_PATH, $sTmpFolder);
if (!$bResult)
@ -2581,27 +2591,35 @@ class Actions
$this->Logger()->Write('Cannot extract package files: '.$oArchive->errorInfo(), \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
if ($bResult && file_exists($sTmpFolder.'/index.php') &&
is_writable(APP_INDEX_ROOT_PATH.'rainloop/') &&
file_exists($sTmpFolder.'/data/VERSION') &&
is_dir($sTmpFolder.'/rainloop/'))
if ($bResult && \file_exists($sTmpFolder.'/index.php') &&
\is_writable(APP_INDEX_ROOT_PATH.'rainloop/') &&
\file_exists($sTmpFolder.'/data/VERSION') &&
\is_dir($sTmpFolder.'/rainloop/'))
{
$sNewVersion = file_get_contents($sTmpFolder.'/data/VERSION');
if ($sNewVersion && !is_dir(APP_INDEX_ROOT_PATH.'rainloop/v/'.$sNewVersion))
$sNewVersion = \file_get_contents($sTmpFolder.'/data/VERSION');
if ($sNewVersion && !\is_dir(APP_INDEX_ROOT_PATH.'rainloop/v/'.$sNewVersion))
{
\MailSo\Base\Utils::CopyDir($sTmpFolder.'/rainloop/', APP_INDEX_ROOT_PATH.'rainloop/');
copy($sTmpFolder.'/data/VERSION', APP_DATA_FOLDER_PATH.'VERSION');
if (md5_file($sTmpFolder.'/index.php') !== md5_file(APP_INDEX_ROOT_PATH.'index.php'))
if (!\is_dir(APP_INDEX_ROOT_PATH.'rainloop/v/'.$sNewVersion) &&
\copy($sTmpFolder.'/data/VERSION', APP_DATA_FOLDER_PATH.'VERSION'))
{
copy($sTmpFolder.'/index.php', APP_INDEX_ROOT_PATH.'index.php');
}
if (\md5_file($sTmpFolder.'/index.php') !== \md5_file(APP_INDEX_ROOT_PATH.'index.php'))
{
\copy($sTmpFolder.'/index.php', APP_INDEX_ROOT_PATH.'index.php');
}
$bResult = true;
$bResult = true;
}
else
{
$this->Logger()->Write('Cannot copy new package files', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
$this->Logger()->Write($sTmpFolder.'/rainloop/ -> '.APP_INDEX_ROOT_PATH.'rainloop/', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
}
else
{
$this->Logger()->WriteDump($sNewVersion.' version already installed', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
$this->Logger()->Write($sNewVersion.' version already installed', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
}
else if ($bResult)
@ -2619,7 +2637,7 @@ class Actions
else
{
$bResult = true;
if (is_dir(APP_PLUGINS_PATH.$sId))
if (\is_dir(APP_PLUGINS_PATH.$sId))
{
$bResult = \MailSo\Base\Utils::RecRmDir(APP_PLUGINS_PATH.$sId);
if (!$bResult)
@ -2638,12 +2656,11 @@ class Actions
}
}
@unlink($sTmp);
@\unlink($sTmp);
}
return $this->DefaultResponse(__FUNCTION__, $bResult ? (
'plugin' !== $sType ? array('Reload' => true) : true
) : false);
return $this->DefaultResponse(__FUNCTION__, $bResult ?
('plugin' !== $sType ? array('Reload' => true) : true) : false);
}
/**

View file

@ -8326,7 +8326,7 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
overflow: auto;
overflow-y: scroll;
font-family: arial, sans-serif;
font-size: 13px;
font-size: 14px;
line-height: 16px;
margin: 0px;
padding: 8px;
@ -8364,6 +8364,8 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
line-height: 16px;
margin: 0px;
padding: 8px;
font-family: arial, sans-serif;
font-size: 14px;
overflow: auto;
overflow-y: scroll;
}

File diff suppressed because one or more lines are too long

View file

@ -6173,7 +6173,7 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
overflow: auto;
overflow-y: scroll;
font-family: arial, sans-serif;
font-size: 13px;
font-size: 14px;
line-height: 16px;
margin: 0px;
padding: 8px;
@ -6211,6 +6211,8 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
line-height: 16px;
margin: 0px;
padding: 8px;
font-family: arial, sans-serif;
font-size: 14px;
overflow: auto;
overflow-y: scroll;
}