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

View file

@ -2,7 +2,7 @@
"name": "RainLoop", "name": "RainLoop",
"title": "RainLoop Webmail", "title": "RainLoop Webmail",
"version": "1.6.3", "version": "1.6.3",
"release": "715", "release": "716",
"description": "Simple, modern & fast web-based email client", "description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net", "homepage": "http://rainloop.net",
"main": "Gruntfile.js", "main": "Gruntfile.js",

View file

@ -914,6 +914,7 @@ class Actions
'CustomLogoutLink' => $oConfig->Get('labs', 'custom_logout_link', ''), 'CustomLogoutLink' => $oConfig->Get('labs', 'custom_logout_link', ''),
'AllowAdditionalAccounts' => (bool) $oConfig->Get('webmail', 'allow_additional_accounts', true), 'AllowAdditionalAccounts' => (bool) $oConfig->Get('webmail', 'allow_additional_accounts', true),
'AllowIdentities' => (bool) $oConfig->Get('webmail', 'allow_identities', true), 'AllowIdentities' => (bool) $oConfig->Get('webmail', 'allow_identities', true),
'AllowCtrlSOnCompose' => (bool) $oConfig->Get('labs', 'allow_ctrl_s_on_compose', true),
'DetermineUserLanguage' => (bool) $oConfig->Get('labs', 'determine_user_language', false), 'DetermineUserLanguage' => (bool) $oConfig->Get('labs', 'determine_user_language', false),
'AllowPrefetch' => (bool) $oConfig->Get('labs', 'allow_prefetch', true), 'AllowPrefetch' => (bool) $oConfig->Get('labs', 'allow_prefetch', true),
'AllowCustomLogin' => (bool) $oConfig->Get('login', 'allow_custom_login', false), 'AllowCustomLogin' => (bool) $oConfig->Get('login', 'allow_custom_login', false),

View file

@ -213,6 +213,7 @@ Enables caching in the system'),
'date_from_headers' => array(false), 'date_from_headers' => array(false),
'autocreate_system_folders' => array(true), 'autocreate_system_folders' => array(true),
'allow_message_append' => array(false), 'allow_message_append' => array(false),
'allow_ctrl_s_on_compose' => array(true),
'determine_user_language' => array(true), 'determine_user_language' => array(true),
'disable_iconv_if_mbstring_supported' => array(false), 'disable_iconv_if_mbstring_supported' => array(false),
'login_fault_delay' => array(1), 'login_fault_delay' => array(1),

File diff suppressed because one or more lines are too long

View file

@ -7606,6 +7606,7 @@ function PopupsComposeViewModel()
this.bReloadFolder = false; this.bReloadFolder = false;
this.bAllowIdentities = RL.settingsGet('AllowIdentities'); this.bAllowIdentities = RL.settingsGet('AllowIdentities');
this.bAllowCtrlS = !!RL.settingsGet('AllowCtrlSOnCompose');
var var
self = this, self = this,
@ -8511,12 +8512,12 @@ PopupsComposeViewModel.prototype.onBuild = function ()
if (oEvent && self.modalVisibility() && RL.data().useKeyboardShortcuts()) 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(); self.saveCommand();
bResult = false; bResult = false;
} }
else */if (oEvent.ctrlKey && Enums.EventKeyCode.Enter === oEvent.keyCode) else if (oEvent.ctrlKey && Enums.EventKeyCode.Enter === oEvent.keyCode)
{ {
self.sendCommand(); self.sendCommand();
bResult = false; bResult = false;

File diff suppressed because one or more lines are too long