ES2015 first look / babeljs

This commit is contained in:
RainLoop Team 2015-11-15 03:23:16 +03:00
parent 5dcceaaca5
commit 445cd155e5
123 changed files with 3214 additions and 3680 deletions

View file

@ -121,7 +121,7 @@
{
bTrial = Utils.isUnd(bTrial) ? false : !!bTrial;
this.key(bTrial ? Consts.Values.RainLoopTrialKey : '');
this.key(bTrial ? Consts.RAINLOOP_TRIAL_KEY : '');
this.activateText('');
this.activateText.isError(false);
this.activationSuccessed(false);
@ -142,7 +142,7 @@
ActivatePopupView.prototype.validateSubscriptionKey = function ()
{
var sValue = this.key();
return '' === sValue || Consts.Values.RainLoopTrialKey === sValue ||
return '' === sValue || Consts.RAINLOOP_TRIAL_KEY === sValue ||
!!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
};

View file

@ -380,7 +380,7 @@
if (!this.allowFolders)
{
sSentFolder = Consts.Values.UnuseOptionValue;
sSentFolder = Consts.UNUSED_OPTION_VALUE;
}
if ('' === sSentFolder)
@ -412,7 +412,7 @@
}
}
sSentFolder = Consts.Values.UnuseOptionValue === sSentFolder ? '' : sSentFolder;
sSentFolder = Consts.UNUSED_OPTION_VALUE === sSentFolder ? '' : sSentFolder;
Cache.setFolderHash(this.draftFolder(), '');
Cache.setFolderHash(sSentFolder, '');
@ -649,7 +649,7 @@
sDraftFolder = FolderStore.draftFolder()
;
if ('' !== sDraftFolder && Consts.Values.UnuseOptionValue !== sDraftFolder)
if ('' !== sDraftFolder && Consts.UNUSED_OPTION_VALUE !== sDraftFolder)
{
Cache.setFolderHash(sDraftFolder, '');
if (FolderStore.currentFolderFullNameRaw() === sDraftFolder)

View file

@ -68,7 +68,7 @@
this.contactsPage = ko.observable(1);
this.contactsPageCount = ko.computed(function () {
var iPage = window.Math.ceil(this.contactsCount() / Consts.Defaults.ContactsPerPage);
var iPage = window.Math.ceil(this.contactsCount() / Consts.CONTACTS_PER_PAGE);
return 0 >= iPage ? 1 : iPage;
}, this);
@ -679,7 +679,7 @@
{
var
self = this,
iOffset = (this.contactsPage() - 1) * Consts.Defaults.ContactsPerPage
iOffset = (this.contactsPage() - 1) * Consts.CONTACTS_PER_PAGE
;
this.bDropPageAfterDelete = false;
@ -722,7 +722,7 @@
self.contacts.loading(false);
self.viewClearSearch('' !== self.search());
}, iOffset, Consts.Defaults.ContactsPerPage, this.search());
}, iOffset, Consts.CONTACTS_PER_PAGE, this.search());
};
ContactsPopupView.prototype.onBuild = function (oDom)

View file

@ -74,16 +74,16 @@
this.name.focused = ko.observable(false);
this.imapServer = ko.observable('');
this.imapPort = ko.observable('' + Consts.Values.ImapDefaulPort);
this.imapPort = ko.observable('' + Consts.IMAP_DEFAULT_PORT);
this.imapSecure = ko.observable(Enums.ServerSecure.None);
this.imapShortLogin = ko.observable(false);
this.useSieve = ko.observable(false);
this.sieveAllowRaw = ko.observable(false);
this.sieveServer = ko.observable('');
this.sievePort = ko.observable('' + Consts.Values.SieveDefaulPort);
this.sievePort = ko.observable('' + Consts.SIEVE_DEFAULT_PORT);
this.sieveSecure = ko.observable(Enums.ServerSecure.None);
this.smtpServer = ko.observable('');
this.smtpPort = ko.observable('' + Consts.Values.SmtpDefaulPort);
this.smtpPort = ko.observable('' + Consts.SMTP_DEFAULT_PORT);
this.smtpSecure = ko.observable(Enums.ServerSecure.None);
this.smtpShortLogin = ko.observable(false);
this.smtpAuth = ko.observable(true);
@ -441,18 +441,18 @@
this.name.focused(false);
this.imapServer('');
this.imapPort('' + Consts.Values.ImapDefaulPort);
this.imapPort('' + Consts.IMAP_DEFAULT_PORT);
this.imapSecure(Enums.ServerSecure.None);
this.imapShortLogin(false);
this.useSieve(false);
this.sieveAllowRaw(false);
this.sieveServer('');
this.sievePort('' + Consts.Values.SieveDefaulPort);
this.sievePort('' + Consts.SIEVE_DEFAULT_PORT);
this.sieveSecure(Enums.ServerSecure.None);
this.smtpServer('');
this.smtpPort('' + Consts.Values.SmtpDefaulPort);
this.smtpPort('' + Consts.SMTP_DEFAULT_PORT);
this.smtpSecure(Enums.ServerSecure.None);
this.smtpShortLogin(false);
this.smtpAuth(true);

View file

@ -36,7 +36,7 @@
this.folderName = ko.observable('');
this.folderName.focused = ko.observable(false);
this.selectedParentValue = ko.observable(Consts.Values.UnuseOptionValue);
this.selectedParentValue = ko.observable(Consts.UNUSED_OPTION_VALUE);
this.parentFolderSelectList = ko.computed(function () {

View file

@ -39,7 +39,7 @@
this.folderSelectList = ko.computed(function () {
return Utils.folderListOptionsBuilder([], FolderStore.folderList(), FolderStore.folderListSystemNames(), [
['', this.sChooseOnText],
[Consts.Values.UnuseOptionValue, this.sUnuseText]
[Consts.UNUSED_OPTION_VALUE, this.sUnuseText]
], null, null, null, null, null, true);
}, this);