From ac61a6e5c6089e7ea0f23de4afe79772050888dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Sat, 20 Aug 2016 21:22:24 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20s=C3=A9lection=20annulation(s)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kfet/models.py | 2 ++ kfet/templates/kfet/kpsul.html | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/kfet/models.py b/kfet/models.py index cbac30f2..fbda4db4 100644 --- a/kfet/models.py +++ b/kfet/models.py @@ -118,6 +118,8 @@ class Account(models.Model): perms.add('kfet.override_frozen_protection') new_balance = self.balance + amount if new_balance < 0 and amount < 0: + print(new_balance) + print(amount) # Retrieving overdraft amount limit if (hasattr(self, 'negative') and self.negative.authz_overdraft_amount is not None): diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html index 46598cee..c4fddb27 100644 --- a/kfet/templates/kfet/kpsul.html +++ b/kfet/templates/kfet/kpsul.html @@ -1028,15 +1028,10 @@ $(document).ready(function() { selected: function(e, ui) { $(ui.selected).each(function() { if ($(this).hasClass('opegroup')) - $(this).siblings('.ope').addClass('ui-selected'); + var opegroup = $(this).attr('data-opegroup'); + $(this).siblings('.ope[data-opegroup='+opegroup+']').addClass('ui-selected'); }); }, - unselected: function(e, ui) { - $(ui.unselected).each(function() { - if ($(this).hasClass('opegroup')) - $(this).siblings('.ope').removeClass('ui-selected'); - }); - } }); $(document).on('keydown', function (e) {