{% set oFinishedPromotions = oView.getPromoFinishedList() %} {% set oCurrentPromotions = oView.getPromoCurrentList() %} {% set oFuturePromotions = oView.getPromoFutureList() %} {% set blShowPromotionList = oView.getShowPromotionList() %} {% for iPromoNr, oPromotion in oCurrentPromotions %} {% endfor %} {# TODO Include https://github.com/js-cookie/js-cookie plugin #} {% if oCurrentPromotions|length and blShowPromotionList and oxcmp_user %} {{ script({ include: "js/libs/jquery.cookie.min.js", dynamic: __oxid_include_dynamic }) }} {{ script({ add: " if (window.innerHeight > 1000) {var heightFactor=0.50;} else {var heightFactor=0.75;}; var maxHeightModal = window.innerHeight * heightFactor; $('.modal-content').css({'overflow-y':'auto','height':'auto','max-height':maxHeightModal}); var c4sPromotionCookie = $.cookie('c4sPromotionCookie'); if (!c4sPromotionCookie) { $.cookie('c4sPromotionCookie','yes', {expires: 1, path: '/'}); $('#c4sPromotionsModal').modal(); }", dynamic: __oxid_include_dynamic }) }} {% endif %}