aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2022-07-17 22:54:24 +0200
committerGravatar GitHub <noreply@github.com> 2022-07-17 22:54:24 +0200
commitb2e46d62154faf28c3c17e2b775c47d11e38ee56 (patch)
tree69df7287cdc30cee103cdeed43f5a43bbfb086af /p/scripts
parent954fcef9e26ce1d9e4e5ad83749e4ee9c894f716 (diff)
Improved: Article header (#4101)
* First draft for normal view * Revert changes on the entry header * Update normal.phtml * Update normal.phtml * RTL CSS * CSS fixes * Better tags style * fix * Update swage.scss * fix * Update swage.scss * fixed .content header * font-size in rem * improved template * dropdown menu if more than 7 tags * configuration: show tags in topline * Simplify loop logic * Minor space * config tags via reading (i18n still missed) * fixed the whitespaces * optimizations * optimize header+footer * Update normal.phtml * fix css * new config: show author+date in footer * config feed name display * improve HTML * fix whitespaces * i18n * i18n: German translations * fix i18n German * fixed: uncouple from bottomline config * reverted: tobline_tags * equalities * fixed: author in footer * fixed data-leave-validation * improved max numbers i18n label * Config works now also in the reader view * fix: footer border * reader view: style article-header-topline * fixed whitespace * i18n fr * Minor i18n fr * Fix mistake i18n fr * i18n fr more precise expression * Fix JavaScript * removed the link icon in the title * clean CSS Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/config.js16
-rw-r--r--p/scripts/main.js2
2 files changed, 13 insertions, 5 deletions
diff --git a/p/scripts/config.js b/p/scripts/config.js
index e3a85df15..01cd15a26 100644
--- a/p/scripts/config.js
+++ b/p/scripts/config.js
@@ -19,12 +19,20 @@ function updateSelectInput(ev) {
const input = document.getElementById(elem.dataset.name + '-input');
if (elem.selectedOptions[0].dataset.inputVisible == 'false') {
formGroup.style.display = 'none';
- input.name = '';
- elem.name = elem.dataset.name;
+ if (input) {
+ input.name = '';
+ }
+ if (elem.name == '') {
+ elem.name = elem.dataset.name;
+ }
} else {
formGroup.style.display = '';
- input.name = elem.dataset.name;
- elem.name = '';
+ if (input) {
+ input.name = elem.dataset.name;
+ }
+ if (elem.name === elem.dataset.name) {
+ elem.name = '';
+ }
}
}
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 461dc1b10..17c292b9f 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1043,7 +1043,7 @@ function init_stream(stream) {
return ev.ctrlKey;
}
- el = ev.target.closest('.flux .content a');
+ el = ev.target.closest('.flux .content .text a');
if (el) {
if (!el.closest('div').classList.contains('author')) {
el.target = '_blank';