summaryrefslogtreecommitdiff
path: root/js/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2014-08-11 15:39:14 +0400
committerAndrew Dolgov <[email protected]>2014-08-11 15:39:14 +0400
commit89018afa13887c46de4c8ef8189fc7b500cdac0f (patch)
tree54e3f8e911c353f05dac1185f9e75b31435c940b /js/tt-rss.js
parent3263c9ccee799969a4a4322cd359553bb54b76ce (diff)
assign stored content-insert height/width in switchPanelMode(); reset stored sizes on widescreen switch
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r--js/tt-rss.js29
1 files changed, 18 insertions, 11 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js
index a66411d11..7d6f22f87 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -500,6 +500,10 @@ function init() {
if (!isCdmMode()) {
_widescreen_mode = !_widescreen_mode;
+ // reset stored sizes because geometry changed
+ setCookie("ttrss_ci_width", 0);
+ setCookie("ttrss_ci_height", 0);
+
switchPanelMode(_widescreen_mode);
}
};
@@ -555,17 +559,6 @@ function init_second_stage() {
{width: getCookie("ttrss_fh_width") + "px" });
}
- if (parseInt(getCookie("ttrss_ci_width")) > 0) {
- if (_widescreen_mode) {
- dijit.byId("content-insert").domNode.setStyle(
- {width: getCookie("ttrss_ci_width") + "px" });
-
- } else {
- dijit.byId("content-insert").domNode.setStyle(
- {height: getCookie("ttrss_ci_height") + "px" });
- }
- }
-
dijit.byId("main").resize();
var tmph = dojo.connect(dijit.byId('feeds-holder'), 'resize',
@@ -706,6 +699,10 @@ function quickMenuGo(opid) {
if (!isCdmMode()) {
_widescreen_mode = !_widescreen_mode;
+ // reset stored sizes because geometry changed
+ setCookie("ttrss_ci_width", 0);
+ setCookie("ttrss_ci_height", 0);
+
switchPanelMode(_widescreen_mode);
}
break;
@@ -1077,6 +1074,11 @@ function switchPanelMode(wide) {
height: 'auto',
borderTopWidth: '0px' });
+ if (parseInt(getCookie("ttrss_ci_width")) > 0) {
+ dijit.byId("content-insert").domNode.setStyle(
+ {width: getCookie("ttrss_ci_width") + "px" });
+ }
+
$("headlines-frame").setStyle({ borderBottomWidth: '0px' });
$("headlines-frame").addClassName("wide");
@@ -1088,6 +1090,11 @@ function switchPanelMode(wide) {
height: '50%',
borderTopWidth: '0px'});
+ if (parseInt(getCookie("ttrss_ci_height")) > 0) {
+ dijit.byId("content-insert").domNode.setStyle(
+ {height: getCookie("ttrss_ci_height") + "px" });
+ }
+
$("headlines-frame").setStyle({ borderBottomWidth: '1px' });
$("headlines-frame").removeClassName("wide");