mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 11:09:20 +03:00
Completion and preparation contacts to release.
This commit is contained in:
parent
45d34e64f4
commit
eeda3dbb85
24 changed files with 505 additions and 236 deletions
|
|
@ -17,10 +17,52 @@ function AdminContacts()
|
|||
this.pdoDsnTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.pdoUserTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.pdoPasswordTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.testing = ko.observable(false);
|
||||
this.testContactsSuccess = ko.observable(false);
|
||||
this.testContactsError = ko.observable(false);
|
||||
|
||||
this.testContactsCommand = Utils.createCommand(this, function () {
|
||||
|
||||
this.testContactsSuccess(false);
|
||||
this.testContactsError(false);
|
||||
this.testing(true);
|
||||
|
||||
RL.remote().testContacts(this.onTestContactsResponse, {
|
||||
'ContactsPdoDsn': this.pdoDsn(),
|
||||
'ContactsPdoUser': this.pdoUser(),
|
||||
'ContactsPdoPassword': this.pdoPassword()
|
||||
});
|
||||
|
||||
}, function () {
|
||||
return '' !== this.pdoDsn() && '' !== this.pdoUser();
|
||||
});
|
||||
|
||||
this.onTestContactsResponse = _.bind(this.onTestContactsResponse, this);
|
||||
}
|
||||
|
||||
Utils.addSettingsViewModel(AdminContacts, 'AdminSettingsContacts', 'Contacts', 'contacts');
|
||||
|
||||
AdminContacts.prototype.onTestContactsResponse = function (sResult, oData)
|
||||
{
|
||||
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
|
||||
{
|
||||
this.testContactsSuccess(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.testContactsError(true);
|
||||
}
|
||||
|
||||
this.testing(false);
|
||||
};
|
||||
|
||||
AdminContacts.prototype.onShow = function ()
|
||||
{
|
||||
this.testContactsSuccess(false);
|
||||
this.testContactsError(false);
|
||||
};
|
||||
|
||||
AdminContacts.prototype.onBuild = function ()
|
||||
{
|
||||
var self = this;
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ function AdminSecurity()
|
|||
this.adminPasswordUpdateSuccess(false);
|
||||
}, this);
|
||||
|
||||
this.onNewAdminPasswordResponse = _.bind(this.onNewAdminPasswordResponse, this);
|
||||
|
||||
this.saveNewAdminPasswordCommand = Utils.createCommand(this, function () {
|
||||
|
||||
this.adminPasswordUpdateError(false);
|
||||
|
|
@ -39,6 +37,8 @@ function AdminSecurity()
|
|||
}, function () {
|
||||
return '' !== this.adminPassword() && '' !== this.adminPasswordNew();
|
||||
});
|
||||
|
||||
this.onNewAdminPasswordResponse = _.bind(this.onNewAdminPasswordResponse, this);
|
||||
}
|
||||
|
||||
Utils.addSettingsViewModel(AdminSecurity, 'AdminSettingsSecurity', 'Security', 'security');
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ Utils.fixLongSubject = function (sSubject)
|
|||
|
||||
sSubject = sSubject.replace(/[\s]+/, ' ');
|
||||
return sSubject;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {number} iNum
|
||||
|
|
|
|||
|
|
@ -218,6 +218,15 @@ AdminAjaxRemoteStorage.prototype.testConnectionForDomain = function (fCallback,
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {?Function} fCallback
|
||||
* @param {?} oData
|
||||
*/
|
||||
AdminAjaxRemoteStorage.prototype.testContacts = function (fCallback, oData)
|
||||
{
|
||||
this.defaultRequest(fCallback, 'AdminContactsTest', oData);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {?Function} fCallback
|
||||
* @param {?} oData
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ html.rl-no-preview-pane {
|
|||
|
||||
.e-quota {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
margin-top: 5px;
|
||||
font-size: 18px;
|
||||
cursor: help;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
span {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
&.inputosaurus-required {
|
||||
padding-rigth: 5px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue