Login screen new interface (social buttons)

This commit is contained in:
RainLoop Team 2014-10-30 17:59:25 +04:00
parent 28a684b7c8
commit 77a30c0b92
40 changed files with 622 additions and 630 deletions

View file

@ -441,7 +441,7 @@
}
});
if (bAnimate)
if (bAnimate && !Globals.bMobileDevice)
{
$('.i18n-animation.i18n', oElement).letterfx({
'fx': 'fall fade', 'backwards': false, 'timing': 50, 'fx_duration': '50ms', 'letter_end': 'restore', 'element_end': 'restore'

View file

@ -10,7 +10,7 @@
/**
* @constructor
*/
function AboutAdminSetting()
function AboutAdminSettings()
{
var
Settings = require('Storage/Settings'),
@ -67,7 +67,7 @@
}, this);
}
AboutAdminSetting.prototype.onBuild = function ()
AboutAdminSettings.prototype.onBuild = function ()
{
if (this.access())
{
@ -75,7 +75,7 @@
}
};
AboutAdminSetting.prototype.updateCoreData = function ()
AboutAdminSettings.prototype.updateCoreData = function ()
{
if (!this.coreUpdating())
{
@ -83,6 +83,6 @@
}
};
module.exports = AboutAdminSetting;
module.exports = AboutAdminSettings;
}());

View file

@ -13,7 +13,7 @@
/**
* @constructor
*/
function BrandingAdminSetting()
function BrandingAdminSettings()
{
var
Enums = require('Common/Enums'),
@ -40,7 +40,7 @@
this.loginPowered = ko.observable(!!Settings.settingsGet('LoginPowered'));
}
BrandingAdminSetting.prototype.onBuild = function ()
BrandingAdminSettings.prototype.onBuild = function ()
{
if (this.capa)
{
@ -99,6 +99,6 @@
}
};
module.exports = BrandingAdminSetting;
module.exports = BrandingAdminSettings;
}());

View file

@ -16,7 +16,7 @@
/**
* @constructor
*/
function ContactsAdminSetting()
function ContactsAdminSettings()
{
var
Remote = require('Storage/Admin/Remote')
@ -141,7 +141,7 @@
this.onTestContactsResponse = _.bind(this.onTestContactsResponse, this);
}
ContactsAdminSetting.prototype.onTestContactsResponse = function (sResult, oData)
ContactsAdminSettings.prototype.onTestContactsResponse = function (sResult, oData)
{
this.testContactsSuccess(false);
this.testContactsError(false);
@ -167,14 +167,14 @@
this.testing(false);
};
ContactsAdminSetting.prototype.onShow = function ()
ContactsAdminSettings.prototype.onShow = function ()
{
this.testContactsSuccess(false);
this.testContactsError(false);
this.testContactsErrorMessage('');
};
ContactsAdminSetting.prototype.onBuild = function ()
ContactsAdminSettings.prototype.onBuild = function ()
{
var
self = this,
@ -237,6 +237,6 @@
}, 50);
};
module.exports = ContactsAdminSetting;
module.exports = ContactsAdminSettings;
}());

View file

@ -19,7 +19,7 @@
/**
* @constructor
*/
function DomainsAdminSetting()
function DomainsAdminSettings()
{
this.domains = Data.domains;
@ -45,7 +45,7 @@
]});
}
DomainsAdminSetting.prototype.startDomainForDeletionTimeout = function ()
DomainsAdminSettings.prototype.startDomainForDeletionTimeout = function ()
{
var self = this;
window.clearInterval(this.iDomainForDeletionTimeout);
@ -54,24 +54,24 @@
}, 1000 * 3);
};
DomainsAdminSetting.prototype.createDomain = function ()
DomainsAdminSettings.prototype.createDomain = function ()
{
require('Knoin/Knoin').showScreenPopup(PopupsDomainViewModel);
};
DomainsAdminSetting.prototype.deleteDomain = function (oDomain)
DomainsAdminSettings.prototype.deleteDomain = function (oDomain)
{
this.domains.remove(oDomain);
Remote.domainDelete(_.bind(this.onDomainListChangeRequest, this), oDomain.name);
};
DomainsAdminSetting.prototype.disableDomain = function (oDomain)
DomainsAdminSettings.prototype.disableDomain = function (oDomain)
{
oDomain.disabled(!oDomain.disabled());
Remote.domainDisable(_.bind(this.onDomainListChangeRequest, this), oDomain.name, oDomain.disabled());
};
DomainsAdminSetting.prototype.onBuild = function (oDom)
DomainsAdminSettings.prototype.onBuild = function (oDom)
{
var self = this;
oDom
@ -87,7 +87,7 @@
require('App/Admin').reloadDomainList();
};
DomainsAdminSetting.prototype.onDomainLoadRequest = function (sResult, oData)
DomainsAdminSettings.prototype.onDomainLoadRequest = function (sResult, oData)
{
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
@ -95,11 +95,11 @@
}
};
DomainsAdminSetting.prototype.onDomainListChangeRequest = function ()
DomainsAdminSettings.prototype.onDomainListChangeRequest = function ()
{
require('App/Admin').reloadDomainList();
};
module.exports = DomainsAdminSetting;
module.exports = DomainsAdminSettings;
}());

