mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
parent
d961fa480a
commit
0fad66c452
53 changed files with 2231 additions and 1181 deletions
|
|
@ -31,6 +31,8 @@ function PopupsComposeViewModel()
|
|||
|
||||
this.resizer = ko.observable(false).extend({'throttle': 50});
|
||||
|
||||
this.identitiesDropdownTrigger = ko.observable(false);
|
||||
|
||||
this.to = ko.observable('');
|
||||
this.to.focusTrigger = ko.observable(false);
|
||||
this.cc = ko.observable('');
|
||||
|
|
@ -915,43 +917,33 @@ PopupsComposeViewModel.prototype.tryToClosePopup = function ()
|
|||
}]);
|
||||
};
|
||||
|
||||
PopupsComposeViewModel.prototype.useShortcuts = function ()
|
||||
{
|
||||
return RL.data().useKeyboardShortcuts();
|
||||
};
|
||||
|
||||
PopupsComposeViewModel.prototype.onBuild = function ()
|
||||
{
|
||||
this.initUploader();
|
||||
|
||||
var
|
||||
self = this,
|
||||
oData = RL.data(),
|
||||
oScript = null
|
||||
;
|
||||
|
||||
key('ctrl+q, command+q', Enums.KeyState.Compose, function () {
|
||||
self.identitiesDropdownTrigger(true);
|
||||
return false;
|
||||
});
|
||||
|
||||
key('ctrl+s, command+s', Enums.KeyState.Compose, function () {
|
||||
if (oData.useKeyboardShortcuts())
|
||||
{
|
||||
self.saveCommand();
|
||||
return false;
|
||||
}
|
||||
self.saveCommand();
|
||||
return false;
|
||||
});
|
||||
|
||||
key('ctrl+enter, command+enter', Enums.KeyState.Compose, function () {
|
||||
if (oData.useKeyboardShortcuts())
|
||||
{
|
||||
self.sendCommand();
|
||||
return false;
|
||||
}
|
||||
self.sendCommand();
|
||||
return false;
|
||||
});
|
||||
|
||||
key('esc', Enums.KeyState.Compose, function () {
|
||||
if (oData.useKeyboardShortcuts())
|
||||
{
|
||||
self.tryToClosePopup();
|
||||
return false;
|
||||
}
|
||||
self.tryToClosePopup();
|
||||
return false;
|
||||
});
|
||||
|
||||
$window.on('resize', function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue