aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rossi <alexandre.rossi@gmail.com>2019-06-12 20:59:13 +0200
committerAlexandre Rossi <alexandre.rossi@gmail.com>2019-06-12 21:33:15 +0200
commit625f516c36f982f1a8843b7fa474efcbad7c2f48 (patch)
tree2f6b6b96adff14997e82b96f2a075937622725cd
parentf0cde6d8104f96048a4b1518604b11e237fa7c8f (diff)
downloadlazygal-625f516c36f982f1a8843b7fa474efcbad7c2f48.zip
lazygal-625f516c36f982f1a8843b7fa474efcbad7c2f48.tar.bz2
fix left/right/up keys not working
-rw-r--r--themes/nojs/SHARED_scripts.js2
-rw-r--r--themes/nojs/browse.thtml6
-rw-r--r--themes/nojs/dirindex.thtml6
3 files changed, 11 insertions, 3 deletions
diff --git a/themes/nojs/SHARED_scripts.js b/themes/nojs/SHARED_scripts.js
index 21633ba..914b53c 100644
--- a/themes/nojs/SHARED_scripts.js
+++ b/themes/nojs/SHARED_scripts.js
@@ -11,7 +11,7 @@ function gotopage(divid) {
}
}
-$(document).keypress(function(e) {
+$(document).keydown(function(e) {
switch(e.keyCode) {
case 37: /* Left */
gotopage('prev_link');
diff --git a/themes/nojs/browse.thtml b/themes/nojs/browse.thtml
index 0cd8f8e..2a06135 100644
--- a/themes/nojs/browse.thtml
+++ b/themes/nojs/browse.thtml
@@ -19,9 +19,13 @@
<div class="inline_enum" id="breadcrumbs">
<ul>
- <li py:for="webgal in webgal_path">
+ <li py:for="webgal in webgal_path[:-1]">
<a href="${webgal.link}" py:content="webgal.name" />
</li>
+ <li py:if="webgal_path[-1:]" id="index_link">
+ <a href="${webgal_path[-1].link}"
+ py:content="webgal_path[-1].name" />
+ </li>
<li class="bc_current" py:content="name" />
</ul>
</div>
diff --git a/themes/nojs/dirindex.thtml b/themes/nojs/dirindex.thtml
index f200741..37e0ebf 100644
--- a/themes/nojs/dirindex.thtml
+++ b/themes/nojs/dirindex.thtml
@@ -23,9 +23,13 @@
<div class="inline_enum" id="breadcrumbs">
<ul>
- <li py:for="webgal in webgal_path">
+ <li py:for="webgal in webgal_path[:-1]">
<a href="${webgal.link}" py:content="webgal.name" />
</li>
+ <li py:if="webgal_path[-1:]" id="index_link">
+ <a href="${webgal_path[-1].link}"
+ py:content="webgal_path[-1].name" />
+ </li>
<li class="bc_current" py:content="album_name" />
</ul>
</div>