mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 01:55:47 +00:00
Fixed DataTables numeric/datetime sorting (fixes #1085)
This commit is contained in:
parent
bbad049880
commit
b5fc64cf5d
@ -163,6 +163,7 @@
|
|||||||
- More `config.php` settings (see the section `Component configuration for Quagga2`) to tweak Quagga2 (this is the component used for device camera for barcode scanning) (thanks @andrelam)
|
- More `config.php` settings (see the section `Component configuration for Quagga2`) to tweak Quagga2 (this is the component used for device camera for barcode scanning) (thanks @andrelam)
|
||||||
- Some localization string fixes (thanks @duckfullstop)
|
- Some localization string fixes (thanks @duckfullstop)
|
||||||
- Better error pages
|
- Better error pages
|
||||||
|
- Fixed that numeric and date-time sorting of table columns did not work correctly
|
||||||
- Fixed that XSS / HTML injection was possible through some user input fields (low severity / not really a problem as this could not be abused unauthenticated)
|
- Fixed that XSS / HTML injection was possible through some user input fields (low severity / not really a problem as this could not be abused unauthenticated)
|
||||||
- New translations: (thanks all the translators)
|
- New translations: (thanks all the translators)
|
||||||
- Greek (demo available at https://el.demo.grocy.info)
|
- Greek (demo available at https://el.demo.grocy.info)
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
'order': [[2, 'desc']],
|
'order': [[2, 'desc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
{ 'searchable': false, "targets": 0 }
|
{ 'searchable': false, "targets": 0 },
|
||||||
|
{ "type": "html", "targets": 3 },
|
||||||
|
{ "type": "html", "targets": 4 }
|
||||||
].concat($.fn.dataTable.defaults.columnDefs)
|
].concat($.fn.dataTable.defaults.columnDefs)
|
||||||
});
|
});
|
||||||
$('#batteries-overview-table tbody').removeClass("d-none");
|
$('#batteries-overview-table tbody').removeClass("d-none");
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
'order': [[2, 'desc']],
|
'order': [[2, 'desc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
{ 'searchable': false, "targets": 0 }
|
{ 'searchable': false, "targets": 0 },
|
||||||
|
{ "type": "html", "targets": 5 },
|
||||||
|
{ "type": "html", "targets": 2 },
|
||||||
|
{ "type": "html", "targets": 3 }
|
||||||
].concat($.fn.dataTable.defaults.columnDefs)
|
].concat($.fn.dataTable.defaults.columnDefs)
|
||||||
});
|
});
|
||||||
$('#chores-overview-table tbody').removeClass("d-none");
|
$('#chores-overview-table tbody').removeClass("d-none");
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
{ 'searchable': false, "targets": 0 }
|
{ 'searchable': false, "targets": 0 },
|
||||||
|
{ "type": "html-num-fmt", "targets": 3 }
|
||||||
].concat($.fn.dataTable.defaults.columnDefs)
|
].concat($.fn.dataTable.defaults.columnDefs)
|
||||||
});
|
});
|
||||||
$('#products-table tbody').removeClass("d-none");
|
$('#products-table tbody').removeClass("d-none");
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
{ 'searchable': false, "targets": 0 }
|
{ 'searchable': false, "targets": 0 },
|
||||||
|
{ "type": "html-num-fmt", "targets": 2 },
|
||||||
].concat($.fn.dataTable.defaults.columnDefs),
|
].concat($.fn.dataTable.defaults.columnDefs),
|
||||||
select: {
|
select: {
|
||||||
style: 'single',
|
style: 'single',
|
||||||
|
@ -6,7 +6,8 @@ var shoppingListTable = $('#shoppinglist-table').DataTable({
|
|||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
{ 'searchable': false, "targets": 0 },
|
{ 'searchable': false, "targets": 0 },
|
||||||
{ 'visible': false, 'targets': 3 }
|
{ 'visible': false, 'targets': 3 },
|
||||||
|
{ "type": "num", "targets": 2 }
|
||||||
].concat($.fn.dataTable.defaults.columnDefs),
|
].concat($.fn.dataTable.defaults.columnDefs),
|
||||||
'rowGroup': {
|
'rowGroup': {
|
||||||
enable: true,
|
enable: true,
|
||||||
|
@ -10,7 +10,11 @@
|
|||||||
{ 'visible': false, 'targets': 2 },
|
{ 'visible': false, 'targets': 2 },
|
||||||
{ 'visible': false, 'targets': 4 },
|
{ 'visible': false, 'targets': 4 },
|
||||||
{ 'visible': false, 'targets': 9 },
|
{ 'visible': false, 'targets': 9 },
|
||||||
{ 'visible': false, 'targets': 10 }
|
{ 'visible': false, 'targets': 10 },
|
||||||
|
{ "type": "num", "targets": 3 },
|
||||||
|
{ "type": "html-num-fmt", "targets": 9 },
|
||||||
|
{ "type": "html-num-fmt", "targets": 10 },
|
||||||
|
{ "type": "html", "targets": 5 }
|
||||||
].concat($.fn.dataTable.defaults.columnDefs)
|
].concat($.fn.dataTable.defaults.columnDefs)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
{ 'searchable': false, "targets": 0 },
|
{ 'searchable': false, "targets": 0 },
|
||||||
{ 'visible': false, 'targets': 3 }
|
{ 'visible': false, 'targets': 3 },
|
||||||
|
{ "type": "html", "targets": 2 }
|
||||||
].concat($.fn.dataTable.defaults.columnDefs),
|
].concat($.fn.dataTable.defaults.columnDefs),
|
||||||
'rowGroup': {
|
'rowGroup': {
|
||||||
enable: true,
|
enable: true,
|
||||||
|
@ -231,7 +231,6 @@
|
|||||||
data-product-id="{{ $listItem->product_id }}">
|
data-product-id="{{ $listItem->product_id }}">
|
||||||
@if(!empty($listItem->product_id)) {{ FindObjectInArrayByPropertyValue($products, 'id', $listItem->product_id)->name }}<br>@endif<em>{!! nl2br($listItem->note) !!}</em>
|
@if(!empty($listItem->product_id)) {{ FindObjectInArrayByPropertyValue($products, 'id', $listItem->product_id)->name }}<br>@endif<em>{!! nl2br($listItem->note) !!}</em>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
@if(!empty($listItem->product_id))
|
@if(!empty($listItem->product_id))
|
||||||
@php
|
@php
|
||||||
$listItem->amount_origin_qu = $listItem->amount;
|
$listItem->amount_origin_qu = $listItem->amount;
|
||||||
@ -245,6 +244,7 @@
|
|||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
@endif
|
@endif
|
||||||
|
<td data-order={{ $listItem->amount }}>
|
||||||
<span class="locale-number locale-number-quantity-amount">{{ $listItem->amount }}</span> @if(!empty($listItem->product_id)){{ $__n($listItem->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', $listItem->qu_id)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', $listItem->qu_id)->name_plural) }}@endif
|
<span class="locale-number locale-number-quantity-amount">{{ $listItem->amount }}</span> @if(!empty($listItem->product_id)){{ $__n($listItem->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', $listItem->qu_id)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', $listItem->qu_id)->name_plural) }}@endif
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -305,7 +305,7 @@
|
|||||||
<td>
|
<td>
|
||||||
@if($currentStockEntry->product_group_name !== null){{ $currentStockEntry->product_group_name }}@endif
|
@if($currentStockEntry->product_group_name !== null){{ $currentStockEntry->product_group_name }}@endif
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td data-order={{ $currentStockEntry->amount }}>
|
||||||
<span id="product-{{ $currentStockEntry->product_id }}-amount"
|
<span id="product-{{ $currentStockEntry->product_id }}-amount"
|
||||||
class="locale-number locale-number-quantity-amount">{{ $currentStockEntry->amount }}</span> <span id="product-{{ $currentStockEntry->product_id }}-qu-name">{{ $__n($currentStockEntry->amount, $currentStockEntry->qu_unit_name, $currentStockEntry->qu_unit_name_plural) }}</span>
|
class="locale-number locale-number-quantity-amount">{{ $currentStockEntry->amount }}</span> <span id="product-{{ $currentStockEntry->product_id }}-qu-name">{{ $__n($currentStockEntry->amount, $currentStockEntry->qu_unit_name, $currentStockEntry->qu_unit_name_plural) }}</span>
|
||||||
<span id="product-{{ $currentStockEntry->product_id }}-opened-amount"
|
<span id="product-{{ $currentStockEntry->product_id }}-opened-amount"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user