summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-08-20 08:30:24 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-08-20 08:30:24 +0200
commit44b47dfb359f8a7412208079202fca0adf741540 (patch)
treec36bea0bd3f0f3c2c45825e4d79d5e3a9e57ca11 /program/js
parentfb5e2fb96f4cda26936f599f1a15a49afb53178e (diff)
Add config/preference option to disable saving messages in localStorage (#1489979)
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 20ad93a1a..0fca47191 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3361,7 +3361,8 @@ function rcube_webmail()
}
// check for locally stored compose data
- this.compose_restore_dialog(0, html_mode)
+ if (this.env.save_localstorage)
+ this.compose_restore_dialog(0, html_mode)
if (input_to.val() == '')
input_to.focus();
@@ -3793,7 +3794,7 @@ function rcube_webmail()
}
// save compose form content to local storage every 5 seconds
- if (!this.local_save_timer && window.localStorage) {
+ if (!this.local_save_timer && window.localStorage && this.env.save_localstorage) {
// track typing activity and only save on changes
this.compose_type_activity = this.compose_type_activity_last = 0;
$(document).bind('keypress', function(e){ ref.compose_type_activity++; });
@@ -3849,6 +3850,10 @@ function rcube_webmail()
// store the contents of the compose form to localstorage
this.save_compose_form_local = function()
{
+ // feature is disabled
+ if (!this.env.save_localstorage)
+ return;
+
var formdata = { session:this.env.session_id, changed:new Date().getTime() },
ed, empty = true;