aboutsummaryrefslogtreecommitdiff
path: root/app/views/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/javascript')
-rw-r--r--app/views/javascript/main.phtml19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml
index beae6c12b..641bfa00c 100644
--- a/app/views/javascript/main.phtml
+++ b/app/views/javascript/main.phtml
@@ -35,6 +35,10 @@ function slide (new_active, old_active) {
}
function mark_read (active) {
+ if (active[0] === undefined) {
+ return false;
+ }
+
url = active.find ("a.read").attr ("href");
$.ajax ({
@@ -56,6 +60,10 @@ function mark_read (active) {
}
function mark_favorite (active) {
+ if (active[0] === undefined) {
+ return false;
+ }
+
url = active.find ("a.bookmark").attr ("href");
$.ajax ({
@@ -87,6 +95,12 @@ $(document).ready (function () {
if (old_active[0] != new_active[0]) {
slide (new_active, old_active);
+ } else {
+ old_active.removeClass ("active");
+
+ if (hide_posts) {
+ old_active.children (".content").slideUp (200);
+ }
}
});
@@ -109,6 +123,11 @@ $(document).ready (function () {
active = $(".post.flux.active");
mark_read (active);
});
+ shortcut.add("shift+<?php echo $s['mark_read']; ?>", function () {
+ // on marque tout comme lu
+ url = $("#top a.read_all").attr ("href");
+ redirect (url);
+ });
shortcut.add("<?php echo $s['mark_favorite']; ?>", function () {
// on marque comme favori ou non favori
active = $(".post.flux.active");