View file

@ -18,7 +18,7 @@
/**
* @constructor
*/
function GeneralAdminSetting()
function GeneralAdminSettings()
{
this.mainLanguage = Data.mainLanguage;
this.mainTheme = Data.mainTheme;
@ -59,7 +59,7 @@
this.themeTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
}
GeneralAdminSetting.prototype.onBuild = function ()
GeneralAdminSettings.prototype.onBuild = function ()
{
var
self = this,
@ -128,7 +128,7 @@
}, 50);
};
GeneralAdminSetting.prototype.selectLanguage = function ()
GeneralAdminSettings.prototype.selectLanguage = function ()
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Languages'));
};
@ -136,11 +136,11 @@
/**
* @return {string}
*/
GeneralAdminSetting.prototype.phpInfoLink = function ()
GeneralAdminSettings.prototype.phpInfoLink = function ()
{
return Links.phpInfo();
};
module.exports = GeneralAdminSetting;
module.exports = GeneralAdminSettings;
}());

View file

@ -14,7 +14,7 @@
/**
* @constructor
*/
function LicensingAdminSetting()
function LicensingAdminSettings()
{
this.licensing = Data.licensing;
this.licensingProcess = Data.licensingProcess;
@ -34,7 +34,7 @@
}, this);
}
LicensingAdminSetting.prototype.onBuild = function ()
LicensingAdminSettings.prototype.onBuild = function ()
{
if (this.subscriptionEnabled())
{
@ -42,12 +42,12 @@
}
};
LicensingAdminSetting.prototype.onShow = function ()
LicensingAdminSettings.prototype.onShow = function ()
{
this.adminDomain(Settings.settingsGet('AdminDomain'));
};
LicensingAdminSetting.prototype.showActivationForm = function ()
LicensingAdminSettings.prototype.showActivationForm = function ()
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Activate'));
};
@ -55,7 +55,7 @@
/**
* @returns {string}
*/
LicensingAdminSetting.prototype.licenseExpiredMomentValue = function ()
LicensingAdminSettings.prototype.licenseExpiredMomentValue = function ()
{
var
iTime = this.licenseExpired(),
@ -65,6 +65,6 @@
return iTime && 1898625600 === iTime ? 'Never' : (oDate.format('LL') + ' (' + oDate.from(moment()) + ')');
};
module.exports = LicensingAdminSetting;
module.exports = LicensingAdminSettings;
}());

View file

@ -17,7 +17,7 @@
/**
* @constructor
*/
function LoginAdminSetting()
function LoginAdminSettings()
{
this.determineUserLanguage = Data.determineUserLanguage;
this.determineUserDomain = Data.determineUserDomain;
@ -30,7 +30,7 @@
this.dummy = ko.observable(false);
}
LoginAdminSetting.prototype.onBuild = function ()
LoginAdminSettings.prototype.onBuild = function ()
{
var
self = this,
@ -68,6 +68,6 @@
}, 50);
};
module.exports = LoginAdminSetting;
module.exports = LoginAdminSettings;
}());

View file

