diff --git a/kfet/templates/kfet/history.html b/kfet/templates/kfet/history.html index 01aaa359..97a0e413 100644 --- a/kfet/templates/kfet/history.html +++ b/kfet/templates/kfet/history.html @@ -62,6 +62,8 @@ $(document).ready(function() { settings = { 'subvention_cof': parseFloat({{ settings.subvention_cof|unlocalize }})} + lock = 0 ; + khistory = new KHistory(); var $from_date = $('#from_date'); @@ -166,7 +168,10 @@ $(document).ready(function() { function confirmCancel(opes_to_cancel) { var nb = opes_to_cancel.length; - var content = nb+" opérations vont être annulées"; + var content = nb+' opération'.pluralize(nb) + +' va'.pluralize(nb, ' vont') + + ' être' + + ' annulée'.pluralize(nb); $.confirm({ title: 'Confirmation', content: content, @@ -180,50 +185,10 @@ $(document).ready(function() { }); } - function requestAuth(data, callback) { - var content = getErrorsHtml(data); - content += '', - $.confirm({ - title: 'Authentification requise', - content: content, - backgroundDismiss: true, - animation:'top', - closeAnimation:'bottom', - keyboardEnabled: true, - confirm: function() { - var password = this.$content.find('input').val(); - callback(password); - }, - onOpen: function() { - var that = this; - this.$content.find('input').on('keypress', function(e) { - if (e.keyCode == 13) - that.$confirmButton.click(); - }); - }, - }); - } - - function getErrorsHtml(data) { - var content = ''; - if ('missing_perms' in data['errors']) { - content += 'Permissions manquantes'; - content += '