keep two sets of content-insert size cookies for wide & normal mode
This commit is contained in:
parent
a28d9582e8
commit
d43d6f7dff
18
js/App.js
18
js/App.js
|
@ -810,8 +810,10 @@ const App = {
|
||||||
dojo.connect(dijit.byId('content-insert'), 'resize',
|
dojo.connect(dijit.byId('content-insert'), 'resize',
|
||||||
(args) => {
|
(args) => {
|
||||||
if (args && args.w >= 0 && args.h >= 0) {
|
if (args && args.w >= 0 && args.h >= 0) {
|
||||||
Cookie.set("ttrss_ci_width", args.w, this.getInitParam("cookie_lifetime"));
|
const cookie_suffix = this._widescreen_mode ? "wide" : "normal";
|
||||||
Cookie.set("ttrss_ci_height", args.h, this.getInitParam("cookie_lifetime"));
|
|
||||||
|
Cookie.set("ttrss_ci_width:" + cookie_suffix, args.w, this.getInitParam("cookie_lifetime"));
|
||||||
|
Cookie.set("ttrss_ci_height:" + cookie_suffix, args.h, this.getInitParam("cookie_lifetime"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -918,10 +920,6 @@ const App = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset stored sizes because geometry changed
|
|
||||||
Cookie.set("ttrss_ci_width", 0);
|
|
||||||
Cookie.set("ttrss_ci_height", 0);
|
|
||||||
|
|
||||||
this._widescreen_mode = wide;
|
this._widescreen_mode = wide;
|
||||||
|
|
||||||
const article_id = Article.getActive();
|
const article_id = Article.getActive();
|
||||||
|
@ -938,9 +936,9 @@ const App = {
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
borderTopWidth: '0px' });
|
borderTopWidth: '0px' });
|
||||||
|
|
||||||
if (parseInt(Cookie.get("ttrss_ci_width")) > 0) {
|
if (parseInt(Cookie.get("ttrss_ci_width:wide")) > 0) {
|
||||||
content_insert.domNode.setStyle(
|
content_insert.domNode.setStyle(
|
||||||
{width: Cookie.get("ttrss_ci_width") + "px" });
|
{width: Cookie.get("ttrss_ci_width:wide") + "px" });
|
||||||
}
|
}
|
||||||
|
|
||||||
headlines_frame.setStyle({ borderBottomWidth: '0px' });
|
headlines_frame.setStyle({ borderBottomWidth: '0px' });
|
||||||
|
@ -953,9 +951,9 @@ const App = {
|
||||||
height: '50%',
|
height: '50%',
|
||||||
borderTopWidth: '0px'});
|
borderTopWidth: '0px'});
|
||||||
|
|
||||||
if (parseInt(Cookie.get("ttrss_ci_height")) > 0) {
|
if (parseInt(Cookie.get("ttrss_ci_height:normal")) > 0) {
|
||||||
content_insert.domNode.setStyle(
|
content_insert.domNode.setStyle(
|
||||||
{height: Cookie.get("ttrss_ci_height") + "px" });
|
{height: Cookie.get("ttrss_ci_height:normal") + "px" });
|
||||||
}
|
}
|
||||||
|
|
||||||
headlines_frame.setStyle({ borderBottomWidth: '1px' });
|
headlines_frame.setStyle({ borderBottomWidth: '1px' });
|
||||||
|
|
Loading…
Reference in New Issue