mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-01 10:46:43 +03:00
Original unminified source code (dev folder - js, css, less) (fixes #6) Grunt build system Multiple identities correction (fixes #9) Compose html editor (fixes #12) New general settings - Loading Description New warning about default admin password Split general and login screen settings
52 lines
1.3 KiB
JavaScript
52 lines
1.3 KiB
JavaScript
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
|
|
|
/**
|
|
* @constructor
|
|
*/
|
|
function SettingsPersonal()
|
|
{
|
|
var oData = RL.data();
|
|
|
|
this.displayName = oData.displayName;
|
|
this.replyTo = oData.replyTo;
|
|
this.signature = oData.signature;
|
|
|
|
this.nameTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
|
this.replyTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
|
this.signatureTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
|
}
|
|
|
|
Utils.addSettingsViewModel(SettingsPersonal, 'SettingsPersonal', 'SETTINGS_LABELS/LABEL_PERSONAL_NAME', 'personal');
|
|
|
|
SettingsPersonal.prototype.onBuild = function ()
|
|
{
|
|
var self = this;
|
|
_.delay(function () {
|
|
|
|
var
|
|
oData = RL.data(),
|
|
f1 = Utils.settingsSaveHelperSimpleFunction(self.nameTrigger, self),
|
|
f2 = Utils.settingsSaveHelperSimpleFunction(self.replyTrigger, self),
|
|
f3 = Utils.settingsSaveHelperSimpleFunction(self.signatureTrigger, self)
|
|
;
|
|
|
|
oData.displayName.subscribe(function (sValue) {
|
|
RL.remote().saveSettings(f1, {
|
|
'DisplayName': sValue
|
|
});
|
|
});
|
|
|
|
oData.replyTo.subscribe(function (sValue) {
|
|
RL.remote().saveSettings(f2, {
|
|
'ReplyTo': sValue
|
|
});
|
|
});
|
|
|
|
oData.signature.subscribe(function (sValue) {
|
|
RL.remote().saveSettings(f3, {
|
|
'Signature': sValue
|
|
});
|
|
});
|
|
|
|
}, 50);
|
|
};
|