summaryrefslogtreecommitdiff
path: root/public/scripts/main.js
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-21 22:23:23 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-21 22:23:23 +0100
commit305f1436e3ca2907e5234ed77f62348cf4303b79 (patch)
tree9bdc331f401b343e9a9a27949924588ce838365b /public/scripts/main.js
parent50f3b27eb9d15369c6e64ac5140db1b0a90e681d (diff)
Accessibilité : Quelques alternative Unicode aux icônes
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.
Diffstat (limited to 'public/scripts/main.js')
-rw-r--r--public/scripts/main.js21
1 files changed, 11 insertions, 10 deletions
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++;
}