From 453bcb969eac21c0ffd3de80d1014902e58c7b1a Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Thu, 18 Dec 2014 01:11:58 +0400 Subject: [PATCH] Added "[labs] allow_ctrl_enter_on_compose = false" setting (Closes #387) --- dev/View/Popup/Compose.js | 13 ++++++++----- rainloop/v/0.0.0/app/src/RainLoop/Actions.php | 1 + .../v/0.0.0/app/src/RainLoop/Config/Application.php | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dev/View/Popup/Compose.js b/dev/View/Popup/Compose.js index ed03d56c7..a0f2aa8c4 100644 --- a/dev/View/Popup/Compose.js +++ b/dev/View/Popup/Compose.js @@ -1063,10 +1063,13 @@ return false; }); -// key('ctrl+enter, command+enter', Enums.KeyState.Compose, function () { -// self.sendCommand(); -// return false; -// }); + if (!!Settings.settingsGet('AllowСtrlEnterOnCompose')) + { + key('ctrl+enter, command+enter', Enums.KeyState.Compose, function () { + self.sendCommand(); + return false; + }); + } key('esc', Enums.KeyState.Compose, function () { if (self.modalVisibility()) @@ -1204,7 +1207,7 @@ window.gapi.load('auth', {'callback': function () { - var + var oAuthToken = window.gapi.auth.getToken(), fResult = function (oAuthResult) { if (oAuthResult && !oAuthResult.error) diff --git a/rainloop/v/0.0.0/app/src/RainLoop/Actions.php b/rainloop/v/0.0.0/app/src/RainLoop/Actions.php index 1ccab3ea0..325fb3a08 100644 --- a/rainloop/v/0.0.0/app/src/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/src/RainLoop/Actions.php @@ -1063,6 +1063,7 @@ class Actions 'AllowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true), 'AllowHtmlEditorSourceButton' => (bool) $oConfig->Get('labs', 'allow_html_editor_source_button', false), 'AllowHtmlEditorBitiButtons' => (bool) $oConfig->Get('labs', 'allow_html_editor_biti_buttons', false), + 'AllowСtrlEnterOnCompose' => (bool) $oConfig->Get('labs', 'allow_ctrl_enter_on_compose', false), 'UseRsaEncryption' => (bool) $oConfig->Get('security', 'use_rsa_encryption', false), 'RsaPublicKey' => '', 'HideDangerousActions' => $oConfig->Get('labs', 'hide_dangerous_actions', false), diff --git a/rainloop/v/0.0.0/app/src/RainLoop/Config/Application.php b/rainloop/v/0.0.0/app/src/RainLoop/Config/Application.php index 56b870026..a2d6d92ea 100644 --- a/rainloop/v/0.0.0/app/src/RainLoop/Config/Application.php +++ b/rainloop/v/0.0.0/app/src/RainLoop/Config/Application.php @@ -247,6 +247,7 @@ Enables caching in the system'), 'log_ajax_response_write_limit' => array(300), 'allow_html_editor_source_button' => array(false), 'allow_html_editor_biti_buttons' => array(false), + 'allow_ctrl_enter_on_compose' => array(false), 'hide_dangerous_actions' => array(false), 'use_app_debug_js' => array(false), 'use_app_debug_css' => array(false),