mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Smll fixes
This commit is contained in:
parent
6b7a256ca9
commit
e6ac4cdff0
6 changed files with 30 additions and 24 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
vertical-align: text-top;
|
vertical-align: text-top;
|
||||||
|
|
||||||
.btn.disabled &, .btn[disabled] &{
|
.disabled &, .btn[disabled] &{
|
||||||
color: grey;
|
color: grey;
|
||||||
&.icon-white {
|
&.icon-white {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
|
||||||
|
|
@ -344,6 +344,8 @@
|
||||||
|
|
||||||
var
|
var
|
||||||
sTo = Utils.trim(this.to()),
|
sTo = Utils.trim(this.to()),
|
||||||
|
sCc = Utils.trim(this.cc()),
|
||||||
|
sBcc = Utils.trim(this.bcc()),
|
||||||
sSentFolder = FolderStore.sentFolder(),
|
sSentFolder = FolderStore.sentFolder(),
|
||||||
aFlagsCache = []
|
aFlagsCache = []
|
||||||
;
|
;
|
||||||
|
|
@ -363,7 +365,7 @@
|
||||||
this.attachmentsPlace(true);
|
this.attachmentsPlace(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 === sTo.length)
|
if ('' === sTo && '' === sCc && '' === sBcc)
|
||||||
{
|
{
|
||||||
this.emptyToError(true);
|
this.emptyToError(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
var
|
var
|
||||||
_ = require('_'),
|
_ = require('_'),
|
||||||
|
$ = require('$'),
|
||||||
ko = require('ko'),
|
ko = require('ko'),
|
||||||
key = require('key'),
|
key = require('key'),
|
||||||
|
|
||||||
|
|
@ -246,7 +247,6 @@
|
||||||
var
|
var
|
||||||
sKeyId = this.selectedPrivateKey(),
|
sKeyId = this.selectedPrivateKey(),
|
||||||
oKey = null,
|
oKey = null,
|
||||||
aKeys = this.encryptKeys(),
|
|
||||||
oOption = sKeyId ? _.find(this.privateKeysOptions(), function (oItem) {
|
oOption = sKeyId ? _.find(this.privateKeysOptions(), function (oItem) {
|
||||||
return oItem && sKeyId === oItem.id;
|
return oItem && sKeyId === oItem.id;
|
||||||
}) : null
|
}) : null
|
||||||
|
|
@ -317,8 +317,19 @@
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.sDefaultKeyScope = Enums.KeyState.PopupComposeOpenPGP;
|
this.sDefaultKeyScope = Enums.KeyState.PopupComposeOpenPGP;
|
||||||
|
|
||||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||||
|
|
||||||
|
this.addOptionClass = function (oDomOption, oItem) {
|
||||||
|
|
||||||
|
self.defautOptionsAfterRender(oDomOption, oItem);
|
||||||
|
|
||||||
|
if (oItem && !Utils.isUnd(oItem['class']) && oDomOption)
|
||||||
|
{
|
||||||
|
$(oDomOption).addClass(oItem['class']);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this.deletePublickKey = _.bind(this.deletePublickKey, this);
|
this.deletePublickKey = _.bind(this.deletePublickKey, this);
|
||||||
|
|
||||||
kn.constructorEnd(this);
|
kn.constructorEnd(this);
|
||||||
|
|
@ -327,16 +338,6 @@
|
||||||
kn.extendAsViewModel(['View/Popup/ComposeOpenPgp', 'PopupsComposeOpenPgpViewModel'], ComposeOpenPgpPopupView);
|
kn.extendAsViewModel(['View/Popup/ComposeOpenPgp', 'PopupsComposeOpenPgpViewModel'], ComposeOpenPgpPopupView);
|
||||||
_.extend(ComposeOpenPgpPopupView.prototype, AbstractView.prototype);
|
_.extend(ComposeOpenPgpPopupView.prototype, AbstractView.prototype);
|
||||||
|
|
||||||
ComposeOpenPgpPopupView.prototype.addOptionClass = function (oDomOption, oItem)
|
|
||||||
{
|
|
||||||
this.defautOptionsAfterRender(oDomOption, oItem);
|
|
||||||
|
|
||||||
if (oItem)
|
|
||||||
{
|
|
||||||
oDomOption.classList.add(oItem['class']);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ComposeOpenPgpPopupView.prototype.deletePublickKey = function (oKey)
|
ComposeOpenPgpPopupView.prototype.deletePublickKey = function (oKey)
|
||||||
{
|
{
|
||||||
this.encryptKeys.remove(oKey);
|
this.encryptKeys.remove(oKey);
|
||||||
|
|
@ -405,7 +406,6 @@
|
||||||
aRec = [],
|
aRec = [],
|
||||||
sEmail = '',
|
sEmail = '',
|
||||||
aKeys = [],
|
aKeys = [],
|
||||||
oKey = null,
|
|
||||||
oEmail = new EmailModel()
|
oEmail = new EmailModel()
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -438,13 +438,12 @@
|
||||||
sEmail = oIdentity.email();
|
sEmail = oIdentity.email();
|
||||||
aRec.unshift(sEmail);
|
aRec.unshift(sEmail);
|
||||||
aKeys = PgpStore.findAllPrivateKeysByEmailNotNative(sEmail);
|
aKeys = PgpStore.findAllPrivateKeysByEmailNotNative(sEmail);
|
||||||
if (aKeys)
|
if (aKeys && aKeys[0])
|
||||||
{
|
{
|
||||||
var oKey = aKeys[0];
|
|
||||||
this.signKey({
|
this.signKey({
|
||||||
'users': oKey.users || [sEmail],
|
'users': aKeys[0].users || [sEmail],
|
||||||
'hash': oKey.id.substr(-8).toUpperCase(),
|
'hash': aKeys[0].id.substr(-8).toUpperCase(),
|
||||||
'key': oKey
|
'key': aKeys[0]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,8 @@ class Service
|
||||||
}
|
}
|
||||||
|
|
||||||
$bIndex = true;
|
$bIndex = true;
|
||||||
|
$bMobile = (0 < \count($aPaths) && !empty($aPaths[0]) && 'mobile' === $aPaths[0]);
|
||||||
|
|
||||||
if (0 < \count($aPaths) && !empty($aPaths[0]) && !$bAdmin && 'index' !== $aPaths[0])
|
if (0 < \count($aPaths) && !empty($aPaths[0]) && !$bAdmin && 'index' !== $aPaths[0])
|
||||||
{
|
{
|
||||||
$bIndex = false;
|
$bIndex = false;
|
||||||
|
|
@ -167,7 +169,7 @@ class Service
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aTemplateParameters = $this->indexTemplateParameters($bAdmin);
|
$aTemplateParameters = $this->indexTemplateParameters($bAdmin, $bMobile);
|
||||||
|
|
||||||
$sCacheFileName = '';
|
$sCacheFileName = '';
|
||||||
if ($this->oActions->Config()->Get('labs', 'cache_system_data', true))
|
if ($this->oActions->Config()->Get('labs', 'cache_system_data', true))
|
||||||
|
|
@ -223,10 +225,11 @@ class Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bool $bAdmin = false
|
* @param bool $bAdmin = false
|
||||||
|
* @param bool $bMobile = false
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function indexTemplateParameters($bAdmin = false)
|
private function indexTemplateParameters($bAdmin = false, $bMobile = false)
|
||||||
{
|
{
|
||||||
$sLanguage = 'en';
|
$sLanguage = 'en';
|
||||||
$sTheme = 'Default';
|
$sTheme = 'Default';
|
||||||
|
|
@ -255,7 +258,7 @@ class Service
|
||||||
'AppJsLink' => $sStaticPrefix.'js/'.($bAppJsDebug ? '' : 'min/').($bAdmin ? 'admin' : 'app').'.js'
|
'AppJsLink' => $sStaticPrefix.'js/'.($bAppJsDebug ? '' : 'min/').($bAdmin ? 'admin' : 'app').'.js'
|
||||||
);
|
);
|
||||||
|
|
||||||
$aTemplateParameters = array(
|
$aTemplateParameters = array(
|
||||||
'{{BaseAppDataScriptLink}}' => ($bAdmin ? './?/AdminAppData/' : './?/AppData/'),
|
'{{BaseAppDataScriptLink}}' => ($bAdmin ? './?/AdminAppData/' : './?/AppData/'),
|
||||||
'{{BaseAppFaviconPngLinkTag}}' => $aData['FaviconPngLink'] ? '<link rel="shortcut icon" href="'.$aData['FaviconPngLink'].'" type="image/png" />' : '',
|
'{{BaseAppFaviconPngLinkTag}}' => $aData['FaviconPngLink'] ? '<link rel="shortcut icon" href="'.$aData['FaviconPngLink'].'" type="image/png" />' : '',
|
||||||
'{{BaseAppFaviconTouchLinkTag}}' => $aData['AppleTouchLink'] ? '<link rel="apple-touch-icon" href="'.$aData['AppleTouchLink'].'" type="image/png" />' : '',
|
'{{BaseAppFaviconTouchLinkTag}}' => $aData['AppleTouchLink'] ? '<link rel="apple-touch-icon" href="'.$aData['AppleTouchLink'].'" type="image/png" />' : '',
|
||||||
|
|
@ -269,6 +272,8 @@ class Service
|
||||||
'{{BaseAppMainCommonScriptLink}}' => $aData['AppJsCommonLink'],
|
'{{BaseAppMainCommonScriptLink}}' => $aData['AppJsCommonLink'],
|
||||||
'{{BaseAppMainScriptLink}}' => $aData['AppJsLink'],
|
'{{BaseAppMainScriptLink}}' => $aData['AppJsLink'],
|
||||||
'{{BaseVersion}}' => APP_VERSION,
|
'{{BaseVersion}}' => APP_VERSION,
|
||||||
|
// '{{BaseViewport}}' => $bMobile ? 'width=device-width,initial-scale=1,user-scalable=no' : 'width=950,maximum-scale=2',
|
||||||
|
'{{BaseViewport}}' => 'width=950,maximum-scale=2',
|
||||||
'{{BaseDir}}' => 'ltr'
|
'{{BaseDir}}' => 'ltr'
|
||||||
// '{{BaseDir}}' => \in_array($aData['Language'], array('ar', 'he', 'ur')) ? 'rtl' : 'ltr'
|
// '{{BaseDir}}' => \in_array($aData['Language'], array('ar', 'he', 'ur')) ? 'rtl' : 'ltr'
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
<meta id="rl-head-viewport" name="viewport" content="width=950,maximum-scale=2">
|
<meta id="rl-head-viewport" name="viewport" content="{{BaseViewport}}">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<noscript>
|
<noscript>
|
||||||
<meta http-equiv="refresh" content="0; URL=./?/NoScript" />
|
<meta http-equiv="refresh" content="0; URL=./?/NoScript" />
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
label: 'POPUPS_COMPOSE_OPEN_PGP/LABEL_SIGN',
|
label: 'POPUPS_COMPOSE_OPEN_PGP/LABEL_SIGN',
|
||||||
value: sign
|
value: sign
|
||||||
}
|
}
|
||||||
}, click: updateCommand "></div>
|
}, click: updateCommand"></div>
|
||||||
|
|
||||||
<div class="key-list" data-bind="visible: sign">
|
<div class="key-list" data-bind="visible: sign">
|
||||||
<div class="key-list-wrp empty" data-bind="visible: !signKey()">
|
<div class="key-list-wrp empty" data-bind="visible: !signKey()">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue