diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/Feeds.js | 12 | ||||
-rwxr-xr-x | js/Headlines.js | 13 |
2 files changed, 23 insertions, 2 deletions
diff --git a/js/Feeds.js b/js/Feeds.js index b14caeaf9..9e65a06fd 100644 --- a/js/Feeds.js +++ b/js/Feeds.js @@ -321,8 +321,16 @@ const Feeds = { this._active_feed_id = id; this._active_feed_is_cat = is_cat; - App.byId("headlines-frame").setAttribute("feed-id", id); - App.byId("headlines-frame").setAttribute("is-cat", is_cat ? 1 : 0); + const container = App.byId("headlines-frame"); + + // TODO @deprecated: these two should be removed (replaced with data- attributes below) + container.setAttribute("feed-id", id); + container.setAttribute("is-cat", is_cat ? 1 : 0); + // ^ + + container.setAttribute("data-feed-id", id); + container.setAttribute("data-is-cat", is_cat ? "true" : "false"); + container.setAttribute("data-enable-grid", App.getInitParam("cdm_enable_grid") ? "true" : "false"); this.select(id, is_cat); diff --git a/js/Headlines.js b/js/Headlines.js index 8d7e06f41..8f104c951 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -431,6 +431,8 @@ const Headlines = { this.unpack_observer.observe(e) }); + dijit.byId('main').resize(); + }, render: function (headlines, hl) { let row = null; @@ -459,6 +461,11 @@ const Headlines = { this.vgroup_last_feed = hl.feed_id; } + const container = App.byId("headlines-frame"); + + container.setAttribute("data-is-cdm", App.isCombinedMode() ? "true" : "false"); + container.setAttribute("data-is-cdm-expanded", App.getInitParam("cdm_expanded")); + if (App.isCombinedMode()) { row_class += App.getInitParam("cdm_expanded") ? " expanded" : " expandable"; @@ -677,9 +684,13 @@ const Headlines = { // also called in renderAgain() after view mode switch Headlines.setCommonClasses(); + /** TODO: remove @deprecated */ App.byId("headlines-frame").setAttribute("is-vfeed", reply['headlines']['is_vfeed'] ? 1 : 0); + App.byId("headlines-frame").setAttribute("data-is-vfeed", + reply['headlines']['is_vfeed'] ? "true" : "false"); + Article.setActive(0); try { @@ -820,6 +831,8 @@ const Headlines = { // unpack visible articles, fill buffer more, etc this.scrollHandler(); + dijit.byId('main').resize(); + Notify.close(); }, reverse: function () { |