CardDAV (pre-release)

This commit is contained in:
RainLoop Team 2013-12-25 04:05:04 +04:00
parent 7a8fffede8
commit 639d8c58f6
38 changed files with 525 additions and 207 deletions

View file

@ -146,7 +146,7 @@ AbstractApp.prototype.settingsSet = function (sName, mValue)
AbstractApp.prototype.setTitle = function (sTitle)
{
sTitle = ((0 < sTitle.length) ? sTitle + ' - ' : '') +
sTitle = ((Utils.isNormal(sTitle) && 0 < sTitle.length) ? sTitle + ' - ' : '') +
RL.settingsGet('Title') || '';
window.document.title = '_';

View file

@ -719,7 +719,12 @@ RainLoopApp.prototype.bootstart = function ()
{
Utils.removeSettingsViewModel(SettingsChangePasswordScreen);
}
if (!RL.settingsGet('ContactsIsAllowed'))
{
Utils.removeSettingsViewModel(SettingsContacts);
}
if (!RL.settingsGet('AllowAdditionalAccounts'))
{
Utils.removeSettingsViewModel(SettingsAccounts);

View file

@ -13,5 +13,5 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
LoginScreen.prototype.onShow = function ()
{
RL.setTitle(Utils.i18n('TITLES/LOGIN'));
RL.setTitle('');
};

39
dev/Settings/Contacts.js Normal file
View file

@ -0,0 +1,39 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
* @constructor
*/
function SettingsContacts()
{
var oData = RL.data();
this.contactsAutosave = oData.contactsAutosave;
this.showPassword = ko.observable(false);
this.allowContactsSync = !!RL.settingsGet('ContactsSyncIsAllowed');
this.contactsSyncServer = RL.settingsGet('ContactsSyncServer');
this.contactsSyncUser = RL.settingsGet('ContactsSyncUser');
this.contactsSyncPass = RL.settingsGet('ContactsSyncPassword');
this.contactsSyncPabUrl = RL.settingsGet('ContactsSyncPabUrl');
}
Utils.addSettingsViewModel(SettingsContacts, 'SettingsContacts', 'SETTINGS_LABELS/LABEL_CONTACTS_NAME', 'contacts');
SettingsContacts.prototype.toggleShowPassword = function ()
{
this.showPassword(!this.showPassword());
};
SettingsContacts.prototype.onBuild = function ()
{
RL.data().contactsAutosave.subscribe(function (bValue) {
RL.remote().saveSettings(Utils.emptyFunction, {
'ContactsAutosave': bValue ? '1' : '0'
});
});
};
SettingsContacts.prototype.onShow = function ()
{
this.showPassword(false);
};

View file

@ -12,7 +12,6 @@ function SettingsGeneral()
this.mainMessagesPerPageArray = Consts.Defaults.MessagesPerPageArray;
this.editorDefaultType = oData.editorDefaultType;
this.showImages = oData.showImages;
this.contactsAutosave = oData.contactsAutosave;
this.interfaceAnimation = oData.interfaceAnimation;
this.useDesktopNotifications = oData.useDesktopNotifications;
this.threading = oData.threading;
@ -39,7 +38,6 @@ function SettingsGeneral()
this.mppTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
this.isAnimationSupported = Globals.bAnimationSupported;
this.allowContacts = !!RL.settingsGet('ContactsIsAllowed');
}
Utils.addSettingsViewModel(SettingsGeneral, 'SettingsGeneral', 'SETTINGS_LABELS/LABEL_GENERAL_NAME', 'general', true);
@ -97,12 +95,6 @@ SettingsGeneral.prototype.onBuild = function ()
});
});
oData.contactsAutosave.subscribe(function (bValue) {
RL.remote().saveSettings(Utils.emptyFunction, {
'ContactsAutosave': bValue ? '1' : '0'
});
});
oData.interfaceAnimation.subscribe(function (sValue) {
RL.remote().saveSettings(Utils.emptyFunction, {
'InterfaceAnimation': sValue