mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Fixed column visibility handling when there is a shadow rowgroup column (fixes #2074)
This commit is contained in:
parent
2ebb9b2cd9
commit
f6e0ff11f1
@ -9,6 +9,7 @@
|
|||||||
### Stock
|
### Stock
|
||||||
|
|
||||||
- Quantity unit conversions now support transitive conversions, means the QU hierarchy has now unlimited levels (thanks a lot @esclear)
|
- Quantity unit conversions now support transitive conversions, means the QU hierarchy has now unlimited levels (thanks a lot @esclear)
|
||||||
|
- Fixed that hiding the "Purchased date" column (table options) on the stock entries page didn't work
|
||||||
|
|
||||||
### Shopping list
|
### Shopping list
|
||||||
|
|
||||||
@ -16,7 +17,7 @@
|
|||||||
|
|
||||||
### Recipes
|
### Recipes
|
||||||
|
|
||||||
- xxx
|
- Fixed that hiding the "Requirements fulfilled" column (table options) on the recipes page didn't work
|
||||||
|
|
||||||
### Meal plan
|
### Meal plan
|
||||||
|
|
||||||
@ -32,7 +33,7 @@
|
|||||||
|
|
||||||
### Tasks
|
### Tasks
|
||||||
|
|
||||||
- xxx
|
- Fixed that hiding the "Category" column (table options) on the tasks page didn't work
|
||||||
|
|
||||||
### Batteries
|
### Batteries
|
||||||
|
|
||||||
|
@ -1029,6 +1029,7 @@ $(".change-table-columns-visibility-button").on("click", function(e)
|
|||||||
dataTable.columns().every(function()
|
dataTable.columns().every(function()
|
||||||
{
|
{
|
||||||
var index = this.index();
|
var index = this.index();
|
||||||
|
var indexForGrouping = index;
|
||||||
var headerCell = $(this.header());
|
var headerCell = $(this.header());
|
||||||
var title = headerCell.text();
|
var title = headerCell.text();
|
||||||
var visible = this.visible();
|
var visible = this.visible();
|
||||||
@ -1041,7 +1042,7 @@ $(".change-table-columns-visibility-button").on("click", function(e)
|
|||||||
var shadowColumnIndex = headerCell.attr("data-shadow-rowgroup-column");
|
var shadowColumnIndex = headerCell.attr("data-shadow-rowgroup-column");
|
||||||
if (shadowColumnIndex)
|
if (shadowColumnIndex)
|
||||||
{
|
{
|
||||||
index = shadowColumnIndex;
|
indexForGrouping = shadowColumnIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
var checked = "checked";
|
var checked = "checked";
|
||||||
@ -1076,12 +1077,12 @@ $(".change-table-columns-visibility-button").on("click", function(e)
|
|||||||
<input ' + rowGroupChecked + ' class="custom-control-input change-table-columns-rowgroup-toggle" \
|
<input ' + rowGroupChecked + ' class="custom-control-input change-table-columns-rowgroup-toggle" \
|
||||||
type="radio" \
|
type="radio" \
|
||||||
name="column-rowgroup" \
|
name="column-rowgroup" \
|
||||||
id="column-rowgroup-' + index.toString() + '" \
|
id="column-rowgroup-' + indexForGrouping.toString() + '" \
|
||||||
data-table-selector="' + dataTableSelector + '" \
|
data-table-selector="' + dataTableSelector + '" \
|
||||||
data-column-index="' + index.toString() + '" \
|
data-column-index="' + indexForGrouping.toString() + '" \
|
||||||
> \
|
> \
|
||||||
<label class="custom-control-label" \
|
<label class="custom-control-label" \
|
||||||
for="column-rowgroup-' + index.toString() + '">' + title + ' \
|
for="column-rowgroup-' + indexForGrouping.toString() + '">' + title + ' \
|
||||||
</label > \
|
</label > \
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user