From 305f1436e3ca2907e5234ed77f62348cf4303b79 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 21 Nov 2013 22:23:23 +0100 Subject: Accessibilité : Quelques alternative Unicode aux icônes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FreshRSS est maintenant utilisable en bonne partie sans CSS. Ce patch inclut un caractère Unicode approprié en plus de certaines icônes définies en tant qu'image en CSS. Contribue à https://github.com/marienfressinaud/FreshRSS/issues/284 Il manque encore certaines icônes, et les alternatives Unicode ne sont pour l'instant pas montrées si la CSS est chargée mais que les images ne le sont pas. --- public/scripts/main.js | 21 +++++++++++---------- public/themes/default/global.css | 3 ++- public/themes/flat-design/global.css | 3 ++- 3 files changed, 15 insertions(+), 12 deletions(-) (limited to 'public') diff --git a/public/scripts/main.js b/public/scripts/main.js index b798f918c..3a9fa0196 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -39,15 +39,15 @@ function mark_read(active, only_not_read) { url: url, data : { ajax: true } }).done(function (data) { - var res = $.parseJSON(data); - - active.find("a.read").attr("href", res.url); - - var inc = 0; + var res = $.parseJSON(data), + $r = active.find("a.read").attr("href", res.url), + inc = 0; if (active.hasClass("not_read")) { + $r.text('☑'); active.removeClass("not_read"); inc--; } else if (only_not_read !== true || active.hasClass("not_read")) { + $r.text('☐'); active.addClass("not_read"); inc++; } @@ -109,15 +109,16 @@ function mark_favorite(active) { url: url, data : { ajax: true } }).done(function (data) { - var res = $.parseJSON(data); - - active.find("a.bookmark").attr("href", res.url); - var inc = 0; + var res = $.parseJSON(data), + $b = active.find("a.bookmark").attr("href", res.url), + inc = 0; if (active.hasClass("favorite")) { + $b.text('☆'); active.removeClass("favorite"); inc--; } else { - active.addClass("favorite"); + $b.text('★'); + active.addClass("favorite").find('.bookmark'); inc++; } diff --git a/public/themes/default/global.css b/public/themes/default/global.css index 94c11b957..d4de7df50 100644 --- a/public/themes/default/global.css +++ b/public/themes/default/global.css @@ -477,8 +477,9 @@ input, select, textarea { color: #844; } -/* ICONES */ +/* ICÔNES */ .icon { + font-size: 0; display: inline-block; width: 16px; height: 16px; diff --git a/public/themes/flat-design/global.css b/public/themes/flat-design/global.css index 1952cc097..87c4ace6f 100644 --- a/public/themes/flat-design/global.css +++ b/public/themes/flat-design/global.css @@ -469,8 +469,9 @@ input, select, textarea { color: #844; } -/* ICONES */ +/* ICÔNES */ .icon { + font-size: 0; display: inline-block; width: 16px; height: 16px; -- cgit v1.2.3