@ -17,7 +17,7 @@
/**
* @constructor
*/
function PackagesAdminSetting()
function PackagesAdminSettings()
{
this.packagesError = ko.observable('');
@ -42,17 +42,17 @@
}, this);
}
PackagesAdminSetting.prototype.onShow = function ()
PackagesAdminSettings.prototype.onShow = function ()
{
this.packagesError('');
};
PackagesAdminSetting.prototype.onBuild = function ()
PackagesAdminSettings.prototype.onBuild = function ()
{
require('App/Admin').reloadPackagesList();
};
PackagesAdminSetting.prototype.requestHelper = function (oPackage, bInstall)
PackagesAdminSettings.prototype.requestHelper = function (oPackage, bInstall)
{
var self = this;
return function (sResult, oData) {
@ -89,7 +89,7 @@
};
};
PackagesAdminSetting.prototype.deletePackage = function (oPackage)
PackagesAdminSettings.prototype.deletePackage = function (oPackage)
{
if (oPackage)
{
@ -98,7 +98,7 @@
}
};
PackagesAdminSetting.prototype.installPackage = function (oPackage)
PackagesAdminSettings.prototype.installPackage = function (oPackage)
{
if (oPackage)
{
@ -107,6 +107,6 @@
}
};
module.exports = PackagesAdminSetting;
module.exports = PackagesAdminSettings;
}());

View file

@ -18,7 +18,7 @@
/**
* @constructor
*/
function PluginsAdminSetting()
function PluginsAdminSettings()
{
this.enabledPlugins = ko.observable(!!Settings.settingsGet('EnabledPlugins'));
@ -34,18 +34,18 @@
this.onPluginDisableRequest = _.bind(this.onPluginDisableRequest, this);
}
PluginsAdminSetting.prototype.disablePlugin = function (oPlugin)
PluginsAdminSettings.prototype.disablePlugin = function (oPlugin)
{
oPlugin.disabled(!oPlugin.disabled());
Remote.pluginDisable(this.onPluginDisableRequest, oPlugin.name, oPlugin.disabled());
};
PluginsAdminSetting.prototype.configurePlugin = function (oPlugin)
PluginsAdminSettings.prototype.configurePlugin = function (oPlugin)
{
Remote.plugin(this.onPluginLoadRequest, oPlugin.name);
};
PluginsAdminSetting.prototype.onBuild = function (oDom)
PluginsAdminSettings.prototype.onBuild = function (oDom)
{
var self = this;
@ -73,13 +73,13 @@
});
};
PluginsAdminSetting.prototype.onShow = function ()
PluginsAdminSettings.prototype.onShow = function ()
{
this.pluginsError('');
require('App/Admin').reloadPluginList();
};
PluginsAdminSetting.prototype.onPluginLoadRequest = function (sResult, oData)
PluginsAdminSettings.prototype.onPluginLoadRequest = function (sResult, oData)
{
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
@ -87,7 +87,7 @@
}
};
PluginsAdminSetting.prototype.onPluginDisableRequest = function (sResult, oData)
PluginsAdminSettings.prototype.onPluginDisableRequest = function (sResult, oData)
{
if (Enums.StorageResultType.Success === sResult && oData)
{
@ -107,6 +107,6 @@
require('App/Admin').reloadPluginList();
};
module.exports = PluginsAdminSetting;
module.exports = PluginsAdminSettings;
}());

View file

@ -19,7 +19,7 @@
/**
* @constructor
*/
function SecurityAdminSetting()
function SecurityAdminSettings()
{
this.useLocalProxyForExternalImages = Data.useLocalProxyForExternalImages;
@ -91,7 +91,7 @@
this.onNewAdminPasswordResponse = _.bind(this.onNewAdminPasswordResponse, this);
}
SecurityAdminSetting.prototype.onNewAdminPasswordResponse = function (sResult, oData)
SecurityAdminSettings.prototype.onNewAdminPasswordResponse = function (sResult, oData)
{
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
@ -109,7 +109,7 @@
}
};
SecurityAdminSetting.prototype.onBuild = function ()
SecurityAdminSettings.prototype.onBuild = function ()
{
var
Remote = require('Storage/Admin/Remote')
@ -140,7 +140,7 @@
});
};
SecurityAdminSetting.prototype.onHide = function ()
SecurityAdminSettings.prototype.onHide = function ()
{
this.adminPassword('');
this.adminPasswordNew('');
@ -150,11 +150,11 @@
/**
* @return {string}
*/
SecurityAdminSetting.prototype.phpInfoLink = function ()
SecurityAdminSettings.prototype.phpInfoLink = function ()
{
return Links.phpInfo();
};
module.exports = SecurityAdminSetting;
module.exports = SecurityAdminSettings;
}());

