Added configuration (#97)

[labs]
allow_ctrl_s_on_compose = On
This commit is contained in:
RainLoop Team 2014-02-28 23:43:32 +04:00
parent ca84bbb807
commit 5a5c6af2c6
10 changed files with 204 additions and 200 deletions

View file

@ -16,6 +16,7 @@ function PopupsComposeViewModel()
this.bReloadFolder = false;
this.bAllowIdentities = RL.settingsGet('AllowIdentities');
this.bAllowCtrlS = !!RL.settingsGet('AllowCtrlSOnCompose');
var
self = this,
@ -921,12 +922,12 @@ PopupsComposeViewModel.prototype.onBuild = function ()
if (oEvent && self.modalVisibility() && RL.data().useKeyboardShortcuts())
{
/*if (oEvent.ctrlKey && Enums.EventKeyCode.S === oEvent.keyCode)
if (self.bAllowCtrlS && oEvent.ctrlKey && Enums.EventKeyCode.S === oEvent.keyCode)
{
self.saveCommand();
bResult = false;
}
else */if (oEvent.ctrlKey && Enums.EventKeyCode.Enter === oEvent.keyCode)
else if (oEvent.ctrlKey && Enums.EventKeyCode.Enter === oEvent.keyCode)
{
self.sendCommand();
bResult = false;