Small different UI improvements

Show the cursor as pointer on stock overview page while hovering the product name cell to highlight that the productcard can be opened
Show a waiting cursor and disable all form inputs while doing background XHR calls to highlight that the user should wait
Place the search field (to search a table) on all pages to the left most place
This commit is contained in:
Bernd Bestel
2018-11-24 19:40:50 +01:00
parent ff341d8547
commit a3617cffb8
31 changed files with 195 additions and 37 deletions

View File

@@ -3,6 +3,7 @@
e.preventDefault();
var jsonForm = $('#consume-form').serializeJSON();
Grocy.FrontendHelpers.BeginUiBusy("consume-form");
if ($("#use_specific_stock_entry").is(":checked"))
{
@@ -34,6 +35,7 @@
$("#use_specific_stock_entry").click();
}
Grocy.FrontendHelpers.EndUiBusy("consume-form");
toastr.success(L('Removed #1 #2 of #3 from stock', jsonForm.amount, Pluralize(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural), productDetails.product.name) + '<br><a class="btn btn-secondary btn-sm mt-2" href="#" onclick="UndoStockBooking(' + result.booking_id + ')"><i class="fas fa-undo"></i> ' + L("Undo") + '</a>');
$('#amount').val(1);
@@ -43,12 +45,14 @@
},
function(xhr)
{
Grocy.FrontendHelpers.EndUiBusy("consume-form");
console.error(xhr);
}
);
},
function(xhr)
{
Grocy.FrontendHelpers.EndUiBusy("consume-form");
console.error(xhr);
}
);
@@ -59,6 +63,7 @@ $('#save-mark-as-open-button').on('click', function(e)
e.preventDefault();
var jsonForm = $('#consume-form').serializeJSON();
Grocy.FrontendHelpers.BeginUiBusy("consume-form");
if ($("#use_specific_stock_entry").is(":checked"))
{
@@ -84,6 +89,7 @@ $('#save-mark-as-open-button').on('click', function(e)
$("#use_specific_stock_entry").click();
}
Grocy.FrontendHelpers.EndUiBusy("consume-form");
toastr.success(L('Marked #1 #2 of #3 as opened', jsonForm.amount, Pluralize(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural), productDetails.product.name) + '<br><a class="btn btn-secondary btn-sm mt-2" href="#" onclick="UndoStockBooking(' + result.booking_id + ')"><i class="fas fa-undo"></i> ' + L("Undo") + '</a>');
$('#amount').val(1);
@@ -93,12 +99,14 @@ $('#save-mark-as-open-button').on('click', function(e)
},
function(xhr)
{
Grocy.FrontendHelpers.EndUiBusy("consume-form");
console.error(xhr);
}
);
},
function(xhr)
{
Grocy.FrontendHelpers.EndUiBusy("consume-form");
console.error(xhr);
}
);