mailto links fixes

Filters interface fixes
DKIM status a new message
This commit is contained in:
RainLoop Team 2015-01-31 23:00:10 +04:00
parent 0152f1583b
commit 0735071f1c
18 changed files with 212 additions and 113 deletions

View file

@ -121,7 +121,8 @@
* @const
* @type {string}
*/
Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2P8DwQACgAD/il4QJ8AAAAASUVORK5CYII=';
// Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2P8DwQACgAD/il4QJ8AAAAASUVORK5CYII=';
Consts.DataImages.UserDotPic = 'data:image/png;base64,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';
/**
* @const

View file

@ -144,25 +144,39 @@
var
oParams = {},
oEmailModel = null,
oToEmailModel = null,
oCcEmailModel = null,
oBccEmailModel = null,
sEmail = sMailToUrl.replace(/\?.+$/, ''),
sQueryString = sMailToUrl.replace(/^[^\?]*\?/, ''),
EmailModel = require('Model/Email')
;
oEmailModel = new EmailModel();
oEmailModel.parse(window.decodeURIComponent(sEmail));
oToEmailModel = new EmailModel();
oToEmailModel.parse(window.decodeURIComponent(sEmail));
if (oEmailModel && oEmailModel.email)
oParams = Utils.simpleQueryParser(sQueryString);
if (!Utils.isUnd(oParams.cc))
{
oParams = Utils.simpleQueryParser(sQueryString);
require('Knoin/Knoin').showScreenPopup(PopupComposeVoreModel, [Enums.ComposeType.Empty, null, [oEmailModel],
Utils.isUnd(oParams.subject) ? null : Utils.pString(oParams.subject),
Utils.isUnd(oParams.body) ? null : Utils.plainToHtml(Utils.pString(oParams.body))
]);
oCcEmailModel = new EmailModel();
oCcEmailModel.parse(window.decodeURIComponent(oParams.cc));
}
if (!Utils.isUnd(oParams.bcc))
{
oBccEmailModel = new EmailModel();
oBccEmailModel.parse(window.decodeURIComponent(oParams.bcc));
}
require('Knoin/Knoin').showScreenPopup(PopupComposeVoreModel, [Enums.ComposeType.Empty, null,
oToEmailModel && oToEmailModel.email ? [oToEmailModel] : null,
oCcEmailModel && oCcEmailModel.email ? [oCcEmailModel] : null,
oBccEmailModel && oBccEmailModel.email ? [oBccEmailModel] : null,
Utils.isUnd(oParams.subject) ? null : Utils.pString(oParams.subject),
Utils.isUnd(oParams.body) ? null : Utils.plainToHtml(Utils.pString(oParams.body))
]);
return true;
}

View file

@ -11,14 +11,16 @@
* @param {string=} sEmail
* @param {string=} sName
* @param {string=} sDkimStatus
* @param {string=} sDkimValue
*
* @constructor
*/
function EmailModel(sEmail, sName, sDkimStatus)
function EmailModel(sEmail, sName, sDkimStatus, sDkimValue)
{
this.email = sEmail || '';
this.name = sName || '';
this.dkimStatus = sDkimStatus || 'none';
this.dkimValue = sDkimValue || '';
this.clearDuplicateName();
}
@ -49,11 +51,18 @@
*/
EmailModel.prototype.dkimStatus = 'none';
/**
* @type {string}
*/
EmailModel.prototype.dkimValue = '';
EmailModel.prototype.clear = function ()
{
this.email = '';
this.name = '';
this.dkimStatus = 'none';
this.dkimValue = '';
};
/**
@ -130,6 +139,7 @@
this.name = Utils.trim(oJsonEmail.Name);
this.email = Utils.trim(oJsonEmail.Email);
this.dkimStatus = Utils.trim(oJsonEmail.DkimStatus || '');
this.dkimValue = Utils.trim(oJsonEmail.DkimValue || '');
bResult = '' !== this.email;
this.clearDuplicateName();

View file

@ -572,7 +572,7 @@
if (Utils.isNonEmptyArray(this.from) && 1 === this.from.length &&
this.from[0] && this.from[0].dkimStatus)
{
aResult = [this.from[0].dkimStatus, this.from[0].email];
aResult = [this.from[0].dkimStatus, this.from[0].dkimValue || ''];
}
return aResult;

View file

@ -12,7 +12,7 @@
Events = require('Common/Events'),
Translator = require('Common/Translator'),
SettingsUserStore = require('Stores/User/Settings'),
SettingsStore = require('Stores/User/Settings'),
Data = require('Storage/User/Data'),
Cache = require('Storage/User/Cache'),
@ -71,7 +71,7 @@
{
if (Utils.isUnd(bPreview) ? false : !!bPreview)
{
if (Enums.Layout.NoPreview === SettingsUserStore.layout() && !Data.message())
if (Enums.Layout.NoPreview === SettingsStore.layout() && !Data.message())
{
require('App/User').historyBack();
}
@ -91,7 +91,7 @@
.messageListSearch(sSearch)
;
if (Enums.Layout.NoPreview === SettingsUserStore.layout() && Data.message())
if (Enums.Layout.NoPreview === SettingsStore.layout() && Data.message())
{
Data.message(null);
}
@ -107,16 +107,9 @@
Data.messageList.subscribe(Utils.windowResizeCallback);
Data.message.subscribe(Utils.windowResizeCallback);
SettingsUserStore.layout.subscribe(function (nValue) {
Globals.$html.toggleClass('rl-no-preview-pane', Enums.Layout.NoPreview === nValue);
Globals.$html.toggleClass('rl-side-preview-pane', Enums.Layout.SidePreview === nValue);
Globals.$html.toggleClass('rl-bottom-preview-pane', Enums.Layout.BottomPreview === nValue);
Events.pub('layout', [nValue]);
});
SettingsUserStore.layout.valueHasMutated();
_.delay(function () {
SettingsStore.layout.valueHasMutated();
}, 50);
Events.sub('mailbox.inbox-unread-count', function (nCount) {
Data.foldersInboxUnreadCount(nCount);

View file

@ -10,8 +10,6 @@
Enums = require('Common/Enums'),
PopupsDomainViewModel = require('View/Popup/Domain'),
DomainStore = require('Stores/Admin/Domain'),
Remote = require('Storage/Admin/Remote')
;
@ -56,7 +54,7 @@
DomainsAdminSettings.prototype.createDomain = function ()
{
require('Knoin/Knoin').showScreenPopup(PopupsDomainViewModel);
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Domain'));
};
DomainsAdminSettings.prototype.deleteDomain = function (oDomain)
@ -91,7 +89,7 @@
{
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
require('Knoin/Knoin').showScreenPopup(PopupsDomainViewModel, [oData.Result]);
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Domain'), [oData.Result]);
}
};

View file

@ -66,7 +66,7 @@
if (!this.filters.saving())
{
if ('' === Utils.trim(this.filterRaw()))
if (this.filterRaw.active() && '' === Utils.trim(this.filterRaw()))
{
this.filterRaw.error(true);
return false;
@ -165,8 +165,6 @@
self.filterRaw.capa({});
self.serverError(true);
self.serverErrorDesc('ERROR');
self.serverErrorDesc(oData && oData.ErrorCode ? Translator.getNotification(oData.ErrorCode) :
Translator.getNotification(Enums.Notification.CantGetFilters));
}

View file

@ -8,7 +8,9 @@
Consts = require('Common/Consts'),
Enums = require('Common/Enums'),
Globals = require('Common/Globals'),
Utils = require('Common/Utils'),
Events = require('Common/Events'),
Settings = require('Storage/Settings')
;
@ -38,6 +40,7 @@
this.replySameFolder = ko.observable(false);
this.computedProperies();
this.subscribes();
}
SettingsUserStore.prototype.computedProperies = function ()
@ -47,6 +50,18 @@
}, this);
};
SettingsUserStore.prototype.subscribes = function ()
{
this.layout.subscribe(function (nValue) {
Globals.$html.toggleClass('rl-no-preview-pane', Enums.Layout.NoPreview === nValue);
Globals.$html.toggleClass('rl-side-preview-pane', Enums.Layout.SidePreview === nValue);
Globals.$html.toggleClass('rl-bottom-preview-pane', Enums.Layout.BottomPreview === nValue);
Events.pub('layout', [nValue]);
});
};
SettingsUserStore.prototype.populate = function ()
{
this.layout(Utils.pInt(Settings.settingsGet('Layout')));

View file

@ -45,26 +45,20 @@
{
AbstractView.call(this, 'Popups', 'PopupsCompose');
var self = this;
this.oEditor = null;
this.aDraftInfo = null;
this.sInReplyTo = '';
this.bFromDraft = false;
this.sReferences = '';
this.triggerForResize = _.bind(this.triggerForResize, this);
this.bCapaAdditionalIdentities = Settings.capa(Enums.Capa.AdditionalIdentities);
this.allowContacts = !!AppStore.contactsIsAllowed();
var
self = this,
fCcAndBccCheckHelper = function (aValue) {
if (false === self.showCcAndBcc() && 0 < aValue.length)
{
self.showCcAndBcc(true);
}
}
;
this.bSkipNextHide = false;
this.composeInEdit = Data.composeInEdit;
this.editorDefaultType = SettingsStore.editorDefaultType;
@ -97,10 +91,23 @@
this.emptyToError = ko.observable(false);
this.attachmentsInProcessError = ko.observable(false);
this.attachmentsInErrorError = ko.observable(false);
this.showCcAndBcc = ko.observable(false);
this.cc.subscribe(fCcAndBccCheckHelper, this);
this.bcc.subscribe(fCcAndBccCheckHelper, this);
this.showCc = ko.observable(false);
this.showBcc = ko.observable(false);
this.cc.subscribe(function (aValue) {
if (false === self.showCc() && 0 < aValue.length)
{
self.showCc(true);
}
}, this);
this.bcc.subscribe(function (aValue) {
if (false === self.showBcc() && 0 < aValue.length)
{
self.showBcc(true);
}
}, this);
this.draftFolder = ko.observable('');
this.draftUid = ko.observable('');
@ -422,9 +429,8 @@
}
}, this);
this.showCcAndBcc.subscribe(function () {
this.triggerForResize();
}, this);
this.showCc.subscribe(this.triggerForResize);
this.showBcc.subscribe(this.triggerForResize);
this.dropboxEnabled = SocialStore.dropbox.enabled;
this.dropboxApiKey = SocialStore.dropbox.apiKey;
@ -849,10 +855,13 @@
* @param {string=} sType = Enums.ComposeType.Empty
* @param {?MessageModel|Array=} oMessageOrArray = null
* @param {Array=} aToEmails = null
* @param {Array=} aCcEmails = null
* @param {Array=} aBccEmails = null
* @param {string=} sCustomSubject = null
* @param {string=} sCustomPlainText = null
*/
ComposePopupView.prototype.onShow = function (sType, oMessageOrArray, aToEmails, sCustomSubject, sCustomPlainText)
ComposePopupView.prototype.onShow = function (sType, oMessageOrArray,
aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText)
{
kn.routeOff();
@ -862,53 +871,65 @@
{
sType = sType || Enums.ComposeType.Empty;
var
self = this,
PopupsAskViewModel = require('View/Popup/Ask')
;
var self = this;
if (Enums.ComposeType.Empty !== sType)
{
kn.showScreenPopup(PopupsAskViewModel, [Translator.i18n('COMPOSE/DISCARD_UNSAVED_DATA'), function () {
self.initOnShow(sType, oMessageOrArray, aToEmails, sCustomSubject, sCustomPlainText);
kn.showScreenPopup(require('View/Popup/Ask'), [Translator.i18n('COMPOSE/DISCARD_UNSAVED_DATA'), function () {
self.initOnShow(sType, oMessageOrArray, aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText);
}, null, null, null, false]);
}
else if (aToEmails && 0 < aToEmails.length)
else
{
this.addEmailsToTo(aToEmails);
this.addEmailsTo(this.to, aToEmails);
this.addEmailsTo(this.cc, aCcEmails);
this.addEmailsTo(this.bcc, aBccEmails);
if (Utils.isNormal(sCustomSubject) && '' !== sCustomSubject &&
'' === this.subject())
{
this.subject(sCustomSubject);
}
}
}
else
{
this.initOnShow(sType, oMessageOrArray, aToEmails, sCustomSubject, sCustomPlainText);
this.initOnShow(sType, oMessageOrArray, aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText);
}
};
/**
* @param {Function} fKoValue
* @param {Array} aEmails
*/
ComposePopupView.prototype.addEmailsToTo = function (aEmails)
ComposePopupView.prototype.addEmailsTo = function (fKoValue, aEmails)
{
var
sTo = Utils.trim(this.to()),
aTo = []
sValue = Utils.trim(fKoValue()),
aValue = []
;
aTo = _.uniq(_.compact(_.map(aEmails, function (oItem) {
return oItem ? oItem.toLine(false) : null;
})));
if (Utils.isNonEmptyArray(aEmails))
{
aValue = _.uniq(_.compact(_.map(aEmails, function (oItem) {
return oItem ? oItem.toLine(false) : null;
})));
this.to(sTo + ('' === sTo ? '' : ', ') + Utils.trim(aTo.join(', ')));
fKoValue(sValue + ('' === sValue ? '' : ', ') + Utils.trim(aValue.join(', ')));
}
};
/**
* @param {string=} sType = Enums.ComposeType.Empty
* @param {?MessageModel|Array=} oMessageOrArray = null
* @param {Array=} aToEmails = null
* @param {Array=} aCcEmails = null
* @param {Array=} aBccEmails = null
* @param {string=} sCustomSubject = null
* @param {string=} sCustomPlainText = null
*/
ComposePopupView.prototype.initOnShow = function (sType, oMessageOrArray, aToEmails, sCustomSubject, sCustomPlainText)
ComposePopupView.prototype.initOnShow = function (sType, oMessageOrArray,
aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText)
{
this.composeInEdit(true);
@ -975,6 +996,16 @@
this.to(fEmailArrayToStringLineHelper(aToEmails));
}
if (Utils.isNonEmptyArray(aCcEmails))
{
this.cc(fEmailArrayToStringLineHelper(aCcEmails));
}
if (Utils.isNonEmptyArray(aBccEmails))
{
this.bcc(fEmailArrayToStringLineHelper(aBccEmails));
}
if ('' !== sComposeType && oMessage)
{
sDate = oMessage.fullFormatDateValue();
@ -1263,9 +1294,7 @@
return false;
});
Globals.$win.on('resize', function () {
self.triggerForResize();
});
Globals.$win.on('resize', self.triggerForResize);
if (this.dropboxEnabled())
{
@ -1948,7 +1977,9 @@
this.savedOrSendingText('');
this.emptyToError(false);
this.attachmentsInProcessError(false);
this.showCcAndBcc(false);
this.showCc(false);
this.showBcc(false);
Utils.delegateRunOnDestroy(this.attachments());
this.attachments([]);

View file

@ -205,16 +205,15 @@
this.viewFromDkimStatusIconClass = ko.computed(function () {
// var sResult = 'icon-warning-alt iconcolor-grey';
var sResult = 'icon-none iconcolor-display-none';
// var sResult = 'icon-warning-alt iconcolor-grey';
switch (this.viewFromDkimData()[0])
{
case 'none':
// sResult = 'icon-warning-alt iconcolor-grey';
sResult = 'icon-none iconcolor-display-none';
break;
case 'pass':
sResult = 'icon-ok iconcolor-green';
// sResult = 'icon-warning-alt iconcolor-green';
break;
default:
sResult = 'icon-warning-alt iconcolor-red';
@ -226,8 +225,22 @@
}, this);
this.viewFromDkimStatusTitle = ko.computed(function () {
var aStatus = this.viewFromDkimData();
return Utils.isNonEmptyArray(aStatus) ? 'DKIM: ' + aStatus[0] + ' (' + aStatus[1] + ')' : '';
if (Utils.isNonEmptyArray(aStatus))
{
if (aStatus[0] && aStatus[1])
{
return aStatus[1];
}
else if (aStatus[0])
{
return 'DKIM: ' + aStatus[0];
}
}
return '';
}, this);
this.message.subscribe(function (oMessage) {

View file

@ -2,7 +2,7 @@
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.7.3",
"release": "235",
"release": "237",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "gulpfile.js",

View file

@ -37,6 +37,11 @@ class Email
*/
private $sDkimStatus;
/**
* @var string
*/
private $sDkimValue;
/**
* @access private
*
@ -58,6 +63,7 @@ class Email
$this->sRemark = \trim($sRemark);
$this->sDkimStatus = \MailSo\Mime\Enumerations\DkimStatus::NONE;
$this->sDkimValue = '';
}
/**
@ -238,6 +244,14 @@ class Email
return $this->sDkimStatus;
}
/**
* @return string
*/
public function GetDkimValue()
{
return $this->sDkimValue;
}
/**
* @return string
*/
@ -258,10 +272,12 @@ class Email
/**
* @param string $sDkimStatus
* @param string $sDkimValue = ''
*/
public function SetDkimStatus($sDkimStatus)
public function SetDkimStatusAndValue($sDkimStatus, $sDkimValue = '')
{
$this->sDkimStatus = \MailSo\Mime\Enumerations\DkimStatus::normalizeValue($sDkimStatus);
$this->sDkimValue = $sDkimValue;
}
/**
@ -271,7 +287,8 @@ class Email
*/
public function ToArray($bIdn = false)
{
return array($this->sDisplayName, $this->GetEmail($bIdn), $this->sRemark, $this->sDkimStatus);
return array($this->sDisplayName, $this->GetEmail($bIdn), $this->sRemark,
$this->sDkimStatus, $this->sDkimValue);
}
/**

View file

@ -394,7 +394,7 @@ class HeaderCollection extends \MailSo\Base\Collection
if (!empty($sStatus) && !empty($sHeader))
{
$aResult[] = array($sStatus, $sHeader);
$aResult[] = array($sStatus, $sHeader, $sDkimLine);
}
}
}
@ -426,7 +426,7 @@ class HeaderCollection extends \MailSo\Base\Collection
if (!empty($sStatus) && !empty($sHeader))
{
$aResult[] = array($sStatus, $sHeader);
$aResult[] = array($sStatus, $sHeader, $sHeaderValue);
}
}
}
@ -454,7 +454,7 @@ class HeaderCollection extends \MailSo\Base\Collection
if (isset($aDkimData[0], $aDkimData[1]) &&
$aDkimData[1] === \strstr($sEmail, $aDkimData[1]))
{
$oItem->SetDkimStatus($aDkimData[0]);
$oItem->SetDkimStatusAndValue($aDkimData[0], empty($aDkimData[2]) ? '' : $aDkimData[2]);
}
}
}

View file

@ -5882,6 +5882,11 @@ class Actions
$oData = $this->getTwoFactorInfo($oAccount->ParentEmailHelper());
$sSecret = !empty($oData['Secret']) ? $oData['Secret'] : '';
$this->Logger()->WriteDump(array(
$sCode, $sSecret, $oData,
$this->TwoFactorAuthProvider()->VerifyCode($sSecret, $sCode)
));
\sleep(1);
return $this->DefaultResponse(__FUNCTION__,
$this->TwoFactorAuthProvider()->VerifyCode($sSecret, $sCode));
@ -8352,7 +8357,8 @@ class Actions
$mResult = \array_merge($this->objectData($mResponse, $sParent, $aParameters), array(
'Name' => \MailSo\Base\Utils::Utf8Clear($mResponse->GetDisplayName()),
'Email' => \MailSo\Base\Utils::Utf8Clear($mResponse->GetEmail(true)),
'DkimStatus' => $mResponse->GetDkimStatus()
'DkimStatus' => $mResponse->GetDkimStatus(),
'DkimValue' => $mResponse->GetDkimValue()
));
}
else if ('RainLoop\Providers\AddressBook\Classes\Contact' === $sClassName)

View file

@ -6,8 +6,8 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
{
const NEW_LINE = "\r\n";
const SIEVE_FILE_NAME = 'rainloop.user';
const SIEVE_FILE_NAME_RAW = 'rainloop.raw';
const SIEVE_FILE_NAME = 'rainloop.sieve.user';
const SIEVE_FILE_NAME_RAW = 'rainloop.sieve.raw';
/**
* @var \MailSo\Log\Logger
@ -98,7 +98,7 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
'moveto' => \in_array('fileinto', $aModules),
'reject' => \in_array('reject', $aModules),
'vacation' => \in_array('vacation', $aModules),
'markasread' => \in_array('imap4flags', $aModules) && false
'markasread' => \in_array('imap4flags', $aModules)
)
);
}
@ -119,33 +119,31 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
{
$aList = $oSieveClient->ListScripts();
$sUserFilter = $this->collectionToFileString($aFilters);
if (!empty($sUserFilter))
if ($bRawIsActive)
{
$oSieveClient->PutScript(self::SIEVE_FILE_NAME, $sUserFilter);
if (!$bRawIsActive)
{
$oSieveClient->SetActiveScript(self::SIEVE_FILE_NAME);
}
}
else if (isset($aList[self::SIEVE_FILE_NAME]))
{
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME);
}
$sRaw = \trim($sRaw);
if (!empty($sRaw))
{
$oSieveClient->PutScript(self::SIEVE_FILE_NAME_RAW, $sRaw);
if ($bRawIsActive)
if (!empty($sRaw))
{
$oSieveClient->PutScript(self::SIEVE_FILE_NAME_RAW, $sRaw);
$oSieveClient->SetActiveScript(self::SIEVE_FILE_NAME_RAW);
}
else if (isset($aList[self::SIEVE_FILE_NAME_RAW]))
{
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME_RAW);
}
}
else if (isset($aList[self::SIEVE_FILE_NAME_RAW]))
else
{
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME_RAW);
$sUserFilter = $this->collectionToFileString($aFilters);
if (!empty($sUserFilter))
{
$oSieveClient->PutScript(self::SIEVE_FILE_NAME, $sUserFilter);
$oSieveClient->SetActiveScript(self::SIEVE_FILE_NAME);
}
else if (isset($aList[self::SIEVE_FILE_NAME]))
{
$oSieveClient->DeleteScript(self::SIEVE_FILE_NAME);
}
}
$oSieveClient->LogoutAndDisconnect();

View file

@ -2,14 +2,14 @@
namespace RainLoop\Providers\TwoFactorAuth;
class GoogleTwoFactorAuth
class GoogleTwoFactorAuth
extends \RainLoop\Providers\TwoFactorAuth\AbstractTwoFactorAuth
implements \RainLoop\Providers\TwoFactorAuth\TwoFactorAuthInterface
{
/**
* @param string $sSecret
* @param string $sCode
*
*
* @return bool
*/
public function VerifyCode($sSecret, $sCode)
@ -17,7 +17,7 @@ class GoogleTwoFactorAuth
include_once APP_VERSION_ROOT_PATH.'app/libraries/PHPGangsta/GoogleAuthenticator.php';
$oGoogleAuthenticator = new \PHPGangsta_GoogleAuthenticator();
return $oGoogleAuthenticator->verifyCode($sSecret, $sCode);
return $oGoogleAuthenticator->verifyCode($sSecret, $sCode, 8);
}
/**

View file

@ -1109,6 +1109,7 @@ class ServiceActions
}
catch (\Exception $oException)
{
$oException = null;
$this->oActions->ClearSignMeData($oAccount);
}
}

View file

@ -86,8 +86,12 @@
</a>
</div>
<div class="btn-group pull-right">&nbsp;</div>
<span class="pull-right" data-bind="visible: !showCcAndBcc()">
<span class="i18n g-ui-link" data-i18n-text="COMPOSE/LINK_SHOW_INPUTS" data-bind="click: function () { showCcAndBcc(true); }"></span>
<span class="pull-right">
<span class="i18n g-ui-link" data-i18n-text="COMPOSE/TITLE_CC"
data-bind="visible: !showCc(), click: function () { showCc(true); }"></span>
&nbsp;&nbsp;
<span class="i18n g-ui-link" data-i18n-text="COMPOSE/TITLE_BCC"
data-bind="visible: !showBcc(), click: function () { showBcc(true); }"></span>
</span>
</div>
</div>
@ -104,7 +108,7 @@
</span>
</div>
</div>
<div class="e-row cc-row" data-bind="visible: showCcAndBcc">
<div class="e-row cc-row" data-bind="visible: showCc">
<div class="e-cell e-label">
<span class="i18n" data-i18n-text="COMPOSE/TITLE_CC"></span>
</div>
@ -112,7 +116,7 @@
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" data-bind="emailsTags: cc, autoCompleteSource: emailsSource" />
</div>
</div>
<div class="e-row bcc-row" data-bind="visible: showCcAndBcc">
<div class="e-row bcc-row" data-bind="visible: showBcc">
<div class="e-cell e-label">
<span class="i18n" data-i18n-text="COMPOSE/TITLE_BCC"></span>
</div>