summaryrefslogtreecommitdiff
path: root/app/views/javascript/main.phtml
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-06-15 17:54:24 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-06-15 17:54:24 +0200
commit4bda1d75aec180ee3845f74991f99a99ef2ae062 (patch)
treeef97bb0e05dc2b93387d6e903f1ac8a512fff039 /app/views/javascript/main.phtml
parent8cf9ee76504d2eabd969aff1760b4edb59dfb358 (diff)
Possibilité de marquer un article lu / favori même si une autre action de ce type est en attente (http) + ajustement css
Diffstat (limited to 'app/views/javascript/main.phtml')
-rw-r--r--app/views/javascript/main.phtml17
1 files changed, 2 insertions, 15 deletions
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml
index 9596b1647..28bb0dfd9 100644
--- a/app/views/javascript/main.phtml
+++ b/app/views/javascript/main.phtml
@@ -42,19 +42,14 @@ function toggleContent (new_active, old_active) {
<?php } ?>
}
-var load = false;
function mark_read (active, only_not_read) {
if (active[0] === undefined || (
- only_not_read === true && !active.hasClass("not_read")) ||
- load === true) {
+ only_not_read === true && !active.hasClass("not_read"))) {
return false;
}
- load = true;
-
url = active.find ("a.read").attr ("href");
if (url === undefined) {
- load = false;
return false;
}
@@ -71,22 +66,16 @@ function mark_read (active, only_not_read) {
} else {
active.addClass ("not_read");
}
-
- load = false;
});
}
function mark_favorite (active) {
- if (active[0] === undefined ||
- load === true) {
+ if (active[0] === undefined) {
return false;
}
- load = true;
-
url = active.find ("a.bookmark").attr ("href");
if (url === undefined) {
- load = false;
return false;
}
@@ -103,8 +92,6 @@ function mark_favorite (active) {
} else {
active.addClass ("favorite");
}
-
- load = false;
});
}