summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js22
1 files changed, 18 insertions, 4 deletions
diff --git a/js/Article.js b/js/Article.js
index ed74051a6..16abfbfee 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -93,6 +93,16 @@ const Article = {
w.opener = null;
w.location = url;
},
+ cdmToggleGridSpan: function(id) {
+ const row = App.byId(`RROW-${id}`);
+
+ if (row) {
+ row.toggleClassName('grid-span-row');
+
+ this.setActive(id);
+ this.cdmMoveToId(id);
+ }
+ },
cdmUnsetActive: function (event) {
const row = App.byId(`RROW-${Article.getActive()}`);
@@ -273,7 +283,9 @@ const Article = {
row.setAttribute("data-content", row.getAttribute("data-content-original"));
row.removeAttribute("data-content-original");
- row.querySelector(".content-inner").innerHTML = " ";
+ row.querySelector(".content-inner").innerHTML = `<div class="text-center text-muted">
+ ${__("Loading, please wait...")}
+ </div>`
}
},
view: function (id, no_expand) {
@@ -389,10 +401,12 @@ const Article = {
const ctr = App.byId("headlines-frame");
const row = App.byId(`RROW-${id}`);
- if (!row || !ctr) return;
+ if (ctr && row) {
+ const grid_gap = parseInt(window.getComputedStyle(ctr).gridGap) || 0;
- if (force_to_top || !App.Scrollable.fitsInContainer(row, ctr)) {
- ctr.scrollTop = row.offsetTop;
+ if (force_to_top || !App.Scrollable.fitsInContainer(row, ctr)) {
+ ctr.scrollTop = row.offsetTop - grid_gap;
+ }
}
},
setActive: function (id) {