diff options
| author | 2012-10-25 22:24:54 +0200 | |
|---|---|---|
| committer | 2012-10-25 22:24:54 +0200 | |
| commit | b5916b6c04cd7428cd188ed56545dbf985b6c18c (patch) | |
| tree | e92a812f47b675f4d788c828d5320e6aad21f144 /app/views/javascript/main.phtml | |
| parent | 3ff51a59ba97f3ef1df3c26df16d9a3ab5789843 (diff) | |
mise en place du routage
Diffstat (limited to 'app/views/javascript/main.phtml')
| -rw-r--r-- | app/views/javascript/main.phtml | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index 641bfa00c..7d077d93f 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -146,6 +146,14 @@ $(document).ready (function () { slide (last_active, old_active); } }); + shortcut.add("shift+<?php echo $s['prev_entry']; ?>", function () { + old_active = $(".post.flux.active"); + first = $(".post.flux:first"); + + if (first[0] instanceof HTMLDivElement) { + slide (first, old_active); + } + }); shortcut.add("<?php echo $s['next_entry']; ?>", function () { old_active = $(".post.flux.active"); first_active = $(".post.flux:first"); @@ -157,20 +165,28 @@ $(document).ready (function () { slide (first_active, old_active); } }); + shortcut.add("shift+<?php echo $s['next_entry']; ?>", function () { + old_active = $(".post.flux.active"); + last = $(".post.flux:last"); + + if (last[0] instanceof HTMLDivElement) { + slide (last, old_active); + } + }); shortcut.add("<?php echo $s['next_page']; ?>", function () { url = $(".pager-next a").attr ("href"); - if (url === undefined) { - url = $(".pager-first a").attr ("href"); - } - + redirect (url); + }); + shortcut.add("shift+<?php echo $s['next_page']; ?>", function () { + url = $(".pager-last a").attr ("href"); redirect (url); }); shortcut.add("<?php echo $s['prev_page']; ?>", function () { url = $(".pager-previous a").attr ("href"); - if (url === undefined) { - url = $(".pager-last a").attr ("href"); - } - + redirect (url); + }); + shortcut.add("shift+<?php echo $s['prev_page']; ?>", function () { + url = $(".pager-first a").attr ("href"); redirect (url); }); shortcut.add("<?php echo $s['go_website']; ?>", function () { |