View file

@ -14,7 +14,7 @@
/**
* @constructor
*/
function SocialAdminSetting()
function SocialAdminSettings()
{
var Data = require('Storage/Admin/Data');
@ -45,7 +45,7 @@
this.dropboxTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
}
SocialAdminSetting.prototype.onBuild = function ()
SocialAdminSettings.prototype.onBuild = function ()
{
var
self = this,
@ -161,6 +161,6 @@
}, 50);
};
module.exports = SocialAdminSetting;
module.exports = SocialAdminSettings;
}());

View file

@ -19,7 +19,7 @@
/**
* @constructor
*/
function AccountsUserSetting()
function AccountsUserSettings()
{
this.accounts = Data.accounts;
@ -46,12 +46,12 @@
]});
}
AccountsUserSetting.prototype.addNewAccount = function ()
AccountsUserSettings.prototype.addNewAccount = function ()
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/AddAccount'));
};
AccountsUserSetting.prototype.editAccount = function (oAccountItem)
AccountsUserSettings.prototype.editAccount = function (oAccountItem)
{
if (oAccountItem && oAccountItem.canBeEdit())
{
@ -62,7 +62,7 @@
/**
* @param {AccountModel} oAccountToRemove
*/
AccountsUserSetting.prototype.deleteAccount = function (oAccountToRemove)
AccountsUserSettings.prototype.deleteAccount = function (oAccountToRemove)
{
if (oAccountToRemove && oAccountToRemove.deleteAccess())
{
@ -102,7 +102,7 @@
}
};
AccountsUserSetting.prototype.onBuild = function (oDom)
AccountsUserSettings.prototype.onBuild = function (oDom)
{
var self = this;
@ -117,6 +117,6 @@
;
};
module.exports = AccountsUserSetting;
module.exports = AccountsUserSettings;
}());

View file

@ -16,7 +16,7 @@
/**
* @constructor
*/
function ChangePasswordUserSetting()
function ChangePasswordUserSettings()
{
this.changeProcess = ko.observable(false);
@ -76,7 +76,7 @@
this.onChangePasswordResponse = _.bind(this.onChangePasswordResponse, this);
}
ChangePasswordUserSetting.prototype.onHide = function ()
ChangePasswordUserSettings.prototype.onHide = function ()
{
this.changeProcess(false);
this.currentPassword('');
@ -87,7 +87,7 @@
this.currentPassword.error(false);
};
ChangePasswordUserSetting.prototype.onChangePasswordResponse = function (sResult, oData)
ChangePasswordUserSettings.prototype.onChangePasswordResponse = function (sResult, oData)
{
this.changeProcess(false);
this.passwordMismatch(false);
@ -116,6 +116,6 @@
}
};
module.exports = ChangePasswordUserSetting;
module.exports = ChangePasswordUserSettings;
}());

View file

@ -13,7 +13,7 @@
/**
* @constructor
*/
function ContactsUserSetting()
function ContactsUserSettings()
{
this.contactsAutosave = Data.contactsAutosave;
@ -31,6 +31,15 @@
this.contactsSyncPass()
].join('|');
}, this).extend({'throttle': 500});
}
ContactsUserSettings.prototype.onBuild = function ()
{
Data.contactsAutosave.subscribe(function (bValue) {
Remote.saveSettings(null, {
'ContactsAutosave': bValue ? '1' : '0'
});
});
this.saveTrigger.subscribe(function () {
Remote.saveContactsSyncData(null,
@ -40,17 +49,8 @@
this.contactsSyncPass()
);
}, this);
}
ContactsUserSetting.prototype.onBuild = function ()
{
Data.contactsAutosave.subscribe(function (bValue) {
Remote.saveSettings(null, {
'ContactsAutosave': bValue ? '1' : '0'
});
});
};
module.exports = ContactsUserSetting;
module.exports = ContactsUserSettings;
}());

View file

