workaround for resetting panel size cookies (closes #756)

This commit is contained in:
Andrew Dolgov 2013-07-25 14:20:42 +04:00
parent 113c3dec9e
commit 1966e05457
1 changed files with 7 additions and 3 deletions

View File

@ -573,13 +573,17 @@ function init_second_stage() {
var tmph = dojo.connect(dijit.byId('feeds-holder'), 'resize', var tmph = dojo.connect(dijit.byId('feeds-holder'), 'resize',
function (args) { function (args) {
if (args && args.w >= 0) {
setCookie("ttrss_fh_width", args.w, getInitParam("cookie_lifetime")); setCookie("ttrss_fh_width", args.w, getInitParam("cookie_lifetime"));
}
}); });
var tmph = dojo.connect(dijit.byId('content-insert'), 'resize', var tmph = dojo.connect(dijit.byId('content-insert'), 'resize',
function (args) { function (args) {
if (args && args.w >= 0 && args.h >= 0) {
setCookie("ttrss_ci_width", args.w, getInitParam("cookie_lifetime")); setCookie("ttrss_ci_width", args.w, getInitParam("cookie_lifetime"));
setCookie("ttrss_ci_height", args.h, getInitParam("cookie_lifetime")); setCookie("ttrss_ci_height", args.h, getInitParam("cookie_lifetime"));
}
}); });
}); });