From 9ef705650bf867e3a351eb67d02a810bcd849b36 Mon Sep 17 00:00:00 2001
From: Ozzie Isaacs
Date: Thu, 13 May 2021 09:41:27 +0200
Subject: [PATCH] Access pages with stored order per default (#1987) Fix for
toggle-text of enable-sort button on shelf page
---
cps/static/js/main.js | 2 +-
cps/templates/detail.html | 8 ++++----
cps/templates/grid.html | 4 ++--
cps/templates/list.html | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/cps/static/js/main.js b/cps/static/js/main.js
index 927b65ac..ca9f3e14 100644
--- a/cps/static/js/main.js
+++ b/cps/static/js/main.js
@@ -533,7 +533,7 @@ $(function() {
$("#pub_new").toggleClass("disabled");
$("#pub_old").toggleClass("disabled");
var alternative_text = $("#toggle_order_shelf").data('alt-text');
- $("#toggle_order_shelf")[0].attributes['data-alt-text'].value = $("#toggle_order_shelf").html();
+ $("#toggle_order_shelf").data('alt-text', $("#toggle_order_shelf").html());
$("#toggle_order_shelf").html(alternative_text);
});
diff --git a/cps/templates/detail.html b/cps/templates/detail.html
index 342cce53..5b1f2448 100644
--- a/cps/templates/detail.html
+++ b/cps/templates/detail.html
@@ -100,7 +100,7 @@
{{entry.title}}
{% for author in entry.authors %}
- {{author.name.replace('|',',')}}
+ {{author.name.replace('|',',')}}
{% if not loop.last %}
&
{% endif %}
@@ -122,7 +122,7 @@
{% endif %}
{% if entry.series|length > 0 %}
-
{{_('Book')}} {{entry.series_index}} {{_('of')}} {{entry.series[0].name}}
+ {{_('Book')}} {{entry.series_index}} {{_('of')}} {{entry.series[0].name}}
{% endif %}
{% if entry.languages.__len__() > 0 %}
@@ -151,7 +151,7 @@
{% for tag in entry.tags %}
- {{tag.name}}
+ {{tag.name}}
{%endfor%}
@@ -162,7 +162,7 @@
diff --git a/cps/templates/grid.html b/cps/templates/grid.html
index 6b03d89c..1e79c43d 100644
--- a/cps/templates/grid.html
+++ b/cps/templates/grid.html
@@ -27,7 +27,7 @@
{% for entry in entries %}
diff --git a/cps/templates/list.html b/cps/templates/list.html
index 1e171ca5..c68bda10 100644
--- a/cps/templates/list.html
+++ b/cps/templates/list.html
@@ -32,7 +32,7 @@
{% endif %}