mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 03:59:21 +03:00
Interface optimizations
This commit is contained in:
parent
7552ffe241
commit
d430de9e93
68 changed files with 276 additions and 110 deletions
|
|
@ -12,6 +12,8 @@ function AdminSecurity()
|
|||
this.adminLogin = ko.observable(RL.settingsGet('AdminLogin'));
|
||||
this.adminPassword = ko.observable('');
|
||||
this.adminPasswordNew = ko.observable('');
|
||||
this.adminPasswordNew2 = ko.observable('');
|
||||
this.adminPasswordNewError = ko.observable(false);
|
||||
|
||||
this.adminPasswordUpdateError = ko.observable(false);
|
||||
this.adminPasswordUpdateSuccess = ko.observable(false);
|
||||
|
|
@ -24,10 +26,23 @@ function AdminSecurity()
|
|||
this.adminPasswordNew.subscribe(function () {
|
||||
this.adminPasswordUpdateError(false);
|
||||
this.adminPasswordUpdateSuccess(false);
|
||||
this.adminPasswordNewError(false);
|
||||
}, this);
|
||||
|
||||
this.adminPasswordNew2.subscribe(function () {
|
||||
this.adminPasswordUpdateError(false);
|
||||
this.adminPasswordUpdateSuccess(false);
|
||||
this.adminPasswordNewError(false);
|
||||
}, this);
|
||||
|
||||
this.saveNewAdminPasswordCommand = Utils.createCommand(this, function () {
|
||||
|
||||
if (this.adminPasswordNew() !== this.adminPasswordNew2())
|
||||
{
|
||||
this.adminPasswordNewError(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.adminPasswordUpdateError(false);
|
||||
this.adminPasswordUpdateSuccess(false);
|
||||
|
||||
|
|
@ -37,7 +52,7 @@ function AdminSecurity()
|
|||
});
|
||||
|
||||
}, function () {
|
||||
return '' !== this.adminPassword() && '' !== this.adminPasswordNew();
|
||||
return '' !== this.adminPassword() && '' !== this.adminPasswordNew() && '' !== this.adminPasswordNew2();
|
||||
});
|
||||
|
||||
this.onNewAdminPasswordResponse = _.bind(this.onNewAdminPasswordResponse, this);
|
||||
|
|
@ -51,6 +66,7 @@ AdminSecurity.prototype.onNewAdminPasswordResponse = function (sResult, oData)
|
|||
{
|
||||
this.adminPassword('');
|
||||
this.adminPasswordNew('');
|
||||
this.adminPasswordNew2('');
|
||||
|
||||
this.adminPasswordUpdateSuccess(true);
|
||||
}
|
||||
|
|
@ -85,6 +101,7 @@ AdminSecurity.prototype.onHide = function ()
|
|||
{
|
||||
this.adminPassword('');
|
||||
this.adminPasswordNew('');
|
||||
this.adminPasswordNew2('');
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ AbstractSystemDropDownViewModel.prototype.settingsClick = function ()
|
|||
kn.setHash(RL.link().settings());
|
||||
};
|
||||
|
||||
AbstractSystemDropDownViewModel.prototype.settingsHelp = function ()
|
||||
{
|
||||
kn.showScreenPopup(PopupsKeyboardShortcutsHelpViewModel);
|
||||
};
|
||||
|
||||
AbstractSystemDropDownViewModel.prototype.addAccountClick = function ()
|
||||
{
|
||||
if (this.allowAddAccount)
|
||||
|
|
@ -80,4 +85,13 @@ AbstractSystemDropDownViewModel.prototype.onBuild = function ()
|
|||
self.accountMenuDropdownTrigger(true);
|
||||
}
|
||||
});
|
||||
|
||||
// shortcuts help
|
||||
key('shift+/', [Enums.KeyState.MessageList, Enums.KeyState.MessageView, Enums.KeyState.Settings], function () {
|
||||
if (self.viewModelVisibility())
|
||||
{
|
||||
kn.showScreenPopup(PopupsKeyboardShortcutsHelpViewModel);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -737,12 +737,6 @@ MailBoxMessageListViewModel.prototype.initShortcuts = function ()
|
|||
return false;
|
||||
});
|
||||
|
||||
// shortcuts help
|
||||
key('shift+/', [Enums.KeyState.MessageList, Enums.KeyState.MessageView], function () {
|
||||
kn.showScreenPopup(PopupsKeyboardShortcutsHelpViewModel);
|
||||
return false;
|
||||
});
|
||||
|
||||
key('shift+f', [Enums.KeyState.MessageList, Enums.KeyState.MessageView], function () {
|
||||
self.multyForwardCommand();
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue