mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Small fixes
This commit is contained in:
parent
5b38b2c92c
commit
f5f067f1f3
11 changed files with 88 additions and 26 deletions
|
|
@ -170,8 +170,6 @@
|
||||||
Globals.popupVisibilityNames.push(this.viewModelName);
|
Globals.popupVisibilityNames.push(this.viewModelName);
|
||||||
oViewModel.viewModelDom.css('z-index', 3000 + Globals.popupVisibilityNames().length + 10);
|
oViewModel.viewModelDom.css('z-index', 3000 + Globals.popupVisibilityNames().length + 10);
|
||||||
|
|
||||||
// Utils.delegateRun(this, 'onShow'); // moved to showScreenPopup function (for parameters)
|
|
||||||
|
|
||||||
if (this.onShowTrigger)
|
if (this.onShowTrigger)
|
||||||
{
|
{
|
||||||
this.onShowTrigger(!this.onShowTrigger());
|
this.onShowTrigger(!this.onShowTrigger());
|
||||||
|
|
@ -257,6 +255,8 @@
|
||||||
|
|
||||||
if (ViewModelClassToShow.__vm && ViewModelClassToShow.__dom)
|
if (ViewModelClassToShow.__vm && ViewModelClassToShow.__dom)
|
||||||
{
|
{
|
||||||
|
Utils.delegateRun(ViewModelClassToShow.__vm, 'onBeforeShow', aParameters || []);
|
||||||
|
|
||||||
ViewModelClassToShow.__vm.modalVisibility(true);
|
ViewModelClassToShow.__vm.modalVisibility(true);
|
||||||
|
|
||||||
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
||||||
|
|
@ -383,6 +383,8 @@
|
||||||
if (ViewModelClass.__vm && ViewModelClass.__dom &&
|
if (ViewModelClass.__vm && ViewModelClass.__dom &&
|
||||||
'Popups' !== ViewModelClass.__vm.viewModelPosition())
|
'Popups' !== ViewModelClass.__vm.viewModelPosition())
|
||||||
{
|
{
|
||||||
|
Utils.delegateRun(ViewModelClass.__vm, 'onBeforeShow');
|
||||||
|
|
||||||
ViewModelClass.__dom.show();
|
ViewModelClass.__dom.show();
|
||||||
ViewModelClass.__vm.viewModelVisibility(true);
|
ViewModelClass.__vm.viewModelVisibility(true);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@
|
||||||
// show
|
// show
|
||||||
if (self.oCurrentSubScreen)
|
if (self.oCurrentSubScreen)
|
||||||
{
|
{
|
||||||
|
Utils.delegateRun(self.oCurrentSubScreen, 'onBeforeShow');
|
||||||
self.oCurrentSubScreen.viewModelDom.show();
|
self.oCurrentSubScreen.viewModelDom.show();
|
||||||
Utils.delegateRun(self.oCurrentSubScreen, 'onShow');
|
Utils.delegateRun(self.oCurrentSubScreen, 'onShow');
|
||||||
Utils.delegateRun(self.oCurrentSubScreen, 'onShowWithDelay', [], 200);
|
Utils.delegateRun(self.oCurrentSubScreen, 'onShowWithDelay', [], 200);
|
||||||
|
|
|
||||||
|
|
@ -180,10 +180,12 @@ html.rl-no-preview-pane {
|
||||||
|
|
||||||
.listThreadUidDesc {
|
.listThreadUidDesc {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
padding: 7px 20px 5px 20px;
|
padding: 7px 20px 6px 20px;
|
||||||
background-color: #999;
|
background-color: #aaa;
|
||||||
|
border-bottom: 1px solid #888;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
text-shadow: 0 1px 0 #000;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -410,16 +412,25 @@ html.rl-no-preview-pane {
|
||||||
|
|
||||||
.threads-len {
|
.threads-len {
|
||||||
.threads-len-data {
|
.threads-len-data {
|
||||||
background-color: #999;
|
|
||||||
color: #fff;
|
background-color: #eee;
|
||||||
|
color: #666;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 1px 2px 1px 5px;
|
padding: 2px 0px 1px 6px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
|
||||||
[class^="icon-"],
|
[class^="icon-"],
|
||||||
[class*=" icon-"] {
|
[class*=" icon-"] {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #aaa;
|
||||||
|
border-color: #666;
|
||||||
|
text-shadow: 0 1px 0 #999;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,14 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
LanguagesPopupView.prototype.onBeforeShow = function ()
|
||||||
|
{
|
||||||
|
this.fLang = null;
|
||||||
|
this.userLanguage('');
|
||||||
|
|
||||||
|
this.langs([]);
|
||||||
|
};
|
||||||
|
|
||||||
LanguagesPopupView.prototype.onShow = function (fLanguage, aLangs, sUserLanguage)
|
LanguagesPopupView.prototype.onShow = function (fLanguage, aLangs, sUserLanguage)
|
||||||
{
|
{
|
||||||
this.fLang = fLanguage;
|
this.fLang = fLanguage;
|
||||||
|
|
@ -72,13 +80,6 @@
|
||||||
this.langs(aLangs);
|
this.langs(aLangs);
|
||||||
};
|
};
|
||||||
|
|
||||||
LanguagesPopupView.prototype.onHide = function ()
|
|
||||||
{
|
|
||||||
this.fLang = null;
|
|
||||||
this.userLanguage('');
|
|
||||||
this.langs([]);
|
|
||||||
};
|
|
||||||
|
|
||||||
LanguagesPopupView.prototype.changeLanguage = function (sLang)
|
LanguagesPopupView.prototype.changeLanguage = function (sLang)
|
||||||
{
|
{
|
||||||
if (this.fLang)
|
if (this.fLang)
|
||||||
|
|
|
||||||
|
|
@ -630,7 +630,7 @@
|
||||||
|
|
||||||
MessageListMailBoxUserView.prototype.gotoThread = function (oMessage)
|
MessageListMailBoxUserView.prototype.gotoThread = function (oMessage)
|
||||||
{
|
{
|
||||||
if (oMessage)
|
if (oMessage && 0 < oMessage.threadsLen())
|
||||||
{
|
{
|
||||||
MessageStore.messageListPageBeforeThread(MessageStore.messageListPage());
|
MessageStore.messageListPageBeforeThread(MessageStore.messageListPage());
|
||||||
|
|
||||||
|
|
@ -643,6 +643,13 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MessageListMailBoxUserView.prototype.clearListIsVisible = function ()
|
||||||
|
{
|
||||||
|
return '' === this.messageListSearchDesc() && '' === this.messageListError() &&
|
||||||
|
'' === MessageStore.messageListEndThreadUid() &&
|
||||||
|
0 < this.messageList().length && (this.isSpamFolder() || this.isTrashFolder());
|
||||||
|
};
|
||||||
|
|
||||||
MessageListMailBoxUserView.prototype.onBuild = function (oDom)
|
MessageListMailBoxUserView.prototype.onBuild = function (oDom)
|
||||||
{
|
{
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
@ -671,6 +678,9 @@
|
||||||
.on('click', '.messageList .messageListItem .threads-len', function () {
|
.on('click', '.messageList .messageListItem .threads-len', function () {
|
||||||
self.gotoThread(ko.dataFor(this));
|
self.gotoThread(ko.dataFor(this));
|
||||||
})
|
})
|
||||||
|
.on('dblclick', '.messageList .messageListItem .actionHandle', function () {
|
||||||
|
self.gotoThread(ko.dataFor(this));
|
||||||
|
})
|
||||||
;
|
;
|
||||||
|
|
||||||
this.initUploaderForAppend();
|
this.initUploaderForAppend();
|
||||||
|
|
|
||||||
|
|
@ -679,10 +679,10 @@ class Http
|
||||||
{
|
{
|
||||||
if ($bSetCacheHeader)
|
if ($bSetCacheHeader)
|
||||||
{
|
{
|
||||||
\header('Cache-Control: public', true);
|
@\header('Cache-Control: public', true);
|
||||||
\header('Pragma: public', true);
|
@\header('Pragma: public', true);
|
||||||
\header('Last-Modified: '.\gmdate('D, d M Y H:i:s', $iUtcTimeStamp - $iExpireTime).' UTC', true);
|
@\header('Last-Modified: '.\gmdate('D, d M Y H:i:s', $iUtcTimeStamp - $iExpireTime).' UTC', true);
|
||||||
\header('Expires: '.\gmdate('D, j M Y H:i:s', $iUtcTimeStamp + $iExpireTime).' UTC', true);
|
@\header('Expires: '.\gmdate('D, j M Y H:i:s', $iUtcTimeStamp + $iExpireTime).' UTC', true);
|
||||||
|
|
||||||
if (0 < strlen($sEtag))
|
if (0 < strlen($sEtag))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,8 @@ abstract class Driver
|
||||||
$this->bTypedPrefix = true;
|
$this->bTypedPrefix = true;
|
||||||
$this->bGuidPrefix = true;
|
$this->bGuidPrefix = true;
|
||||||
|
|
||||||
|
$this->iTimeOffset = 0;
|
||||||
|
|
||||||
$this->iWriteOnTimeoutOnly = 0;
|
$this->iWriteOnTimeoutOnly = 0;
|
||||||
$this->bWriteOnErrorOnly = false;
|
$this->bWriteOnErrorOnly = false;
|
||||||
$this->bWriteOnPhpErrorOnly = false;
|
$this->bWriteOnPhpErrorOnly = false;
|
||||||
|
|
@ -106,6 +108,17 @@ abstract class Driver
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $iTimeOffset
|
||||||
|
*
|
||||||
|
* @return \MailSo\Log\Driver
|
||||||
|
*/
|
||||||
|
public function SetTimeOffset($iTimeOffset)
|
||||||
|
{
|
||||||
|
$this->iTimeOffset = $iTimeOffset;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \MailSo\Log\Driver
|
* @return \MailSo\Log\Driver
|
||||||
*/
|
*/
|
||||||
|
|
@ -217,7 +230,7 @@ abstract class Driver
|
||||||
protected function getTimeWithMicroSec()
|
protected function getTimeWithMicroSec()
|
||||||
{
|
{
|
||||||
$aMicroTimeItems = \explode(' ', \microtime());
|
$aMicroTimeItems = \explode(' ', \microtime());
|
||||||
return \gmdate($this->sDatePattern, $aMicroTimeItems[1]).'.'.
|
return \MailSo\Log\Logger::DateHelper($this->sDatePattern, $this->iTimeOffset, $aMicroTimeItems[1]).'.'.
|
||||||
\str_pad((int) ($aMicroTimeItems[0] * 1000), 3, '0', STR_PAD_LEFT);
|
\str_pad((int) ($aMicroTimeItems[0] * 1000), 3, '0', STR_PAD_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,21 @@ class Logger extends \MailSo\Base\Collection
|
||||||
return $oInstance;
|
return $oInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $sFormat
|
||||||
|
* @param int $iTimeOffset = 0
|
||||||
|
* @param int $iTimestamp = 0
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function DateHelper($sFormat, $iTimeOffset = 0, $iTimestamp = null)
|
||||||
|
{
|
||||||
|
$iTimestamp = null === $iTimestamp ? \time() : (int) $iTimestamp;
|
||||||
|
$iTimeOffset = (int) $iTimeOffset;
|
||||||
|
|
||||||
|
return \gmdate($sFormat, $iTimestamp + $iTimeOffset * 3600);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -407,8 +407,9 @@ class Actions
|
||||||
{
|
{
|
||||||
if (false !== \strpos($sLine, '{date:'))
|
if (false !== \strpos($sLine, '{date:'))
|
||||||
{
|
{
|
||||||
$sLine = \preg_replace_callback('/\{date:([^}]+)\}/', function ($aMatch) {
|
$iTimeOffset = (int) $this->Config()->Get('logs', 'time_offset', 0);
|
||||||
return \gmdate($aMatch[1]);
|
$sLine = \preg_replace_callback('/\{date:([^}]+)\}/', function ($aMatch) use ($iTimeOffset) {
|
||||||
|
return \MailSo\Log\Logger::DateHelper($aMatch[1], $iTimeOffset);
|
||||||
}, $sLine);
|
}, $sLine);
|
||||||
|
|
||||||
$sLine = \preg_replace('/\{date:([^}]*)\}/', 'date', $sLine);
|
$sLine = \preg_replace('/\{date:([^}]*)\}/', 'date', $sLine);
|
||||||
|
|
@ -939,6 +940,8 @@ class Actions
|
||||||
|
|
||||||
if (!!$this->Config()->Get('logs', 'enable', false))
|
if (!!$this->Config()->Get('logs', 'enable', false))
|
||||||
{
|
{
|
||||||
|
$iTimeOffset = (int) $this->Config()->Get('logs', 'time_offset', 0);
|
||||||
|
|
||||||
$this->oLogger->SetShowSecter(!$this->Config()->Get('logs', 'hide_passwords', true));
|
$this->oLogger->SetShowSecter(!$this->Config()->Get('logs', 'hide_passwords', true));
|
||||||
|
|
||||||
$sLogFileFullPath = \APP_PRIVATE_DATA.'logs/'.$this->compileLogFileName(
|
$sLogFileFullPath = \APP_PRIVATE_DATA.'logs/'.$this->compileLogFileName(
|
||||||
|
|
@ -956,6 +959,7 @@ class Actions
|
||||||
->WriteOnErrorOnly($this->Config()->Get('logs', 'write_on_error_only', false))
|
->WriteOnErrorOnly($this->Config()->Get('logs', 'write_on_error_only', false))
|
||||||
->WriteOnPhpErrorOnly($this->Config()->Get('logs', 'write_on_php_error_only', false))
|
->WriteOnPhpErrorOnly($this->Config()->Get('logs', 'write_on_php_error_only', false))
|
||||||
->WriteOnTimeoutOnly($this->Config()->Get('logs', 'write_on_timeout_only', 0))
|
->WriteOnTimeoutOnly($this->Config()->Get('logs', 'write_on_timeout_only', 0))
|
||||||
|
->SetTimeOffset($iTimeOffset)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!$this->Config()->Get('debug', 'enable', false))
|
if (!$this->Config()->Get('debug', 'enable', false))
|
||||||
|
|
@ -967,7 +971,10 @@ class Actions
|
||||||
|
|
||||||
$oHttp = $this->Http();
|
$oHttp = $this->Http();
|
||||||
|
|
||||||
$this->oLogger->Write('[DATE:'.\gmdate('d.m.y').'][RL:'.APP_VERSION.'][PHP:'.PHP_VERSION.'][IP:'.
|
$this->oLogger->Write('[DATE:'.\MailSo\Log\Logger::DateHelper('d.m.y', $iTimeOffset).
|
||||||
|
(0 !== $iTimeOffset ? '][OFFSET:'.(0 < $iTimeOffset ? '+' : '-').
|
||||||
|
\str_pad((string) \abs($iTimeOffset), 2, '0', STR_PAD_LEFT) : '').
|
||||||
|
'][RL:'.APP_VERSION.'][PHP:'.PHP_VERSION.'][IP:'.
|
||||||
$oHttp->GetClientIp($this->Config()->Get('labs', 'http_client_ip_check_proxy', false)).'][PID:'.
|
$oHttp->GetClientIp($this->Config()->Get('labs', 'http_client_ip_check_proxy', false)).'][PID:'.
|
||||||
(\MailSo\Base\Utils::FunctionExistsAndEnabled('getmypid') ? \getmypid() : 'unknown').']['.
|
(\MailSo\Base\Utils::FunctionExistsAndEnabled('getmypid') ? \getmypid() : 'unknown').']['.
|
||||||
$oHttp->GetServer('SERVER_SOFTWARE', '~').']['.
|
$oHttp->GetServer('SERVER_SOFTWARE', '~').']['.
|
||||||
|
|
@ -5462,7 +5469,7 @@ class Actions
|
||||||
*/
|
*/
|
||||||
public function DoMessageList()
|
public function DoMessageList()
|
||||||
{
|
{
|
||||||
\sleep(1);
|
// \sleep(1);
|
||||||
// throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantGetMessageList);
|
// throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantGetMessageList);
|
||||||
|
|
||||||
$sFolder = '';
|
$sFolder = '';
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,8 @@ Values:
|
||||||
'hide_passwords' => array(true, 'Required for development purposes only.
|
'hide_passwords' => array(true, 'Required for development purposes only.
|
||||||
Disabling this option is not recommended.'),
|
Disabling this option is not recommended.'),
|
||||||
|
|
||||||
|
'time_offset' => array(0),
|
||||||
|
|
||||||
'filename' => array('log-{date:Y-m-d}.txt',
|
'filename' => array('log-{date:Y-m-d}.txt',
|
||||||
'Log filename.
|
'Log filename.
|
||||||
For security reasons, some characters are removed from filename.
|
For security reasons, some characters are removed from filename.
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@
|
||||||
|
|
||||||
<span class="i18n" data-i18n="MESSAGE_LIST/PUT_MESSAGE_HERE"></span>
|
<span class="i18n" data-i18n="MESSAGE_LIST/PUT_MESSAGE_HERE"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="listClear" data-bind="visible: '' === messageListSearchDesc() && '' === messageListError() && 0 < messageList().length && (isSpamFolder() || isTrashFolder())">
|
<div class="listClear" data-bind="visible: clearListIsVisible()">
|
||||||
<span class="g-ui-link i18n" data-i18n="MESSAGE_LIST/BUTTON_EMPTY_FOLDER" data-bind="command: clearCommand"></span>
|
<span class="g-ui-link i18n" data-i18n="MESSAGE_LIST/BUTTON_EMPTY_FOLDER" data-bind="command: clearCommand"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="listError" data-bind="visible: !dragOver() && '' !== messageListError()">
|
<div class="listError" data-bind="visible: !dragOver() && '' !== messageListError()">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue