From c0a065f97d6c5ee9a9bf5ead6090c7e8f900552c Mon Sep 17 00:00:00 2001 From: Sanasol Date: Wed, 7 Mar 2018 21:41:05 +0700 Subject: [PATCH] discount change --- project/templates/lilcity/index.html | 5 ++++- web/src/js/modules/popup.js | 6 ++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/project/templates/lilcity/index.html b/project/templates/lilcity/index.html index 6ec88106..53519ea5 100644 --- a/project/templates/lilcity/index.html +++ b/project/templates/lilcity/index.html @@ -440,7 +440,7 @@
{% for school_schedule in school_schedules %}
+ {% block foot %}{% endblock foot %} diff --git a/web/src/js/modules/popup.js b/web/src/js/modules/popup.js index dddd1e32..db9824b1 100644 --- a/web/src/js/modules/popup.js +++ b/web/src/js/modules/popup.js @@ -52,10 +52,9 @@ $(document).ready(function () { $(document).on('change', '[data-day]', function(){ var weekday = $(this).data('day'); var price = $(this).data('price'); - var discount = $(this).data('discount'); if($(this).is(':checked')) { console.log('checked'); - selectedWeekdays[weekday] = {price:price, discount:discount}; + selectedWeekdays[weekday] = {price:price}; } else { console.log('not checked'); delete selectedWeekdays[weekday]; @@ -69,14 +68,13 @@ $(document).ready(function () { var weekdays = [], daysText = [], price = 0, discount = 0; for(var i in selectedWeekdays) { price += parseInt(selectedWeekdays[i].price); - discount += parseInt(selectedWeekdays[i].discount); weekdays.push(i); daysText.push(days[i]); } var text = ''; if(weekdays.length >= 7) { - text = ''+price+' '+(price-discount)+'р.'; + text = ''+price+' '+(price-schoolDiscount)+'р.'; } else { text = price+'p.'; }