From ab26cb6ed8904bb873e0ae4b874aed3f3a0fdb48 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 25 Nov 2013 00:40:35 +0100 Subject: Accessibilité sans images (expérimentation) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expérimentation : utilisation de vraies images à la place des icônes générées en CSS. Permet de fournir un texte alternatif affiché en cas de non-chargement de l'image (par choix ou problème réseau par exemple). Meilleure sémantique (plutôt que le tag i détourné). Implémente https://github.com/marienfressinaud/FreshRSS/issues/284 Il est toujours possible de changer d'icônes selon les thèmes grâce à RSSThemes.php --- public/scripts/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'public/scripts') diff --git a/public/scripts/main.js b/public/scripts/main.js index e21483f28..6d8389a44 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -286,7 +286,15 @@ function init_column_categories() { return; } $('#aside_flux').on('click', '.category>a.dropdown-toggle', function () { - $(this).children().toggleClass("i_down").toggleClass("i_up").text($(this).hasClass("i_up") ? "△" : "▽"); + $(this).children().each(function() { + if (this.alt === '▽') { + this.src = this.src.replace('/icons/down.', '/icons/up.'); + this.alt = '△'; + } else { + this.src = this.src.replace('/icons/up.', '/icons/down.'); + this.alt = '▽'; + } + }); $(this).parent().next(".feeds").slideToggle(); return false; }); -- cgit v1.2.3