@ -12,7 +12,7 @@
/**
* @constructor
*/
function FiltersUserSetting()
function FiltersUserSettings()
{
this.filters = ko.observableArray([]);
this.filters.loading = ko.observable(false);
@ -22,13 +22,13 @@
});
}
FiltersUserSetting.prototype.deleteFilter = function (oFilter)
FiltersUserSettings.prototype.deleteFilter = function (oFilter)
{
this.filters.remove(oFilter);
Utils.delegateRunOnDestroy(oFilter);
};
FiltersUserSetting.prototype.addFilter = function ()
FiltersUserSettings.prototype.addFilter = function ()
{
var
FilterModel = require('Model/Filter')
@ -38,6 +38,6 @@
require('View/Popup/Filter'), [new FilterModel()]);
};
module.exports = FiltersUserSetting;
module.exports = FiltersUserSettings;
}());

View file

@ -19,7 +19,7 @@
/**
* @constructor
*/
function FoldersUserSetting()
function FoldersUserSettings()
{
this.foldersListError = Data.foldersListError;
this.folderList = Data.folderList;
@ -89,7 +89,7 @@
this.useImapSubscribe = !!Settings.settingsGet('UseImapSubscribe');
}
FoldersUserSetting.prototype.folderEditOnEnter = function (oFolder)
FoldersUserSettings.prototype.folderEditOnEnter = function (oFolder)
{
var
sEditName = oFolder ? Utils.trim(oFolder.nameForEdit()) : ''
@ -121,7 +121,7 @@
oFolder.edited(false);
};
FoldersUserSetting.prototype.folderEditOnEsc = function (oFolder)
FoldersUserSettings.prototype.folderEditOnEsc = function (oFolder)
{
if (oFolder)
{
@ -129,22 +129,22 @@
}
};
FoldersUserSetting.prototype.onShow = function ()
FoldersUserSettings.prototype.onShow = function ()
{
Data.foldersListError('');
};
FoldersUserSetting.prototype.createFolder = function ()
FoldersUserSettings.prototype.createFolder = function ()
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/FolderCreate'));
};
FoldersUserSetting.prototype.systemFolder = function ()
FoldersUserSettings.prototype.systemFolder = function ()
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/FolderSystem'));
};
FoldersUserSetting.prototype.deleteFolder = function (oFolderToRemove)
FoldersUserSettings.prototype.deleteFolder = function (oFolderToRemove)
{
if (oFolderToRemove && oFolderToRemove.canBeDeleted() && oFolderToRemove.deleteAccess() &&
0 === oFolderToRemove.privateMessageCountAll())
@ -193,7 +193,7 @@
}
};
FoldersUserSetting.prototype.subscribeFolder = function (oFolder)
FoldersUserSettings.prototype.subscribeFolder = function (oFolder)
{
Local.set(Enums.ClientSideKeyName.FoldersLashHash, '');
Remote.folderSetSubscribe(Utils.emptyFunction, oFolder.fullNameRaw, true);
@ -201,7 +201,7 @@
oFolder.subScribed(true);
};
FoldersUserSetting.prototype.unSubscribeFolder = function (oFolder)
FoldersUserSettings.prototype.unSubscribeFolder = function (oFolder)
{
Local.set(Enums.ClientSideKeyName.FoldersLashHash, '');
Remote.folderSetSubscribe(Utils.emptyFunction, oFolder.fullNameRaw, false);
@ -209,6 +209,6 @@
oFolder.subScribed(false);
};
module.exports = FoldersUserSetting;
module.exports = FoldersUserSettings;
}());

View file

@ -19,7 +19,7 @@
/**
* @constructor
*/
function GeneralUserSetting()
function GeneralUserSettings()
{
this.mainLanguage = Data.mainLanguage;
this.mainMessagesPerPage = Data.mainMessagesPerPage;
@ -74,12 +74,12 @@
}, this);
}
GeneralUserSetting.prototype.toggleLayout = function ()
GeneralUserSettings.prototype.toggleLayout = function ()
{
this.layout(Enums.Layout.NoPreview === this.layout() ? Enums.Layout.SidePreview : Enums.Layout.NoPreview);
};
GeneralUserSetting.prototype.onBuild = function ()
GeneralUserSettings.prototype.onBuild = function ()
{
var self = this;
@ -178,16 +178,16 @@
}, 50);
};
GeneralUserSetting.prototype.onShow = function ()
GeneralUserSettings.prototype.onShow = function ()
{
Data.desktopNotifications.valueHasMutated();
};
GeneralUserSetting.prototype.selectLanguage = function ()
GeneralUserSettings.prototype.selectLanguage = function ()
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Languages'));
};
module.exports = GeneralUserSetting;
module.exports = GeneralUserSettings;
}());

