General UI review/test

This commit is contained in:
Bernd Bestel
2020-12-19 14:03:28 +01:00
parent 7ef5bc6f77
commit 574d17fa52
15 changed files with 64 additions and 42 deletions

View File

@@ -938,7 +938,7 @@ $(".change-table-columns-visibility-button").on("click", function(e)
data-table-selector="' + dataTableSelector + '" \
data-column-index="-1" \
> \
<label class="custom-control-label" \
<label class="custom-control-label font-italic" \
for="column-rowgroup-none">' + __t("None") + ' \
</label > \
</div>';
@@ -998,10 +998,10 @@ $(".change-table-columns-visibility-button").on("click", function(e)
}
});
var message = '<div class="text-center"><h5>' + __t('Table options') + '</h5><hr><h5>' + __t('Hide/view columns') + '</h5><div class="text-left form-group">' + columnCheckBoxesHtml + '</div></div>';
var message = '<div class="text-center"><h5>' + __t('Table options') + '</h5><hr><h5 class="mb-0">' + __t('Hide/view columns') + '</h5><div class="text-left form-group">' + columnCheckBoxesHtml + '</div></div>';
if (rowGroupDefined)
{
message += '<div class="text-center mt-1"><h5>' + __t('Group by') + '</h5><div class="text-left form-group">' + rowGroupRadioBoxesHtml + '</div></div>';
message += '<div class="text-center mt-1"><h5 class="pt-3 mb-0">' + __t('Group by') + '</h5><div class="text-left form-group">' + rowGroupRadioBoxesHtml + '</div></div>';
}
bootbox.dialog({
@@ -1009,7 +1009,6 @@ $(".change-table-columns-visibility-button").on("click", function(e)
size: 'small',
backdrop: true,
closeButton: false,
onEscape: true,
buttons: {
reset: {
label: __t('Reset'),
@@ -1017,16 +1016,15 @@ $(".change-table-columns-visibility-button").on("click", function(e)
callback: function()
{
bootbox.confirm({
swapButtonOrder: true,
message: __t("Are you sure to reset the table options?"),
buttons: {
confirm: {
label: 'Yes',
className: 'btn-danger'
},
cancel: {
label: 'No',
className: 'btn-primary'
className: 'btn-danger'
},
confirm: {
label: 'Yes',
className: 'btn-success'
}
},
callback: function(result)
@@ -1084,7 +1082,7 @@ $(document).on("click", ".change-table-columns-rowgroup-toggle", function()
dataTable.rowGroup().enable(false);
//remove fixed order
// Remove fixed order
dataTable.order.fixed({});
}
else
@@ -1097,7 +1095,7 @@ $(document).on("click", ".change-table-columns-rowgroup-toggle", function()
dataTable.rowGroup().enable(true);
dataTable.rowGroup().dataSrc(columnIndex);
//apply fixed order for group column
// Apply fixed order for group column
var fixedOrder = {
pre: [columnIndex, 'asc']
};

View File

@@ -76,6 +76,8 @@ Grocy.Components.ProductAmountPicker.AllowAnyQu = function(keepInitialQu = false
Grocy.Components.ProductAmountPicker.SetQuantityUnit($("#qu_id").attr("data-initial-qu-id"));
}
$("#qu_id").removeAttr("disabled");
$(".input-group-productamountpicker").trigger("change");
}

View File

@@ -667,7 +667,7 @@ $(document).on('click', '.recipe-consume-button', function(e)
var servings = $(e.currentTarget).attr('data-mealplan-servings');
bootbox.confirm({
message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "check only if a single unit is in stock" will be ignored)?', objectName),
message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "only check if any amount is in stock" will be ignored)?', objectName),
closeButton: false,
buttons: {
confirm: {

View File

@@ -136,7 +136,7 @@ $('#recipe-pos-form input').keydown(function(event)
}
});
$("#only_check_single_unit_in_stock").on("click", function()
$("#only_check_single_unit_in_stock").on("change", function()
{
if (this.checked)
{

View File

@@ -192,7 +192,7 @@ $(".recipe-consume").on('click', function(e)
var objectId = $(e.currentTarget).attr('data-recipe-id');
bootbox.confirm({
message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "check only if a single unit is in stock" will be ignored)?', objectName),
message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "only check if any amount is in stock" will be ignored)?', objectName),
closeButton: false,
buttons: {
confirm: {

View File

@@ -74,6 +74,8 @@ $("#clear-filter-button").on("click", function()
$("#transaction-type-filter").val("all");
$("#location-filter").val("all");
$("#user-filter").val("all");
$("#product-filter").val("all");
stockJournalTable.column(1).search("").draw();
stockJournalTable.column(4).search("").draw();
stockJournalTable.column(5).search("").draw();
stockJournalTable.column(6).search("").draw();

View File

@@ -62,6 +62,7 @@ $("#clear-filter-button").on("click", function()
$("#transaction-type-filter").val("all");
$("#location-filter").val("all");
$("#user-filter").val("all");
$("#product-filter").val("all");
journalSummaryTable.column(1).search("").draw();
journalSummaryTable.column(2).search("").draw();
journalSummaryTable.column(3).search("").draw();