mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Welcome page branding option
This commit is contained in:
parent
acb013fbb5
commit
351c12c002
50 changed files with 531 additions and 160 deletions
|
|
@ -162,6 +162,7 @@
|
|||
|
||||
this.testingDone(false);
|
||||
this.testingImapError(false);
|
||||
this.testingSieveError(false);
|
||||
this.testingSmtpError(false);
|
||||
this.testing(true);
|
||||
|
||||
|
|
@ -295,26 +296,29 @@
|
|||
|
||||
this.testingDone(true);
|
||||
this.testingImapError(true !== oData.Result.Imap);
|
||||
this.testingSmtpError(true !== oData.Result.Smtp);
|
||||
this.testingSieveError(true !== oData.Result.Sieve);
|
||||
this.testingSmtpError(true !== oData.Result.Smtp);
|
||||
|
||||
if (this.testingImapError() && oData.Result.Imap)
|
||||
{
|
||||
bImap = true;
|
||||
this.testingImapErrorDesc('');
|
||||
this.testingImapErrorDesc(oData.Result.Imap);
|
||||
}
|
||||
|
||||
if (this.testingSmtpError() && oData.Result.Smtp)
|
||||
{
|
||||
this.testingSmtpErrorDesc(oData.Result.Smtp);
|
||||
}
|
||||
|
||||
if (this.testingSieveError() && oData.Result.Sieve)
|
||||
{
|
||||
bSieve = true;
|
||||
this.testingSieveErrorDesc('');
|
||||
this.testingSieveErrorDesc(oData.Result.Sieve);
|
||||
}
|
||||
|
||||
if (this.testingSmtpError() && oData.Result.Smtp)
|
||||
{
|
||||
this.testingSmtpErrorDesc('');
|
||||
this.testingSmtpErrorDesc(oData.Result.Smtp);
|
||||
}
|
||||
|
||||
if (this.sieveSettings())
|
||||
{
|
||||
if (!bSieve && bImap)
|
||||
|
|
@ -333,8 +337,8 @@
|
|||
else
|
||||
{
|
||||
this.testingImapError(true);
|
||||
this.testingSmtpError(true);
|
||||
this.testingSieveError(true);
|
||||
this.testingSmtpError(true);
|
||||
this.sieveSettings(false);
|
||||
}
|
||||
};
|
||||
|
|
@ -365,8 +369,8 @@
|
|||
this.testing(false);
|
||||
this.testingDone(false);
|
||||
this.testingImapError(false);
|
||||
this.testingSmtpError(false);
|
||||
this.testingSieveError(false);
|
||||
this.testingSmtpError(false);
|
||||
};
|
||||
|
||||
DomainPopupView.prototype.onHide = function ()
|
||||
|
|
|
|||
62
dev/View/Popup/WelcomePage.js
Normal file
62
dev/View/Popup/WelcomePage.js
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Promises = require('Promises/User/Ajax'),
|
||||
|
||||
kn = require('Knoin/Knoin'),
|
||||
AbstractView = require('Knoin/AbstractView')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends AbstractView
|
||||
*/
|
||||
function WelcomePagePopupView()
|
||||
{
|
||||
AbstractView.call(this, 'Popups', 'PopupsWelcomePage');
|
||||
|
||||
this.welcomePageURL = ko.observable('');
|
||||
|
||||
this.closeFocused = ko.observable(false);
|
||||
|
||||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel(['View/Popup/WelcomePage', 'WelcomePagePopupViewModel'], WelcomePagePopupView);
|
||||
_.extend(WelcomePagePopupView.prototype, AbstractView.prototype);
|
||||
|
||||
WelcomePagePopupView.prototype.clearPopup = function ()
|
||||
{
|
||||
this.welcomePageURL('');
|
||||
this.closeFocused(false);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sUrl
|
||||
*/
|
||||
WelcomePagePopupView.prototype.onShow = function (sUrl)
|
||||
{
|
||||
this.clearPopup();
|
||||
|
||||
this.welcomePageURL(sUrl);
|
||||
};
|
||||
|
||||
WelcomePagePopupView.prototype.onShowWithDelay = function ()
|
||||
{
|
||||
this.closeFocused(true);
|
||||
};
|
||||
|
||||
WelcomePagePopupView.prototype.onHide = function ()
|
||||
{
|
||||
Promises.welcomeClose();
|
||||
};
|
||||
|
||||
module.exports = WelcomePagePopupView;
|
||||
|
||||
}());
|
||||
|
|
@ -843,7 +843,7 @@
|
|||
;
|
||||
|
||||
// exit fullscreen, back
|
||||
key('esc', Enums.KeyState.MessageView, _.bind(this.escShortcuts, this));
|
||||
key('esc, backspace', Enums.KeyState.MessageView, _.bind(this.escShortcuts, this));
|
||||
|
||||
// fullscreen
|
||||
key('enter', Enums.KeyState.MessageView, function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue