mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
v1.14.0-djmaze5
This commit is contained in:
parent
dcdaf70601
commit
088945b636
5 changed files with 43 additions and 48 deletions
9
dev/External/ko.js
vendored
9
dev/External/ko.js
vendored
|
|
@ -628,15 +628,6 @@ ko.observable.fn.validateEmail = function() {
|
|||
return this;
|
||||
};
|
||||
|
||||
ko.observable.fn.validateSimpleEmail = function() {
|
||||
this.hasError = ko.observable(false);
|
||||
|
||||
this.subscribe(value => this.hasError(value && !/^.+@.+$/.test(value)));
|
||||
|
||||
this.valueHasMutated();
|
||||
return this;
|
||||
};
|
||||
|
||||
ko.observable.fn.deleteAccessHelper = function() {
|
||||
this.extend({ falseTimeout: 3000 }).extend({ toggleSubscribeProperty: [this, 'deleteAccess'] });
|
||||
return this;
|
||||
|
|
|
|||
|
|
@ -80,22 +80,6 @@ export function addSettingsViewModel(SettingsViewModelClass, template, labelName
|
|||
VIEW_MODELS.settings.push(SettingsViewModelClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Function} SettingsViewModelClass
|
||||
* @returns {void}
|
||||
*/
|
||||
export function removeSettingsViewModel(SettingsViewModelClass) {
|
||||
VIEW_MODELS['settings-removed'].push(SettingsViewModelClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Function} SettingsViewModelClass
|
||||
* @returns {void}
|
||||
*/
|
||||
export function disableSettingsViewModel(SettingsViewModelClass) {
|
||||
VIEW_MODELS['settings-disabled'].push(SettingsViewModelClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
|
|
@ -122,7 +106,7 @@ export function screen(screenName) {
|
|||
* @param {Function} ViewModelClassToShow
|
||||
* @returns {Function|null}
|
||||
*/
|
||||
export function getScreenPopup(PopuViewModelClass) {
|
||||
function getScreenPopup(PopuViewModelClass) {
|
||||
let result = null;
|
||||
if (PopuViewModelClass) {
|
||||
result = PopuViewModelClass;
|
||||
|
|
@ -150,7 +134,7 @@ export function hideScreenPopup(ViewModelClassToHide) {
|
|||
* @param {Object=} vmScreen
|
||||
* @returns {*}
|
||||
*/
|
||||
export function buildViewModel(ViewModelClass, vmScreen) {
|
||||
function buildViewModel(ViewModelClass, vmScreen) {
|
||||
if (ViewModelClass && !ViewModelClass.__builded) {
|
||||
let vmDom = null;
|
||||
const vm = new ViewModelClass(vmScreen),
|
||||
|
|
@ -276,7 +260,7 @@ export function isPopupVisible(ViewModelClassToShow) {
|
|||
* @param {string} subPart
|
||||
* @returns {void}
|
||||
*/
|
||||
export function screenOnRoute(screenName, subPart) {
|
||||
function screenOnRoute(screenName, subPart) {
|
||||
let vmScreen = null,
|
||||
isSameScreen = false,
|
||||
cross = null;
|
||||
|
|
@ -531,7 +515,6 @@ export {
|
|||
commandDecorator as command,
|
||||
viewDecorator,
|
||||
viewDecorator as view,
|
||||
viewDecorator as viewModel,
|
||||
popupDecorator,
|
||||
popupDecorator as popup,
|
||||
settingsMenuKeysHandler
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ class IdentityPopupView extends AbstractViewNext {
|
|||
this.email = ko.observable('').validateEmail();
|
||||
this.email.focused = ko.observable(false);
|
||||
this.name = ko.observable('');
|
||||
this.replyTo = ko.observable('').validateSimpleEmail();
|
||||
this.replyTo = ko.observable('').validateEmail();
|
||||
this.replyTo.focused = ko.observable(false);
|
||||
this.bcc = ko.observable('').validateSimpleEmail();
|
||||
this.bcc = ko.observable('').validateEmail();
|
||||
this.bcc.focused = ko.observable(false);
|
||||
|
||||
this.signature = ko.observable('');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue