summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-20 09:32:25 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-20 09:32:25 +0200
commitae7027de029e28fdd3894efe919b6171b2b11eab (patch)
treed2a83feb13621c5122d671dc9827ae3e2b38b0b3 /program/js
parentc8f35a17e645ec7328557846b976e38432c9a062 (diff)
Added session_path config option and unified cookies settings in javascript
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js8
-rw-r--r--program/js/common.js1
-rw-r--r--program/js/googiespell.js4
3 files changed, 11 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index e8bb6c1a7..9ca16b39c 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6585,6 +6585,12 @@ function rcube_webmail()
return 0;
};
+ // Cookie setter
+ this.set_cookie = function(name, value, expires)
+ {
+ setCookie(name, value, expires, this.env.cookie_path, this.env.cookie_domain, this.env.cookie_secure);
+ }
+
} // end object rcube_webmail
@@ -6615,6 +6621,8 @@ rcube_webmail.long_subject_title_ie = function(elem, indent)
}
};
+rcube_webmail.prototype.get_cookie = getCookie;
+
// copy event engine prototype
rcube_webmail.prototype.addEventListener = rcube_event_engine.prototype.addEventListener;
rcube_webmail.prototype.removeEventListener = rcube_event_engine.prototype.removeEventListener;
diff --git a/program/js/common.js b/program/js/common.js
index fdef3453e..a08387ecb 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -635,6 +635,7 @@ function getCookie(name)
return unescape(dc.substring(begin + prefix.length, end));
};
+// deprecated aliases, to be removed, use rcmail.set_cookie/rcmail.get_cookie
roundcube_browser.prototype.set_cookie = setCookie;
roundcube_browser.prototype.get_cookie = getCookie;
diff --git a/program/js/googiespell.js b/program/js/googiespell.js
index 9f1b41bb2..478858bac 100644
--- a/program/js/googiespell.js
+++ b/program/js/googiespell.js
@@ -25,7 +25,7 @@ var GOOGIE_CUR_LANG,
function GoogieSpell(img_dir, server_url, has_dict)
{
var ref = this,
- cookie_value = getCookie('language');
+ cookie_value = rcmail.get_cookie('language');
GOOGIE_CUR_LANG = cookie_value != null ? cookie_value : GOOGIE_DEFAULT_LANG;
@@ -150,7 +150,7 @@ this.setCurrentLanguage = function(lan_code)
//Set cookie
var now = new Date();
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
- setCookie('language', lan_code, now);
+ rcmail.set_cookie('language', lan_code, now);
};
this.setForceWidthHeight = function(width, height)