cdmToggleGridSpan: toggle classname instead of a style property

This commit is contained in:
Andrew Dolgov 2021-03-12 14:05:51 +03:00
parent efde6d36c7
commit bc73bf0f67
8 changed files with 27 additions and 6 deletions

View File

@ -97,11 +97,7 @@ const Article = {
const row = App.byId(`RROW-${id}`); const row = App.byId(`RROW-${id}`);
if (row) { if (row) {
row.toggleClassName('grid-span-row');
if (row.style.gridColumn != '1 / -1')
row.style.gridColumn = '1 / -1';
else
row.style.gridColumn = '';
this.setActive(id); this.setActive(id);
this.cdmMoveToId(id); this.cdmMoveToId(id);

View File

@ -5,7 +5,8 @@ parameters:
- '#Constant.*\b(SUBSTRING_FOR_DATE|SCHEMA_VERSION|SELF_USER_AGENT|LABEL_BASE_INDEX|PLUGIN_FEED_BASE_INDEX)\b.*not found#' - '#Constant.*\b(SUBSTRING_FOR_DATE|SCHEMA_VERSION|SELF_USER_AGENT|LABEL_BASE_INDEX|PLUGIN_FEED_BASE_INDEX)\b.*not found#'
- '#Comparison operation ">" between int<1, max> and 0 is always true.#' - '#Comparison operation ">" between int<1, max> and 0 is always true.#'
- '#Access to an undefined property DOMNode::\$tagName.#' - '#Access to an undefined property DOMNode::\$tagName.#'
- '#Call to an undefined method DOMNode::(get|remove|set)Attribute\(\).#' - '#Call to an undefined method DOMNode::(get|remove|set|has)Attribute\(\).#'
- '#Call to an undefined method DOMNode::(getElementsByTagName)\(\).#'
- '#PHPDoc tag @param has invalid value#' - '#PHPDoc tag @param has invalid value#'
- message: '##' - message: '##'
paths: paths:

View File

@ -602,9 +602,13 @@ body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="tr
/* 2 = because #headlines-spacer is the actual last child /* 2 = because #headlines-spacer is the actual last child
only if odd to deal with 1) single article and 2) not break any previous rows; only if odd to deal with 1) single article and 2) not break any previous rows;
1 = spacer; 1 = spacer;
this is outside of .cdm selector because of #headlines-spacer etc this is outside of .cdm selector because of #headlines-spacer etc
.grid-span-row is manually expanded RROWs
*/ */
} }
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *.grid-span-row,
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd), body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd),
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) { body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) {
grid-column: 1 / -1; grid-column: 1 / -1;

View File

@ -602,9 +602,13 @@ body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="tr
/* 2 = because #headlines-spacer is the actual last child /* 2 = because #headlines-spacer is the actual last child
only if odd to deal with 1) single article and 2) not break any previous rows; only if odd to deal with 1) single article and 2) not break any previous rows;
1 = spacer; 1 = spacer;
this is outside of .cdm selector because of #headlines-spacer etc this is outside of .cdm selector because of #headlines-spacer etc
.grid-span-row is manually expanded RROWs
*/ */
} }
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *.grid-span-row,
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd), body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd),
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) { body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) {
grid-column: 1 / -1; grid-column: 1 / -1;

View File

@ -602,9 +602,13 @@ body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="tr
/* 2 = because #headlines-spacer is the actual last child /* 2 = because #headlines-spacer is the actual last child
only if odd to deal with 1) single article and 2) not break any previous rows; only if odd to deal with 1) single article and 2) not break any previous rows;
1 = spacer; 1 = spacer;
this is outside of .cdm selector because of #headlines-spacer etc this is outside of .cdm selector because of #headlines-spacer etc
.grid-span-row is manually expanded RROWs
*/ */
} }
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *.grid-span-row,
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd), body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd),
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) { body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) {
grid-column: 1 / -1; grid-column: 1 / -1;

View File

@ -692,8 +692,12 @@ body.ttrss_main {
/* 2 = because #headlines-spacer is the actual last child /* 2 = because #headlines-spacer is the actual last child
only if odd to deal with 1) single article and 2) not break any previous rows; only if odd to deal with 1) single article and 2) not break any previous rows;
1 = spacer; 1 = spacer;
this is outside of .cdm selector because of #headlines-spacer etc this is outside of .cdm selector because of #headlines-spacer etc
.grid-span-row is manually expanded RROWs
*/ */
&.grid-span-row,
&:nth-last-child(2):nth-child(odd), &:nth-last-child(2):nth-child(odd),
&:nth-last-child(1) { &:nth-last-child(1) {
grid-column : 1 e("/") -1; grid-column : 1 e("/") -1;

View File

@ -603,9 +603,13 @@ body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="tr
/* 2 = because #headlines-spacer is the actual last child /* 2 = because #headlines-spacer is the actual last child
only if odd to deal with 1) single article and 2) not break any previous rows; only if odd to deal with 1) single article and 2) not break any previous rows;
1 = spacer; 1 = spacer;
this is outside of .cdm selector because of #headlines-spacer etc this is outside of .cdm selector because of #headlines-spacer etc
.grid-span-row is manually expanded RROWs
*/ */
} }
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *.grid-span-row,
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd), body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd),
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) { body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) {
grid-column: 1 / -1; grid-column: 1 / -1;

View File

@ -603,9 +603,13 @@ body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="tr
/* 2 = because #headlines-spacer is the actual last child /* 2 = because #headlines-spacer is the actual last child
only if odd to deal with 1) single article and 2) not break any previous rows; only if odd to deal with 1) single article and 2) not break any previous rows;
1 = spacer; 1 = spacer;
this is outside of .cdm selector because of #headlines-spacer etc this is outside of .cdm selector because of #headlines-spacer etc
.grid-span-row is manually expanded RROWs
*/ */
} }
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *.grid-span-row,
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd), body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(2):nth-child(odd),
body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) { body.ttrss_main #headlines-frame:not([data-headlines-count="0"])[data-is-cdm="true"][data-is-cdm-expanded="true"][data-enable-grid="true"] > *:nth-last-child(1) {
grid-column: 1 / -1; grid-column: 1 / -1;