From 8279bddf4e5f4b01b5645c7b000f064b21ca01bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Sun, 12 Feb 2017 05:59:57 +0100 Subject: [PATCH] clean js k-psul - K-Psul JavaScript uses strict-mode (when JS try to do better things, we should follow) --- kfet/static/kfet/js/kfet.js | 2 +- kfet/templates/kfet/kpsul.html | 35 ++++++++++++++++++---------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/kfet/static/kfet/js/kfet.js b/kfet/static/kfet/js/kfet.js index e3e5a6d9..f2e207d2 100644 --- a/kfet/static/kfet/js/kfet.js +++ b/kfet/static/kfet/js/kfet.js @@ -38,7 +38,7 @@ function amountDisplay(amount, is_cof=false, tri='') { } function amountToUKF(amount, is_cof=false) { - var coef_cof = is_cof ? 1 + settings['subvention_cof'] / 100 : 1; + var coef_cof = is_cof ? 1 + window.settings['subvention_cof'] / 100 : 1; return Math.round(amount * coef_cof * 10); } diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html index fb59060b..1bda6045 100644 --- a/kfet/templates/kfet/kpsul.html +++ b/kfet/templates/kfet/kpsul.html @@ -170,16 +170,17 @@