View file

@ -18,7 +18,7 @@
/**
* @constructor
*/
function IdentitiesUserSetting()
function IdentitiesUserSettings()
{
this.editor = null;
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
@ -100,7 +100,7 @@
*
* @return {string}
*/
IdentitiesUserSetting.prototype.formattedAccountIdentity = function ()
IdentitiesUserSettings.prototype.formattedAccountIdentity = function ()
{
var
sDisplayName = this.displayName.peek(),
@ -110,12 +110,12 @@
return '' === sDisplayName ? sEmail : '"' + Utils.quoteName(sDisplayName) + '" <' + sEmail + '>';
};
IdentitiesUserSetting.prototype.addNewIdentity = function ()
IdentitiesUserSettings.prototype.addNewIdentity = function ()
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Identity'));
};
IdentitiesUserSetting.prototype.editIdentity = function (oIdentity)
IdentitiesUserSettings.prototype.editIdentity = function (oIdentity)
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Identity'), [oIdentity]);
};
@ -123,7 +123,7 @@
/**
* @param {IdentityModel} oIdentityToRemove
*/
IdentitiesUserSetting.prototype.deleteIdentity = function (oIdentityToRemove)
IdentitiesUserSettings.prototype.deleteIdentity = function (oIdentityToRemove)
{
if (oIdentityToRemove && oIdentityToRemove.deleteAccess())
{
@ -146,7 +146,7 @@
}
};
IdentitiesUserSetting.prototype.onFocus = function ()
IdentitiesUserSettings.prototype.onFocus = function ()
{
if (!this.editor && this.signatureDom())
{
@ -172,7 +172,7 @@
}
};
IdentitiesUserSetting.prototype.onBuild = function (oDom)
IdentitiesUserSettings.prototype.onBuild = function (oDom)
{
var self = this;
@ -228,6 +228,6 @@
}, 50);
};
module.exports = IdentitiesUserSetting;
module.exports = IdentitiesUserSettings;
}());

View file

@ -18,7 +18,7 @@
/**
* @constructor
*/
function IdentityUserSetting()
function IdentityUserSettings()
{
this.editor = null;
@ -34,7 +34,7 @@
this.signatureTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
}
IdentityUserSetting.prototype.onFocus = function ()
IdentityUserSettings.prototype.onFocus = function ()
{
if (!this.editor && this.signatureDom())
{
@ -60,7 +60,7 @@
}
};
IdentityUserSetting.prototype.onBuild = function ()
IdentityUserSettings.prototype.onBuild = function ()
{
var self = this;
_.delay(function () {
@ -98,6 +98,6 @@
}, 50);
};
module.exports = IdentityUserSetting;
module.exports = IdentityUserSettings;
}());

View file

@ -17,7 +17,7 @@
/**
* @constructor
*/
function OpenPgpUserSetting()
function OpenPgpUserSettings()
{
this.openpgpkeys = Data.openpgpkeys;
this.openpgpkeysPublic = Data.openpgpkeysPublic;
@ -38,17 +38,17 @@
]});
}
OpenPgpUserSetting.prototype.addOpenPgpKey = function ()
OpenPgpUserSettings.prototype.addOpenPgpKey = function ()
{
kn.showScreenPopup(require('View/Popup/AddOpenPgpKey'));
};
OpenPgpUserSetting.prototype.generateOpenPgpKey = function ()
OpenPgpUserSettings.prototype.generateOpenPgpKey = function ()
{
kn.showScreenPopup(require('View/Popup/NewOpenPgpKey'));
};
OpenPgpUserSetting.prototype.viewOpenPgpKey = function (oOpenPgpKey)
OpenPgpUserSettings.prototype.viewOpenPgpKey = function (oOpenPgpKey)
{
if (oOpenPgpKey)
{
@ -59,7 +59,7 @@
/**
* @param {OpenPgpKeyModel} oOpenPgpKeyToRemove
*/
OpenPgpUserSetting.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
OpenPgpUserSettings.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
{
if (oOpenPgpKeyToRemove && oOpenPgpKeyToRemove.deleteAccess())
{
@ -87,6 +87,6 @@
}
};
module.exports = OpenPgpUserSetting;
module.exports = OpenPgpUserSettings;
}());

