summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-11 15:07:54 +0300
committerAndrew Dolgov <[email protected]>2021-03-11 15:07:54 +0300
commita4da2f1e621d4de73e589d81dd3f06cd0711204f (patch)
tree32fcf11943b8d8246ee90ca47700158c04a9f155 /js
parent755072de9180880122b4629e49fa4d1fa4ca5e2a (diff)
continuation of the css cleanup
Diffstat (limited to 'js')
-rw-r--r--js/App.js25
1 files changed, 14 insertions, 11 deletions
diff --git a/js/App.js b/js/App.js
index e2da5433b..a9d796968 100644
--- a/js/App.js
+++ b/js/App.js
@@ -872,41 +872,44 @@ const App = {
},
setWidescreen: function(wide) {
const article_id = Article.getActive();
+ const headlines_frame = App.byId("headlines-frame");
+ const content_insert = dijit.byId("content-insert");
+
+ // TODO: setStyle stuff should probably be handled by CSS
if (wide) {
dijit.byId("headlines-wrap-inner").attr("design", 'sidebar');
- dijit.byId("content-insert").attr("region", "trailing");
+ content_insert.attr("region", "trailing");
- dijit.byId("content-insert").domNode.setStyle({width: '50%',
+ content_insert.domNode.setStyle({width: '50%',
height: 'auto',
borderTopWidth: '0px' });
if (parseInt(Cookie.get("ttrss_ci_width")) > 0) {
- dijit.byId("content-insert").domNode.setStyle(
+ content_insert.domNode.setStyle(
{width: Cookie.get("ttrss_ci_width") + "px" });
}
- App.byId("headlines-frame").setStyle({ borderBottomWidth: '0px' });
- App.byId("headlines-frame").addClassName("wide");
+ headlines_frame.setStyle({ borderBottomWidth: '0px' });
} else {
- dijit.byId("content-insert").attr("region", "bottom");
+ content_insert.attr("region", "bottom");
- dijit.byId("content-insert").domNode.setStyle({width: 'auto',
+ content_insert.domNode.setStyle({width: 'auto',
height: '50%',
borderTopWidth: '0px'});
if (parseInt(Cookie.get("ttrss_ci_height")) > 0) {
- dijit.byId("content-insert").domNode.setStyle(
+ content_insert.domNode.setStyle(
{height: Cookie.get("ttrss_ci_height") + "px" });
}
- App.byId("headlines-frame").setStyle({ borderBottomWidth: '1px' });
- App.byId("headlines-frame").removeClassName("wide");
-
+ headlines_frame.setStyle({ borderBottomWidth: '1px' });
}
+ headlines_frame.setAttribute("data-is-wide-screen", wide ? "true" : "false");
+
Article.close();
if (article_id) Article.view(article_id);