From 2dcc1b2c40daeb9849c41eb7840df44e49e771cb Mon Sep 17 00:00:00 2001 From: Jon Price Date: Mon, 8 Apr 2013 09:44:00 +1000 Subject: [PATCH] Adjust carousel on the offer list page Fixes #596 --- oscar/static/oscar/js/oscar/ui.js | 9 ++++-- oscar/templates/oscar/offer/detail.html | 2 +- oscar/templates/oscar/offer/list.html | 37 ++++++++++++------------- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/oscar/static/oscar/js/oscar/ui.js b/oscar/static/oscar/js/oscar/ui.js index 153b3066175..e32142e84d5 100644 --- a/oscar/static/oscar/js/oscar/ui.js +++ b/oscar/static/oscar/js/oscar/ui.js @@ -117,9 +117,14 @@ var oscar = (function(o, $) { var gallery = $(this).parent('.rg-thumbs').length; // Don't apply this to the gallery carousel if (gallery <= 0) { + var imageWidth = 175, + minProducts = 4; + if ($(this).hasClass('wide')) { + minProducts = 5; + } $(this).elastislide({ - imageW: 175, - minItems: 4, + imageW: imageWidth, + minItems: minProducts, onClick: function() {return true;} }); } diff --git a/oscar/templates/oscar/offer/detail.html b/oscar/templates/oscar/offer/detail.html index fb39f35d0e5..02027c37ef8 100644 --- a/oscar/templates/oscar/offer/detail.html +++ b/oscar/templates/oscar/offer/detail.html @@ -43,7 +43,7 @@

{% trans "What you need to
{% include "partials/pagination.html" %} -
    +
      {% for product in products %}
    1. {% render_product product %}
    2. {% endfor %} diff --git a/oscar/templates/oscar/offer/list.html b/oscar/templates/oscar/offer/list.html index 1ed16fba394..81dc374fda7 100644 --- a/oscar/templates/oscar/offer/list.html +++ b/oscar/templates/oscar/offer/list.html @@ -25,26 +25,25 @@

      {% trans "There are no site offers at the moment." %}

      {% else %} {% for offer in offers %} -
      -

      {{ offer.name }}

      - {% if offer.description %} -

      {{ offer.description|safe }}

      - {% endif %} - {% if offer.has_products %} - +

      + {% trans "Browse products in offer" %} +

      + {% endif %} +
      {% endfor %} {% endif %} {% endblock content %}