mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-02 18:37:52 -05:00
* 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>
65 lines
1.8 KiB
JavaScript
65 lines
1.8 KiB
JavaScript
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
|
|
'use strict';
|
|
|
|
function init_selectInputChanger() {
|
|
const select = document.getElementsByClassName('select-input-changer');
|
|
|
|
for (let i = 0; i < select.length; i++) {
|
|
select[i].addEventListener('change', updateSelectInput);
|
|
select[i].dispatchEvent(new Event('change', {
|
|
bubbles: true,
|
|
cancelable: true,
|
|
}));
|
|
}
|
|
}
|
|
|
|
function updateSelectInput(ev) {
|
|
const elem = ev.target;
|
|
const formGroup = document.getElementById(elem.dataset.name + '-block');
|
|
const input = document.getElementById(elem.dataset.name + '-input');
|
|
if (elem.selectedOptions[0].dataset.inputVisible == 'false') {
|
|
formGroup.style.display = 'none';
|
|
if (input) {
|
|
input.name = '';
|
|
}
|
|
if (elem.name == '') {
|
|
elem.name = elem.dataset.name;
|
|
}
|
|
} else {
|
|
formGroup.style.display = '';
|
|
if (input) {
|
|
input.name = elem.dataset.name;
|
|
}
|
|
if (elem.name === elem.dataset.name) {
|
|
elem.name = '';
|
|
}
|
|
}
|
|
}
|
|
|
|
function init_maxNumbersOfAccountsStatus() {
|
|
const input = document.getElementById('max-registrations-input');
|
|
if (input) {
|
|
input.addEventListener('change', onchange_maxNumbersOfAccounts);
|
|
input.dispatchEvent(new Event('change', {
|
|
bubbles: true,
|
|
cancelable: true,
|
|
}));
|
|
}
|
|
}
|
|
|
|
function onchange_maxNumbersOfAccounts(ev) {
|
|
const elem = ev.target;
|
|
if (elem.value > elem.dataset.number) {
|
|
document.getElementById('max-registrations-status-disabled').style.display = 'none';
|
|
document.getElementById('max-registrations-status-enabled').style.display = '';
|
|
} else {
|
|
document.getElementById('max-registrations-status-disabled').style.display = '';
|
|
document.getElementById('max-registrations-status-enabled').style.display = 'none';
|
|
}
|
|
}
|
|
|
|
init_selectInputChanger();
|
|
init_maxNumbersOfAccountsStatus();
|
|
|
|
// @license-end
|