From 8572589cf9b87a88822eb29cba5014d3c4bb36bd Mon Sep 17 00:00:00 2001
From: Carlos Vega <carlos.vega@uni.lu>
Date: Wed, 22 Apr 2020 19:16:19 +0200
Subject: [PATCH] added integer select that starts from 0

---
 smash/web/static/js/smash.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/smash/web/static/js/smash.js b/smash/web/static/js/smash.js
index 08d14d24..c565a56a 100644
--- a/smash/web/static/js/smash.js
+++ b/smash/web/static/js/smash.js
@@ -328,6 +328,14 @@ function createTable(params) {
         $(this).html('<select style="width:60px" >' + options + '</select>');
     });
 
+    $(tableElement).find('tfoot div[name="from_zero_integer_filter"]').each(function () {
+        var options = '<option value selected="selected">---</option>';
+        for (var i = 0; i < 8; i++) {
+            options += '<option value="' + i + '">' + i + '</option>';
+        }
+        $(this).html('<select style="width:60px" >' + options + '</select>');
+    });
+
     $(tableElement).find('tfoot div[name="voucher_status_filter"]').each(function () {
         $(this).html('<select style="width:60px" ><option value selected="selected">---</option>' +
             '<option value="NEW">NEW</option>' +
-- 
GitLab