aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-25 22:24:54 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-25 22:24:54 +0200
commitb5916b6c04cd7428cd188ed56545dbf985b6c18c (patch)
treee92a812f47b675f4d788c828d5320e6aad21f144 /app/views
parent3ff51a59ba97f3ef1df3c26df16d9a3ab5789843 (diff)
mise en place du routage
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/feed.phtml (renamed from app/views/configure/flux.phtml)2
-rw-r--r--app/views/configure/shortcut.phtml7
-rw-r--r--app/views/javascript/main.phtml32
3 files changed, 31 insertions, 10 deletions
diff --git a/app/views/configure/flux.phtml b/app/views/configure/feed.phtml
index 1aa26c634..582457b63 100644
--- a/app/views/configure/flux.phtml
+++ b/app/views/configure/feed.phtml
@@ -5,7 +5,7 @@
<?php if (!empty ($this->feeds)) { ?>
<?php foreach ($this->feeds as $feed) { ?>
<li <?php echo ($this->flux && $this->flux->id () == $feed->id ()) ? 'class="active"' : ''; ?>>
- <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'flux', 'params' => array ('id' => $feed->id ()))); ?>"><?php echo $feed->name (); ?></a>
+ <a href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'feed', 'params' => array ('id' => $feed->id ()))); ?>"><?php echo $feed->name (); ?></a>
</li>
<?php } ?>
<?php } else { ?>
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index 6fc253dd5..56718d566 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -9,8 +9,9 @@
<form method="post" action="">
<h1>Gérer les raccourcis</h1>
- <label for="mark_read">Marquer l'article comme lu</label>
+ <label for="mark_read">Marquer l'article comme lu / non lu</label>
<input type="text" id="mark_read" name="shortcuts[mark_read]" list="keys" value="<?php echo $s['mark_read']; ?>" />
+ <p>+ <code>shift</code> pour marquer tous les articles</p>
<label for="mark_favorite">Mettre l'article en favori</label>
<input type="text" id="mark_favorite" name="shortcuts[mark_favorite]" list="keys" value="<?php echo $s['mark_favorite']; ?>" />
@@ -20,15 +21,19 @@
<label for="next_entry">Passer à l'article suivant</label>
<input type="text" id="next_entry" name="shortcuts[next_entry]" list="keys" value="<?php echo $s['next_entry']; ?>" />
+ <p>+ <code>shift</code> pour passer au dernier article de la page</p>
<label for="prev_entry">Passer à l'article précédent</label>
<input type="text" id="prev_entry" name="shortcuts[prev_entry]" list="keys" value="<?php echo $s['prev_entry']; ?>" />
+ <p>+ <code>shift</code> pour passer au premier article de la page</p>
<label for="next_page">Passer à la page suivant</label>
<input type="text" id="next_page" name="shortcuts[next_page]" list="keys" value="<?php echo $s['next_page']; ?>" />
+ <p>+ <code>shift</code> pour passer à la dernière page</p>
<label for="prev_page">Passer à la page précédente</label>
<input type="text" id="prev_page" name="shortcuts[prev_page]" list="keys" value="<?php echo $s['prev_page']; ?>" />
+ <p>+ <code>shift</code> pour passer à la première page</p>
<input type="submit" value="Valider" />
</form>
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 () {