fixes
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 9 Sep 2022 10:13:43 +0000 (12:13 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 9 Sep 2022 10:13:43 +0000 (12:13 +0200)
src/catalogue/static/2022/book/filter.js
src/catalogue/templates/catalogue/2022/book_box.html
src/catalogue/templates/catalogue/preview_ad.html

index e4538ce..15d4e34 100644 (file)
             }, 200);
         }, 200);
     });
-    $("#sort-popular").on('click', function() {
-        $(".l-books__item").each(function() {
-            $(this).css('order', $(this).attr('data-pop'));
-        });
-    });
-    $("#sort-popular").on('click', function() {
-        $(".l-books__item").each(function() {
-            $(this).css('order', $(this).attr('data-pop'));
-        });
-    });
-    
     
 })(jQuery);
index 55f851d..2d2ac05 100644 (file)
@@ -1,6 +1,6 @@
 {% load sorl_thumbnail %}
 
-<article class="l-books__item" data-pop="{{ book.popularity.count }}">
+<article class="l-books__item" data-pop="-{{ book.popularity.count }}">
   <figure class="l-books__item__img" style="height:240px">
     <a href="{{ book.get_absolute_url }}">
       {% if book.is_picture %}
index 0494a8b..33ea773 100644 (file)
@@ -18,7 +18,7 @@
       </a>
     </h3>
     <div>
-      {{ book.description|truncatewords_html:20|safe }}
+      {{ book.abstract|truncatewords_html:20|safe }}
     </div>
   </div>
 {% endif %}