mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
PreRelease 1.8.3
This commit is contained in:
parent
39566292af
commit
0ea982671b
40 changed files with 712 additions and 370 deletions
|
|
@ -58,62 +58,17 @@ class AttachmentCollection extends \MailSo\Base\Collection
|
|||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @return array
|
||||
*/
|
||||
public function ImageCount()
|
||||
public function SpecData()
|
||||
{
|
||||
$aList = $this->FilterList(function ($oAttachment) {
|
||||
return $oAttachment && $oAttachment->IsImage();
|
||||
return $this->MapList(function ($oAttachment) {
|
||||
if ($oAttachment)
|
||||
{
|
||||
return array($oAttachment->FileName(true), $oAttachment->MimeType());
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
return \is_array($aList) ? \count($aList) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function ArchiveCount()
|
||||
{
|
||||
$aList = $this->FilterList(function ($oAttachment) {
|
||||
return $oAttachment && $oAttachment->IsArchive();
|
||||
});
|
||||
|
||||
return \is_array($aList) ? \count($aList) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function PdfCount()
|
||||
{
|
||||
$aList = $this->FilterList(function ($oAttachment) {
|
||||
return $oAttachment && $oAttachment->IsPdf();
|
||||
});
|
||||
|
||||
return \is_array($aList) ? \count($aList) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function DocCount()
|
||||
{
|
||||
$aList = $this->FilterList(function ($oAttachment) {
|
||||
return $oAttachment && $oAttachment->IsDoc();
|
||||
});
|
||||
|
||||
return \is_array($aList) ? \count($aList) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function CertificateCount()
|
||||
{
|
||||
$aList = $this->FilterList(function ($oAttachment) {
|
||||
return $oAttachment && $oAttachment->IsPgpSignature();
|
||||
});
|
||||
|
||||
return \is_array($aList) ? \count($aList) : 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2630,6 +2630,17 @@ class Actions
|
|||
return $this->FalseResponse(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @throws \MailSo\Base\Exceptions\Exception
|
||||
*/
|
||||
public function DoAttachmentsActions()
|
||||
{
|
||||
\sleep(1);
|
||||
return $this->TrueResponse(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
|
|
@ -9079,28 +9090,7 @@ class Actions
|
|||
$iAttachmentsCount = $oAttachments ? $oAttachments->Count() : 0;
|
||||
|
||||
$mResult['HasAttachments'] = 0 < $iAttachmentsCount;
|
||||
$mResult['AttachmentsMainType'] = '';
|
||||
if (0 < $iAttachmentsCount)
|
||||
{
|
||||
switch (true)
|
||||
{
|
||||
case $iAttachmentsCount === $oAttachments->ImageCount():
|
||||
$mResult['AttachmentsMainType'] = 'image';
|
||||
break;
|
||||
case $iAttachmentsCount === $oAttachments->ArchiveCount():
|
||||
$mResult['AttachmentsMainType'] = 'archive';
|
||||
break;
|
||||
case $iAttachmentsCount === $oAttachments->PdfCount():
|
||||
$mResult['AttachmentsMainType'] = 'pdf';
|
||||
break;
|
||||
case $iAttachmentsCount === $oAttachments->DocCount():
|
||||
$mResult['AttachmentsMainType'] = 'doc';
|
||||
break;
|
||||
case $iAttachmentsCount === $oAttachments->CertificateCount():
|
||||
$mResult['AttachmentsMainType'] = 'certificate';
|
||||
break;
|
||||
}
|
||||
}
|
||||
$mResult['AttachmentsSpecData'] = $mResult['HasAttachments'] ? $oAttachments->SpecData() : array();
|
||||
|
||||
$sSubject = $mResult['Subject'];
|
||||
$mResult['Hash'] = \md5($mResult['Folder'].$mResult['Uid']);
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
<div class="b-login-content">
|
||||
<div class="loginFormWrapper">
|
||||
<div class="loginFormWrapper" data-bind="css: {'afterLoginHide': formHidden}">
|
||||
<center>
|
||||
<div class="alert alertError" data-bind="visible: '' !== submitError()">
|
||||
<button type="button" class="close" data-bind="click: function () { submitError('') }">×</button>
|
||||
<span data-bind="text: submitError"></span>
|
||||
</div>
|
||||
<form class="wrapper loginForm thm-login" action="#/" data-bind="submit: submitForm">
|
||||
<div class="controls" data-bind="css: {'error': loginError}">
|
||||
<form class="wrapper loginForm thm-login" action="#/" data-bind="submit: submitForm, css: {'errorAnimated': formError}">
|
||||
<div class="controls" data-bind="css: {'error': loginError, 'animated': loginErrorAnimation}">
|
||||
<div class="input-append">
|
||||
<input type="text" class="input-block-level inputLogin checkAutocomplete" name="RainLoopAdminLogin" id="RainLoopAdminLogin"
|
||||
<input type="text" class="input-block-level inputLogin checkAutocomplete"
|
||||
name="RainLoopAdminLogin" id="RainLoopAdminLogin"
|
||||
style="padding-right: 35px;"
|
||||
autocorrect="off" autocapitalize="off" spellcheck="false" data-i18n="[placeholder]LOGIN/LABEL_LOGIN"
|
||||
data-bind="textInput: login, hasFocus: loginFocus" />
|
||||
<span class="add-on">
|
||||
|
|
@ -16,9 +18,11 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls" data-bind="css: {'error': passwordError}">
|
||||
<div class="controls" data-bind="css: {'error': passwordError, 'animated': passwordErrorAnimation}">
|
||||
<div class="input-append">
|
||||
<input type="password" class="input-block-level inputPassword checkAutocomplete" placeholder="Password" name="RainLoopAdminPassword" id="RainLoopAdminPassword"
|
||||
<input type="password" class="input-block-level inputPassword checkAutocomplete"
|
||||
placeholder="Password" name="RainLoopAdminPassword" id="RainLoopAdminPassword"
|
||||
style="padding-right: 35px;"
|
||||
autocorrect="off" autocapitalize="off" spellcheck="false" data-i18n="[placeholder]LOGIN/LABEL_PASSWORD"
|
||||
data-bind="textInput: password" />
|
||||
<span class="add-on">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="b-login-content">
|
||||
<div class="loginFormWrapper">
|
||||
<div class="loginFormWrapper" data-bind="css: {'afterLoginHide': formHidden}">
|
||||
<center>
|
||||
{{INCLUDE/BeforeLogo/PLACE}}
|
||||
<!-- ko if: logoImg -->
|
||||
|
|
@ -19,12 +19,13 @@
|
|||
<span data-bind="text: submitErrorAddidional"></span>
|
||||
</div>
|
||||
</div>
|
||||
<form class="wrapper loginForm thm-login" action="#/" data-bind="submit: submitForm">
|
||||
<form class="wrapper loginForm thm-login" action="#/" data-bind="submit: submitForm, css: {'errorAnimated': formError}">
|
||||
{{INCLUDE/TopControlGroup/PLACE}}
|
||||
<div class="controls" data-bind="css: {'error': emailError}">
|
||||
<div class="controls" data-bind="css: {'error': emailError, 'animated': emailErrorAnimation}">
|
||||
<div class="input-append">
|
||||
<input type="email" class="i18n input-block-level inputEmail checkAutocomplete"
|
||||
name="RainLoopEmail" id="RainLoopEmail"
|
||||
style="padding-right: 35px;"
|
||||
autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="textInput: email, hasFocus: emailFocus" data-i18n="[placeholder]LOGIN/LABEL_EMAIL" />
|
||||
<span class="add-on">
|
||||
|
|
@ -32,9 +33,11 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls" data-bind="css: {'error': passwordError}">
|
||||
<div class="controls" data-bind="css: {'error': passwordError, 'animated': passwordErrorAnimation}">
|
||||
<div class="input-append">
|
||||
<input type="password" class="i18n input-block-level inputPassword checkAutocomplete" name="RainLoopPassword" id="RainLoopPassword"
|
||||
<input type="password" class="i18n input-block-level inputPassword checkAutocomplete"
|
||||
name="RainLoopPassword" id="RainLoopPassword"
|
||||
style="padding-right: 35px;"
|
||||
autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="textInput: password, hasFocus: passwordFocus" data-i18n="[placeholder]LOGIN/LABEL_PASSWORD" />
|
||||
<span class="add-on">
|
||||
|
|
@ -42,9 +45,11 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls" data-bind="visible: additionalCode.visibility(), css: {'error': additionalCode.error}">
|
||||
<div class="controls" data-bind="visible: additionalCode.visibility(), css: {'error': additionalCode.error, 'animated': additionalCode.errorAnimation}">
|
||||
<div class="input-append">
|
||||
<input type="text" class="i18n input-block-level inputAdditionalCode" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
<input type="text" class="i18n input-block-level inputAdditionalCode"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
style="padding-right: 35px;"
|
||||
data-bind="textInput: additionalCode, hasFocus: additionalCode.focused" data-i18n="[placeholder]LOGIN/LABEL_VERIFICATION_CODE" />
|
||||
<span class="add-on">
|
||||
<i class="icon-key"></i>
|
||||
|
|
|
|||
|
|
@ -430,14 +430,31 @@
|
|||
<i class="icon-cog controls-handle" data-bind="visible: allowAttachmnetControls() && !showAttachmnetControls(), click: function () { showAttachmnetControls(true) }"></i>
|
||||
</div>
|
||||
<div class="attachmentsControls"
|
||||
data-bind="visible: showAttachmnetControls() && message() && message().hasVisibleAttachments()">
|
||||
<i class="icon-file-zip"></i>
|
||||
data-bind="visible: showAttachmnetControls() && message() && message().hasVisibleAttachments()">
|
||||
|
||||
<i class="icon-file-zip"
|
||||
data-bind="css: {'icon-file-zip': !downloadAsZipLoading(), 'icon-spinner animated': downloadAsZipLoading()}"></i>
|
||||
|
||||
|
||||
<span class="g-ui-link">Download as zip</span>
|
||||
<span class="g-ui-link" data-bind="click: downloadAsZip">Download as zip</span>
|
||||
|
||||
|
||||
<i class="icon-cloud-up"></i>
|
||||
|
||||
<i class="icon-cloud-up"
|
||||
data-bind="css: {'icon-cloud-up': !saveToOwnCloudLoading(), 'icon-spinner animated': saveToOwnCloudLoading()}"></i>
|
||||
|
||||
|
||||
<span class="g-ui-link">Save to ownCloud</span>
|
||||
<span class="g-ui-link" data-bind="click: saveToOwnCloud">Save to ownCloud</span>
|
||||
|
||||
|
||||
|
||||
<i class="icon-dropbox"
|
||||
data-bind="css: {'icon-dropbox': !saveToDropboxLoading(), 'icon-spinner animated': saveToDropboxLoading()}"></i>
|
||||
|
||||
|
||||
<span class="g-ui-link" data-bind="click: saveToDropbox">Save to Dropbox</span>
|
||||
|
||||
<!-- // --->
|
||||
<button type="button" class="close" style="margin-right: 5px;"
|
||||
data-bind="click: function () { showAttachmnetControls(false); }">×</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue