From 459f06876576954c023f8e317bea52d858829f14 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 26 Jul 2023 20:59:05 +0200 Subject: [PATCH] bismeldestichtag gui: added icon to delete button, added id field --- public/js/apps/Bismeldestichtag/TabulatorSetup.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/public/js/apps/Bismeldestichtag/TabulatorSetup.js b/public/js/apps/Bismeldestichtag/TabulatorSetup.js index b7da6c1e1..ffc8a6e3a 100644 --- a/public/js/apps/Bismeldestichtag/TabulatorSetup.js +++ b/public/js/apps/Bismeldestichtag/TabulatorSetup.js @@ -22,14 +22,18 @@ export const BismeldestichtagTabulatorOptions = { maxHeight: "100%", minHeight: 50, layout: 'fitColumns', + index: 'meldestichtag_id', columns: [ {title: 'Meldestichtag',field: 'meldestichtag', headerFilter: true, formatter: function(cell){ return BismeldestichtagTabulatorHelperFunctions._formatDate(cell.getValue()); } }, {title: 'Studiensemester', field: 'studiensemester_kurzbz', headerFilter: true}, - {title: 'Löschen', field: 'meldestichtag_id', headerFilter: false, formatter:function(cell){ - return ''; + {title: 'ID', field: 'meldestichtag_id', headerFilter: true, visible: false}, + {title: 'Löschen', field: 'loeschen', headerFilter: false, formatter:function(cell){ + return ''; } } ] @@ -42,8 +46,7 @@ export const BismeldestichtagTabulatorEventHandlers = [ { event: "rowClick", handler: function(e, row) { - if (e.target.nodeName == 'DIV') - { + if (e.target.nodeName == 'DIV') { let data = row.getData(); alert(data.studiensemester_kurzbz + ': ' + BismeldestichtagTabulatorHelperFunctions._formatDate(data.meldestichtag)); } @@ -52,7 +55,7 @@ export const BismeldestichtagTabulatorEventHandlers = [ ]; let BismeldestichtagTabulatorHelperFunctions = { - _formatDate: function(date){ + _formatDate: function(date) { return date.replace(/(.*)-(.*)-(.*)/, '$3.$2.$1'); } }