View file

@ -16,7 +16,7 @@
/**
* @constructor
*/
function SecurityUserSetting()
function SecurityUserSettings()
{
this.processing = ko.observable(false);
this.clearing = ko.observable(false);
@ -46,37 +46,37 @@
this.onSecretResult = _.bind(this.onSecretResult, this);
}
SecurityUserSetting.prototype.showSecret = function ()
SecurityUserSettings.prototype.showSecret = function ()
{
this.secreting(true);
Remote.showTwoFactorSecret(this.onSecretResult);
};
SecurityUserSetting.prototype.hideSecret = function ()
SecurityUserSettings.prototype.hideSecret = function ()
{
this.viewSecret('');
this.viewBackupCodes('');
this.viewUrl('');
};
SecurityUserSetting.prototype.createTwoFactor = function ()
SecurityUserSettings.prototype.createTwoFactor = function ()
{
this.processing(true);
Remote.createTwoFactor(this.onResult);
};
SecurityUserSetting.prototype.enableTwoFactor = function ()
SecurityUserSettings.prototype.enableTwoFactor = function ()
{
this.processing(true);
Remote.enableTwoFactor(this.onResult, this.viewEnable());
};
SecurityUserSetting.prototype.testTwoFactor = function ()
SecurityUserSettings.prototype.testTwoFactor = function ()
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/TwoFactorTest'));
};
SecurityUserSetting.prototype.clearTwoFactor = function ()
SecurityUserSettings.prototype.clearTwoFactor = function ()
{
this.viewSecret('');
this.viewBackupCodes('');
@ -86,14 +86,14 @@
Remote.clearTwoFactor(this.onResult);
};
SecurityUserSetting.prototype.onShow = function ()
SecurityUserSettings.prototype.onShow = function ()
{
this.viewSecret('');
this.viewBackupCodes('');
this.viewUrl('');
};
SecurityUserSetting.prototype.onResult = function (sResult, oData)
SecurityUserSettings.prototype.onResult = function (sResult, oData)
{
this.processing(false);
this.clearing(false);
@ -139,7 +139,7 @@
}
};
SecurityUserSetting.prototype.onSecretResult = function (sResult, oData)
SecurityUserSettings.prototype.onSecretResult = function (sResult, oData)
{
this.secreting(false);
@ -155,12 +155,12 @@
}
};
SecurityUserSetting.prototype.onBuild = function ()
SecurityUserSettings.prototype.onBuild = function ()
{
this.processing(true);
Remote.getTwoFactor(this.onResult);
};
module.exports = SecurityUserSetting;
module.exports = SecurityUserSettings;
}());

View file

@ -6,7 +6,7 @@
/**
* @constructor
*/
function SocialUserSetting()
function SocialUserSettings()
{
var
Utils = require('Common/Utils'),
@ -71,6 +71,6 @@
});
}
module.exports = SocialUserSetting;
module.exports = SocialUserSettings;
}());

View file

@ -18,7 +18,7 @@
/**
* @constructor
*/
function ThemesUserSetting()
function ThemesUserSettings()
{
var self = this;
@ -45,7 +45,7 @@
}, this);
}
ThemesUserSetting.prototype.onBuild = function ()
ThemesUserSettings.prototype.onBuild = function ()
{
var sCurrentTheme = Data.theme();
this.themesObjects(_.map(Data.themes(), function (sTheme) {
@ -58,6 +58,6 @@
}));
};
module.exports = ThemesUserSetting;
module.exports = ThemesUserSettings;
}());

View file

@ -103,4 +103,13 @@
.flag-selector {
margin-bottom: 0;
}
.social-buttons {
margin-top: 5px;
}
.social-button, .language-button {
padding: 5px;
outline: none;
}
}